[Mlir-commits] [mlir] [mlir] Fix RemoveDeadRegionBranchOpSuccessorInputs producing invalid scf.for (LoopLikeOpInterface tie) (PR #216627)

Maksim Levental llvmlistbot at llvm.org
Mon Aug 17 09:57:21 PDT 2026


================
@@ -3733,7 +3756,7 @@ void WhileOp::getCanonicalizationPatterns(RewritePatternSet &results,
   results.add<WhileConditionTruth, WhileCmpCond, WhileOpAlignBeforeArgs,
               WhileMoveIfDown>(context);
   populateRegionBranchOpInterfaceCanonicalizationPatterns(
-      results, WhileOp::getOperationName());
+      results, WhileOp::getOperationName(), addLoopLikeStructuralTies);
----------------
makslevental wrote:

overzealous bot - `scf.while` isn't affected because `WhileOp::getSuccessorRegions` does no pruning and `ConditionOp::getMutableSuccessorOperands` always forwards all operands. Removed.

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


More information about the Mlir-commits mailing list