long a;
int b;
int c;
long d;
void e() {
for (int f = 0; f < b; f++)
d = c > 0 ? a / c : 1;
}
Crash is:
VPIRBasicBlock can only be used as pre-header or a successor of middle-block at the moment!
clang: /root/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:8593: void llvm::LoopVectorizationPlanner::buildVPlansWithVPRecipes(llvm::ElementCount, llvm::ElementCount): Assertion `verifyVPlanIsValid(*Plan) && "VPlan is invalid"' failed.
When I compiled this code with O2, it crashed:
Crash is:
Details can be found here: https://godbolt.org/z/7nhzEWb81