blob: 841490e9f323444f7f0160cc462c6b61ab5156db [file] [log] [blame]
Martin Erhart254d1392023-08-09 10:24:531// RUN: mlir-opt %s --test-side-effects --verify-diagnostics
2
3func.func @test_side_effects(%arg0: memref<2xi32>) -> memref<2xi32> {
donald chen2c1ae8012024-06-19 14:10:344 // 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>'}}
Martin Erhart254d1392023-08-09 10:24:537 %0 = bufferization.clone %arg0 : memref<2xi32> to memref<2xi32>
Martin Erhart254d1392023-08-09 10:24:538 return %0 : memref<2xi32>
9}