| Issue |
107854
|
| Summary |
LoopVectorize/VPlan asserts "underlying instruction may write to memory" (via PoCL's work-group generation from an OpenCL C code)
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
pjaaskel
|
I cannot reproduce this one from C/C++, but only via PoCL-generated work-group functions which can sometimes be a bit ... involved. Attached is a reproducer .ll, which produces the crash. It originates from an OpenCL C kernel which has a volatile int as the loop iteration variable, which PoCL (currently, this is a WiP to clean up) converts to per-WI variables. It somehow sneaks the loop down to the assert point and then fails because the load is a volatile. I'll try to minimize the test case.
```
opt --passes=loop-vectorize vplan-crash.ll -S -o -
opt: /home/pjaaskel/src/chipStar/llvm-project/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp:80: bool llvm::VPRecipeBase::mayWriteToMemory() const: Assertion `(!I || !I->mayWriteToMemory()) && "underlying instruction may write to memory"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
...
```
[vplan-crash.ll.gz](https://github.com/user-attachments/files/16930255/vplan-crash.ll.gz)
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs