[PATCH] D43245: [LoopInterchange] Support reductions across inner and outer loop.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 7 13:40:31 PST 2018


efriedma added inline comments.


================
Comment at: lib/Transforms/Scalar/LoopInterchange.cpp:689
+          return false;
+      } else if (PHI.getNumIncomingValues() == 2) {
+        // Check if we have a PHI node in the outer loop that has a reduction
----------------
I think "PHI.getNumIncomingValues() == 2" must be true?  If it weren't true, it would imply the loop header had more than two predecessors (and I think you disallow that elsewhere).


https://reviews.llvm.org/D43245





More information about the llvm-commits mailing list