llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

[Bug][LoopUnrollAndJam] LoopUnrollAndJam calls into ScalarEvolution with out-of-date LoopInfo

Open CongzheUalberta opened this issue 8 months ago • 2 comments

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

CongzheUalberta avatar Apr 06 '26 20:04 CongzheUalberta

Currently looking into it for a fix.

CongzheUalberta avatar Apr 06 '26 20:04 CongzheUalberta

Fixed by https://github.com/llvm/llvm-project/pull/191250.

CongzheUalberta avatar Apr 10 '26 17:04 CongzheUalberta