3
3
func.func @concat(%arg0: !fir.ref<!fir.char<1,10>>, %arg1: !fir.ref<!fir.char<1, 20>>) {
4
4
// expected-remark@+1 {{operation has no memory effects}}
5
5
%c30 = arith.constant 30 : index
6
- // expected-remark@+2 {{found an instance of 'allocate' on a op result, on resource '<Default>'}}
7
- // expected-remark@+1 {{found an instance of 'read' on a op operand, on resource '<Default>'}}
6
+ // expected-remark@+3 {{found an instance of 'allocate' on op result 0, on resource '<Default>'}}
7
+ // expected-remark@+2 {{found an instance of 'read' on op operand 0, on resource '<Default>'}}
8
+ // expected-remark@+1 {{found an instance of 'read' on op operand 1, on resource '<Default>'}}
8
9
%0 = hlfir.concat %arg0, %arg1 len %c30 : (!fir.ref<!fir.char<1,10>>, !fir.ref<!fir.char<1,20>>, index) -> (!hlfir.expr<!fir.char<1,30>>)
9
10
return
10
11
}
@@ -16,8 +17,8 @@ func.func @all_no_effects(%arg0: !hlfir.expr<2x!fir.logical<4>>) {
16
17
}
17
18
18
19
func.func @all_effects(%arg0: !fir.ref<!fir.array<2x10x!fir.logical<4>>>, %arg1: i32) {
19
- // expected-remark@+2 {{found an instance of 'allocate' on a op result, on resource '<Default>'}}
20
- // expected-remark@+1 {{found an instance of 'read' on a op operand, on resource '<Default>'}}
20
+ // expected-remark@+2 {{found an instance of 'allocate' on op result 0 , on resource '<Default>'}}
21
+ // expected-remark@+1 {{found an instance of 'read' on op operand 0 , on resource '<Default>'}}
21
22
%all = hlfir.all %arg0 dim %arg1 : (!fir.ref<!fir.array<2x10x!fir.logical<4>>>, i32) -> !hlfir.expr<?x!fir.logical<4>>
22
23
return
23
24
}
@@ -29,8 +30,8 @@ func.func @any_no_effects(%arg0: !hlfir.expr<2x!fir.logical<4>>) {
29
30
}
30
31
31
32
func.func @any_effects(%arg0: !fir.ref<!fir.array<2x10x!fir.logical<4>>>, %arg1: i32) {
32
- // expected-remark@+2 {{found an instance of 'allocate' on a op result, on resource '<Default>'}}
33
- // expected-remark@+1 {{found an instance of 'read' on a op operand, on resource '<Default>'}}
33
+ // expected-remark@+2 {{found an instance of 'allocate' on op result 0 , on resource '<Default>'}}
34
+ // expected-remark@+1 {{found an instance of 'read' on op operand 0 , on resource '<Default>'}}
34
35
%all = hlfir.any %arg0 dim %arg1 : (!fir.ref<!fir.array<2x10x!fir.logical<4>>>, i32) -> !hlfir.expr<?x!fir.logical<4>>
35
36
return
36
37
}
@@ -42,7 +43,7 @@ func.func @count_no_effects(%arg0: !hlfir.expr<2x!fir.logical<4>>) {
42
43
}
43
44
44
45
func.func @count_effects(%arg0: !fir.ref<!fir.array<2x10x!fir.logical<4>>>, %arg1: i32) {
45
- // expected-remark@+1 {{found an instance of 'read' on a op operand, on resource '<Default>'}}
46
+ // expected-remark@+1 {{found an instance of 'read' on op operand 0 , on resource '<Default>'}}
46
47
%all = hlfir.count %arg0 dim %arg1 : (!fir.ref<!fir.array<2x10x!fir.logical<4>>>, i32) -> i32
47
48
return
48
49
}
@@ -54,15 +55,15 @@ func.func @product_no_effects(%arg0: !hlfir.expr<?xf32>) {
54
55
}
55
56
56
57
func.func @product_effects(%arg0: !fir.ref<!fir.array<2x2xf32>>, %arg1: i32) {
57
- // expected-remark@+2 {{found an instance of 'allocate' on a op result, on resource '<Default>'}}
58
- // expected-remark@+1 {{found an instance of 'read' on a op operand, on resource '<Default>'}}
58
+ // expected-remark@+2 {{found an instance of 'allocate' on op result 0 , on resource '<Default>'}}
59
+ // expected-remark@+1 {{found an instance of 'read' on op operand 0 , on resource '<Default>'}}
59
60
%product = hlfir.product %arg0 dim %arg1 : (!fir.ref<!fir.array<2x2xf32>>, i32) -> !hlfir.expr<2xf32>
60
61
return
61
62
}
62
63
63
64
func.func @set_length_read(%arg0: !fir.ref<!fir.char<1,10>>, %arg1: index) {
64
- // expected-remark@+2 {{found an instance of 'allocate' on a op result, on resource '<Default>'}}
65
- // expected-remark@+1 {{found an instance of 'read' on a op operand, on resource '<Default>'}}
65
+ // expected-remark@+2 {{found an instance of 'allocate' on op result 0 , on resource '<Default>'}}
66
+ // expected-remark@+1 {{found an instance of 'read' on op operand 0 , on resource '<Default>'}}
66
67
%0 = hlfir.set_length %arg0 len %arg1 : (!fir.ref<!fir.char<1,10>>, index) -> !hlfir.expr<!fir.char<1,?>>
67
68
return
68
69
}
@@ -74,8 +75,8 @@ func.func @sum_no_effects(%arg0: !hlfir.expr<?xf32>) {
74
75
}
75
76
76
77
func.func @sum_effects(%arg0: !fir.ref<!fir.array<2x2xf32>>, %arg1: i32) {
77
- // expected-remark@+2 {{found an instance of 'allocate' on a op result, on resource '<Default>'}}
78
- // expected-remark@+1 {{found an instance of 'read' on a op operand, on resource '<Default>'}}
78
+ // expected-remark@+2 {{found an instance of 'allocate' on op result 0 , on resource '<Default>'}}
79
+ // expected-remark@+1 {{found an instance of 'read' on op operand 0 , on resource '<Default>'}}
79
80
%sum = hlfir.sum %arg0 dim %arg1 : (!fir.ref<!fir.array<2x2xf32>>, i32) -> !hlfir.expr<2xf32>
80
81
return
81
82
}
@@ -87,8 +88,8 @@ func.func @maxval_no_effects(%arg0: !hlfir.expr<?xf32>) {
87
88
}
88
89
89
90
func.func @maxval_effects(%arg0: !fir.ref<!fir.array<2x2xf32>>, %arg1: i32) {
90
- // expected-remark@+2 {{found an instance of 'allocate' on a op result, on resource '<Default>'}}
91
- // expected-remark@+1 {{found an instance of 'read' on a op operand, on resource '<Default>'}}
91
+ // expected-remark@+2 {{found an instance of 'allocate' on op result 0 , on resource '<Default>'}}
92
+ // expected-remark@+1 {{found an instance of 'read' on op operand 0 , on resource '<Default>'}}
92
93
%maxval = hlfir.maxval %arg0 dim %arg1 : (!fir.ref<!fir.array<2x2xf32>>, i32) -> !hlfir.expr<2xf32>
93
94
return
94
95
}
@@ -100,34 +101,34 @@ func.func @minval_no_effects(%arg0: !hlfir.expr<?xf32>) {
100
101
}
101
102
102
103
func.func @minval_effects(%arg0: !fir.ref<!fir.array<2x2xf32>>, %arg1: i32) {
103
- // expected-remark@+2 {{found an instance of 'allocate' on a op result, on resource '<Default>'}}
104
- // expected-remark@+1 {{found an instance of 'read' on a op operand, on resource '<Default>'}}
104
+ // expected-remark@+2 {{found an instance of 'allocate' on op result 0 , on resource '<Default>'}}
105
+ // expected-remark@+1 {{found an instance of 'read' on op operand 0 , on resource '<Default>'}}
105
106
%minval = hlfir.minval %arg0 dim %arg1 : (!fir.ref<!fir.array<2x2xf32>>, i32) -> !hlfir.expr<2xf32>
106
107
return
107
108
}
108
109
109
110
func.func @minloc_effects_simple(%arg0: !hlfir.expr<?xf32>) {
110
- // expected-remark@+1 {{found an instance of 'allocate' on a op result, on resource '<Default>'}}
111
+ // expected-remark@+1 {{found an instance of 'allocate' on op result 0 , on resource '<Default>'}}
111
112
%minloc = hlfir.minloc %arg0 : (!hlfir.expr<?xf32>) -> !hlfir.expr<?xi32>
112
113
return
113
114
}
114
115
115
116
func.func @minloc_effects(%arg0: !fir.ref<!fir.array<2x2xf32>>, %arg1: i32) {
116
- // expected-remark@+2 {{found an instance of 'allocate' on a op result, on resource '<Default>'}}
117
- // expected-remark@+1 {{found an instance of 'read' on a op operand, on resource '<Default>'}}
117
+ // expected-remark@+2 {{found an instance of 'allocate' on op result 0 , on resource '<Default>'}}
118
+ // expected-remark@+1 {{found an instance of 'read' on op operand 0 , on resource '<Default>'}}
118
119
%minloc = hlfir.minloc %arg0 dim %arg1 : (!fir.ref<!fir.array<2x2xf32>>, i32) -> !hlfir.expr<2xi32>
119
120
return
120
121
}
121
122
122
123
func.func @maxloc_effects_simple(%arg0: !hlfir.expr<?xf32>) {
123
- // expected-remark@+1 {{found an instance of 'allocate' on a op result, on resource '<Default>'}}
124
+ // expected-remark@+1 {{found an instance of 'allocate' on op result 0 , on resource '<Default>'}}
124
125
%maxloc = hlfir.maxloc %arg0 : (!hlfir.expr<?xf32>) -> !hlfir.expr<?xi32>
125
126
return
126
127
}
127
128
128
129
func.func @maxloc_effects(%arg0: !fir.ref<!fir.array<2x2xf32>>, %arg1: i32) {
129
- // expected-remark@+2 {{found an instance of 'allocate' on a op result, on resource '<Default>'}}
130
- // expected-remark@+1 {{found an instance of 'read' on a op operand, on resource '<Default>'}}
130
+ // expected-remark@+2 {{found an instance of 'allocate' on op result 0 , on resource '<Default>'}}
131
+ // expected-remark@+1 {{found an instance of 'read' on op operand 0 , on resource '<Default>'}}
131
132
%maxloc = hlfir.maxloc %arg0 dim %arg1 : (!fir.ref<!fir.array<2x2xf32>>, i32) -> !hlfir.expr<2xi32>
132
133
return
133
134
}
@@ -139,49 +140,49 @@ func.func @dot_product_no_effects(%arg0: !hlfir.expr<?xf32>, %arg1: !hlfir.expr<
139
140
}
140
141
141
142
func.func @dot_product_effects(%arg0: !fir.ref<!fir.array<10xf32>>, %arg1: !fir.ref<!fir.array<10xf32>>) {
142
- // there are read effects on both arguments - the diagnostic verification just doesn't register duplicate identical diagnostics
143
- // expected-remark@+1 {{found an instance of 'read' on a op operand, on resource '<Default>'}}
143
+ // expected-remark@+2 {{found an instance of 'read' on op operand 0, on resource '<Default>'}}
144
+ // expected-remark@+1 {{found an instance of 'read' on op operand 1 , on resource '<Default>'}}
144
145
%0 = hlfir.dot_product %arg0 %arg1 : (!fir.ref<!fir.array<10xf32>>, !fir.ref<!fir.array<10xf32>>) -> f32
145
146
return
146
147
}
147
148
148
149
func.func @matmul_no_reads(%arg0: !hlfir.expr<?x?xf32>, %arg1: !hlfir.expr<?x?xf32>) {
149
- // expected-remark@+1 {{found an instance of 'allocate' on a op result, on resource '<Default>'}}
150
+ // expected-remark@+1 {{found an instance of 'allocate' on op result 0 , on resource '<Default>'}}
150
151
%0 = hlfir.matmul %arg0 %arg1 : (!hlfir.expr<?x?xf32>, !hlfir.expr<?x?xf32>) -> !hlfir.expr<?x?xf32>
151
152
return
152
153
}
153
154
154
155
func.func @matmul_reads(%arg0: !fir.ref<!fir.array<10x5xf32>>, %arg1: !fir.ref<!fir.array<5x10xf32>>) {
155
- // expected-remark@+3 {{found an instance of 'allocate' on a op result, on resource '<Default>'}}
156
- // there are read effects on both arguments - the diagnostic verification just doesn't register duplicate identical diagnostics
157
- // expected-remark@+1 {{found an instance of 'read' on a op operand, on resource '<Default>'}}
156
+ // expected-remark@+3 {{found an instance of 'allocate' on op result 0 , on resource '<Default>'}}
157
+ // expected-remark@+2 {{found an instance of 'read' on op operand 0, on resource '<Default>'}}
158
+ // expected-remark@+1 {{found an instance of 'read' on op operand 1 , on resource '<Default>'}}
158
159
%0 = hlfir.matmul %arg0 %arg1 : (!fir.ref<!fir.array<10x5xf32>>, !fir.ref<!fir.array<5x10xf32>>) -> !hlfir.expr<10x10xf32>
159
160
return
160
161
}
161
162
162
163
func.func @transpose_no_reads(%arg0: !hlfir.expr<?x?xf32>) {
163
- // expected-remark@+1 {{found an instance of 'allocate' on a op result, on resource '<Default>'}}
164
+ // expected-remark@+1 {{found an instance of 'allocate' on op result 0 , on resource '<Default>'}}
164
165
%0 = hlfir.transpose %arg0 : (!hlfir.expr<?x?xf32>) -> !hlfir.expr<?x?xf32>
165
166
return
166
167
}
167
168
168
169
func.func @transpose_read(%arg0: !fir.ref<!fir.array<10x5xf32>>) {
169
- // expected-remark@+2 {{found an instance of 'allocate' on a op result, on resource '<Default>'}}
170
- // expected-remark@+1 {{found an instance of 'read' on a op operand, on resource '<Default>'}}
170
+ // expected-remark@+2 {{found an instance of 'allocate' on op result 0 , on resource '<Default>'}}
171
+ // expected-remark@+1 {{found an instance of 'read' on op operand 0 , on resource '<Default>'}}
171
172
%0 = hlfir.transpose %arg0 : (!fir.ref<!fir.array<10x5xf32>>) -> !hlfir.expr<5x10xf32>
172
173
return
173
174
}
174
175
175
176
func.func @matmul_transpose_no_reads(%arg0: !hlfir.expr<?x?xf32>, %arg1: !hlfir.expr<?x?xf32>) {
176
- // expected-remark@+1 {{found an instance of 'allocate' on a op result, on resource '<Default>'}}
177
+ // expected-remark@+1 {{found an instance of 'allocate' on op result 0 , on resource '<Default>'}}
177
178
%0 = hlfir.matmul_transpose %arg0 %arg1 : (!hlfir.expr<?x?xf32>, !hlfir.expr<?x?xf32>) -> !hlfir.expr<?x?xf32>
178
179
return
179
180
}
180
181
181
182
func.func @matmul_transpose_reads(%arg0: !fir.ref<!fir.array<5x10xf32>>, %arg1: !fir.ref<!fir.array<5x10xf32>>) {
182
- // expected-remark@+3 {{found an instance of 'allocate' on a op result, on resource '<Default>'}}
183
- // there are read effects on both arguments - the diagnostic verification just doesn't register duplicate identical diagnostics
184
- // expected-remark@+1 {{found an instance of 'read' on a op operand, on resource '<Default>'}}
183
+ // expected-remark@+3 {{found an instance of 'allocate' on op result 0 , on resource '<Default>'}}
184
+ // expected-remark@+2 {{found an instance of 'read' on op operand 0, on resource '<Default>'}}
185
+ // expected-remark@+1 {{found an instance of 'read' on op operand 1 , on resource '<Default>'}}
185
186
%0 = hlfir.matmul_transpose %arg0 %arg1 : (!fir.ref<!fir.array<5x10xf32>>, !fir.ref<!fir.array<5x10xf32>>) -> !hlfir.expr<10x10xf32>
186
187
return
187
188
}
@@ -195,37 +196,37 @@ func.func @associate(%arg0: i32) {
195
196
}
196
197
197
198
func.func @as_expr_read(%arg0: !fir.ref<!fir.array<2xi32>>) {
198
- // expected-remark@+2 {{found an instance of 'allocate' on a op result, on resource '<Default>'}}
199
- // expected-remark@+1 {{found an instance of 'read' on a op operand, on resource '<Default>'}}
199
+ // expected-remark@+2 {{found an instance of 'allocate' on op result 0 , on resource '<Default>'}}
200
+ // expected-remark@+1 {{found an instance of 'read' on op operand 0 , on resource '<Default>'}}
200
201
%0 = hlfir.as_expr %arg0 : (!fir.ref<!fir.array<2xi32>>) -> !hlfir.expr<?xi32>
201
202
// expected-remark@+1 {{found an instance of 'free' on resource '<Default>'}}
202
203
hlfir.destroy %0 : !hlfir.expr<?xi32>
203
204
return
204
205
}
205
206
206
207
func.func @char_extremum(%arg0: !fir.ref<!fir.char<1,10>>, %arg1: !fir.ref<!fir.char<1,20>>) {
207
- // expected-remark@+3 {{found an instance of 'allocate' on a op result, on resource '<Default>'}}
208
- // there are read effects on both arguments - the diagnostic verification just doesn't register duplicate identical diagnostics
209
- // expected-remark@+1 {{found an instance of 'read' on a op operand, on resource '<Default>'}}
208
+ // expected-remark@+3 {{found an instance of 'allocate' on op result 0 , on resource '<Default>'}}
209
+ // expected-remark@+2 {{found an instance of 'read' on op operand 0, on resource '<Default>'}}
210
+ // expected-remark@+1 {{found an instance of 'read' on op operand 1 , on resource '<Default>'}}
210
211
%0 = hlfir.char_extremum min, %arg0, %arg1 : (!fir.ref<!fir.char<1, 10>>, !fir.ref<!fir.char<1,20>>) -> !hlfir.expr<!fir.char<1,10>>
211
212
return
212
213
}
213
214
214
215
func.func @copy_in(%box: !fir.box<!fir.array<?xf64>>, %temp: !fir.ref<!fir.box<!fir.heap<!fir.array<?xf64>>>>, %is_present: i1) {
215
216
// expected-remark@+3 {{found an instance of 'allocate' on resource '<Default>'}}
216
- // expected-remark@+2 {{found an instance of 'read' on a op operand, on resource '<Default>'}}
217
- // expected-remark@+1 {{found an instance of 'write' on a op operand, on resource '<Default>'}}
217
+ // expected-remark@+2 {{found an instance of 'read' on op operand 0 , on resource '<Default>'}}
218
+ // expected-remark@+1 {{found an instance of 'write' on op operand 1 , on resource '<Default>'}}
218
219
%0:2 = hlfir.copy_in %box to %temp : (!fir.box<!fir.array<?xf64>>, !fir.ref<!fir.box<!fir.heap<!fir.array<?xf64>>>>) -> (!fir.box<!fir.array<?xf64>>, i1)
219
220
return
220
221
}
221
222
222
223
func.func @copy_out(%box: !fir.box<!fir.array<?xf64>>, %temp: !fir.ref<!fir.box<!fir.heap<!fir.array<?xf64>>>>, %was_copied: i1) {
223
224
// expected-remark@+2 {{found an instance of 'free' on resource '<Default>'}}
224
- // expected-remark@+1 {{found an instance of 'read' on a op operand, on resource '<Default>'}}
225
+ // expected-remark@+1 {{found an instance of 'read' on op operand 0 , on resource '<Default>'}}
225
226
hlfir.copy_out %temp, %was_copied : (!fir.ref<!fir.box<!fir.heap<!fir.array<?xf64>>>>, i1) -> ()
226
227
// expected-remark@+3 {{found an instance of 'free' on resource '<Default>'}}
227
- // expected-remark@+2 {{found an instance of 'read' on a op operand, on resource '<Default>'}}
228
- // expected-remark@+1 {{found an instance of 'write' on a op operand, on resource '<Default>'}}
228
+ // expected-remark@+2 {{found an instance of 'read' on op operand 0 , on resource '<Default>'}}
229
+ // expected-remark@+1 {{found an instance of 'write' on op operand 2 , on resource '<Default>'}}
229
230
hlfir.copy_out %temp, %was_copied to %box : (!fir.ref<!fir.box<!fir.heap<!fir.array<?xf64>>>>, i1, !fir.box<!fir.array<?xf64>>) -> ()
230
231
return
231
232
}
0 commit comments