1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes --check-attributes
2 ; RUN: opt -passes=attributor -S < %s | FileCheck %s --check-prefixes=CHECK
4 define amdgpu_kernel void @__omp_offloading_fd00_2c00523__ZN11qmcplusplus7ompBLAS9gemv_implIfEEiRiciiT_PKS3_iS5_iS3_PS3_i_l383() {
5 ; CHECK: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn
6 ; CHECK-LABEL: define {{[^@]+}}@__omp_offloading_fd00_2c00523__ZN11qmcplusplus7ompBLAS9gemv_implIfEEiRiciiT_PKS3_iS5_iS3_PS3_i_l383
7 ; CHECK-SAME: () #[[ATTR0:[0-9]+]] {
8 ; CHECK-NEXT: [[TMP1:%.*]] = alloca [0 x [0 x float]], i32 0, align 8, addrspace(5)
9 ; CHECK-NEXT: [[TMP2:%.*]] = addrspacecast ptr addrspace(5) [[TMP1]] to ptr
10 ; CHECK-NEXT: store ptr [[TMP2]], ptr addrspace(5) [[TMP1]], align 8
11 ; CHECK-NEXT: [[TMP3:%.*]] = call fastcc i32 @__kmpc_nvptx_parallel_reduce_nowait_v2(ptr nocapture nofree noundef readonly align 8 dereferenceable_or_null(8) [[TMP2]], i1 noundef false)
12 ; CHECK-NEXT: ret void
14 %1 = alloca [0 x [0 x float]], i32 0, align 8, addrspace(5)
15 %2 = addrspacecast ptr addrspace(5) %1 to ptr
16 store ptr %2, ptr addrspace(5) %1, align 8
17 %3 = call fastcc i32 @__kmpc_nvptx_parallel_reduce_nowait_v2(ptr %2, i1 false)
21 define fastcc i32 @__kmpc_nvptx_parallel_reduce_nowait_v2(ptr %0, i1 %1) {
22 ; CHECK: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn
23 ; CHECK-LABEL: define {{[^@]+}}@__kmpc_nvptx_parallel_reduce_nowait_v2
24 ; CHECK-SAME: (ptr nocapture nofree nonnull readonly align 8 dereferenceable(8) [[TMP0:%.*]], i1 noundef [[TMP1:%.*]]) #[[ATTR0]] {
25 ; CHECK-NEXT: br i1 [[TMP1]], label [[TMP3:%.*]], label [[TMP79:%.*]]
27 ; CHECK-NEXT: br i1 [[TMP1]], label [[TMP4:%.*]], label [[TMP6:%.*]]
29 ; CHECK-NEXT: [[TMP5:%.*]] = load ptr, ptr [[TMP0]], align 8
30 ; CHECK-NEXT: store i64 0, ptr [[TMP5]], align 8
31 ; CHECK-NEXT: br label [[TMP77:%.*]]
33 ; CHECK-NEXT: br i1 [[TMP1]], label [[TMP7:%.*]], label [[TMP9:%.*]]
35 ; CHECK-NEXT: [[TMP8:%.*]] = load ptr, ptr [[TMP0]], align 8
36 ; CHECK-NEXT: store i32 0, ptr [[TMP8]], align 4
37 ; CHECK-NEXT: br label [[TMP77]]
39 ; CHECK-NEXT: br i1 [[TMP1]], label [[TMP10:%.*]], label [[TMP12:%.*]]
41 ; CHECK-NEXT: [[TMP11:%.*]] = load ptr, ptr [[TMP0]], align 8
42 ; CHECK-NEXT: store i32 0, ptr [[TMP11]], align 4
43 ; CHECK-NEXT: br label [[TMP77]]
45 ; CHECK-NEXT: br i1 [[TMP1]], label [[TMP13:%.*]], label [[TMP15:%.*]]
47 ; CHECK-NEXT: [[TMP14:%.*]] = load ptr, ptr [[TMP0]], align 8
48 ; CHECK-NEXT: store i32 0, ptr [[TMP14]], align 4
49 ; CHECK-NEXT: br label [[TMP77]]
51 ; CHECK-NEXT: br i1 [[TMP1]], label [[TMP16:%.*]], label [[TMP18:%.*]]
53 ; CHECK-NEXT: [[TMP17:%.*]] = load ptr, ptr [[TMP0]], align 8
54 ; CHECK-NEXT: store i32 0, ptr [[TMP17]], align 4
55 ; CHECK-NEXT: br label [[TMP77]]
57 ; CHECK-NEXT: br i1 [[TMP1]], label [[TMP19:%.*]], label [[TMP21:%.*]]
59 ; CHECK-NEXT: [[TMP20:%.*]] = load ptr, ptr [[TMP0]], align 8
60 ; CHECK-NEXT: store i32 0, ptr [[TMP20]], align 4
61 ; CHECK-NEXT: br label [[TMP77]]
63 ; CHECK-NEXT: br i1 [[TMP1]], label [[TMP22:%.*]], label [[TMP24:%.*]]
65 ; CHECK-NEXT: [[TMP23:%.*]] = load ptr, ptr [[TMP0]], align 8
66 ; CHECK-NEXT: store i32 0, ptr [[TMP23]], align 4
67 ; CHECK-NEXT: br label [[TMP77]]
69 ; CHECK-NEXT: br i1 [[TMP1]], label [[TMP25:%.*]], label [[TMP27:%.*]]
71 ; CHECK-NEXT: [[TMP26:%.*]] = load ptr, ptr [[TMP0]], align 8
72 ; CHECK-NEXT: store i32 0, ptr [[TMP26]], align 8
73 ; CHECK-NEXT: br label [[TMP77]]
75 ; CHECK-NEXT: br i1 [[TMP1]], label [[TMP28:%.*]], label [[TMP30:%.*]]
77 ; CHECK-NEXT: [[TMP29:%.*]] = load ptr, ptr [[TMP0]], align 8
78 ; CHECK-NEXT: store i32 0, ptr [[TMP29]], align 4
79 ; CHECK-NEXT: br label [[TMP77]]
81 ; CHECK-NEXT: br i1 [[TMP1]], label [[TMP31:%.*]], label [[TMP33:%.*]]
83 ; CHECK-NEXT: [[TMP32:%.*]] = load ptr, ptr [[TMP0]], align 8
84 ; CHECK-NEXT: store i32 0, ptr [[TMP32]], align 4
85 ; CHECK-NEXT: br label [[TMP77]]
87 ; CHECK-NEXT: br i1 [[TMP1]], label [[TMP34:%.*]], label [[TMP36:%.*]]
89 ; CHECK-NEXT: [[TMP35:%.*]] = load ptr, ptr [[TMP0]], align 8
90 ; CHECK-NEXT: store i32 0, ptr [[TMP35]], align 4
91 ; CHECK-NEXT: br label [[TMP77]]
93 ; CHECK-NEXT: br i1 [[TMP1]], label [[TMP37:%.*]], label [[TMP39:%.*]]
95 ; CHECK-NEXT: [[TMP38:%.*]] = load ptr, ptr [[TMP0]], align 8
96 ; CHECK-NEXT: store i64 0, ptr [[TMP38]], align 8
97 ; CHECK-NEXT: br label [[TMP77]]
99 ; CHECK-NEXT: br i1 [[TMP1]], label [[TMP40:%.*]], label [[TMP42:%.*]]
101 ; CHECK-NEXT: [[TMP41:%.*]] = load ptr, ptr [[TMP0]], align 8
102 ; CHECK-NEXT: store i64 0, ptr [[TMP41]], align 8
103 ; CHECK-NEXT: br label [[TMP77]]
105 ; CHECK-NEXT: br i1 [[TMP1]], label [[TMP43:%.*]], label [[TMP45:%.*]]
107 ; CHECK-NEXT: [[TMP44:%.*]] = load ptr, ptr [[TMP0]], align 8
108 ; CHECK-NEXT: store i32 0, ptr [[TMP44]], align 4
109 ; CHECK-NEXT: br label [[TMP77]]
111 ; CHECK-NEXT: br i1 [[TMP1]], label [[TMP46:%.*]], label [[TMP48:%.*]]
113 ; CHECK-NEXT: [[TMP47:%.*]] = load ptr, ptr [[TMP0]], align 8
114 ; CHECK-NEXT: store i32 0, ptr [[TMP47]], align 4
115 ; CHECK-NEXT: br label [[TMP77]]
117 ; CHECK-NEXT: br i1 [[TMP1]], label [[TMP49:%.*]], label [[TMP51:%.*]]
119 ; CHECK-NEXT: [[TMP50:%.*]] = load ptr, ptr [[TMP0]], align 8
120 ; CHECK-NEXT: store i64 0, ptr [[TMP50]], align 8
121 ; CHECK-NEXT: br label [[TMP77]]
123 ; CHECK-NEXT: br i1 [[TMP1]], label [[TMP52:%.*]], label [[TMP54:%.*]]
125 ; CHECK-NEXT: [[TMP53:%.*]] = load ptr, ptr [[TMP0]], align 8
126 ; CHECK-NEXT: store i64 0, ptr [[TMP53]], align 8
127 ; CHECK-NEXT: br label [[TMP77]]
129 ; CHECK-NEXT: br i1 [[TMP1]], label [[TMP55:%.*]], label [[TMP57:%.*]]
131 ; CHECK-NEXT: [[TMP56:%.*]] = load ptr, ptr [[TMP0]], align 8
132 ; CHECK-NEXT: store i32 0, ptr [[TMP56]], align 4
133 ; CHECK-NEXT: br label [[TMP77]]
135 ; CHECK-NEXT: br i1 [[TMP1]], label [[TMP58:%.*]], label [[TMP60:%.*]]
137 ; CHECK-NEXT: [[TMP59:%.*]] = load ptr, ptr [[TMP0]], align 8
138 ; CHECK-NEXT: store i32 0, ptr [[TMP59]], align 4
139 ; CHECK-NEXT: br label [[TMP77]]
141 ; CHECK-NEXT: br i1 [[TMP1]], label [[TMP61:%.*]], label [[TMP63:%.*]]
143 ; CHECK-NEXT: [[TMP62:%.*]] = load ptr, ptr [[TMP0]], align 8
144 ; CHECK-NEXT: store i64 0, ptr [[TMP62]], align 8
145 ; CHECK-NEXT: br label [[TMP77]]
147 ; CHECK-NEXT: br i1 [[TMP1]], label [[TMP64:%.*]], label [[TMP66:%.*]]
149 ; CHECK-NEXT: [[TMP65:%.*]] = load ptr, ptr [[TMP0]], align 8
150 ; CHECK-NEXT: store i64 0, ptr [[TMP65]], align 8
151 ; CHECK-NEXT: br label [[TMP77]]
153 ; CHECK-NEXT: br i1 [[TMP1]], label [[TMP67:%.*]], label [[TMP69:%.*]]
155 ; CHECK-NEXT: [[TMP68:%.*]] = load ptr, ptr [[TMP0]], align 8
156 ; CHECK-NEXT: store i32 0, ptr [[TMP68]], align 4
157 ; CHECK-NEXT: br label [[TMP77]]
159 ; CHECK-NEXT: br i1 [[TMP1]], label [[TMP70:%.*]], label [[TMP72:%.*]]
161 ; CHECK-NEXT: [[TMP71:%.*]] = load ptr, ptr [[TMP0]], align 8
162 ; CHECK-NEXT: store i32 0, ptr [[TMP71]], align 4
163 ; CHECK-NEXT: br label [[TMP77]]
165 ; CHECK-NEXT: br i1 [[TMP1]], label [[TMP73:%.*]], label [[TMP75:%.*]]
167 ; CHECK-NEXT: [[TMP74:%.*]] = load ptr, ptr [[TMP0]], align 8
168 ; CHECK-NEXT: store i32 0, ptr [[TMP74]], align 4
169 ; CHECK-NEXT: br label [[TMP77]]
171 ; CHECK-NEXT: [[TMP76:%.*]] = load ptr, ptr [[TMP0]], align 8
172 ; CHECK-NEXT: store i32 0, ptr [[TMP76]], align 4
173 ; CHECK-NEXT: br label [[TMP77]]
175 ; CHECK-NEXT: [[TMP78:%.*]] = load ptr, ptr [[TMP0]], align 8
176 ; CHECK-NEXT: store i32 0, ptr [[TMP78]], align 4
177 ; CHECK-NEXT: br i1 [[TMP1]], label [[TMP80:%.*]], label [[TMP82:%.*]]
179 ; CHECK-NEXT: ret i32 0
181 ; CHECK-NEXT: [[TMP81:%.*]] = load ptr, ptr [[TMP0]], align 8
182 ; CHECK-NEXT: store i64 0, ptr [[TMP81]], align 8
183 ; CHECK-NEXT: ret i32 0
185 ; CHECK-NEXT: br i1 [[TMP1]], label [[TMP83:%.*]], label [[TMP85:%.*]]
187 ; CHECK-NEXT: [[TMP84:%.*]] = load ptr, ptr [[TMP0]], align 8
188 ; CHECK-NEXT: store i32 0, ptr [[TMP84]], align 4
189 ; CHECK-NEXT: ret i32 0
191 ; CHECK-NEXT: br i1 [[TMP1]], label [[TMP86:%.*]], label [[TMP88:%.*]]
193 ; CHECK-NEXT: [[TMP87:%.*]] = load ptr, ptr [[TMP0]], align 8
194 ; CHECK-NEXT: store i32 0, ptr [[TMP87]], align 4
195 ; CHECK-NEXT: ret i32 0
197 ; CHECK-NEXT: br i1 [[TMP1]], label [[TMP89:%.*]], label [[TMP91:%.*]]
199 ; CHECK-NEXT: [[TMP90:%.*]] = load ptr, ptr [[TMP0]], align 8
200 ; CHECK-NEXT: store i32 0, ptr [[TMP90]], align 4
201 ; CHECK-NEXT: ret i32 0
203 ; CHECK-NEXT: br i1 [[TMP1]], label [[TMP92:%.*]], label [[TMP94:%.*]]
205 ; CHECK-NEXT: [[TMP93:%.*]] = load ptr, ptr [[TMP0]], align 8
206 ; CHECK-NEXT: store i32 0, ptr [[TMP93]], align 4
207 ; CHECK-NEXT: ret i32 0
209 ; CHECK-NEXT: br i1 [[TMP1]], label [[TMP95:%.*]], label [[TMP97:%.*]]
211 ; CHECK-NEXT: [[TMP96:%.*]] = load ptr, ptr [[TMP0]], align 8
212 ; CHECK-NEXT: store i32 0, ptr [[TMP96]], align 4
213 ; CHECK-NEXT: ret i32 0
215 ; CHECK-NEXT: br i1 [[TMP1]], label [[TMP98:%.*]], label [[TMP100:%.*]]
217 ; CHECK-NEXT: [[TMP99:%.*]] = load ptr, ptr [[TMP0]], align 8
218 ; CHECK-NEXT: store i32 0, ptr [[TMP99]], align 4
219 ; CHECK-NEXT: ret i32 0
221 ; CHECK-NEXT: br i1 [[TMP1]], label [[TMP101:%.*]], label [[TMP103:%.*]]
223 ; CHECK-NEXT: [[TMP102:%.*]] = load ptr, ptr [[TMP0]], align 8
224 ; CHECK-NEXT: store i32 0, ptr [[TMP102]], align 8
225 ; CHECK-NEXT: ret i32 0
227 ; CHECK-NEXT: br i1 [[TMP1]], label [[TMP104:%.*]], label [[TMP106:%.*]]
229 ; CHECK-NEXT: [[TMP105:%.*]] = load ptr, ptr [[TMP0]], align 8
230 ; CHECK-NEXT: store i32 0, ptr [[TMP105]], align 4
231 ; CHECK-NEXT: ret i32 0
233 ; CHECK-NEXT: br i1 [[TMP1]], label [[TMP107:%.*]], label [[TMP109:%.*]]
235 ; CHECK-NEXT: [[TMP108:%.*]] = load ptr, ptr [[TMP0]], align 8
236 ; CHECK-NEXT: store i32 0, ptr [[TMP108]], align 4
237 ; CHECK-NEXT: ret i32 0
239 ; CHECK-NEXT: br i1 [[TMP1]], label [[TMP110:%.*]], label [[TMP112:%.*]]
241 ; CHECK-NEXT: [[TMP111:%.*]] = load ptr, ptr [[TMP0]], align 8
242 ; CHECK-NEXT: store i32 0, ptr [[TMP111]], align 4
243 ; CHECK-NEXT: ret i32 0
245 ; CHECK-NEXT: br i1 [[TMP1]], label [[TMP113:%.*]], label [[TMP115:%.*]]
247 ; CHECK-NEXT: [[TMP114:%.*]] = load ptr, ptr [[TMP0]], align 8
248 ; CHECK-NEXT: store i64 0, ptr [[TMP114]], align 8
249 ; CHECK-NEXT: ret i32 0
251 ; CHECK-NEXT: br i1 [[TMP1]], label [[TMP116:%.*]], label [[TMP118:%.*]]
253 ; CHECK-NEXT: [[TMP117:%.*]] = load ptr, ptr [[TMP0]], align 8
254 ; CHECK-NEXT: store i64 0, ptr [[TMP117]], align 8
255 ; CHECK-NEXT: ret i32 0
257 ; CHECK-NEXT: [[TMP119:%.*]] = load ptr, ptr [[TMP0]], align 8
258 ; CHECK-NEXT: store i32 0, ptr [[TMP119]], align 4
259 ; CHECK-NEXT: ret i32 0
261 br i1 %1, label %3, label %88
264 %4 = load ptr, ptr %0, align 8
265 br i1 %1, label %5, label %7
268 %6 = load ptr, ptr %0, align 8
269 store i64 0, ptr %6, align 8
273 br i1 %1, label %8, label %11
276 %9 = load i32, ptr %4, align 4
277 %10 = load ptr, ptr %0, align 8
278 store i32 0, ptr %10, align 4
282 br i1 %1, label %12, label %14
285 %13 = load ptr, ptr %0, align 8
286 store i32 0, ptr %13, align 4
290 br i1 %1, label %15, label %17
293 %16 = load ptr, ptr %0, align 8
294 store i32 0, ptr %16, align 4
298 br i1 %1, label %18, label %20
301 %19 = load ptr, ptr %0, align 8
302 store i32 0, ptr %19, align 4
306 br i1 %1, label %21, label %23
309 %22 = load ptr, ptr %0, align 8
310 store i32 0, ptr %22, align 4
314 br i1 %1, label %24, label %26
317 %25 = load ptr, ptr %0, align 8
318 store i32 0, ptr %25, align 4
322 br i1 %1, label %27, label %29
325 %28 = load ptr, ptr %0, align 8
326 store i32 0, ptr %28, align 8
330 br i1 %1, label %30, label %32
333 %31 = load ptr, ptr %0, align 8
334 store i32 0, ptr %31, align 4
338 br i1 %1, label %33, label %35
341 %34 = load ptr, ptr %0, align 8
342 store i32 0, ptr %34, align 4
346 br i1 %1, label %36, label %38
349 %37 = load ptr, ptr %0, align 8
350 store i32 0, ptr %37, align 4
354 br i1 %1, label %39, label %41
357 %40 = load ptr, ptr %0, align 8
358 store i64 0, ptr %40, align 8
362 br i1 %1, label %42, label %44
365 %43 = load ptr, ptr %0, align 8
366 store i64 0, ptr %43, align 8
370 br i1 %1, label %45, label %47
373 %46 = load ptr, ptr %0, align 8
374 store i32 0, ptr %46, align 4
378 br i1 %1, label %48, label %50
381 %49 = load ptr, ptr %0, align 8
382 store i32 0, ptr %49, align 4
386 br i1 %1, label %51, label %53
389 %52 = load ptr, ptr %0, align 8
390 store i64 0, ptr %52, align 8
394 br i1 %1, label %54, label %56
397 %55 = load ptr, ptr %0, align 8
398 store i64 0, ptr %55, align 8
402 br i1 %1, label %57, label %59
405 %58 = load ptr, ptr %0, align 8
406 store i32 0, ptr %58, align 4
410 br i1 %1, label %60, label %62
413 %61 = load ptr, ptr %0, align 8
414 store i32 0, ptr %61, align 4
418 br i1 %1, label %63, label %65
421 %64 = load ptr, ptr %0, align 8
422 store i64 0, ptr %64, align 8
426 br i1 %1, label %66, label %68
429 %67 = load ptr, ptr %0, align 8
430 store i64 0, ptr %67, align 8
434 br i1 %1, label %69, label %71
437 %70 = load ptr, ptr %0, align 8
438 store i32 0, ptr %70, align 4
442 br i1 %1, label %72, label %74
445 %73 = load ptr, ptr %0, align 8
446 store i32 0, ptr %73, align 4
450 br i1 %1, label %75, label %77
453 %76 = load ptr, ptr %0, align 8
454 store i32 0, ptr %76, align 4
458 %78 = load ptr, ptr %0, align 8
459 store i32 0, ptr %78, align 4
462 79: ; preds = %77, %75, %72, %69, %66, %63, %60, %57, %54, %51, %48, %45, %42, %39, %36, %33, %30, %27, %24, %21, %18, %15, %12, %8, %5
463 %80 = load ptr, ptr %0, align 8
464 %81 = load i32, ptr %80, align 4
465 %82 = load ptr, ptr %0, align 8
466 store i32 0, ptr %82, align 4
467 %83 = load ptr, ptr %0, align 8
468 %84 = getelementptr i8, ptr %83, i64 4
469 %85 = load ptr, ptr %0, align 8
470 %86 = getelementptr i8, ptr %85, i64 4
471 %87 = load ptr, ptr %0, align 8
472 br i1 %1, label %91, label %93
475 %89 = load ptr, ptr %0, align 8
476 %90 = load i64, ptr %89, align 8
480 %92 = load ptr, ptr %0, align 8
481 store i64 0, ptr %92, align 8
485 br i1 %1, label %94, label %96
488 %95 = load ptr, ptr %0, align 8
489 store i32 0, ptr %95, align 4
493 br i1 %1, label %97, label %99
496 %98 = load ptr, ptr %0, align 8
497 store i32 0, ptr %98, align 4
501 br i1 %1, label %100, label %102
504 %101 = load ptr, ptr %0, align 8
505 store i32 0, ptr %101, align 4
509 br i1 %1, label %103, label %105
512 %104 = load ptr, ptr %0, align 8
513 store i32 0, ptr %104, align 4
517 br i1 %1, label %106, label %108
520 %107 = load ptr, ptr %0, align 8
521 store i32 0, ptr %107, align 4
525 br i1 %1, label %109, label %111
528 %110 = load ptr, ptr %0, align 8
529 store i32 0, ptr %110, align 4
533 br i1 %1, label %112, label %114
536 %113 = load ptr, ptr %0, align 8
537 store i32 0, ptr %113, align 8
541 br i1 %1, label %115, label %117
544 %116 = load ptr, ptr %0, align 8
545 store i32 0, ptr %116, align 4
549 br i1 %1, label %118, label %121
552 %119 = load i32, ptr %87, align 4
553 %120 = load ptr, ptr %0, align 8
554 store i32 0, ptr %120, align 4
558 br i1 %1, label %122, label %124
561 %123 = load ptr, ptr %0, align 8
562 store i32 0, ptr %123, align 4
566 br i1 %1, label %125, label %127
569 %126 = load ptr, ptr %0, align 8
570 store i64 0, ptr %126, align 8
574 br i1 %1, label %128, label %130
577 %129 = load ptr, ptr %0, align 8
578 store i64 0, ptr %129, align 8
582 %131 = load ptr, ptr %0, align 8
583 store i32 0, ptr %131, align 4
587 ; uselistorder directives
588 uselistorder i32 0, { 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, 0 }