16 lines · plain
1// RUN: mlir-opt %s --test-side-effects --verify-diagnostics2 3func.func @test_side_effects(%arg0: memref<8xf32>) {4 // expected-remark @below {{operation has no memory effects}}5 %c0 = arith.constant 0 : index6 // expected-remark @below {{operation has no memory effects}}7 %c4 = arith.constant 4 : index8 // expected-remark @below {{operation has no memory effects}}9 %cst = arith.constant 0.0 : f3210 // expected-remark @below {{found an instance of 'read' on op operand 0, on resource '<Default>'}}11 %0 = vector.transfer_read %arg0[%c0], %cst : memref<8xf32>, vector<4xf32>12 // expected-remark @below {{found an instance of 'write' on op operand 1, on resource '<Default>'}}13 vector.transfer_write %0, %arg0[%c4] : vector<4xf32>, memref<8xf32>14 return15}16