Issue 109561
Summary [clang] Assertion failed in LoopVectorize
Labels clang
Assignees
Reporter cardigan1008
    When I compiled this code with O2, it crashed:

```c
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.
```

Details can be found here: https://godbolt.org/z/7nhzEWb81
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to