9
9
#define HEADER
10
10
11
11
// Check that the execution mode of all 6 target regions is set to Generic Mode.
12
- // CHECK-DAG: {{@__omp_offloading_.+l98}}_exec_mode = weak constant i8 1
13
- // CHECK-DAG: {{@__omp_offloading_.+l175}}_exec_mode = weak constant i8 1
14
- // CHECK-DAG: {{@__omp_offloading_.+l284}}_exec_mode = weak constant i8 1
15
- // CHECK-DAG: {{@__omp_offloading_.+l321}}_exec_mode = weak constant i8 1
16
- // CHECK-DAG: {{@__omp_offloading_.+l339}}_exec_mode = weak constant i8 1
17
- // CHECK-DAG: {{@__omp_offloading_.+l304}}_exec_mode = weak constant i8 1
12
+ // CHECK-DAG: {{@__omp_offloading_.+l100}}_exec_mode = weak constant i8 1
13
+ // CHECK-DAG: {{@__omp_offloading_.+l177}}_exec_mode = weak constant i8 1
14
+ // CHECK-DAG: {{@__omp_offloading_.+l287}}_exec_mode = weak constant i8 1
15
+ // CHECK-DAG: {{@__omp_offloading_.+l324}}_exec_mode = weak constant i8 1
16
+ // CHECK-DAG: {{@__omp_offloading_.+l342}}_exec_mode = weak constant i8 1
17
+ // CHECK-DAG: {{@__omp_offloading_.+l307}}_exec_mode = weak constant i8 1
18
+
19
+ __thread int id;
18
20
19
21
template <typename tx, typename ty>
20
22
struct TT {
@@ -31,7 +33,7 @@ int foo(int n) {
31
33
double cn[5 ][n];
32
34
TT<long long , char > d;
33
35
34
- // CHECK-LABEL: define {{.*}}void {{@__omp_offloading_.+foo.+l98 }}_worker()
36
+ // CHECK-LABEL: define {{.*}}void {{@__omp_offloading_.+foo.+l100 }}_worker()
35
37
// CHECK-DAG: [[OMP_EXEC_STATUS:%.+]] = alloca i8,
36
38
// CHECK-DAG: [[OMP_WORK_FN:%.+]] = alloca i8*,
37
39
// CHECK: store i8* null, i8** [[OMP_WORK_FN]],
@@ -62,7 +64,7 @@ int foo(int n) {
62
64
// CHECK: [[EXIT]]
63
65
// CHECK: ret void
64
66
65
- // CHECK: define {{.*}}void [[T1:@__omp_offloading_.+foo.+l98 ]]()
67
+ // CHECK: define {{.*}}void [[T1:@__omp_offloading_.+foo.+l100 ]]()
66
68
// CHECK-DAG: [[TID:%.+]] = call i32 @llvm.nvvm.read.ptx.sreg.tid.x()
67
69
// CHECK-DAG: [[NTH:%.+]] = call i32 @llvm.nvvm.read.ptx.sreg.ntid.x()
68
70
// CHECK-DAG: [[WS:%.+]] = call i32 @llvm.nvvm.read.ptx.sreg.warpsize()
@@ -104,7 +106,7 @@ int foo(int n) {
104
106
{
105
107
}
106
108
107
- // CHECK-LABEL: define {{.*}}void {{@__omp_offloading_.+foo.+l175 }}_worker()
109
+ // CHECK-LABEL: define {{.*}}void {{@__omp_offloading_.+foo.+l177 }}_worker()
108
110
// CHECK-DAG: [[OMP_EXEC_STATUS:%.+]] = alloca i8,
109
111
// CHECK-DAG: [[OMP_WORK_FN:%.+]] = alloca i8*,
110
112
// CHECK: store i8* null, i8** [[OMP_WORK_FN]],
@@ -135,7 +137,7 @@ int foo(int n) {
135
137
// CHECK: [[EXIT]]
136
138
// CHECK: ret void
137
139
138
- // CHECK: define {{.*}}void [[T2:@__omp_offloading_.+foo.+l175 ]](i[[SZ:32|64]] [[ARG1:%[a-zA-Z_]+]])
140
+ // CHECK: define {{.*}}void [[T2:@__omp_offloading_.+foo.+l177 ]](i[[SZ:32|64]] [[ARG1:%[a-zA-Z_]+]], i[[SZ:32|64]] [[ID :%[a-zA-Z_]+]])
139
141
// CHECK: [[AA_ADDR:%.+]] = alloca i[[SZ]],
140
142
// CHECK: store i[[SZ]] [[ARG1]], i[[SZ]]* [[AA_ADDR]],
141
143
// CHECK: [[AA_CADDR:%.+]] = bitcast i[[SZ]]* [[AA_ADDR]] to i16*
@@ -175,9 +177,10 @@ int foo(int n) {
175
177
#pragma omp target if(1)
176
178
{
177
179
aa += 1 ;
180
+ id = aa;
178
181
}
179
182
180
- // CHECK-LABEL: define {{.*}}void {{@__omp_offloading_.+foo.+l284 }}_worker()
183
+ // CHECK-LABEL: define {{.*}}void {{@__omp_offloading_.+foo.+l287 }}_worker()
181
184
// CHECK-DAG: [[OMP_EXEC_STATUS:%.+]] = alloca i8,
182
185
// CHECK-DAG: [[OMP_WORK_FN:%.+]] = alloca i8*,
183
186
// CHECK: store i8* null, i8** [[OMP_WORK_FN]],
@@ -208,7 +211,7 @@ int foo(int n) {
208
211
// CHECK: [[EXIT]]
209
212
// CHECK: ret void
210
213
211
- // CHECK: define {{.*}}void [[T3:@__omp_offloading_.+foo.+l284 ]](i[[SZ]]
214
+ // CHECK: define {{.*}}void [[T3:@__omp_offloading_.+foo.+l287 ]](i[[SZ]]
212
215
// Create local storage for each capture.
213
216
// CHECK: [[LOCAL_A:%.+]] = alloca i[[SZ]]
214
217
// CHECK: [[LOCAL_B:%.+]] = alloca [10 x float]*
@@ -361,7 +364,7 @@ int bar(int n){
361
364
return a;
362
365
}
363
366
364
- // CHECK-LABEL: define {{.*}}void {{@__omp_offloading_.+static.+321 }}_worker()
367
+ // CHECK-LABEL: define {{.*}}void {{@__omp_offloading_.+static.+324 }}_worker()
365
368
// CHECK-DAG: [[OMP_EXEC_STATUS:%.+]] = alloca i8,
366
369
// CHECK-DAG: [[OMP_WORK_FN:%.+]] = alloca i8*,
367
370
// CHECK: store i8* null, i8** [[OMP_WORK_FN]],
@@ -392,7 +395,7 @@ int bar(int n){
392
395
// CHECK: [[EXIT]]
393
396
// CHECK: ret void
394
397
395
- // CHECK: define {{.*}}void [[T4:@__omp_offloading_.+static.+l321 ]](i[[SZ]]
398
+ // CHECK: define {{.*}}void [[T4:@__omp_offloading_.+static.+l324 ]](i[[SZ]]
396
399
// Create local storage for each capture.
397
400
// CHECK: [[LOCAL_A:%.+]] = alloca i[[SZ]]
398
401
// CHECK: [[LOCAL_AA:%.+]] = alloca i[[SZ]]
@@ -447,7 +450,7 @@ int bar(int n){
447
450
448
451
449
452
450
- // CHECK-LABEL: define {{.*}}void {{@__omp_offloading_.+S1.+l339 }}_worker()
453
+ // CHECK-LABEL: define {{.*}}void {{@__omp_offloading_.+S1.+l342 }}_worker()
451
454
// CHECK-DAG: [[OMP_EXEC_STATUS:%.+]] = alloca i8,
452
455
// CHECK-DAG: [[OMP_WORK_FN:%.+]] = alloca i8*,
453
456
// CHECK: store i8* null, i8** [[OMP_WORK_FN]],
@@ -478,7 +481,7 @@ int bar(int n){
478
481
// CHECK: [[EXIT]]
479
482
// CHECK: ret void
480
483
481
- // CHECK: define {{.*}}void [[T5:@__omp_offloading_.+S1.+l339 ]](
484
+ // CHECK: define {{.*}}void [[T5:@__omp_offloading_.+S1.+l342 ]](
482
485
// Create local storage for each capture.
483
486
// CHECK: [[LOCAL_THIS:%.+]] = alloca [[S1:%struct.*]]*
484
487
// CHECK: [[LOCAL_B:%.+]] = alloca i[[SZ]]
@@ -537,7 +540,7 @@ int bar(int n){
537
540
538
541
539
542
540
- // CHECK-LABEL: define {{.*}}void {{@__omp_offloading_.+template.+l304 }}_worker()
543
+ // CHECK-LABEL: define {{.*}}void {{@__omp_offloading_.+template.+l307 }}_worker()
541
544
// CHECK-DAG: [[OMP_EXEC_STATUS:%.+]] = alloca i8,
542
545
// CHECK-DAG: [[OMP_WORK_FN:%.+]] = alloca i8*,
543
546
// CHECK: store i8* null, i8** [[OMP_WORK_FN]],
@@ -568,7 +571,7 @@ int bar(int n){
568
571
// CHECK: [[EXIT]]
569
572
// CHECK: ret void
570
573
571
- // CHECK: define {{.*}}void [[T6:@__omp_offloading_.+template.+l304 ]](i[[SZ]]
574
+ // CHECK: define {{.*}}void [[T6:@__omp_offloading_.+template.+l307 ]](i[[SZ]]
572
575
// Create local storage for each capture.
573
576
// CHECK: [[LOCAL_A:%.+]] = alloca i[[SZ]]
574
577
// CHECK: [[LOCAL_AA:%.+]] = alloca i[[SZ]]
0 commit comments