[Mlir-commits] [mlir] [mlir][scf] Fix WhileMoveIfDown with duplicated scf.condition operands (PR #219458)
Ming Yan
llvmlistbot at llvm.org
Sat Sep 5 10:30:05 PDT 2026
================
----------------
NexMing wrote:
The root cause is that replaceAllUsesWith(ifResult, elseValue) replaces unexpected def-use chains. We can instead specify that only the expected def-use chain should be replaced.
```
unsigned idxCapture = idx;
rewriter.modifyOpInPlace(conditionOp, [&] {
conditionOp.getArgsMutable()[idxCapture].assign(elseValue);
});
```
https://github.com/llvm/llvm-project/pull/219458
More information about the Mlir-commits
mailing list