[PATCH] D38682: [LoopInterchange] Fix phi node ordering miscompile.

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 17 12:26:08 PDT 2017


dmgreen added a comment.

I've updated the test to one that will always be profitable to interchange, as the vectoriser can then kick in.



================
Comment at: lib/Transforms/Scalar/LoopInterchange.cpp:1219
   if (InnerLoopHasReduction) {
-    // FIXME: Check if the induction PHI will always be the first PHI.
     BasicBlock *New = InnerLoopHeader->splitBasicBlock(
----------------
fhahn wrote:
> It might be helpful to keep a comment documenting the need for the induction phi to be the first PHI node here (without the FIXME of course)
Good idea.


https://reviews.llvm.org/D38682





More information about the llvm-commits mailing list