llvm-project
llvm-project copied to clipboard
[Bug][LoopUnrollAndJam] LoopUnrollAndJam calls into ScalarEvolution with out-of-date LoopInfo
LoopUnrollAndJam did not update LoopInfo completely correctly.
The way to reproduce the bug: put a call to LI.verify(DT) at the beginning of ScalarEvolution::createSCEVIter, then run check-llvm-transforms-loopunrollandjam. The following three tests would crash at LoopUnrollAndJam pass.
LLVM :: Transforms/LoopUnrollAndJam/se-forget.ll
LLVM :: Transforms/LoopUnrollAndJam/unroll-and-jam.ll
LLVM :: CodeGen/AArch64/aarch64-unroll-and-jam.ll
Related parent issue: https://github.com/llvm/llvm-project/issues/190682
Currently looking into it for a fix.
Fixed by https://github.com/llvm/llvm-project/pull/191250.