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

[Bug][LoopUnroll] Invalid LoopInfo used during LoopUnroll

Open CongzheUalberta opened this issue 7 months ago • 1 comments

LoopUnroll did not update LoopInfo completely correctly, and invalid loopinfo was passed into simplifyLoopAfterUnroll() during the transformation.

The way to reproduce the bug: put a call to LI.verify(DT) right before the call of simplifyLoopAfterUnroll(L, !CompletelyUnroll && ULO.Count > 1, LI, SE, DT, AC, TTI, AA) inside llvm::UnrollLoop() in llvm/lib/Transforms/Utils/LoopUnroll.cpp, then run check-llvm-transforms-loopunroll.

93 out of the 230 tests would fail likely all due to invalid loopinfo. Therefore, simplifyLoopAfterUnroll() was called with invalid loopinfo passed into it.

Related parent issue: https://github.com/llvm/llvm-project/issues/190682 Related sub-issue: https://github.com/llvm/llvm-project/issues/190671

CongzheUalberta avatar Apr 08 '26 19:04 CongzheUalberta

Working on it for the fix.

CongzheUalberta avatar Apr 08 '26 19:04 CongzheUalberta