xref: /llvm-project/mlir/test/Dialect/Bufferization/side-effects.mlir (revision 2c1ae801e1b66a09a15028ae4ba614e0911eec00)
1// RUN: mlir-opt %s --test-side-effects --verify-diagnostics
2
3func.func @test_side_effects(%arg0: memref<2xi32>) -> memref<2xi32> {
4  // expected-remark @below {{found an instance of 'read' on a op operand, on resource '<Default>'}}
5  // expected-remark @below {{found an instance of 'write' on a op result, on resource '<Default>'}}
6  // expected-remark @below {{found an instance of 'allocate' on a op result, on resource '<Default>'}}
7  %0 = bufferization.clone %arg0 : memref<2xi32> to memref<2xi32>
8  return %0 : memref<2xi32>
9}
10