[Mlir-commits] [mlir] [MLIR] Preserve operand segment sizes when removing dead inputs (PR #223154)

Matthias Springer llvmlistbot at llvm.org
Sat Sep 12 18:45:22 PDT 2026


================
@@ -923,7 +923,7 @@ struct RemoveDeadRegionBranchOpSuccessorInputs : public RewritePattern {
     for (auto &pair : operandsToRemove) {
       Operation *op = pair.first;
       BitVector &operands = pair.second;
-      rewriter.modifyOpInPlace(op, [&]() { op->eraseOperands(operands); });
+      rewriter.modifyOpInPlace(op, [&]() { eraseOperands(op, operands); });
----------------
matthias-springer wrote:

As you're fixing this, can you also use this new helper function in `RemoveDeadValues.cpp`? This should probably go through the helper: `o.op->eraseOperands(o.nonLive);`

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


More information about the Mlir-commits mailing list