[Mlir-commits] [mlir] [mlir][IR] Add return value to `replaceUsesWithIf` (PR #235748)

Matthias Springer llvmlistbot at llvm.org
Tue Oct 27 06:48:41 PDT 2026


matthias-springer wrote:

I prepared the PR when I saw this code in `SCF.cpp`:

```c++
        rewriter.replaceUsesWithIf(
            selectOp.getResult(), selectOp.getTrueValue(),
            [&](OpOperand &selectUse) {
              bool inThen =
                  getParentType(selectUse.getOwner()->getParentRegion(), op,
                                cache, op.getCondition().getParentRegion()) ==
                  Parent::Then;
              changed |= inThen;
              return inThen;
            });
```

Updating the commit message.

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


More information about the Mlir-commits mailing list