[llvm] [LoopInterchange] Bail out if outer latch has PHI with more than one incoming values (PR #197675)

Sjoerd Meijer via llvm-commits llvm-commits at lists.llvm.org
Mon May 18 04:14:21 PDT 2026


================
@@ -1421,6 +1421,13 @@ static bool areInnerLoopLatchPHIsSupported(Loop *OuterLoop, Loop *InnerLoop) {
   return true;
 }
 
+/// We currently only support PHI nodes in the outer loop latch if they have a
+/// single incoming value.
+static bool areOuterLoopLatchPHIsSupported(Loop *OuterLoop) {
----------------
sjoerdmeijer wrote:

Nit: I don't mind little helper functions, but this is just a one-liner and that could easily be moved/added to `canInterchangeLoops`. But either way is fine by me. 

https://github.com/llvm/llvm-project/pull/197675


More information about the llvm-commits mailing list