[Mlir-commits] [mlir] [mlir][bufferization]-Refactor findValueInReverseUseDefChain to accept opOperand (PR #121304)

Matthias Springer llvmlistbot at llvm.org
Mon Dec 30 07:57:21 PST 2024


================
@@ -155,10 +155,8 @@ LogicalResult mlir::bufferization::eliminateEmptyTensors(
           visitedOpOperands, [&emptyTensorOp](OpOperand *opOperand) {
             return llvm::count(emptyTensorOp->getUses(), *opOperand);
           });
-      // This could be achieved when a use of `emptyTensorOp` is being
-      // consumed by `SubsetInsertionOpInterface`'s source directly.
-      if (iter == visitedOpOperands.end())
-        continue;
+
+      assert(iter != visitedOpOperands.end());
----------------
matthias-springer wrote:

add error message: `assert(... && "could not find use");`

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


More information about the Mlir-commits mailing list