summaryrefslogtreecommitdiff
path: root/dev-libs/rocm-device-libs/files/rocm-device-libs-10.1.0-update-stale-tests.patch
blob: 51dd62ac8d658b7b623dbcf2b688b647adf38437 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
Update stale tests

Backports: https://github.com/ROCm/llvm-project/commit/25affef0d99027aee4dcdf573e6b2b9d174b04eb
--- a/test/compile/atomic_work_item_fence.cl
+++ b/test/compile/atomic_work_item_fence.cl
@@ -48,5 +48,5 @@ kernel void test_invalid() {
     atomic_work_item_fence(0, memory_order_acq_rel, memory_scope_device);
 }
 
-// GCN: ![[LOCAL_MMRA]]  = !{!"amdgpu-as", !"local"}
-// GCN: ![[GLOBAL_MMRA]] = !{!"amdgpu-as", !"global"}
+// GCN: ![[LOCAL_MMRA]]  = !{!"amdgpu-synchronize-as", !"local"}
+// GCN: ![[GLOBAL_MMRA]] = !{!"amdgpu-synchronize-as", !"global"}
--- a/test/compile/fract.cl
+++ b/test/compile/fract.cl
@@ -1,31 +1,20 @@
 #pragma OPENCL EXTENSION cl_khr_fp16 : enable
 
 // CHECK-LABEL: test_fract_f16
-// GFX600-DAG: s_add_u32
-// GFX600-DAG: s_addc_u32
-// GFX600: buffer_load_ushort
+// GFX600-DAG: s_load_dwordx2
 // GFX600-DAG: v_lshlrev_b32
 // GFX600-DAG: v_mov_b32
 // GFX600-DAG: s_mov_b32
-// GFX600-DAG: s_mov_b32
-// GFX600: s_waitcnt
+// GFX600: buffer_load_ushort
 // GFX600: buffer_store_short
 
 
 // TODO: Could promote the f16 pattern to f32
-// GFX700-DAG: s_add_i32
-// GFX700-DAG: s_lshr_b32
-// GFX700-DAG: s_add_u32
-// GFX700-DAG: s_addc_u32
-// GFX700: buffer_load_ushort
 // GFX700-DAG: s_load_dwordx2
 // GFX700-DAG: v_lshlrev_b32
-// GFX700-DAG: s_mov_b32
-// GFX700-DAG: s_waitcnt
-// GFX700-DAG: v_mov_b32
 // GFX700-DAG: v_add_i32
 // GFX700-DAG: v_addc_u32
-// GFX700: s_waitcnt
+// GFX700: flat_load_ushort
 // GFX700: flat_store_short
 
 
@@ -47,9 +36,7 @@ kernel void test_fract_f16(global half* restrict out0,
 // CHECK-LABEL: test_fract_f32
 // GFX600-DAG: v_floor_f32
 // GFX600-DAG: v_sub_f32
-// GFX600-DAG: v_min_f32_e32 v{{[0-9]+}}, 0x3f7fffff,
-// GFX600-DAG: v_cmp_u_f32
-// GFX600-DAG: v_cndmask_b32
+// GFX600-DAG: v_min_legacy_f32_e32 v{{[0-9]+}}, 0x3f7fffff,
 // GFX600-DAG: v_cmp_neq_f32
 // GFX600-DAG: v_cndmask_b32
 
@@ -78,9 +65,10 @@ kernel void test_fract_f32(global float* restrict out0,
 // GFX600: v_cndmask_b32
 // GFX600: v_cndmask_b32
 // GFX600: v_add_f64
-// GFX600: v_cmp_u_f64
 // GFX600: v_add_f64
-// GFX600: v_min_f64
+// GFX600: v_cmp_nle_f64
+// GFX600: v_cndmask_b32
+// GFX600: v_cndmask_b32
 // GFX600: v_cmp_neq_f64
 
 
--- a/test/compile/frexp.cl
+++ b/test/compile/frexp.cl
@@ -6,9 +6,9 @@
 
 // GCN-LABEL: {{^}}test_frexp_f32:
 
-// GFX600-DAG: s_movk_i32 [[INF:s[0-9]+]], 0x1f8
+// GFX600-DAG: s_mov_b32 [[INF:s[0-9]+]], 0x7f800000
 // GFX600-DAG: v_frexp_mant_f32{{(_e32)?}} [[MANT:v[0-9]+]], [[SRC:v[0-9]+]]
-// GFX600-DAG: v_cmp_class_f32{{(_e64)?}} [[CMP:(vcc|s{{\[[0-9]+:[0-9]+\]}})]], [[SRC]], [[INF]]
+// GFX600-DAG: v_cmp_lt_f32{{(_e64)?}} [[CMP:(vcc|s{{\[[0-9]+:[0-9]+\]}})]], |[[SRC]]|, [[INF]]
 // GFX600-DAG: v_frexp_exp_i32_f32{{(_e32)?}} [[EXP:v[0-9]+]], [[SRC]]
 // GFX600-DAG: v_cndmask_b32{{(_e32)?|(e64)?}} v{{[0-9]+}}, [[SRC]], [[MANT]], [[CMP]]
 // GFX600-DAG: v_cndmask_b32{{(_e32)?|(e64)?}} v{{[0-9]+}}, 0, [[EXP]], [[CMP]]
@@ -17,6 +17,7 @@
 // GFX700-DAG: v_frexp_mant_f32{{(_e32)?}} [[MANT:v[0-9]+]], [[SRC:v[0-9]+]]
 // GFX700-DAG: v_frexp_exp_i32_f32{{(_e32)?}} [[EXP:v[0-9]+]], [[SRC:v[0-9]+]]
 // GFX700-NOT: v_cmp_class
+// GCN-LABEL: {{^}}__clang_ocl_kern_imp_test_frexp_f32:
 kernel void test_frexp_f32(global float* restrict out0,
                            global int* restrict out1,
                            global float* restrict in) {
@@ -28,11 +29,11 @@ kernel void test_frexp_f32(global float* restrict out0,
 }
 
 // GCN-LABEL: {{^}}test_frexp_f64:
-// GFX600: s_mov_b32 s{{[0-9]+}}, 0{{$}}
 
-// GFX600-DAG: s_movk_i32 [[INF:s[0-9]+]], 0x1f8
+// GFX600-DAG: s_mov_b32 [[INF:s[0-9]+]], 0x7ff00000
+// GFX600-DAG: v_and_b32{{(_e32)?}} [[ABS_HI:v[0-9]+]], 0x7fffffff, v{{[0-9]+}}
 // GFX600-DAG: v_frexp_mant_f64{{(_e32)?}} v{{\[}}[[MANT_LO:[0-9]+]]:[[MANT_HI:[0-9]+]]{{\]}}, [[SRC:v\[[0-9]+:[0-9]+\]]]
-// GFX600-DAG: v_cmp_class_f64{{(_e64)?}} [[CMP:(vcc|s{{\[[0-9]+:[0-9]+\]}})]], [[SRC]], [[INF]]
+// GFX600-DAG: v_cmp_gt_i32{{(_e32)?}} [[CMP:(vcc|s{{\[[0-9]+:[0-9]+\]}})]], [[INF]], [[ABS_HI]]
 // GFX600-DAG: v_frexp_exp_i32_f64{{(_e32)?}} [[EXP:v[0-9]+]], [[SRC]]
 // GFX600-DAG: v_cndmask_b32{{(_e32)?|(e64)?}} v{{[0-9]+}}, v{{[0-9]+}}, v[[MANT_HI]], [[CMP]]
 // GFX600-DAG: v_cndmask_b32{{(_e32)?|(e64)?}} v{{[0-9]+}}, v{{[0-9]+}}, v[[MANT_LO]], [[CMP]]
@@ -42,6 +43,7 @@ kernel void test_frexp_f32(global float* restrict out0,
 // GFX700-DAG: v_frexp_mant_f64
 // GFX700-DAG: v_frexp_exp_i32_f64
 // GFX700-NOT: v_cmp_class
+// GCN-LABEL: {{^}}__clang_ocl_kern_imp_test_frexp_f64:
 kernel void test_frexp_f64(global double* restrict out0,
                            global int* restrict out1,
                            global double* restrict in) {
--- a/test/compile/lgamma_r.cl
+++ b/test/compile/lgamma_r.cl
@@ -14,90 +14,94 @@ static float test_lgamma_r(float val, volatile global int* sign_out) {
 kernel void constant_fold_lgamma_r_f32(volatile global float* out,
                                        volatile global int* sign_out) {
     // CONSTANTFOLD: store volatile i32 0,
-    // CONSTANTFOLD-NEXT: store volatile float 0x7FF0000000000000
+    // CONSTANTFOLD: store volatile float +inf
     out[0] = test_lgamma_r(0.0f, sign_out);
 
-    // CONSTANTFOLD-NEXT: store volatile i32 0,
-    // CONSTANTFOLD-NEXT: store volatile float 0x7FF0000000000000
+    // CONSTANTFOLD: store volatile i32 0,
+    // CONSTANTFOLD: store volatile float +inf
     out[0] = test_lgamma_r(-0.0f, sign_out);
 
-    // CONSTANTFOLD-NEXT: store volatile i32 0,
-    // CONSTANTFOLD-NEXT: store volatile float 0x7FF8000000000000,
+    // CONSTANTFOLD: store volatile i32 0,
+    // CONSTANTFOLD: store volatile float -qnan,
     out[0] = test_lgamma_r(__builtin_nanf(""), sign_out);
 
-    // CONSTANTFOLD-NEXT: store volatile i32 0,
-    // CONSTANTFOLD-NEXT: store volatile float 0x7FF4000000000000,
+    // CONSTANTFOLD: store volatile i32 0,
+    // CONSTANTFOLD: store volatile float -nan(0x200000),
     out[0] = test_lgamma_r(__builtin_nansf(""), sign_out);
 
-    // CONSTANTFOLD-NEXT: store volatile i32 1,
-    // CONSTANTFOLD-NEXT: store volatile float 0x7FF0000000000000,
+    // CONSTANTFOLD: store volatile i32 1,
+    // CONSTANTFOLD: store volatile float +inf,
     out[0] = test_lgamma_r(__builtin_inff(), sign_out);
 
-    // CONSTANTFOLD-NEXT: store volatile i32 0,
-    // CONSTANTFOLD-NEXT: store volatile float 0x7FF0000000000000,
+    // CONSTANTFOLD: store volatile i32 0,
+    // CONSTANTFOLD: store volatile float +inf,
     out[0] = test_lgamma_r(-__builtin_inff(), sign_out);
 
-    // CONSTANTFOLD-NEXT: store volatile i32 1,
-    // CONSTANTFOLD-NEXT: store volatile float 0x419DE28020000000,
+    // Large arguments hit the Stirling/table path, which uses target
+    // intrinsics (e.g. amdgcn.rcp) that do not constant fold. The result is a
+    // runtime value and its computation may be interleaved with the stores, so
+    // do not use -NEXT around these.
+    // CONSTANTFOLD: store volatile i32 1,
+    // CONSTANTFOLD: store volatile float %{{.*}}
     out[0] = test_lgamma_r(0x1.0p+23f, sign_out);
 
-    // CONSTANTFOLD-NEXT: store volatile i32 0,
-    // CONSTANTFOLD-NEXT: store volatile float 0x7FF0000000000000,
+    // CONSTANTFOLD: store volatile i32 0,
+    // CONSTANTFOLD: store volatile float +inf,
     out[0] = test_lgamma_r(-0x1.0p+23f, sign_out);
 
-    // CONSTANTFOLD-NEXT: store volatile i32 1,
-    // CONSTANTFOLD-NEXT: store volatile float 0.000000e+00,
+    // CONSTANTFOLD: store volatile i32 1,
+    // CONSTANTFOLD: store volatile float 0.000000e+00,
     out[0] = test_lgamma_r(1.0f, sign_out);
 
-    // CONSTANTFOLD-NEXT: store volatile i32 1,
-    // CONSTANTFOLD-NEXT: store volatile float 0.000000e+00,
+    // CONSTANTFOLD: store volatile i32 1,
+    // CONSTANTFOLD: store volatile float 0.000000e+00,
     out[0] = test_lgamma_r(2.0f, sign_out);
 
-    // CONSTANTFOLD-NEXT: store volatile i32 1,
-    // CONSTANTFOLD-NEXT: store volatile float 0x3FE62E4300000000,
+    // CONSTANTFOLD: store volatile i32 1,
+    // CONSTANTFOLD: store volatile float f0x3F317218,
     out[0] = test_lgamma_r(3.0f, sign_out);
 
-    // CONSTANTFOLD-NEXT: store volatile i32 1,
-    // CONSTANTFOLD-NEXT: store volatile float 0x3FE250D040000000,
+    // CONSTANTFOLD: store volatile i32 1,
+    // CONSTANTFOLD: store volatile float f0x3F128682,
     out[0] = test_lgamma_r(0.5f, sign_out);
 
-    // CONSTANTFOLD-NEXT: store volatile i32 1,
-    // CONSTANTFOLD-NEXT: store volatile float 0x405601E680000000,
+    // CONSTANTFOLD: store volatile i32 1,
+    // CONSTANTFOLD: store volatile float f0x42B00F34,
     out[0] = test_lgamma_r(0x1.0p-127f, sign_out);
 
-    // CONSTANTFOLD-NEXT: store volatile i32 1,
-    // CONSTANTFOLD-NEXT: store volatile float 0x419DE28060000000,
+    // CONSTANTFOLD: store volatile i32 1,
+    // CONSTANTFOLD: store volatile float %{{.*}}
     out[0] = test_lgamma_r(nextafter(0x1.0p+23f, __builtin_inff()), sign_out);
 
-    // CONSTANTFOLD-NEXT: store volatile i32 1,
-    // CONSTANTFOLD-NEXT: store volatile float 0x419DE28000000000,
+    // CONSTANTFOLD: store volatile i32 1,
+    // CONSTANTFOLD: store volatile float %{{.*}}
     out[0] = test_lgamma_r(nextafter(0x1.0p+23f, -__builtin_inff()), sign_out);
 
-    // CONSTANTFOLD-NEXT: store volatile i32 1,
-    // CONSTANTFOLD-NEXT: store volatile float 0xC19DE28040000000,
+    // CONSTANTFOLD: store volatile i32 1,
+    // CONSTANTFOLD: store volatile float %{{.*}}
     out[0] = test_lgamma_r(nextafter(-0x1.0p+23f, __builtin_inff()), sign_out);
 
-    // CONSTANTFOLD-NEXT: store volatile i32 0,
-    // CONSTANTFOLD-NEXT: store volatile float 0x7FF0000000000000,
+    // CONSTANTFOLD: store volatile i32 0,
+    // CONSTANTFOLD: store volatile float +inf,
     out[0] = test_lgamma_r(nextafter(-0x1.0p+23f, -__builtin_inff()), sign_out);
 
-    // CONSTANTFOLD-NEXT: store volatile i32 0,
-    // CONSTANTFOLD-NEXT: store volatile float 0x7FF0000000000000,
+    // CONSTANTFOLD: store volatile i32 0,
+    // CONSTANTFOLD: store volatile float +inf,
     out[0] = test_lgamma_r(-1.0f, sign_out);
 
-    // CONSTANTFOLD-NEXT: store volatile i32 0,
-    // CONSTANTFOLD-NEXT: store volatile float 0x7FF0000000000000,
+    // CONSTANTFOLD: store volatile i32 0,
+    // CONSTANTFOLD: store volatile float +inf,
     out[0] = test_lgamma_r(-2.0f, sign_out);
 
-    // CONSTANTFOLD-NEXT: store volatile i32 0,
-    // CONSTANTFOLD-NEXT: store volatile float 0x7FF0000000000000,
+    // CONSTANTFOLD: store volatile i32 0,
+    // CONSTANTFOLD: store volatile float +inf,
     out[0] = test_lgamma_r(-3.0f, sign_out);
 
-    // CONSTANTFOLD-NEXT: store volatile i32 1,
-    // CONSTANTFOLD-NEXT: store volatile float 0xBFF4F1B100000000,
+    // CONSTANTFOLD: store volatile i32 1,
+    // CONSTANTFOLD: store volatile float %{{.*}}
     out[0] = test_lgamma_r(-3.5f, sign_out);
 
-    // CONSTANTFOLD-NEXT: store volatile i32 1,
-    // CONSTANTFOLD-NEXT: store volatile float 0xC19DE28040000000,
+    // CONSTANTFOLD: store volatile i32 1,
+    // CONSTANTFOLD: store volatile float %{{.*}}
     out[0] = test_lgamma_r(as_float(0xcaffffff), sign_out);
 }
--- a/test/compile/native_rcp.cl
+++ b/test/compile/native_rcp.cl
@@ -6,29 +6,31 @@
 
 half __ocml_native_rcp_f16(half);
 
-// GCN: {{^}}test_native_recip_f16:
+// GCN-LABEL: {{^}}test_native_recip_f16:
 // GFX600: v_rcp_f32
 // GFX700: v_rcp_f32
 
 
-// GFX803: {{(flat|global|buffer)}}_load_{{(ushort|b16)}} [[VAL:v[0-9+]]],
+// GFX803: {{(flat|global|buffer)}}_load_{{(ushort|b16)}} [[VAL:v[0-9]+]],
 // GFX803-NOT: [[VAL]]
 // GFX803: v_rcp_f16{{(_e32)?}} [[RESULT:v[0-9]+]], [[VAL]]
 // GFX803-NOT: [[RESULT]]
 // GFX803: [[RESULT]]
 // GFX803-NOT: [[RESULT]]
+// GFX803: s_endpgm
 kernel void test_native_recip_f16(global half* restrict out, global half* restrict in) {
     int id = get_local_id(0);
     out[id] = __ocml_native_rcp_f16(in[id]);
 }
 
-// GCN: {{^}}test_native_recip_f32:
-// GCN: {{(flat|global|buffer)}}_load_{{(dword|b32)}} [[VAL:v[0-9+]]],
+// GCN-LABEL: {{^}}test_native_recip_f32:
+// GCN: {{(flat|global|buffer)}}_load_{{(dword|b32)}} [[VAL:v[0-9]+]],
 // GCN-NOT: [[VAL]]
 // GCN: v_rcp_f32{{(_e32)?}} [[RESULT:v[0-9]+]], [[VAL]]
 // GCN-NOT: [[RESULT]]
 // GCN: [[RESULT]]
 // GCN-NOT: [[RESULT]]
+// GCN: s_endpgm
 kernel void test_native_recip_f32(global float* restrict out, global float* restrict in) {
     int id = get_local_id(0);
     out[id] = native_recip(in[id]);
--- a/test/compile/native_rsqrt.cl
+++ b/test/compile/native_rsqrt.cl
@@ -8,30 +8,30 @@ half __ocml_native_rsqrt_f16(half);
 
 // FIXME: Promoted case using full expansion
 // GCN-LABEL: {{^}}test_native_rsqrt_f16:
-// GFX600: v_sqrt_f32
-// GFX600: v_rcp_f32
+// GFX600: v_rsq_f32
 
-// GFX700: v_sqrt_f32
-// GFX700: v_rcp_f32
+// GFX700: v_rsq_f32
 
-// GFX803: {{(flat|global|buffer)}}_load_{{(ushort|b16)}} [[VAL:v[0-9+]]],
+// GFX803: {{(flat|global|buffer)}}_load_{{(ushort|b16)}} [[VAL:v[0-9]+]],
 // GFX803-NOT: [[VAL]]
 // GFX803: v_rsq_f16{{(_e32)?}} [[RESULT:v[0-9]+]], [[VAL]]
 // GFX803-NOT: [[RESULT]]
 // GFX803: [[RESULT]]
 // GFX803-NOT: [[RESULT]]
+// GFX803: s_endpgm
 kernel void test_native_rsqrt_f16(global half* restrict out, global half* restrict in) {
     int id = get_local_id(0);
     out[id] = __ocml_native_rsqrt_f16(in[id]);
 }
 
 // GCN-LABEL: {{^}}test_native_rsqrt_f32:
-// GCN: {{(flat|global|buffer)}}_load_{{(dword|b32)}} [[VAL:v[0-9+]]],
+// GCN: {{(flat|global|buffer)}}_load_{{(dword|b32)}} [[VAL:v[0-9]+]],
 // GCN-NOT: [[VAL]]
 // GCN: v_rsq_f32{{(_e32)?}} [[RESULT:v[0-9]+]], [[VAL]]
 // GCN-NOT: [[RESULT]]
 // GCN: [[RESULT]]
 // GCN-NOT: [[RESULT]]
+// GCN: s_endpgm
 kernel void test_native_rsqrt_f32(global float* restrict out, global float* restrict in) {
     int id = get_local_id(0);
     out[id] = native_rsqrt(in[id]);