[llvm] [LoopPeel] LCSSA form is destroyed by LoopPeel, preserve it (PR #78696)
Manish Kausik H via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 16 08:27:34 PST 2024
Nirhar wrote:
Hey @nikic! @vedantparanjape-amd has identified the point where LCSSA is broken in this comment here: https://github.com/llvm/llvm-project/pull/78696#issuecomment-1922047879
TLDR; LCSSA is broken in the function
https://github.com/llvm/llvm-project/blob/0b1c25c995cdc3e60fcbb8e0b8ff01adf9061fa6/llvm/lib/Transforms/Utils/LoopUnroll.cpp#L215,
which gets called after the first peel.
In particular the LCSSA is broken at this point:
https://github.com/llvm/llvm-project/blob/0b1c25c995cdc3e60fcbb8e0b8ff01adf9061fa6/llvm/lib/Transforms/Utils/LoopUnroll.cpp#L224,
which does the transformation as shown in the last diagram of this comment:
https://github.com/llvm/llvm-project/pull/78696#issuecomment-1904541196
Now we are unaware if such a transformation is expected of `simplifyLoopIV` and if it is also expected to maintain LCSSA.
https://github.com/llvm/llvm-project/pull/78696
More information about the llvm-commits
mailing list