diff --git a/mlir/lib/Dialect/SCF/Transforms/BufferizableOpInterfaceImpl.cpp b/mlir/lib/Dialect/SCF/Transforms/BufferizableOpInterfaceImpl.cpp --- a/mlir/lib/Dialect/SCF/Transforms/BufferizableOpInterfaceImpl.cpp +++ b/mlir/lib/Dialect/SCF/Transforms/BufferizableOpInterfaceImpl.cpp @@ -539,8 +539,7 @@ if (bufferRelation(op, opResult, state) != BufferRelation::Equivalent) return yieldOp->emitError() << "Yield operand #" << opResult.getResultNumber() - << " does not bufferize to a buffer that is aliasing the " - "matching enclosing scf::for operand"; + << " is not equivalent to the corresponding iter bbArg"; } return success(); diff --git a/mlir/test/Dialect/Bufferization/Transforms/one-shot-module-bufferize-invalid.mlir b/mlir/test/Dialect/Bufferization/Transforms/one-shot-module-bufferize-invalid.mlir --- a/mlir/test/Dialect/Bufferization/Transforms/one-shot-module-bufferize-invalid.mlir +++ b/mlir/test/Dialect/Bufferization/Transforms/one-shot-module-bufferize-invalid.mlir @@ -99,7 +99,7 @@ // Throw a wrench in the system by swapping yielded values: this result in a // ping-pong of values at each iteration on which we currently want to fail. - // expected-error @+1 {{Yield operand #0 does not bufferize to a buffer that is aliasing}} + // expected-error @+1 {{Yield operand #0 is not equivalent to the corresponding iter bbArg}} scf.yield %ttB, %ttA : tensor, tensor } @@ -122,7 +122,7 @@ %c1 = arith.constant 1 : index %res = scf.for %arg0 = %c0 to %iters step %c1 iter_args(%bbarg = %A) -> (tensor) { %r = func.call @foo(%A) : (tensor) -> (tensor) - // expected-error @+1 {{Yield operand #0 does not bufferize to a buffer that is aliasing}} + // expected-error @+1 {{Yield operand #0 is not equivalent to the corresponding iter bbArg}} scf.yield %r : tensor } call @fun_with_side_effects(%res) : (tensor) -> ()