1 // expected-no-diagnostics 2 #ifndef HEADER 3 #define HEADER 4 // Test host codegen. 5 // RUN: %clang_cc1 -DCK1 -verify -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix CK1 --check-prefix CK1-64 6 // RUN: %clang_cc1 -DCK1 -fopenmp -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s 7 // RUN: %clang_cc1 -DCK1 -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix CK1 --check-prefix CK1-64 8 // RUN: %clang_cc1 -DCK1 -verify -fopenmp -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix CK1 --check-prefix CK1-32 9 // RUN: %clang_cc1 -DCK1 -fopenmp -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s 10 // RUN: %clang_cc1 -DCK1 -fopenmp -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix CK1 --check-prefix CK1-32 11 12 // RUN: %clang_cc1 -DCK1 -verify -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s 13 // RUN: %clang_cc1 -DCK1 -fopenmp-simd -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s 14 // RUN: %clang_cc1 -DCK1 -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s 15 // RUN: %clang_cc1 -DCK1 -verify -fopenmp-simd -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s 16 // RUN: %clang_cc1 -DCK1 -fopenmp-simd -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s 17 // RUN: %clang_cc1 -DCK1 -fopenmp-simd -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s 18 // SIMD-ONLY0-NOT: {{__kmpc|__tgt}} 19 #ifdef CK1 20 21 int a[100]; 22 23 // CK1: define {{.*}}i32 @{{.+}}teams_argument_globali( 24 int teams_argument_global(int n) { 25 int i; 26 int te = n / 128; 27 int th = 128; 28 // discard n_addr and i 29 // CK1: alloca i32, 30 // CK1: alloca i32, 31 // CK1: [[TE:%.+]] = alloca i32, 32 // CK1: [[TH:%.+]] = alloca i32, 33 // CK1: [[TE_CAST:%.+]] = alloca i{{32|64}}, 34 // CK1: [[TH_CAST:%.+]] = alloca i{{32|64}}, 35 // CK1: [[TE_PAR:%.+]] = load{{.+}}, {{.+}} [[TE_CAST]], 36 // CK1: [[TH_PAR:%.+]] = load{{.+}}, {{.+}} [[TH_CAST]], 37 38 // CK1: call void @__kmpc_push_target_tripcount(i64 -1, i64 %{{.+}}) 39 // CK1: call i32 @__tgt_target_teams(i64 -1, i8* @{{[^,]+}}, i32 5, i8** %{{[^,]+}}, i8** %{{[^,]+}}, i{{64|32}}* {{.+}}@{{[^,]+}}, i32 0, i32 0), i64* {{.+}}@{{[^,]+}}, i32 0, i32 0), i32 {{.+}}, i32 1) 40 41 // CK1: call void @[[OFFL1:.+]](i{{32|64}} [[TE_PAR]], i{{32|64}} [[TH_PAR]], 42 #pragma omp target 43 #pragma omp teams distribute simd num_teams(te), thread_limit(th) aligned(a) simdlen(16) linear(i) 44 for(i = 0; i < n; i++) { 45 a[i] = 0; 46 } 47 48 // CK1: call i32 @__tgt_target_teams(i64 -1, i8* @{{[^,]+}}, i32 2, i8** %{{[^,]+}}, i8** %{{[^,]+}}, i{{64|32}}* {{.+}}@{{[^,]+}}, i32 0, i32 0), i64* {{.+}}@{{[^,]+}}, i32 0, i32 0), i32 0, i32 1) 49 // CK1: call void @[[OFFL2:.+]](i{{64|32}} %{{.+}}) 50 #pragma omp target 51 {{{ 52 #pragma omp teams distribute simd safelen(32) 53 for(int i = 0; i < n; i++) { 54 a[i] = 0; 55 } 56 }}} 57 58 // outlined target regions 59 // CK1: define internal void @[[OFFL1]](i{{32|64}} [[TE_ARG:%.+]], i{{32|64}} [[TH_ARG:%.+]], [100 x i{{32|64}}]* {{.+}}, i{{32|64}} {{.+}}, {{.+}}) 60 // CK1: [[TE_ADDR:%.+]] = alloca i{{32|64}}, 61 // CK1: [[TH_ADDR:%.+]] = alloca i{{32|64}}, 62 // CK1: store{{.+}} [[TE_ARG]], {{.+}} [[TE_ADDR]], 63 // CK1: store{{.+}} [[TH_ARG]], {{.+}} [[TH_ADDR]], 64 // CK1-64: [[TE_CONV:%.+]] = bitcast{{.+}} [[TE_ADDR]] to 65 // CK1-64: [[TH_CONV:%.+]] = bitcast{{.+}} [[TH_ADDR]] to 66 // CK1-64: [[TE_VAL:%.+]] = load i32, i32* [[TE_CONV]], 67 // CK1-64: [[TH_VAL:%.+]] = load i32, i32* [[TH_CONV]], 68 // CK1-32: [[TE_VAL:%.+]] = load i32, i32* [[TE_ADDR]], 69 // CK1-32: [[TH_VAL:%.+]] = load i32, i32* [[TH_ADDR]], 70 // CK1: {{%.+}} = call i32 @__kmpc_push_num_teams({{.+}}, {{.+}}, i32 [[TE_VAL]], i32 [[TH_VAL]]) 71 // CK1: call void {{.+}} @__kmpc_fork_teams({{.+}}, i32 3, {{.+}} @[[OUTL1:.+]] to {{.+}}, {{.+}}, {{.+}}) 72 // CK1: ret void 73 74 // CK1: define internal void @[[OUTL1]]({{.+}}) 75 // CK1: call void @__kmpc_for_static_init_4( 76 // CK1: call void @__kmpc_for_static_fini( 77 // CK1: ret void 78 79 // CK1: define internal void @[[OFFL2]]({{.+}}, {{.+}}) 80 // CK1: call void {{.+}} @__kmpc_fork_teams({{.+}}, i32 2, {{.+}} @[[OUTL2:.+]] to {{.+}}, {{.+}}, {{.+}}) 81 // CK1: ret void 82 83 // CK1: define internal void @[[OUTL2]]({{.+}}) 84 // CK1: call void @__kmpc_for_static_init_4( 85 // CK1: call void @__kmpc_for_static_fini( 86 // CK1: ret void 87 88 return a[0]; 89 } 90 91 // CK1-DAG: !{!"llvm.loop.vectorize.width", i32 16} 92 // CK1-DAG: !{!"llvm.loop.vectorize.enable", i1 true} 93 // CK1-DAG: !{!"llvm.loop.vectorize.width", i32 32} 94 95 #endif // CK1 96 97 // Test host codegen. 98 // RUN: %clang_cc1 -DCK2 -verify -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix CK2 --check-prefix CK2-64 99 // RUN: %clang_cc1 -DCK2 -fopenmp -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s 100 // RUN: %clang_cc1 -DCK2 -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix CK2 --check-prefix CK2-64 101 // RUN: %clang_cc1 -DCK2 -verify -fopenmp -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix CK2 --check-prefix CK2-32 102 // RUN: %clang_cc1 -DCK2 -fopenmp -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s 103 // RUN: %clang_cc1 -DCK2 -fopenmp -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix CK2 --check-prefix CK2-32 104 105 // RUN: %clang_cc1 -DCK2 -verify -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY1 %s 106 // RUN: %clang_cc1 -DCK2 -fopenmp-simd -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s 107 // RUN: %clang_cc1 -DCK2 -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY1 %s 108 // RUN: %clang_cc1 -DCK2 -verify -fopenmp-simd -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY1 %s 109 // RUN: %clang_cc1 -DCK2 -fopenmp-simd -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s 110 // RUN: %clang_cc1 -DCK2 -fopenmp-simd -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY1 %s 111 // SIMD-ONLY1-NOT: {{__kmpc|__tgt}} 112 #ifdef CK2 113 114 // CK2: define {{.*}}i32 @{{.+}}teams_local_argv( 115 int teams_local_arg(void) { 116 int n = 100; 117 int a[n]; 118 119 // CK2: call i32 @__tgt_target_teams(i64 -1, i8* @{{[^,]+}}, i32 3, i8** %{{[^,]+}}, i8** %{{[^,]+}}, i{{64|32}}* {{.+}}, i64* {{.+}}@{{[^,]+}}, i32 0, i32 0), i32 0, i32 1) 120 // CK2: call void @[[OFFL1:.+]](i{{64|32}} %{{.+}}) 121 #pragma omp target 122 #pragma omp teams distribute simd 123 for(int i = 0; i < n; i++) { 124 a[i] = 0; 125 } 126 127 // outlined target region 128 // CK2: define internal void @[[OFFL1]]({{.+}}, {{.+}}) 129 // CK2: call void {{.+}} @__kmpc_fork_teams({{.+}}, i32 3, {{.+}} @[[OUTL1:.+]] to {{.+}}, {{.+}}, {{.+}}) 130 // CK2: ret void 131 132 // CK2: define internal void @[[OUTL1]]({{.+}}) 133 // CK2: call void @__kmpc_for_static_init_4( 134 // CK2: call void @__kmpc_for_static_fini( 135 // CK2: ret void 136 137 return a[0]; 138 } 139 // CK2: !{!"llvm.loop.vectorize.enable", i1 true} 140 #endif // CK2 141 142 // Test host codegen. 143 // RUN: %clang_cc1 -DCK3 -verify -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix CK3 --check-prefix CK3-64 144 // RUN: %clang_cc1 -DCK3 -fopenmp -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s 145 // RUN: %clang_cc1 -DCK3 -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix CK3 --check-prefix CK3-64 146 // RUN: %clang_cc1 -DCK3 -verify -fopenmp -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix CK3 --check-prefix CK3-32 147 // RUN: %clang_cc1 -DCK3 -fopenmp -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s 148 // RUN: %clang_cc1 -DCK3 -fopenmp -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix CK3 --check-prefix CK3-32 149 150 // RUN: %clang_cc1 -DCK3 -verify -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY2 %s 151 // RUN: %clang_cc1 -DCK3 -fopenmp-simd -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s 152 // RUN: %clang_cc1 -DCK3 -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY2 %s 153 // RUN: %clang_cc1 -DCK3 -verify -fopenmp-simd -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY2 %s 154 // RUN: %clang_cc1 -DCK3 -fopenmp-simd -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s 155 // RUN: %clang_cc1 -DCK3 -fopenmp-simd -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY2 %s 156 // SIMD-ONLY2-NOT: {{__kmpc|__tgt}} 157 #ifdef CK3 158 159 // CK3: [[SSI:%.+]] = type { [{{.+}} x i32], float } 160 161 template <typename T, int X, long long Y> 162 struct SS{ 163 T a[X]; 164 float b; 165 // CK3: define {{.*}}i32 @{{.+}}foo{{.+}}( 166 int foo(void) { 167 168 // CK3: call i32 @__tgt_target_teams(i64 -1, i8* @{{[^,]+}}, i32 2, i8** %{{[^,]+}}, i8** %{{[^,]+}}, i{{64|32}}* %{{.+}}, i64* {{.+}}@{{[^,]+}}, i32 0, i32 0), i32 0, i32 1) 169 // CK3: call void @[[OFFL1:.+]]([[SSI]]* %{{.+}}) 170 #pragma omp target 171 #pragma omp teams distribute simd 172 for(int i = 0; i < X; i++) { 173 a[i] = (T)0; 174 } 175 176 // outlined target region 177 // CK3: define internal void @[[OFFL1]]([[SSI]]* {{.+}}) 178 // CK3: call void {{.+}} @__kmpc_fork_teams({{.+}}, i32 1, {{.+}} @[[OUTL1:.+]] to {{.+}}, {{.+}}, {{.+}}) 179 // CK3: ret void 180 181 // CK3: define internal void @[[OUTL1]]({{.+}}) 182 // CK3: call void @__kmpc_for_static_init_4( 183 // CK3: call void @__kmpc_for_static_fini( 184 // CK3: ret void 185 186 return a[0]; 187 } 188 }; 189 190 int teams_template_struct(void) { 191 SS<int, 123, 456> V; 192 return V.foo(); 193 194 } 195 // CK3: !{!"llvm.loop.vectorize.enable", i1 true} 196 #endif // CK3 197 198 // Test host codegen. 199 // RUN: %clang_cc1 -DCK4 -verify -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix CK4 --check-prefix CK4-64 200 // RUN: %clang_cc1 -DCK4 -fopenmp -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s 201 // RUN: %clang_cc1 -DCK4 -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix CK4 --check-prefix CK4-64 202 // RUN: %clang_cc1 -DCK4 -verify -fopenmp -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix CK4 --check-prefix CK4-32 203 // RUN: %clang_cc1 -DCK4 -fopenmp -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s 204 // RUN: %clang_cc1 -DCK4 -fopenmp -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix CK4 --check-prefix CK4-32 205 206 // RUN: %clang_cc1 -DCK4 -verify -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY3 %s 207 // RUN: %clang_cc1 -DCK4 -fopenmp-simd -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s 208 // RUN: %clang_cc1 -DCK4 -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY3 %s 209 // RUN: %clang_cc1 -DCK4 -verify -fopenmp-simd -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY3 %s 210 // RUN: %clang_cc1 -DCK4 -fopenmp-simd -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s 211 // RUN: %clang_cc1 -DCK4 -fopenmp-simd -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY3 %s 212 // SIMD-ONLY3-NOT: {{__kmpc|__tgt}} 213 214 #ifdef CK4 215 216 template <typename T, int n> 217 int tmain(T argc) { 218 T a[n]; 219 int te = n/128; 220 int th = 128; 221 #pragma omp target 222 #pragma omp teams distribute simd num_teams(te) thread_limit(th) 223 for(int i = 0; i < n; i++) { 224 a[i] = (T)0; 225 } 226 return 0; 227 } 228 229 int main (int argc, char **argv) { 230 int n = 100; 231 int a[n]; 232 #pragma omp target 233 #pragma omp teams distribute simd 234 for(int i = 0; i < n; i++) { 235 a[i] = 0; 236 } 237 return tmain<int, 10>(argc); 238 } 239 240 // CK4: define {{.*}}i32 @{{[^,]+}}(i{{.+}}{{.+}} %[[ARGC:.+]], {{.+}}) 241 // CK4: call i32 @__tgt_target_teams(i64 -1, i8* @{{[^,]+}}, i32 3, i8** %{{[^,]+}}, i8** %{{[^,]+}}, i{{64|32}}* {{.+}}, i64* {{.+}}@{{[^,]+}}, i32 0, i32 0), i32 0, i32 1) 242 // CK4: call void @[[OFFL1:.+]]({{.+}}) 243 // CK4: {{%.+}} = call{{.*}} i32 @[[TMAIN:.+]]({{.+}}) 244 // CK4: ret 245 246 // CK4: define {{.*}}void @[[OFFL1]]({{.+}}) 247 // CK4: call void {{.+}} @__kmpc_fork_teams({{.+}}, i32 3, {{.+}} @[[OUTL1:.+]] to {{.+}}, {{.+}}, {{.+}}) 248 // CK4: ret void 249 250 // CK4: define internal void @[[OUTL1]]({{.+}}) 251 // CK4: call void @__kmpc_for_static_init_4( 252 // CK4: call void @__kmpc_for_static_fini( 253 // CK4: ret void 254 255 // CK4: define {{.*}}i32 @[[TMAIN]]({{.+}}) 256 // CK4: call i32 @__tgt_target_teams(i64 -1, i8* @{{[^,]+}}, i32 3, i8** %{{[^,]+}}, i8** %{{[^,]+}}, i{{64|32}}* {{.+}}@{{[^,]+}}, i32 0, i32 0), i64* {{.+}}@{{[^,]+}}, i32 0, i32 0), i32 {{.+}}, i32 1) 257 // CK4: call void @[[OFFLT:.+]]({{.+}}) 258 // CK4: ret 259 // CK4-NEXT: } 260 261 // CK4: define {{.*}}void @[[OFFLT]](i{{32|64}} [[TE_ARG:%.+]], i{{32|64}} [[TH_ARG:%.+]], {{.+}}) 262 // CK4: [[TE_ADDR:%.+]] = alloca i{{32|64}}, 263 // CK4: [[TH_ADDR:%.+]] = alloca i{{32|64}}, 264 // CK4: store{{.+}} [[TE_ARG]], {{.+}} [[TE_ADDR]], 265 // CK4: store{{.+}} [[TH_ARG]], {{.+}} [[TH_ADDR]], 266 // CK4-64: [[TE_CONV:%.+]] = bitcast{{.+}} [[TE_ADDR]] to 267 // CK4-64: [[TH_CONV:%.+]] = bitcast{{.+}} [[TH_ADDR]] to 268 // CK4-64: [[TE_VAL:%.+]] = load i32, i32* [[TE_CONV]], 269 // CK4-64: [[TH_VAL:%.+]] = load i32, i32* [[TH_CONV]], 270 // CK4-32: [[TE_VAL:%.+]] = load i32, i32* [[TE_ADDR]], 271 // CK4-32: [[TH_VAL:%.+]] = load i32, i32* [[TH_ADDR]], 272 // CK4: {{%.+}} = call i32 @__kmpc_push_num_teams({{.+}}, {{.+}}, i32 [[TE_VAL]], i32 [[TH_VAL]]) 273 // CK4: call void {{.+}} @__kmpc_fork_teams({{.+}}, i32 1, {{.+}} @[[OUTLT:.+]] to {{.+}}, {{.+}}, {{.+}}) 274 // CK4: ret void 275 276 // CK4: define internal void @[[OUTLT]]({{.+}}) 277 // CK4: call void @__kmpc_for_static_init_4( 278 // CK4: call void @__kmpc_for_static_fini( 279 // CK4: ret void 280 281 // CK4: !{!"llvm.loop.vectorize.enable", i1 true} 282 #endif // CK4 283 #endif 284 285