[llvm] [LoopPeel] LCSSA form is destroyed by LoopPeel, preserve it (PR #78696)

Vedant Paranjape via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 1 02:10:12 PST 2024


vedantparanjape-amd wrote:

> Can you please explain in what way LCSSA form gets broken? How does the IR look like after peeling but before simplification?
> 
> Just calling formLCSSARecursively() is of course correct, but it's better to understand why LCSSA gets broken and whether we can fix it incrementally instead.

Actually the issue seems something else imo, the Peeled Loop seems bogus, it just adds blocks with unconditional branch instructions, the loop it seems to evaluate is `Loop at depth 2 containing: %bb12<header><latch><exiting>` which is a loop with no blocks and also infinite. Maybe we need to stop loop peeling in such cases.

https://github.com/llvm/llvm-project/pull/78696


More information about the llvm-commits mailing list