[PATCH] D46198: [LoopInterchange] Move PHI handling to adjustLoopBranches.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 17 10:20:24 PDT 2018


fhahn added inline comments.


================
Comment at: lib/Transforms/Scalar/LoopInterchange.cpp:1467
+      if (InnerLoop->contains(InBB) ||
+          isa<PHINode>(PHI->getIncomingValueForBlock(InBB)))
+        continue;
----------------
efriedma wrote:
> This `isa<PHINode>` check seems weird; do you care whether it's specifically a reduction PHI node?
> 
> 
Thanks Eli! 

Yes I think it misses that case when there is an instruction between the outer loop reduction PHI and the corresponding PHI node in the inner loop. I think I can get rid of this check in this patch and add something to D43245, as D43245 also relaxes the restrictions to allow such nodes.


https://reviews.llvm.org/D46198





More information about the llvm-commits mailing list