[llvm] [LoopInterchange] Assertion failure when a preheader BB has PHI nodes (PR #196691)

Ryotaro Kasuga via llvm-commits llvm-commits at lists.llvm.org
Mon May 11 00:55:54 PDT 2026


================
@@ -2019,6 +2019,19 @@ bool LoopInterchangeTransform::transform(
   // instructions outside the loop nest.
   BasicBlock *InnerLoopPreHeader = InnerLoop->getLoopPreheader();
   BasicBlock *OuterLoopHeader = OuterLoop->getHeader();
+
+  // check if there are any Single path Phi Nodes in InnerLoop-Pre Header
----------------
kasuga-fj wrote:

```suggestion
  // Check if there are any single path Phi nodes in the inner loop preheader.
```

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


More information about the llvm-commits mailing list