Files
llvm-project/llvm/lib/Transforms/Utils/LoopUnrollAndJam.cpp
Congzhe c801f0c797 [LoopUnrollAndJam] Fix out-of-date LoopInfo being used during unroll and jam (#191250)
Fixed issue #190671, where loop unroll and jam did not update LoopInfo
entirely correctly.

Invalid LoopInfo gets passed into `simplifyLoopAfterUnroll()` and is
further called by SCEV at the beginning of
`ScalarEvolution::createSCEVIter()`, which triggered hidden bugs. To
fix, updated LoopInfo correctly before its use.

The loop blocks that `simplifyLoopAfterUnroll()` iterates
through, will become unavailable after the LoopInfo update. Therefore we
store the loop blocks beforehand for its use in
`simplifyLoopAfterUnroll()` later.
2026-04-10 13:16:50 -04:00

38 KiB