bolt/deps/llvm-18.1.8/mlir/test/Dialect/Bufferization/side-effects.mlir

11 lines
585 B
MLIR
Raw Normal View History

2025-02-14 19:21:04 +01:00
// RUN: mlir-opt %s --test-side-effects --verify-diagnostics
func.func @test_side_effects(%arg0: memref<2xi32>) -> memref<2xi32> {
// expected-remark @below {{found an instance of 'read' on a value, on resource '<Default>'}}
// expected-remark @below {{found an instance of 'write' on a value, on resource '<Default>'}}
// expected-remark @below {{found an instance of 'allocate' on a value, on resource '<Default>'}}
%0 = bufferization.clone %arg0 : memref<2xi32> to memref<2xi32>
// expected-remark @below {{operation has no memory effects}}
return %0 : memref<2xi32>
}