1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --include-generated-funcs --replace-value-regex "__omp_offloading_[0-9a-z]+_[0-9a-z]+" "reduction_size[.].+[.]" "pl_cond[.].+[.|,]" --prefix-filecheck-ir-name _ 2 // expected-no-diagnostics 3 #ifndef HEADER 4 #define HEADER 5 6 #ifdef CK1 7 ///==========================================================================/// 8 // RUN: %clang_cc1 -no-opaque-pointers -DCK1 -verify -fopenmp -x c++ -triple x86_64-unknown-unknown -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck %s --check-prefix=CHECK1 9 // RUN: %clang_cc1 -no-opaque-pointers -DCK1 -fopenmp -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s 10 // RUN: %clang_cc1 -no-opaque-pointers -DCK1 -fopenmp -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK1 11 12 // RUN: %clang_cc1 -no-opaque-pointers -DCK1 -verify -fopenmp-simd -x c++ -triple x86_64-unknown-unknown -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}" 13 // RUN: %clang_cc1 -no-opaque-pointers -DCK1 -fopenmp-simd -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s 14 // RUN: %clang_cc1 -no-opaque-pointers -DCK1 -fopenmp-simd -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}" 15 16 17 void foo() { extern void mayThrow(); mayThrow(); } 18 19 void parallel_master() { 20 #pragma omp parallel master 21 foo(); 22 } 23 24 25 26 #endif 27 28 #ifdef CK2 29 ///==========================================================================/// 30 // RUN: %clang_cc1 -no-opaque-pointers -DCK2 -verify -fopenmp -x c++ -triple x86_64-unknown-unknown -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck %s --check-prefix=CHECK5 31 // RUN: %clang_cc1 -no-opaque-pointers -DCK2 -fopenmp -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s 32 // RUN: %clang_cc1 -no-opaque-pointers -DCK2 -fopenmp -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK5 33 34 // RUN: %clang_cc1 -no-opaque-pointers -DCK2 -verify -fopenmp-simd -x c++ -triple x86_64-unknown-unknown -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}" 35 // RUN: %clang_cc1 -no-opaque-pointers -DCK2 -fopenmp-simd -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s 36 // RUN: %clang_cc1 -no-opaque-pointers -DCK2 -fopenmp-simd -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}" 37 38 39 void parallel_master_private() { 40 int a; 41 #pragma omp parallel master private(a) 42 a++; 43 } 44 45 46 47 #endif 48 49 #ifdef CK3 50 ///==========================================================================/// 51 // RUN: %clang_cc1 -no-opaque-pointers -DCK3 -verify -fopenmp -x c++ -triple x86_64-unknown-unknown -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck %s --check-prefix=CHECK9 52 // RUN: %clang_cc1 -no-opaque-pointers -DCK3 -fopenmp -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s 53 // RUN: %clang_cc1 -no-opaque-pointers -DCK3 -fopenmp -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK9 54 55 // RUN: %clang_cc1 -no-opaque-pointers -DCK3 -verify -fopenmp-simd -x c++ -triple x86_64-unknown-unknown -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}" 56 // RUN: %clang_cc1 -no-opaque-pointers -DCK3 -fopenmp-simd -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s 57 // RUN: %clang_cc1 -no-opaque-pointers -DCK3 -fopenmp-simd -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}" 58 59 60 void parallel_master_private() { 61 int a; 62 #pragma omp parallel master default(shared) 63 a++; 64 } 65 66 67 68 #endif 69 70 #ifdef CK31 71 ///==========================================================================/// 72 // RUN: %clang_cc1 -no-opaque-pointers -DCK31 -fopenmp-version=51 -verify -fopenmp -x c++ -triple x86_64-unknown-unknown -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck %s --check-prefix=CHECK13 73 // RUN: %clang_cc1 -no-opaque-pointers -DCK31 -fopenmp-version=51 -fopenmp -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s 74 // RUN: %clang_cc1 -no-opaque-pointers -DCK31 -fopenmp-version=51 -fopenmp -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK13 75 76 // RUN: %clang_cc1 -no-opaque-pointers -DCK31 -fopenmp-version=51 -verify -fopenmp-simd -x c++ -triple x86_64-unknown-unknown -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}" 77 // RUN: %clang_cc1 -no-opaque-pointers -DCK31 -fopenmp-version=51 -fopenmp-simd -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s 78 // RUN: %clang_cc1 -no-opaque-pointers -DCK31 -fopenmp-version=51 -fopenmp-simd -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}" 79 80 81 void parallel_master_default_firstprivate() { 82 int a; 83 #pragma omp parallel master default(firstprivate) 84 a++; 85 } 86 87 88 89 90 91 #endif 92 93 #ifdef CK32 94 ///==========================================================================/// 95 // RUN: %clang_cc1 -no-opaque-pointers -DCK32 -fopenmp-version=51 -verify -fopenmp -x c++ -triple x86_64-unknown-unknown -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck %s --check-prefix=CHECK17 96 // RUN: %clang_cc1 -no-opaque-pointers -DCK32 -fopenmp-version=51 -fopenmp -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s 97 // RUN: %clang_cc1 -no-opaque-pointers -DCK32 -fopenmp-version=51 -fopenmp -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK17 98 99 // RUN: %clang_cc1 -no-opaque-pointers -DCK32 -fopenmp-version=51 -verify -fopenmp-simd -x c++ -triple x86_64-unknown-unknown -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}" 100 // RUN: %clang_cc1 -no-opaque-pointers -DCK32 -fopenmp-version=51 -fopenmp-simd -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s 101 // RUN: %clang_cc1 -no-opaque-pointers -DCK32 -fopenmp-version=51 -fopenmp-simd -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}" 102 103 104 struct St { 105 int a, b; 106 static int y; 107 St() : a(0), b(0) {} 108 ~St() {} 109 }; 110 int St::y = 0; 111 112 void parallel_master_default_firstprivate() { 113 St a = St(); 114 static int y = 0; 115 #pragma omp parallel master default(firstprivate) 116 { 117 a.a += 1; 118 a.b += 1; 119 y++; 120 a.y++; 121 } 122 } 123 124 125 126 127 128 129 130 131 #endif 132 133 #ifdef CK4 134 ///==========================================================================/// 135 // RUN: %clang_cc1 -no-opaque-pointers -DCK4 -verify -fopenmp -x c++ -triple x86_64-unknown-unknown -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck %s --check-prefix=CHECK21 136 // RUN: %clang_cc1 -no-opaque-pointers -DCK4 -fopenmp -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s 137 // RUN: %clang_cc1 -no-opaque-pointers -DCK4 -fopenmp -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK21 138 139 // RUN: %clang_cc1 -no-opaque-pointers -DCK4 -verify -fopenmp-simd -x c++ -triple x86_64-unknown-unknown -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}" 140 // RUN: %clang_cc1 -no-opaque-pointers -DCK4 -fopenmp-simd -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s 141 // RUN: %clang_cc1 -no-opaque-pointers -DCK4 -fopenmp-simd -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}" 142 143 144 void parallel_master_firstprivate() { 145 int a; 146 #pragma omp parallel master firstprivate(a) 147 a++; 148 } 149 150 151 152 #endif 153 154 #ifdef CK5 155 ///==========================================================================/// 156 // RUN: %clang_cc1 -no-opaque-pointers -DCK5 -verify -fopenmp -fopenmp -fnoopenmp-use-tls -x c++ -triple x86_64-unknown-unknown -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck %s --check-prefix=CHECK25 157 // RUN: %clang_cc1 -no-opaque-pointers -DCK5 -fopenmp -fopenmp -fnoopenmp-use-tls -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s 158 // RUN: %clang_cc1 -no-opaque-pointers -DCK5 -fopenmp -fopenmp -fnoopenmp-use-tls -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK25 159 160 // RUN: %clang_cc1 -no-opaque-pointers -DCK5 -verify -fopenmp-simd -fnoopenmp-use-tls -x c++ -triple x86_64-unknown-unknown -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}" 161 // RUN: %clang_cc1 -no-opaque-pointers -DCK5 -fopenmp-simd -fnoopenmp-use-tls -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s 162 // RUN: %clang_cc1 -no-opaque-pointers -DCK5 -fopenmp-simd -fnoopenmp-use-tls -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}" 163 164 // RUN: %clang_cc1 -no-opaque-pointers -DCK5 -verify -fopenmp -x c++ -triple x86_64-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK29 165 // RUN: %clang_cc1 -no-opaque-pointers -DCK5 -fopenmp -x c++ -std=c++11 -triple x86_64-unknown-unknown -emit-pch -o %t %s 166 167 // RUN: %clang_cc1 -no-opaque-pointers -DCK5 -fopenmp-simd -x c++ -std=c++11 -triple x86_64-unknown-unknown -emit-pch -o %t %s 168 169 170 int a; 171 #pragma omp threadprivate(a) 172 173 void parallel_master_copyin() { 174 #pragma omp parallel master copyin(a) 175 a++; 176 } 177 178 179 180 181 182 183 // TLC-CHECK-DAG: [[INC:%.+]] = add nsw i32 [[TEN]], 1 184 // TLC-CHECK-DAG: store i32 [[INC]], i32* [[TEN]] 185 186 #endif 187 #ifdef CK6 188 ///==========================================================================/// 189 // RUN: %clang_cc1 -no-opaque-pointers -DCK6 -fopenmp -x c++ -std=c++11 -triple x86_64-unknown-unknown -emit-pch -o %t %s 190 191 // RUN: %clang_cc1 -no-opaque-pointers -DCK6 -fopenmp-simd -x c++ -std=c++11 -triple x86_64-unknown-unknown -emit-pch -o %t %s 192 193 194 void parallel_master_reduction() { 195 int g; 196 #pragma omp parallel master reduction(+:g) 197 g = 1; 198 } 199 200 201 202 203 204 // switch 205 206 // case 1: 207 208 // case 2: 209 210 #endif 211 #ifdef CK7 212 ///==========================================================================/// 213 // RUN: %clang_cc1 -no-opaque-pointers -DCK7 -fopenmp -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s 214 215 // RUN: %clang_cc1 -no-opaque-pointers -DCK7 -fopenmp-simd -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s 216 217 218 void parallel_master_if() { 219 #pragma omp parallel master if (parallel: false) 220 parallel_master_if(); 221 } 222 223 224 225 #endif 226 #ifdef CK8 227 ///==========================================================================/// 228 // RUN: %clang_cc1 -no-opaque-pointers -DCK8 -fopenmp -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s 229 230 // RUN: %clang_cc1 -no-opaque-pointers -DCK8 -fopenmp-simd -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s 231 232 typedef __INTPTR_TYPE__ intptr_t; 233 234 235 void foo(); 236 237 struct S { 238 intptr_t a, b, c; 239 S(intptr_t a) : a(a) {} 240 operator char() { return a; } 241 ~S() {} 242 }; 243 244 template <typename T> 245 T tmain() { 246 #pragma omp parallel master proc_bind(master) 247 foo(); 248 return T(); 249 } 250 251 int main() { 252 #pragma omp parallel master proc_bind(spread) 253 foo(); 254 #pragma omp parallel master proc_bind(close) 255 foo(); 256 return tmain<int>(); 257 } 258 259 260 261 262 #endif 263 #ifdef CK9 264 ///==========================================================================/// 265 // RUN: %clang_cc1 -no-opaque-pointers -DCK9 -fopenmp -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s 266 267 // RUN: %clang_cc1 -no-opaque-pointers -DCK9 -fopenmp-simd -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s 268 typedef void **omp_allocator_handle_t; 269 extern const omp_allocator_handle_t omp_null_allocator; 270 extern const omp_allocator_handle_t omp_default_mem_alloc; 271 extern const omp_allocator_handle_t omp_large_cap_mem_alloc; 272 extern const omp_allocator_handle_t omp_const_mem_alloc; 273 extern const omp_allocator_handle_t omp_high_bw_mem_alloc; 274 extern const omp_allocator_handle_t omp_low_lat_mem_alloc; 275 extern const omp_allocator_handle_t omp_cgroup_mem_alloc; 276 extern const omp_allocator_handle_t omp_pteam_mem_alloc; 277 extern const omp_allocator_handle_t omp_thread_mem_alloc; 278 279 void parallel_master_allocate() { 280 int a; 281 omp_allocator_handle_t myalloc = nullptr; 282 #pragma omp parallel master firstprivate(a) allocate(myalloc:a) 283 a++; 284 } 285 286 287 #endif 288 #endif 289 // CHECK1-LABEL: define {{[^@]+}}@_Z3foov 290 // CHECK1-SAME: () #[[ATTR0:[0-9]+]] { 291 // CHECK1-NEXT: entry: 292 // CHECK1-NEXT: call void @_Z8mayThrowv() 293 // CHECK1-NEXT: ret void 294 // 295 // 296 // CHECK1-LABEL: define {{[^@]+}}@_Z15parallel_masterv 297 // CHECK1-SAME: () #[[ATTR2:[0-9]+]] { 298 // CHECK1-NEXT: entry: 299 // CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 0, void (i32*, i32*, ...)* bitcast (void (i32*, i32*)* @.omp_outlined. to void (i32*, i32*, ...)*)) 300 // CHECK1-NEXT: ret void 301 // 302 // 303 // CHECK1-LABEL: define {{[^@]+}}@.omp_outlined. 304 // CHECK1-SAME: (i32* noalias noundef [[DOTGLOBAL_TID_:%.*]], i32* noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR3:[0-9]+]] personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { 305 // CHECK1-NEXT: entry: 306 // CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8 307 // CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8 308 // CHECK1-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8 309 // CHECK1-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8 310 // CHECK1-NEXT: [[TMP0:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8 311 // CHECK1-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4 312 // CHECK1-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]]) 313 // CHECK1-NEXT: [[TMP3:%.*]] = icmp ne i32 [[TMP2]], 0 314 // CHECK1-NEXT: br i1 [[TMP3]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]] 315 // CHECK1: omp_if.then: 316 // CHECK1-NEXT: invoke void @_Z3foov() 317 // CHECK1-NEXT: to label [[INVOKE_CONT:%.*]] unwind label [[TERMINATE_LPAD:%.*]] 318 // CHECK1: invoke.cont: 319 // CHECK1-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]]) 320 // CHECK1-NEXT: br label [[OMP_IF_END]] 321 // CHECK1: omp_if.end: 322 // CHECK1-NEXT: ret void 323 // CHECK1: terminate.lpad: 324 // CHECK1-NEXT: [[TMP4:%.*]] = landingpad { i8*, i32 } 325 // CHECK1-NEXT: catch i8* null 326 // CHECK1-NEXT: [[TMP5:%.*]] = extractvalue { i8*, i32 } [[TMP4]], 0 327 // CHECK1-NEXT: call void @__clang_call_terminate(i8* [[TMP5]]) #[[ATTR6:[0-9]+]] 328 // CHECK1-NEXT: unreachable 329 // 330 // 331 // CHECK1-LABEL: define {{[^@]+}}@__clang_call_terminate 332 // CHECK1-SAME: (i8* [[TMP0:%.*]]) #[[ATTR5:[0-9]+]] comdat { 333 // CHECK1-NEXT: [[TMP2:%.*]] = call i8* @__cxa_begin_catch(i8* [[TMP0]]) #[[ATTR4:[0-9]+]] 334 // CHECK1-NEXT: call void @_ZSt9terminatev() #[[ATTR6]] 335 // CHECK1-NEXT: unreachable 336 // 337 // 338 // CHECK5-LABEL: define {{[^@]+}}@_Z23parallel_master_privatev 339 // CHECK5-SAME: () #[[ATTR0:[0-9]+]] { 340 // CHECK5-NEXT: entry: 341 // CHECK5-NEXT: [[A:%.*]] = alloca i32, align 4 342 // CHECK5-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 0, void (i32*, i32*, ...)* bitcast (void (i32*, i32*)* @.omp_outlined. to void (i32*, i32*, ...)*)) 343 // CHECK5-NEXT: ret void 344 // 345 // 346 // CHECK5-LABEL: define {{[^@]+}}@.omp_outlined. 347 // CHECK5-SAME: (i32* noalias noundef [[DOTGLOBAL_TID_:%.*]], i32* noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1:[0-9]+]] { 348 // CHECK5-NEXT: entry: 349 // CHECK5-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8 350 // CHECK5-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8 351 // CHECK5-NEXT: [[A:%.*]] = alloca i32, align 4 352 // CHECK5-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8 353 // CHECK5-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8 354 // CHECK5-NEXT: [[TMP0:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8 355 // CHECK5-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4 356 // CHECK5-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]]) 357 // CHECK5-NEXT: [[TMP3:%.*]] = icmp ne i32 [[TMP2]], 0 358 // CHECK5-NEXT: br i1 [[TMP3]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]] 359 // CHECK5: omp_if.then: 360 // CHECK5-NEXT: [[TMP4:%.*]] = load i32, i32* [[A]], align 4 361 // CHECK5-NEXT: [[INC:%.*]] = add nsw i32 [[TMP4]], 1 362 // CHECK5-NEXT: store i32 [[INC]], i32* [[A]], align 4 363 // CHECK5-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]]) 364 // CHECK5-NEXT: br label [[OMP_IF_END]] 365 // CHECK5: omp_if.end: 366 // CHECK5-NEXT: ret void 367 // 368 // 369 // CHECK9-LABEL: define {{[^@]+}}@_Z23parallel_master_privatev 370 // CHECK9-SAME: () #[[ATTR0:[0-9]+]] { 371 // CHECK9-NEXT: entry: 372 // CHECK9-NEXT: [[A:%.*]] = alloca i32, align 4 373 // CHECK9-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @.omp_outlined. to void (i32*, i32*, ...)*), i32* [[A]]) 374 // CHECK9-NEXT: ret void 375 // 376 // 377 // CHECK9-LABEL: define {{[^@]+}}@.omp_outlined. 378 // CHECK9-SAME: (i32* noalias noundef [[DOTGLOBAL_TID_:%.*]], i32* noalias noundef [[DOTBOUND_TID_:%.*]], i32* noundef nonnull align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR1:[0-9]+]] { 379 // CHECK9-NEXT: entry: 380 // CHECK9-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8 381 // CHECK9-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8 382 // CHECK9-NEXT: [[A_ADDR:%.*]] = alloca i32*, align 8 383 // CHECK9-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8 384 // CHECK9-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8 385 // CHECK9-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 8 386 // CHECK9-NEXT: [[TMP0:%.*]] = load i32*, i32** [[A_ADDR]], align 8 387 // CHECK9-NEXT: [[TMP1:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8 388 // CHECK9-NEXT: [[TMP2:%.*]] = load i32, i32* [[TMP1]], align 4 389 // CHECK9-NEXT: [[TMP3:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]]) 390 // CHECK9-NEXT: [[TMP4:%.*]] = icmp ne i32 [[TMP3]], 0 391 // CHECK9-NEXT: br i1 [[TMP4]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]] 392 // CHECK9: omp_if.then: 393 // CHECK9-NEXT: [[TMP5:%.*]] = load i32, i32* [[TMP0]], align 4 394 // CHECK9-NEXT: [[INC:%.*]] = add nsw i32 [[TMP5]], 1 395 // CHECK9-NEXT: store i32 [[INC]], i32* [[TMP0]], align 4 396 // CHECK9-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]]) 397 // CHECK9-NEXT: br label [[OMP_IF_END]] 398 // CHECK9: omp_if.end: 399 // CHECK9-NEXT: ret void 400 // 401 // 402 // CHECK13-LABEL: define {{[^@]+}}@_Z36parallel_master_default_firstprivatev 403 // CHECK13-SAME: () #[[ATTR0:[0-9]+]] { 404 // CHECK13-NEXT: entry: 405 // CHECK13-NEXT: [[A:%.*]] = alloca i32, align 4 406 // CHECK13-NEXT: [[A_CASTED:%.*]] = alloca i64, align 8 407 // CHECK13-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4 408 // CHECK13-NEXT: [[CONV:%.*]] = bitcast i64* [[A_CASTED]] to i32* 409 // CHECK13-NEXT: store i32 [[TMP0]], i32* [[CONV]], align 4 410 // CHECK13-NEXT: [[TMP1:%.*]] = load i64, i64* [[A_CASTED]], align 8 411 // CHECK13-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i64)* @.omp_outlined. to void (i32*, i32*, ...)*), i64 [[TMP1]]) 412 // CHECK13-NEXT: ret void 413 // 414 // 415 // CHECK13-LABEL: define {{[^@]+}}@.omp_outlined. 416 // CHECK13-SAME: (i32* noalias noundef [[DOTGLOBAL_TID_:%.*]], i32* noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[A:%.*]]) #[[ATTR1:[0-9]+]] { 417 // CHECK13-NEXT: entry: 418 // CHECK13-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8 419 // CHECK13-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8 420 // CHECK13-NEXT: [[A_ADDR:%.*]] = alloca i64, align 8 421 // CHECK13-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8 422 // CHECK13-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8 423 // CHECK13-NEXT: store i64 [[A]], i64* [[A_ADDR]], align 8 424 // CHECK13-NEXT: [[CONV:%.*]] = bitcast i64* [[A_ADDR]] to i32* 425 // CHECK13-NEXT: [[TMP0:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8 426 // CHECK13-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4 427 // CHECK13-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]]) 428 // CHECK13-NEXT: [[TMP3:%.*]] = icmp ne i32 [[TMP2]], 0 429 // CHECK13-NEXT: br i1 [[TMP3]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]] 430 // CHECK13: omp_if.then: 431 // CHECK13-NEXT: [[TMP4:%.*]] = load i32, i32* [[CONV]], align 4 432 // CHECK13-NEXT: [[INC:%.*]] = add nsw i32 [[TMP4]], 1 433 // CHECK13-NEXT: store i32 [[INC]], i32* [[CONV]], align 4 434 // CHECK13-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]]) 435 // CHECK13-NEXT: br label [[OMP_IF_END]] 436 // CHECK13: omp_if.end: 437 // CHECK13-NEXT: ret void 438 // 439 // 440 // CHECK17-LABEL: define {{[^@]+}}@_Z36parallel_master_default_firstprivatev 441 // CHECK17-SAME: () #[[ATTR0:[0-9]+]] { 442 // CHECK17-NEXT: entry: 443 // CHECK17-NEXT: [[A:%.*]] = alloca [[STRUCT_ST:%.*]], align 4 444 // CHECK17-NEXT: [[Y_CASTED:%.*]] = alloca i64, align 8 445 // CHECK17-NEXT: [[Y_CASTED1:%.*]] = alloca i64, align 8 446 // CHECK17-NEXT: call void @_ZN2StC1Ev(%struct.St* noundef nonnull align 4 dereferenceable(8) [[A]]) 447 // CHECK17-NEXT: [[TMP0:%.*]] = load i32, i32* @_ZZ36parallel_master_default_firstprivatevE1y, align 4 448 // CHECK17-NEXT: [[CONV:%.*]] = bitcast i64* [[Y_CASTED]] to i32* 449 // CHECK17-NEXT: store i32 [[TMP0]], i32* [[CONV]], align 4 450 // CHECK17-NEXT: [[TMP1:%.*]] = load i64, i64* [[Y_CASTED]], align 8 451 // CHECK17-NEXT: [[TMP2:%.*]] = load i32, i32* @_ZN2St1yE, align 4 452 // CHECK17-NEXT: [[CONV2:%.*]] = bitcast i64* [[Y_CASTED1]] to i32* 453 // CHECK17-NEXT: store i32 [[TMP2]], i32* [[CONV2]], align 4 454 // CHECK17-NEXT: [[TMP3:%.*]] = load i64, i64* [[Y_CASTED1]], align 8 455 // CHECK17-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 3, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.St*, i64, i64)* @.omp_outlined. to void (i32*, i32*, ...)*), %struct.St* [[A]], i64 [[TMP1]], i64 [[TMP3]]) 456 // CHECK17-NEXT: call void @_ZN2StD1Ev(%struct.St* noundef nonnull align 4 dereferenceable(8) [[A]]) #[[ATTR4:[0-9]+]] 457 // CHECK17-NEXT: ret void 458 // 459 // 460 // CHECK17-LABEL: define {{[^@]+}}@_ZN2StC1Ev 461 // CHECK17-SAME: (%struct.St* noundef nonnull align 4 dereferenceable(8) [[THIS:%.*]]) unnamed_addr #[[ATTR1:[0-9]+]] comdat align 2 { 462 // CHECK17-NEXT: entry: 463 // CHECK17-NEXT: [[THIS_ADDR:%.*]] = alloca %struct.St*, align 8 464 // CHECK17-NEXT: store %struct.St* [[THIS]], %struct.St** [[THIS_ADDR]], align 8 465 // CHECK17-NEXT: [[THIS1:%.*]] = load %struct.St*, %struct.St** [[THIS_ADDR]], align 8 466 // CHECK17-NEXT: call void @_ZN2StC2Ev(%struct.St* noundef nonnull align 4 dereferenceable(8) [[THIS1]]) 467 // CHECK17-NEXT: ret void 468 // 469 // 470 // CHECK17-LABEL: define {{[^@]+}}@.omp_outlined. 471 // CHECK17-SAME: (i32* noalias noundef [[DOTGLOBAL_TID_:%.*]], i32* noalias noundef [[DOTBOUND_TID_:%.*]], %struct.St* noundef nonnull align 4 dereferenceable(8) [[A:%.*]], i64 noundef [[Y:%.*]], i64 noundef [[Y1:%.*]]) #[[ATTR2:[0-9]+]] { 472 // CHECK17-NEXT: entry: 473 // CHECK17-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8 474 // CHECK17-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8 475 // CHECK17-NEXT: [[A_ADDR:%.*]] = alloca %struct.St*, align 8 476 // CHECK17-NEXT: [[Y_ADDR:%.*]] = alloca i64, align 8 477 // CHECK17-NEXT: [[Y_ADDR2:%.*]] = alloca i64, align 8 478 // CHECK17-NEXT: [[A4:%.*]] = alloca [[STRUCT_ST:%.*]], align 4 479 // CHECK17-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8 480 // CHECK17-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8 481 // CHECK17-NEXT: store %struct.St* [[A]], %struct.St** [[A_ADDR]], align 8 482 // CHECK17-NEXT: store i64 [[Y]], i64* [[Y_ADDR]], align 8 483 // CHECK17-NEXT: store i64 [[Y1]], i64* [[Y_ADDR2]], align 8 484 // CHECK17-NEXT: [[TMP0:%.*]] = load %struct.St*, %struct.St** [[A_ADDR]], align 8 485 // CHECK17-NEXT: [[CONV:%.*]] = bitcast i64* [[Y_ADDR]] to i32* 486 // CHECK17-NEXT: [[CONV3:%.*]] = bitcast i64* [[Y_ADDR2]] to i32* 487 // CHECK17-NEXT: [[TMP1:%.*]] = bitcast %struct.St* [[A4]] to i8* 488 // CHECK17-NEXT: [[TMP2:%.*]] = bitcast %struct.St* [[TMP0]] to i8* 489 // CHECK17-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 [[TMP1]], i8* align 4 [[TMP2]], i64 8, i1 false) 490 // CHECK17-NEXT: [[TMP3:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8 491 // CHECK17-NEXT: [[TMP4:%.*]] = load i32, i32* [[TMP3]], align 4 492 // CHECK17-NEXT: [[TMP5:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP4]]) 493 // CHECK17-NEXT: [[TMP6:%.*]] = icmp ne i32 [[TMP5]], 0 494 // CHECK17-NEXT: br i1 [[TMP6]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]] 495 // CHECK17: omp_if.then: 496 // CHECK17-NEXT: [[A5:%.*]] = getelementptr inbounds [[STRUCT_ST]], %struct.St* [[A4]], i32 0, i32 0 497 // CHECK17-NEXT: [[TMP7:%.*]] = load i32, i32* [[A5]], align 4 498 // CHECK17-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP7]], 1 499 // CHECK17-NEXT: store i32 [[ADD]], i32* [[A5]], align 4 500 // CHECK17-NEXT: [[B:%.*]] = getelementptr inbounds [[STRUCT_ST]], %struct.St* [[A4]], i32 0, i32 1 501 // CHECK17-NEXT: [[TMP8:%.*]] = load i32, i32* [[B]], align 4 502 // CHECK17-NEXT: [[ADD6:%.*]] = add nsw i32 [[TMP8]], 1 503 // CHECK17-NEXT: store i32 [[ADD6]], i32* [[B]], align 4 504 // CHECK17-NEXT: [[TMP9:%.*]] = load i32, i32* [[CONV]], align 4 505 // CHECK17-NEXT: [[INC:%.*]] = add nsw i32 [[TMP9]], 1 506 // CHECK17-NEXT: store i32 [[INC]], i32* [[CONV]], align 4 507 // CHECK17-NEXT: [[TMP10:%.*]] = load i32, i32* @_ZN2St1yE, align 4 508 // CHECK17-NEXT: [[INC7:%.*]] = add nsw i32 [[TMP10]], 1 509 // CHECK17-NEXT: store i32 [[INC7]], i32* @_ZN2St1yE, align 4 510 // CHECK17-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP4]]) 511 // CHECK17-NEXT: br label [[OMP_IF_END]] 512 // CHECK17: omp_if.end: 513 // CHECK17-NEXT: call void @_ZN2StD1Ev(%struct.St* noundef nonnull align 4 dereferenceable(8) [[A4]]) #[[ATTR4]] 514 // CHECK17-NEXT: ret void 515 // 516 // 517 // CHECK17-LABEL: define {{[^@]+}}@_ZN2StD1Ev 518 // CHECK17-SAME: (%struct.St* noundef nonnull align 4 dereferenceable(8) [[THIS:%.*]]) unnamed_addr #[[ATTR5:[0-9]+]] comdat align 2 { 519 // CHECK17-NEXT: entry: 520 // CHECK17-NEXT: [[THIS_ADDR:%.*]] = alloca %struct.St*, align 8 521 // CHECK17-NEXT: store %struct.St* [[THIS]], %struct.St** [[THIS_ADDR]], align 8 522 // CHECK17-NEXT: [[THIS1:%.*]] = load %struct.St*, %struct.St** [[THIS_ADDR]], align 8 523 // CHECK17-NEXT: call void @_ZN2StD2Ev(%struct.St* noundef nonnull align 4 dereferenceable(8) [[THIS1]]) #[[ATTR4]] 524 // CHECK17-NEXT: ret void 525 // 526 // 527 // CHECK17-LABEL: define {{[^@]+}}@_ZN2StC2Ev 528 // CHECK17-SAME: (%struct.St* noundef nonnull align 4 dereferenceable(8) [[THIS:%.*]]) unnamed_addr #[[ATTR5]] comdat align 2 { 529 // CHECK17-NEXT: entry: 530 // CHECK17-NEXT: [[THIS_ADDR:%.*]] = alloca %struct.St*, align 8 531 // CHECK17-NEXT: store %struct.St* [[THIS]], %struct.St** [[THIS_ADDR]], align 8 532 // CHECK17-NEXT: [[THIS1:%.*]] = load %struct.St*, %struct.St** [[THIS_ADDR]], align 8 533 // CHECK17-NEXT: [[A:%.*]] = getelementptr inbounds [[STRUCT_ST:%.*]], %struct.St* [[THIS1]], i32 0, i32 0 534 // CHECK17-NEXT: store i32 0, i32* [[A]], align 4 535 // CHECK17-NEXT: [[B:%.*]] = getelementptr inbounds [[STRUCT_ST]], %struct.St* [[THIS1]], i32 0, i32 1 536 // CHECK17-NEXT: store i32 0, i32* [[B]], align 4 537 // CHECK17-NEXT: ret void 538 // 539 // 540 // CHECK17-LABEL: define {{[^@]+}}@_ZN2StD2Ev 541 // CHECK17-SAME: (%struct.St* noundef nonnull align 4 dereferenceable(8) [[THIS:%.*]]) unnamed_addr #[[ATTR5]] comdat align 2 { 542 // CHECK17-NEXT: entry: 543 // CHECK17-NEXT: [[THIS_ADDR:%.*]] = alloca %struct.St*, align 8 544 // CHECK17-NEXT: store %struct.St* [[THIS]], %struct.St** [[THIS_ADDR]], align 8 545 // CHECK17-NEXT: [[THIS1:%.*]] = load %struct.St*, %struct.St** [[THIS_ADDR]], align 8 546 // CHECK17-NEXT: ret void 547 // 548 // 549 // CHECK21-LABEL: define {{[^@]+}}@_Z28parallel_master_firstprivatev 550 // CHECK21-SAME: () #[[ATTR0:[0-9]+]] { 551 // CHECK21-NEXT: entry: 552 // CHECK21-NEXT: [[A:%.*]] = alloca i32, align 4 553 // CHECK21-NEXT: [[A_CASTED:%.*]] = alloca i64, align 8 554 // CHECK21-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4 555 // CHECK21-NEXT: [[CONV:%.*]] = bitcast i64* [[A_CASTED]] to i32* 556 // CHECK21-NEXT: store i32 [[TMP0]], i32* [[CONV]], align 4 557 // CHECK21-NEXT: [[TMP1:%.*]] = load i64, i64* [[A_CASTED]], align 8 558 // CHECK21-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i64)* @.omp_outlined. to void (i32*, i32*, ...)*), i64 [[TMP1]]) 559 // CHECK21-NEXT: ret void 560 // 561 // 562 // CHECK21-LABEL: define {{[^@]+}}@.omp_outlined. 563 // CHECK21-SAME: (i32* noalias noundef [[DOTGLOBAL_TID_:%.*]], i32* noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[A:%.*]]) #[[ATTR1:[0-9]+]] { 564 // CHECK21-NEXT: entry: 565 // CHECK21-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8 566 // CHECK21-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8 567 // CHECK21-NEXT: [[A_ADDR:%.*]] = alloca i64, align 8 568 // CHECK21-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8 569 // CHECK21-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8 570 // CHECK21-NEXT: store i64 [[A]], i64* [[A_ADDR]], align 8 571 // CHECK21-NEXT: [[CONV:%.*]] = bitcast i64* [[A_ADDR]] to i32* 572 // CHECK21-NEXT: [[TMP0:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8 573 // CHECK21-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4 574 // CHECK21-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]]) 575 // CHECK21-NEXT: [[TMP3:%.*]] = icmp ne i32 [[TMP2]], 0 576 // CHECK21-NEXT: br i1 [[TMP3]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]] 577 // CHECK21: omp_if.then: 578 // CHECK21-NEXT: [[TMP4:%.*]] = load i32, i32* [[CONV]], align 4 579 // CHECK21-NEXT: [[INC:%.*]] = add nsw i32 [[TMP4]], 1 580 // CHECK21-NEXT: store i32 [[INC]], i32* [[CONV]], align 4 581 // CHECK21-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]]) 582 // CHECK21-NEXT: br label [[OMP_IF_END]] 583 // CHECK21: omp_if.end: 584 // CHECK21-NEXT: ret void 585 // 586 // 587 // CHECK25-LABEL: define {{[^@]+}}@_Z22parallel_master_copyinv 588 // CHECK25-SAME: () #[[ATTR0:[0-9]+]] { 589 // CHECK25-NEXT: entry: 590 // CHECK25-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 0, void (i32*, i32*, ...)* bitcast (void (i32*, i32*)* @.omp_outlined. to void (i32*, i32*, ...)*)) 591 // CHECK25-NEXT: ret void 592 // 593 // 594 // CHECK25-LABEL: define {{[^@]+}}@.omp_outlined. 595 // CHECK25-SAME: (i32* noalias noundef [[DOTGLOBAL_TID_:%.*]], i32* noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1:[0-9]+]] { 596 // CHECK25-NEXT: entry: 597 // CHECK25-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8 598 // CHECK25-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8 599 // CHECK25-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8 600 // CHECK25-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8 601 // CHECK25-NEXT: [[TMP0:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8 602 // CHECK25-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4 603 // CHECK25-NEXT: [[TMP2:%.*]] = call i8* @__kmpc_threadprivate_cached(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]], i8* bitcast (i32* @a to i8*), i64 4, i8*** @a.cache.) 604 // CHECK25-NEXT: [[TMP3:%.*]] = bitcast i8* [[TMP2]] to i32* 605 // CHECK25-NEXT: [[TMP4:%.*]] = ptrtoint i32* [[TMP3]] to i64 606 // CHECK25-NEXT: [[TMP5:%.*]] = icmp ne i64 ptrtoint (i32* @a to i64), [[TMP4]] 607 // CHECK25-NEXT: br i1 [[TMP5]], label [[COPYIN_NOT_MASTER:%.*]], label [[COPYIN_NOT_MASTER_END:%.*]] 608 // CHECK25: copyin.not.master: 609 // CHECK25-NEXT: [[TMP6:%.*]] = load i32, i32* @a, align 4 610 // CHECK25-NEXT: store i32 [[TMP6]], i32* [[TMP3]], align 4 611 // CHECK25-NEXT: br label [[COPYIN_NOT_MASTER_END]] 612 // CHECK25: copyin.not.master.end: 613 // CHECK25-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 [[TMP1]]) 614 // CHECK25-NEXT: [[TMP7:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]]) 615 // CHECK25-NEXT: [[TMP8:%.*]] = icmp ne i32 [[TMP7]], 0 616 // CHECK25-NEXT: br i1 [[TMP8]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]] 617 // CHECK25: omp_if.then: 618 // CHECK25-NEXT: [[TMP9:%.*]] = call i8* @__kmpc_threadprivate_cached(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]], i8* bitcast (i32* @a to i8*), i64 4, i8*** @a.cache.) 619 // CHECK25-NEXT: [[TMP10:%.*]] = bitcast i8* [[TMP9]] to i32* 620 // CHECK25-NEXT: [[TMP11:%.*]] = load i32, i32* [[TMP10]], align 4 621 // CHECK25-NEXT: [[INC:%.*]] = add nsw i32 [[TMP11]], 1 622 // CHECK25-NEXT: store i32 [[INC]], i32* [[TMP10]], align 4 623 // CHECK25-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]]) 624 // CHECK25-NEXT: br label [[OMP_IF_END]] 625 // CHECK25: omp_if.end: 626 // CHECK25-NEXT: ret void 627 // 628 // 629 // CHECK29-LABEL: define {{[^@]+}}@_Z22parallel_master_copyinv 630 // CHECK29-SAME: () #[[ATTR0:[0-9]+]] { 631 // CHECK29-NEXT: entry: 632 // CHECK29-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @.omp_outlined. to void (i32*, i32*, ...)*), i32* @a) 633 // CHECK29-NEXT: ret void 634 // 635 // 636 // CHECK29-LABEL: define {{[^@]+}}@.omp_outlined. 637 // CHECK29-SAME: (i32* noalias noundef [[DOTGLOBAL_TID_:%.*]], i32* noalias noundef [[DOTBOUND_TID_:%.*]], i32* noundef nonnull align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR1:[0-9]+]] { 638 // CHECK29-NEXT: entry: 639 // CHECK29-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8 640 // CHECK29-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8 641 // CHECK29-NEXT: [[A_ADDR:%.*]] = alloca i32*, align 8 642 // CHECK29-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8 643 // CHECK29-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8 644 // CHECK29-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 8 645 // CHECK29-NEXT: [[TMP0:%.*]] = load i32*, i32** [[A_ADDR]], align 8 646 // CHECK29-NEXT: [[TMP1:%.*]] = ptrtoint i32* [[TMP0]] to i64 647 // CHECK29-NEXT: [[TMP2:%.*]] = icmp ne i64 [[TMP1]], ptrtoint (i32* @a to i64) 648 // CHECK29-NEXT: br i1 [[TMP2]], label [[COPYIN_NOT_MASTER:%.*]], label [[COPYIN_NOT_MASTER_END:%.*]] 649 // CHECK29: copyin.not.master: 650 // CHECK29-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP0]], align 4 651 // CHECK29-NEXT: store i32 [[TMP3]], i32* @a, align 4 652 // CHECK29-NEXT: br label [[COPYIN_NOT_MASTER_END]] 653 // CHECK29: copyin.not.master.end: 654 // CHECK29-NEXT: [[TMP4:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8 655 // CHECK29-NEXT: [[TMP5:%.*]] = load i32, i32* [[TMP4]], align 4 656 // CHECK29-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 [[TMP5]]) 657 // CHECK29-NEXT: [[TMP6:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8 658 // CHECK29-NEXT: [[TMP7:%.*]] = load i32, i32* [[TMP6]], align 4 659 // CHECK29-NEXT: [[TMP8:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB2]], i32 [[TMP7]]) 660 // CHECK29-NEXT: [[TMP9:%.*]] = icmp ne i32 [[TMP8]], 0 661 // CHECK29-NEXT: br i1 [[TMP9]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]] 662 // CHECK29: omp_if.then: 663 // CHECK29-NEXT: [[TMP10:%.*]] = load i32, i32* @a, align 4 664 // CHECK29-NEXT: [[INC:%.*]] = add nsw i32 [[TMP10]], 1 665 // CHECK29-NEXT: store i32 [[INC]], i32* @a, align 4 666 // CHECK29-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB2]], i32 [[TMP7]]) 667 // CHECK29-NEXT: br label [[OMP_IF_END]] 668 // CHECK29: omp_if.end: 669 // CHECK29-NEXT: ret void 670 // 671 // 672 // CHECK29-LABEL: define {{[^@]+}}@_ZTW1a 673 // CHECK29-SAME: () #[[ATTR4:[0-9]+]] comdat { 674 // CHECK29-NEXT: ret i32* @a 675 // 676