Files
llvm-project/llvm/lib/Transforms/Scalar/LoopBoundSplit.cpp
Congzhe Cao fa44ca8e5e [LoopBoundSplit] Fix edge connections during transformation (#192106)
Fixed #190672. 

The issue is caused by invalid intermediate IR when `getSCEV()` is
called during transformation: the exiting block of `pre-loop` did not
re-connect to preheader of the `post-loop`, causing `LI.verify()`
unable to correctly recompute another LoopInfo for verification. 
To fix, reconnect the edge earlier before calling `getSCEV()`.

Also moved the DT updates to more appropriate places right after IR 
control flow has changed. and added a few LI and DT verifications to 
improve robustness of the pass.
2026-04-16 18:00:32 -04:00

17 KiB