[Mlir-commits] [mlir] [mlir][linalg] Fix EraseIdentityLinalgOp on fill-like ops (PR #130000)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Sun Jun 1 13:53:44 PDT 2025
================
@@ -1304,18 +1305,24 @@ struct EraseIdentityLinalgOp : public OpRewritePattern<OpTy> {
// In the buffer case, we need to check exact buffer equality.
if (linalgOp.hasPureBufferSemantics()) {
- if (linalgOp.getNumDpsInputs() == 1 && linalgOp.getNumDpsInits() == 1 &&
- linalgOp.getDpsInputOperand(0)->get() ==
- linalgOp.getDpsInitOperand(0)->get()) {
- rewriter.eraseOp(linalgOp);
- return success();
- }
- return failure();
+ if (linalgOp.getNumDpsInputs() != 1 || linalgOp.getNumDpsInits() != 1 ||
----------------
MaheshRavishankar wrote:
Please add `{` `}` around multi-line statments here and below.
https://github.com/llvm/llvm-project/pull/130000
More information about the Mlir-commits
mailing list