1// RUN: mlir-opt %s -test-func-erase-result -split-input-file | FileCheck %s 2 3// CHECK: func private @f(){{$}} 4// CHECK-NOT: attributes{{.*}}result 5func.func private @f() -> (f32 {test.erase_this_result}) 6 7// ----- 8 9// CHECK: func private @f() -> (f32 {test.A}) 10// CHECK-NOT: attributes{{.*}}result 11func.func private @f() -> ( 12 f32 {test.erase_this_result}, 13 f32 {test.A} 14) 15 16// ----- 17 18// CHECK: func private @f() -> (f32 {test.A}) 19// CHECK-NOT: attributes{{.*}}result 20func.func private @f() -> ( 21 f32 {test.A}, 22 f32 {test.erase_this_result} 23) 24 25// ----- 26 27// CHECK: func private @f() -> (f32 {test.A}, f32 {test.B}) 28// CHECK-NOT: attributes{{.*}}result 29func.func private @f() -> ( 30 f32 {test.A}, 31 f32 {test.erase_this_result}, 32 f32 {test.B} 33) 34 35// ----- 36 37// CHECK: func private @f() -> (f32 {test.A}, f32 {test.B}) 38// CHECK-NOT: attributes{{.*}}result 39func.func private @f() -> ( 40 f32 {test.A}, 41 f32 {test.erase_this_result}, 42 f32 {test.erase_this_result}, 43 f32 {test.B} 44) 45 46// ----- 47 48// CHECK: func private @f() -> (f32 {test.A}, f32 {test.B}, f32 {test.C}) 49// CHECK-NOT: attributes{{.*}}result 50func.func private @f() -> ( 51 f32 {test.A}, 52 f32 {test.erase_this_result}, 53 f32 {test.B}, 54 f32 {test.erase_this_result}, 55 f32 {test.C} 56) 57 58// ----- 59 60// CHECK: func private @f() -> (tensor<1xf32>, tensor<2xf32>, tensor<3xf32>) 61// CHECK-NOT: attributes{{.*}}result 62func.func private @f() -> ( 63 tensor<1xf32>, 64 f32 {test.erase_this_result}, 65 tensor<2xf32>, 66 f32 {test.erase_this_result}, 67 tensor<3xf32> 68) 69