[PATCH] D102615: [LoopDeletion] Break backedge if we can prove that the loop is exited on 1st iteration

Mikael Holmén via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 26 03:54:10 PDT 2021


uabelho added a comment.

In D102615#2781550 <https://reviews.llvm.org/D102615#2781550>, @mkazantsev wrote:

> @uabelho you are right. The problem is loop RPOT processes blocks in order (bb2, bb12, bb4), which is not correct. The expected order is (bb2, bb4, bb12). No clue why this happened, investigating.

Thanks!

I tried testing the transform in Alive2, but I think it doesn't like the recursive call in the input. So then I simplified the input and removed the call and then Alive2 says the transformation done by loop-deletion is correct:
https://alive2.llvm.org/ce/z/K8ZJzz

But I still don't agree that it is (e.g. for input 1,1 I think it's incorrect) so I'm not sure what is going on. It's the first time I try to use Alive2 though so I might very well have messed something up.
(I've looked at this function so much now I'm not quite sure about anything anymore :)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102615/new/

https://reviews.llvm.org/D102615



More information about the llvm-commits mailing list