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