1207b08a9SGiorgis Georgakoudis // 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 _ 2207b08a9SGiorgis Georgakoudis // RUN: %clang_cc1 -verify -fopenmp -x c++ -triple x86_64-unknown-linux -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck %s --check-prefix=CHECK1 3ff260ad0SSaiyedul Islam // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple x86_64-unknown-linux -fexceptions -fcxx-exceptions -emit-pch -o %t %s 4207b08a9SGiorgis Georgakoudis // RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-unknown-linux -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK2 58c2f4e0eSAlexey Bataev 6*6ff380f4SJohannes Doerfert // RUN: %clang_cc1 -triple x86_64-unknown-linux -verify -fopenmp-simd -x c++ -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}" 7ff260ad0SSaiyedul Islam // RUN: %clang_cc1 -fopenmp-simd -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s 8*6ff380f4SJohannes Doerfert // RUN: %clang_cc1 -fopenmp-simd -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -debug-info-kind=limited -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}" 98c2f4e0eSAlexey Bataev // expected-no-diagnostics 108c2f4e0eSAlexey Bataev #ifndef HEADER 118c2f4e0eSAlexey Bataev #define HEADER 128c2f4e0eSAlexey Bataev 138c2f4e0eSAlexey Bataev int main(int argc, char **argv) { 148c2f4e0eSAlexey Bataev #pragma omp parallel master reduction(task, +: argc, argv[0:10][0:argc]) 158c2f4e0eSAlexey Bataev { 168c2f4e0eSAlexey Bataev #pragma omp task in_reduction(+: argc, argv[0:10][0:argc]) 178c2f4e0eSAlexey Bataev ; 188c2f4e0eSAlexey Bataev } 198c2f4e0eSAlexey Bataev } 208c2f4e0eSAlexey Bataev 218c2f4e0eSAlexey Bataev 228c2f4e0eSAlexey Bataev 238c2f4e0eSAlexey Bataev // Init firstprivate copy of argc 248c2f4e0eSAlexey Bataev 258c2f4e0eSAlexey Bataev // Init firstprivate copy of argv[0:10][0:argc] 268c2f4e0eSAlexey Bataev 278c2f4e0eSAlexey Bataev // Register task reduction. 288c2f4e0eSAlexey Bataev 298c2f4e0eSAlexey Bataev 308c2f4e0eSAlexey Bataev 318c2f4e0eSAlexey Bataev 328c2f4e0eSAlexey Bataev 338c2f4e0eSAlexey Bataev 348c2f4e0eSAlexey Bataev 358c2f4e0eSAlexey Bataev 368c2f4e0eSAlexey Bataev 378c2f4e0eSAlexey Bataev #endif 38207b08a9SGiorgis Georgakoudis // CHECK1-LABEL: define {{[^@]+}}@main 39207b08a9SGiorgis Georgakoudis // CHECK1-SAME: (i32 [[ARGC:%.*]], i8** [[ARGV:%.*]]) #[[ATTR0:[0-9]+]] { 40207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: entry: 41207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[ARGC_ADDR:%.*]] = alloca i32, align 4 42207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[ARGV_ADDR:%.*]] = alloca i8**, align 8 43207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i32 [[ARGC]], i32* [[ARGC_ADDR]], align 4 44207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8** [[ARGV]], i8*** [[ARGV_ADDR]], align 8 45207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP0:%.*]] = load i8**, i8*** [[ARGV_ADDR]], align 8 46207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 2, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i8**)* @.omp_outlined. to void (i32*, i32*, ...)*), i32* [[ARGC_ADDR]], i8** [[TMP0]]) 47207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: ret i32 0 48207b08a9SGiorgis Georgakoudis // 49207b08a9SGiorgis Georgakoudis // 50207b08a9SGiorgis Georgakoudis // CHECK1-LABEL: define {{[^@]+}}@.omp_outlined. 51207b08a9SGiorgis Georgakoudis // CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[ARGC:%.*]], i8** [[ARGV:%.*]]) #[[ATTR1:[0-9]+]] { 52207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: entry: 53207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8 54207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8 55207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[ARGC_ADDR:%.*]] = alloca i32*, align 8 56207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[ARGV_ADDR:%.*]] = alloca i8**, align 8 57207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[ARGC1:%.*]] = alloca i32, align 4 58207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[SAVED_STACK:%.*]] = alloca i8*, align 8 59207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[__VLA_EXPR0:%.*]] = alloca i64, align 8 60207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP:%.*]] = alloca i8**, align 8 61207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[_TMP5:%.*]] = alloca i8*, align 8 62207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTRD_INPUT_:%.*]] = alloca [2 x %struct.kmp_taskred_input_t], align 8 63207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTTASK_RED_:%.*]] = alloca i8*, align 8 64207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[AGG_CAPTURED:%.*]] = alloca [[STRUCT_ANON:%.*]], align 8 65207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTOMP_REDUCTION_RED_LIST:%.*]] = alloca [3 x i8*], align 8 66207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[ATOMIC_TEMP:%.*]] = alloca i8, align 1 67207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[_TMP24:%.*]] = alloca i8, align 1 68207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8 69207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8 70207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i32* [[ARGC]], i32** [[ARGC_ADDR]], align 8 71207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8** [[ARGV]], i8*** [[ARGV_ADDR]], align 8 72207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP0:%.*]] = load i32*, i32** [[ARGC_ADDR]], align 8 73207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i32 0, i32* [[ARGC1]], align 4 74207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP1:%.*]] = load i8**, i8*** [[ARGV_ADDR]], align 8 75207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds i8*, i8** [[TMP1]], i64 0 76207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP2:%.*]] = load i8*, i8** [[ARRAYIDX]], align 8 77207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[ARRAYIDX2:%.*]] = getelementptr inbounds i8, i8* [[TMP2]], i64 0 78207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP0]], align 4 79207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP4:%.*]] = sext i32 [[TMP3]] to i64 80207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[LB_ADD_LEN:%.*]] = add nsw i64 -1, [[TMP4]] 81207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP5:%.*]] = load i8**, i8*** [[ARGV_ADDR]], align 8 82207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[ARRAYIDX3:%.*]] = getelementptr inbounds i8*, i8** [[TMP5]], i64 9 83207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP6:%.*]] = load i8*, i8** [[ARRAYIDX3]], align 8 84207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[ARRAYIDX4:%.*]] = getelementptr inbounds i8, i8* [[TMP6]], i64 [[LB_ADD_LEN]] 85207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP7:%.*]] = ptrtoint i8* [[ARRAYIDX4]] to i64 86207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP8:%.*]] = ptrtoint i8* [[ARRAYIDX2]] to i64 87207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP9:%.*]] = sub i64 [[TMP7]], [[TMP8]] 88207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP10:%.*]] = sdiv exact i64 [[TMP9]], ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64) 89207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP11:%.*]] = add nuw i64 [[TMP10]], 1 90207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP12:%.*]] = mul nuw i64 [[TMP11]], ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64) 91207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP13:%.*]] = call i8* @llvm.stacksave() 92207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP13]], i8** [[SAVED_STACK]], align 8 93207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[VLA:%.*]] = alloca i8, i64 [[TMP11]], align 16 94207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i64 [[TMP11]], i64* [[__VLA_EXPR0]], align 8 95207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP14:%.*]] = getelementptr i8, i8* [[VLA]], i64 [[TMP11]] 96207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYINIT_ISEMPTY:%.*]] = icmp eq i8* [[VLA]], [[TMP14]] 97207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: br i1 [[OMP_ARRAYINIT_ISEMPTY]], label [[OMP_ARRAYINIT_DONE:%.*]], label [[OMP_ARRAYINIT_BODY:%.*]] 98207b08a9SGiorgis Georgakoudis // CHECK1: omp.arrayinit.body: 99207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi i8* [ [[VLA]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYINIT_BODY]] ] 100207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8 0, i8* [[OMP_ARRAYCPY_DESTELEMENTPAST]], align 1 101207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr i8, i8* [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1 102207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq i8* [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP14]] 103207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYINIT_DONE]], label [[OMP_ARRAYINIT_BODY]] 104207b08a9SGiorgis Georgakoudis // CHECK1: omp.arrayinit.done: 105207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP15:%.*]] = load i8**, i8*** [[ARGV_ADDR]], align 8 106207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP16:%.*]] = load i8*, i8** [[TMP15]], align 8 107207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP17:%.*]] = ptrtoint i8* [[TMP16]] to i64 108207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP18:%.*]] = ptrtoint i8* [[ARRAYIDX2]] to i64 109207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP19:%.*]] = sub i64 [[TMP17]], [[TMP18]] 110207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP20:%.*]] = sdiv exact i64 [[TMP19]], ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64) 111207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP21:%.*]] = getelementptr i8, i8* [[VLA]], i64 [[TMP20]] 112207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8** [[_TMP5]], i8*** [[TMP]], align 8 113207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP21]], i8** [[_TMP5]], align 8 114207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTRD_INPUT_GEP_:%.*]] = getelementptr inbounds [2 x %struct.kmp_taskred_input_t], [2 x %struct.kmp_taskred_input_t]* [[DOTRD_INPUT_]], i64 0, i64 0 115207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP22:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T:%.*]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 0 116207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP23:%.*]] = bitcast i32* [[ARGC1]] to i8* 117207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP23]], i8** [[TMP22]], align 8 118207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP24:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 1 119207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP25:%.*]] = bitcast i32* [[TMP0]] to i8* 120207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP25]], i8** [[TMP24]], align 8 121207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP26:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 2 122207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i64 4, i64* [[TMP26]], align 8 123207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP27:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 3 124207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* bitcast (void (i8*, i8*)* @.red_init. to i8*), i8** [[TMP27]], align 8 125207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP28:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 4 126207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* null, i8** [[TMP28]], align 8 127207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP29:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 5 128207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* bitcast (void (i8*, i8*)* @.red_comb. to i8*), i8** [[TMP29]], align 8 129207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP30:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 6 130207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP31:%.*]] = bitcast i32* [[TMP30]] to i8* 131207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: call void @llvm.memset.p0i8.i64(i8* align 8 [[TMP31]], i8 0, i64 4, i1 false) 132207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTRD_INPUT_GEP_6:%.*]] = getelementptr inbounds [2 x %struct.kmp_taskred_input_t], [2 x %struct.kmp_taskred_input_t]* [[DOTRD_INPUT_]], i64 0, i64 1 133207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP32:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_6]], i32 0, i32 0 134207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP33:%.*]] = load i8**, i8*** [[ARGV_ADDR]], align 8 135207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[ARRAYIDX7:%.*]] = getelementptr inbounds i8*, i8** [[TMP33]], i64 0 136207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP34:%.*]] = load i8*, i8** [[ARRAYIDX7]], align 8 137207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[ARRAYIDX8:%.*]] = getelementptr inbounds i8, i8* [[TMP34]], i64 0 138207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP35:%.*]] = load i32, i32* [[TMP0]], align 4 139207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP36:%.*]] = sext i32 [[TMP35]] to i64 140207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[LB_ADD_LEN9:%.*]] = add nsw i64 -1, [[TMP36]] 141207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP37:%.*]] = load i8**, i8*** [[ARGV_ADDR]], align 8 142207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[ARRAYIDX10:%.*]] = getelementptr inbounds i8*, i8** [[TMP37]], i64 9 143207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP38:%.*]] = load i8*, i8** [[ARRAYIDX10]], align 8 144207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[ARRAYIDX11:%.*]] = getelementptr inbounds i8, i8* [[TMP38]], i64 [[LB_ADD_LEN9]] 145207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[VLA]], i8** [[TMP32]], align 8 146207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP39:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_6]], i32 0, i32 1 147207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[ARRAYIDX8]], i8** [[TMP39]], align 8 148207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP40:%.*]] = ptrtoint i8* [[ARRAYIDX11]] to i64 149207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP41:%.*]] = ptrtoint i8* [[ARRAYIDX8]] to i64 150207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP42:%.*]] = sub i64 [[TMP40]], [[TMP41]] 151207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP43:%.*]] = sdiv exact i64 [[TMP42]], ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64) 152207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP44:%.*]] = add nuw i64 [[TMP43]], 1 153207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP45:%.*]] = mul nuw i64 [[TMP44]], ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64) 154207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP46:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_6]], i32 0, i32 2 155207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i64 [[TMP45]], i64* [[TMP46]], align 8 156207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP47:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_6]], i32 0, i32 3 157207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* bitcast (void (i8*, i8*)* @.red_init..1 to i8*), i8** [[TMP47]], align 8 158207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP48:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_6]], i32 0, i32 4 159207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* null, i8** [[TMP48]], align 8 160207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP49:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_6]], i32 0, i32 5 161207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* bitcast (void (i8*, i8*)* @.red_comb..2 to i8*), i8** [[TMP49]], align 8 162207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP50:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_6]], i32 0, i32 6 163207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i32 1, i32* [[TMP50]], align 8 164207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP51:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8 165207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP52:%.*]] = load i32, i32* [[TMP51]], align 4 166207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP53:%.*]] = bitcast [2 x %struct.kmp_taskred_input_t]* [[DOTRD_INPUT_]] to i8* 167207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP54:%.*]] = call i8* @__kmpc_taskred_modifier_init(%struct.ident_t* @[[GLOB1]], i32 [[TMP52]], i32 0, i32 2, i8* [[TMP53]]) 168207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP54]], i8** [[DOTTASK_RED_]], align 8 169207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP55:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8 170207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP56:%.*]] = load i32, i32* [[TMP55]], align 4 171207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP57:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP56]]) 172207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP58:%.*]] = icmp ne i32 [[TMP57]], 0 173207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: br i1 [[TMP58]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]] 174207b08a9SGiorgis Georgakoudis // CHECK1: omp_if.then: 175207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP59:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[AGG_CAPTURED]], i32 0, i32 0 176207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8** [[DOTTASK_RED_]], i8*** [[TMP59]], align 8 177207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP60:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[AGG_CAPTURED]], i32 0, i32 1 178207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i32* [[ARGC1]], i32** [[TMP60]], align 8 179207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP61:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[AGG_CAPTURED]], i32 0, i32 2 180207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP62:%.*]] = load i8**, i8*** [[TMP]], align 8 181207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8** [[TMP62]], i8*** [[TMP61]], align 8 182207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP63:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8 183207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP64:%.*]] = load i32, i32* [[TMP63]], align 4 184207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP65:%.*]] = call i8* @__kmpc_omp_task_alloc(%struct.ident_t* @[[GLOB1]], i32 [[TMP64]], i32 1, i64 48, i64 24, i32 (i32, i8*)* bitcast (i32 (i32, %struct.kmp_task_t_with_privates*)* @.omp_task_entry. to i32 (i32, i8*)*)) 185207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP66:%.*]] = bitcast i8* [[TMP65]] to %struct.kmp_task_t_with_privates* 186207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP67:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES:%.*]], %struct.kmp_task_t_with_privates* [[TMP66]], i32 0, i32 0 187207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP68:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T:%.*]], %struct.kmp_task_t* [[TMP67]], i32 0, i32 0 188207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP69:%.*]] = load i8*, i8** [[TMP68]], align 8 189207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP70:%.*]] = bitcast %struct.anon* [[AGG_CAPTURED]] to i8* 190207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 [[TMP69]], i8* align 8 [[TMP70]], i64 24, i1 false) 191207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP71:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES]], %struct.kmp_task_t_with_privates* [[TMP66]], i32 0, i32 1 192207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP72:%.*]] = getelementptr inbounds [[STRUCT__KMP_PRIVATES_T:%.*]], %struct..kmp_privates.t* [[TMP71]], i32 0, i32 0 193207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP73:%.*]] = load i8*, i8** [[DOTTASK_RED_]], align 8 194207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP73]], i8** [[TMP72]], align 8 195207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP74:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8 196207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP75:%.*]] = load i32, i32* [[TMP74]], align 4 197207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP76:%.*]] = call i32 @__kmpc_omp_task(%struct.ident_t* @[[GLOB1]], i32 [[TMP75]], i8* [[TMP65]]) 198207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP56]]) 199207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: br label [[OMP_IF_END]] 200207b08a9SGiorgis Georgakoudis // CHECK1: omp_if.end: 201207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP77:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8 202207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP78:%.*]] = load i32, i32* [[TMP77]], align 4 203207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: call void @__kmpc_task_reduction_modifier_fini(%struct.ident_t* @[[GLOB1]], i32 [[TMP78]], i32 0) 204207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP79:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOMP_REDUCTION_RED_LIST]], i64 0, i64 0 205207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP80:%.*]] = bitcast i32* [[ARGC1]] to i8* 206207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP80]], i8** [[TMP79]], align 8 207207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP81:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOMP_REDUCTION_RED_LIST]], i64 0, i64 1 208207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[VLA]], i8** [[TMP81]], align 8 209207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP82:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOMP_REDUCTION_RED_LIST]], i64 0, i64 2 210207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP83:%.*]] = inttoptr i64 [[TMP11]] to i8* 211207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP83]], i8** [[TMP82]], align 8 212207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP84:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8 213207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP85:%.*]] = load i32, i32* [[TMP84]], align 4 214207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP86:%.*]] = bitcast [3 x i8*]* [[DOTOMP_REDUCTION_RED_LIST]] to i8* 215207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP87:%.*]] = call i32 @__kmpc_reduce_nowait(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 [[TMP85]], i32 2, i64 24, i8* [[TMP86]], void (i8*, i8*)* @.omp.reduction.reduction_func, [8 x i32]* @.gomp_critical_user_.reduction.var) 216207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: switch i32 [[TMP87]], label [[DOTOMP_REDUCTION_DEFAULT:%.*]] [ 217207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: i32 1, label [[DOTOMP_REDUCTION_CASE1:%.*]] 218207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: i32 2, label [[DOTOMP_REDUCTION_CASE2:%.*]] 219207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: ] 220207b08a9SGiorgis Georgakoudis // CHECK1: .omp.reduction.case1: 221207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP88:%.*]] = load i32, i32* [[TMP0]], align 4 222207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP89:%.*]] = load i32, i32* [[ARGC1]], align 4 223207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP88]], [[TMP89]] 224207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i32 [[ADD]], i32* [[TMP0]], align 4 225207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP90:%.*]] = getelementptr i8, i8* [[ARRAYIDX2]], i64 [[TMP11]] 226207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq i8* [[ARRAYIDX2]], [[TMP90]] 227207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE18:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]] 228207b08a9SGiorgis Georgakoudis // CHECK1: omp.arraycpy.body: 229207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi i8* [ [[VLA]], [[DOTOMP_REDUCTION_CASE1]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ] 230207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST12:%.*]] = phi i8* [ [[ARRAYIDX2]], [[DOTOMP_REDUCTION_CASE1]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT16:%.*]], [[OMP_ARRAYCPY_BODY]] ] 231207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP91:%.*]] = load i8, i8* [[OMP_ARRAYCPY_DESTELEMENTPAST12]], align 1 232207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[CONV:%.*]] = sext i8 [[TMP91]] to i32 233207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP92:%.*]] = load i8, i8* [[OMP_ARRAYCPY_SRCELEMENTPAST]], align 1 234207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[CONV13:%.*]] = sext i8 [[TMP92]] to i32 235207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[ADD14:%.*]] = add nsw i32 [[CONV]], [[CONV13]] 236207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[CONV15:%.*]] = trunc i32 [[ADD14]] to i8 237207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8 [[CONV15]], i8* [[OMP_ARRAYCPY_DESTELEMENTPAST12]], align 1 238207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT16]] = getelementptr i8, i8* [[OMP_ARRAYCPY_DESTELEMENTPAST12]], i32 1 239207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr i8, i8* [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1 240207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE17:%.*]] = icmp eq i8* [[OMP_ARRAYCPY_DEST_ELEMENT16]], [[TMP90]] 241207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE17]], label [[OMP_ARRAYCPY_DONE18]], label [[OMP_ARRAYCPY_BODY]] 242207b08a9SGiorgis Georgakoudis // CHECK1: omp.arraycpy.done18: 243207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: call void @__kmpc_end_reduce_nowait(%struct.ident_t* @[[GLOB2]], i32 [[TMP85]], [8 x i32]* @.gomp_critical_user_.reduction.var) 244207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: br label [[DOTOMP_REDUCTION_DEFAULT]] 245207b08a9SGiorgis Georgakoudis // CHECK1: .omp.reduction.case2: 246207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP93:%.*]] = load i32, i32* [[ARGC1]], align 4 247207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP94:%.*]] = atomicrmw add i32* [[TMP0]], i32 [[TMP93]] monotonic, align 4 248207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP95:%.*]] = getelementptr i8, i8* [[ARRAYIDX2]], i64 [[TMP11]] 249207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYCPY_ISEMPTY19:%.*]] = icmp eq i8* [[ARRAYIDX2]], [[TMP95]] 250207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY19]], label [[OMP_ARRAYCPY_DONE32:%.*]], label [[OMP_ARRAYCPY_BODY20:%.*]] 251207b08a9SGiorgis Georgakoudis // CHECK1: omp.arraycpy.body20: 252207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST21:%.*]] = phi i8* [ [[VLA]], [[DOTOMP_REDUCTION_CASE2]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT30:%.*]], [[ATOMIC_EXIT:%.*]] ] 253207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST22:%.*]] = phi i8* [ [[ARRAYIDX2]], [[DOTOMP_REDUCTION_CASE2]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT29:%.*]], [[ATOMIC_EXIT]] ] 254207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP96:%.*]] = load i8, i8* [[OMP_ARRAYCPY_SRCELEMENTPAST21]], align 1 255207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[CONV23:%.*]] = sext i8 [[TMP96]] to i32 256207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[ATOMIC_LOAD:%.*]] = load atomic i8, i8* [[OMP_ARRAYCPY_DESTELEMENTPAST22]] monotonic, align 1 257207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: br label [[ATOMIC_CONT:%.*]] 258207b08a9SGiorgis Georgakoudis // CHECK1: atomic_cont: 259207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP97:%.*]] = phi i8 [ [[ATOMIC_LOAD]], [[OMP_ARRAYCPY_BODY20]] ], [ [[TMP102:%.*]], [[ATOMIC_CONT]] ] 260207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8 [[TMP97]], i8* [[_TMP24]], align 1 261207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP98:%.*]] = load i8, i8* [[_TMP24]], align 1 262207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[CONV25:%.*]] = sext i8 [[TMP98]] to i32 263207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP99:%.*]] = load i8, i8* [[OMP_ARRAYCPY_SRCELEMENTPAST21]], align 1 264207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[CONV26:%.*]] = sext i8 [[TMP99]] to i32 265207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[ADD27:%.*]] = add nsw i32 [[CONV25]], [[CONV26]] 266207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[CONV28:%.*]] = trunc i32 [[ADD27]] to i8 267207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8 [[CONV28]], i8* [[ATOMIC_TEMP]], align 1 268207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP100:%.*]] = load i8, i8* [[ATOMIC_TEMP]], align 1 269207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP101:%.*]] = cmpxchg i8* [[OMP_ARRAYCPY_DESTELEMENTPAST22]], i8 [[TMP97]], i8 [[TMP100]] monotonic monotonic, align 1 270207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP102]] = extractvalue { i8, i1 } [[TMP101]], 0 271207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP103:%.*]] = extractvalue { i8, i1 } [[TMP101]], 1 272207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: br i1 [[TMP103]], label [[ATOMIC_EXIT]], label [[ATOMIC_CONT]] 273207b08a9SGiorgis Georgakoudis // CHECK1: atomic_exit: 274207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT29]] = getelementptr i8, i8* [[OMP_ARRAYCPY_DESTELEMENTPAST22]], i32 1 275207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT30]] = getelementptr i8, i8* [[OMP_ARRAYCPY_SRCELEMENTPAST21]], i32 1 276207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE31:%.*]] = icmp eq i8* [[OMP_ARRAYCPY_DEST_ELEMENT29]], [[TMP95]] 277207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE31]], label [[OMP_ARRAYCPY_DONE32]], label [[OMP_ARRAYCPY_BODY20]] 278207b08a9SGiorgis Georgakoudis // CHECK1: omp.arraycpy.done32: 279207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: br label [[DOTOMP_REDUCTION_DEFAULT]] 280207b08a9SGiorgis Georgakoudis // CHECK1: .omp.reduction.default: 281207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP104:%.*]] = load i8*, i8** [[SAVED_STACK]], align 8 282207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: call void @llvm.stackrestore(i8* [[TMP104]]) 283207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: ret void 284207b08a9SGiorgis Georgakoudis // 285207b08a9SGiorgis Georgakoudis // 286207b08a9SGiorgis Georgakoudis // CHECK1-LABEL: define {{[^@]+}}@.red_init. 287207b08a9SGiorgis Georgakoudis // CHECK1-SAME: (i8* noalias [[TMP0:%.*]], i8* noalias [[TMP1:%.*]]) #[[ATTR3:[0-9]+]] { 288207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: entry: 289207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca i8*, align 8 290207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca i8*, align 8 291207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP0]], i8** [[DOTADDR]], align 8 292207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP1]], i8** [[DOTADDR1]], align 8 293207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP2:%.*]] = load i8*, i8** [[DOTADDR]], align 8 294207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP3:%.*]] = bitcast i8* [[TMP2]] to i32* 295207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i32 0, i32* [[TMP3]], align 8 296207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: ret void 297207b08a9SGiorgis Georgakoudis // 298207b08a9SGiorgis Georgakoudis // 299207b08a9SGiorgis Georgakoudis // CHECK1-LABEL: define {{[^@]+}}@.red_comb. 300207b08a9SGiorgis Georgakoudis // CHECK1-SAME: (i8* [[TMP0:%.*]], i8* [[TMP1:%.*]]) #[[ATTR3]] { 301207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: entry: 302207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca i8*, align 8 303207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca i8*, align 8 304207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP0]], i8** [[DOTADDR]], align 8 305207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP1]], i8** [[DOTADDR1]], align 8 306207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP2:%.*]] = load i8*, i8** [[DOTADDR]], align 8 307207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP3:%.*]] = bitcast i8* [[TMP2]] to i32* 308207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP4:%.*]] = load i8*, i8** [[DOTADDR1]], align 8 309207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP5:%.*]] = bitcast i8* [[TMP4]] to i32* 310207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP6:%.*]] = load i32, i32* [[TMP3]], align 8 311207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP7:%.*]] = load i32, i32* [[TMP5]], align 8 312207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP6]], [[TMP7]] 313207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i32 [[ADD]], i32* [[TMP3]], align 8 314207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: ret void 315207b08a9SGiorgis Georgakoudis // 316207b08a9SGiorgis Georgakoudis // 317207b08a9SGiorgis Georgakoudis // CHECK1-LABEL: define {{[^@]+}}@.red_init..1 318207b08a9SGiorgis Georgakoudis // CHECK1-SAME: (i8* noalias [[TMP0:%.*]], i8* noalias [[TMP1:%.*]]) #[[ATTR3]] { 319207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: entry: 320207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca i8*, align 8 321207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca i8*, align 8 322207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP0]], i8** [[DOTADDR]], align 8 323207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP1]], i8** [[DOTADDR1]], align 8 324207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP2:%.*]] = load i8*, i8** [[DOTADDR]], align 8 325207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP3:%.*]] = load i64, i64* @{{reduction_size[.].+[.]}}, align 8 326207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP4:%.*]] = getelementptr i8, i8* [[TMP2]], i64 [[TMP3]] 327207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYINIT_ISEMPTY:%.*]] = icmp eq i8* [[TMP2]], [[TMP4]] 328207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: br i1 [[OMP_ARRAYINIT_ISEMPTY]], label [[OMP_ARRAYINIT_DONE:%.*]], label [[OMP_ARRAYINIT_BODY:%.*]] 329207b08a9SGiorgis Georgakoudis // CHECK1: omp.arrayinit.body: 330207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi i8* [ [[TMP2]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYINIT_BODY]] ] 331207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8 0, i8* [[OMP_ARRAYCPY_DESTELEMENTPAST]], align 1 332207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr i8, i8* [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1 333207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq i8* [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP4]] 334207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYINIT_DONE]], label [[OMP_ARRAYINIT_BODY]] 335207b08a9SGiorgis Georgakoudis // CHECK1: omp.arrayinit.done: 336207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: ret void 337207b08a9SGiorgis Georgakoudis // 338207b08a9SGiorgis Georgakoudis // 339207b08a9SGiorgis Georgakoudis // CHECK1-LABEL: define {{[^@]+}}@.red_comb..2 340207b08a9SGiorgis Georgakoudis // CHECK1-SAME: (i8* [[TMP0:%.*]], i8* [[TMP1:%.*]]) #[[ATTR3]] { 341207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: entry: 342207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca i8*, align 8 343207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca i8*, align 8 344207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP0]], i8** [[DOTADDR]], align 8 345207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP1]], i8** [[DOTADDR1]], align 8 346207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP2:%.*]] = load i64, i64* @{{reduction_size[.].+[.]}}, align 8 347207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP3:%.*]] = load i8*, i8** [[DOTADDR]], align 8 348207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP4:%.*]] = load i8*, i8** [[DOTADDR1]], align 8 349207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP5:%.*]] = getelementptr i8, i8* [[TMP3]], i64 [[TMP2]] 350207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq i8* [[TMP3]], [[TMP5]] 351207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE4:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]] 352207b08a9SGiorgis Georgakoudis // CHECK1: omp.arraycpy.body: 353207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi i8* [ [[TMP4]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ] 354207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi i8* [ [[TMP3]], [[ENTRY]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ] 355207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP6:%.*]] = load i8, i8* [[OMP_ARRAYCPY_DESTELEMENTPAST]], align 1 356207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[CONV:%.*]] = sext i8 [[TMP6]] to i32 357207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP7:%.*]] = load i8, i8* [[OMP_ARRAYCPY_SRCELEMENTPAST]], align 1 358207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[CONV2:%.*]] = sext i8 [[TMP7]] to i32 359207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 [[CONV]], [[CONV2]] 360207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[CONV3:%.*]] = trunc i32 [[ADD]] to i8 361207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8 [[CONV3]], i8* [[OMP_ARRAYCPY_DESTELEMENTPAST]], align 1 362207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr i8, i8* [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1 363207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr i8, i8* [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1 364207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq i8* [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP5]] 365207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYCPY_DONE4]], label [[OMP_ARRAYCPY_BODY]] 366207b08a9SGiorgis Georgakoudis // CHECK1: omp.arraycpy.done4: 367207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: ret void 368207b08a9SGiorgis Georgakoudis // 369207b08a9SGiorgis Georgakoudis // 370207b08a9SGiorgis Georgakoudis // CHECK1-LABEL: define {{[^@]+}}@.omp_task_privates_map. 371207b08a9SGiorgis Georgakoudis // CHECK1-SAME: (%struct..kmp_privates.t* noalias [[TMP0:%.*]], i8*** noalias [[TMP1:%.*]]) #[[ATTR6:[0-9]+]] { 372207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: entry: 373207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca %struct..kmp_privates.t*, align 8 374207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca i8***, align 8 375207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store %struct..kmp_privates.t* [[TMP0]], %struct..kmp_privates.t** [[DOTADDR]], align 8 376207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8*** [[TMP1]], i8**** [[DOTADDR1]], align 8 377207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP2:%.*]] = load %struct..kmp_privates.t*, %struct..kmp_privates.t** [[DOTADDR]], align 8 378207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT__KMP_PRIVATES_T:%.*]], %struct..kmp_privates.t* [[TMP2]], i32 0, i32 0 379207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP4:%.*]] = load i8***, i8**** [[DOTADDR1]], align 8 380207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8** [[TMP3]], i8*** [[TMP4]], align 8 381207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: ret void 382207b08a9SGiorgis Georgakoudis // 383207b08a9SGiorgis Georgakoudis // 384207b08a9SGiorgis Georgakoudis // CHECK1-LABEL: define {{[^@]+}}@.omp_task_entry. 385207b08a9SGiorgis Georgakoudis // CHECK1-SAME: (i32 [[TMP0:%.*]], %struct.kmp_task_t_with_privates* noalias [[TMP1:%.*]]) #[[ATTR3]] { 386207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: entry: 387207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR_I:%.*]] = alloca i32, align 4 388207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTPART_ID__ADDR_I:%.*]] = alloca i32*, align 8 389207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTPRIVATES__ADDR_I:%.*]] = alloca i8*, align 8 390207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTCOPY_FN__ADDR_I:%.*]] = alloca void (i8*, ...)*, align 8 391207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTTASK_T__ADDR_I:%.*]] = alloca i8*, align 8 392207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[__CONTEXT_ADDR_I:%.*]] = alloca %struct.anon*, align 8 393207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTFIRSTPRIV_PTR_ADDR_I:%.*]] = alloca i8**, align 8 394207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP_I:%.*]] = alloca i8**, align 8 395207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP4_I:%.*]] = alloca i8*, align 8 396207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca i32, align 4 397207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca %struct.kmp_task_t_with_privates*, align 8 398207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i32 [[TMP0]], i32* [[DOTADDR]], align 4 399207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store %struct.kmp_task_t_with_privates* [[TMP1]], %struct.kmp_task_t_with_privates** [[DOTADDR1]], align 8 400207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP2:%.*]] = load i32, i32* [[DOTADDR]], align 4 401207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP3:%.*]] = load %struct.kmp_task_t_with_privates*, %struct.kmp_task_t_with_privates** [[DOTADDR1]], align 8 402207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP4:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES:%.*]], %struct.kmp_task_t_with_privates* [[TMP3]], i32 0, i32 0 403207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T:%.*]], %struct.kmp_task_t* [[TMP4]], i32 0, i32 2 404207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP4]], i32 0, i32 0 405207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP7:%.*]] = load i8*, i8** [[TMP6]], align 8 406207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP8:%.*]] = bitcast i8* [[TMP7]] to %struct.anon* 407207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP9:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES]], %struct.kmp_task_t_with_privates* [[TMP3]], i32 0, i32 1 408207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP10:%.*]] = bitcast %struct..kmp_privates.t* [[TMP9]] to i8* 409207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP11:%.*]] = bitcast %struct.kmp_task_t_with_privates* [[TMP3]] to i8* 410207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META2:![0-9]+]]) 411207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META5:![0-9]+]]) 412207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META7:![0-9]+]]) 413207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META9:![0-9]+]]) 414207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i32 [[TMP2]], i32* [[DOTGLOBAL_TID__ADDR_I]], align 4, !noalias !11 415207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i32* [[TMP5]], i32** [[DOTPART_ID__ADDR_I]], align 8, !noalias !11 416207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP10]], i8** [[DOTPRIVATES__ADDR_I]], align 8, !noalias !11 417207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store void (i8*, ...)* bitcast (void (%struct..kmp_privates.t*, i8***)* @.omp_task_privates_map. to void (i8*, ...)*), void (i8*, ...)** [[DOTCOPY_FN__ADDR_I]], align 8, !noalias !11 418207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP11]], i8** [[DOTTASK_T__ADDR_I]], align 8, !noalias !11 419207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store %struct.anon* [[TMP8]], %struct.anon** [[__CONTEXT_ADDR_I]], align 8, !noalias !11 420207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP12:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR_I]], align 8, !noalias !11 421207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP13:%.*]] = load void (i8*, ...)*, void (i8*, ...)** [[DOTCOPY_FN__ADDR_I]], align 8, !noalias !11 422207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP14:%.*]] = load i8*, i8** [[DOTPRIVATES__ADDR_I]], align 8, !noalias !11 423207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP15:%.*]] = bitcast void (i8*, ...)* [[TMP13]] to void (i8*, i8***)* 424207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: call void [[TMP15]](i8* [[TMP14]], i8*** [[DOTFIRSTPRIV_PTR_ADDR_I]]) #[[ATTR5:[0-9]+]] 425207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP16:%.*]] = load i8**, i8*** [[DOTFIRSTPRIV_PTR_ADDR_I]], align 8, !noalias !11 426207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP17:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP12]], i32 0, i32 1 427207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP18:%.*]] = load i32*, i32** [[TMP17]], align 8 428207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP19:%.*]] = load i8*, i8** [[TMP16]], align 8 429207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP20:%.*]] = load i32, i32* [[DOTGLOBAL_TID__ADDR_I]], align 4, !noalias !11 430207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP21:%.*]] = bitcast i32* [[TMP18]] to i8* 431207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP22:%.*]] = call i8* @__kmpc_task_reduction_get_th_data(i32 [[TMP20]], i8* [[TMP19]], i8* [[TMP21]]) #[[ATTR5]] 432207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[CONV_I:%.*]] = bitcast i8* [[TMP22]] to i32* 433207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP23:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP12]], i32 0, i32 2 434207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP24:%.*]] = load i8**, i8*** [[TMP23]], align 8 435207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP25:%.*]] = load i8*, i8** [[TMP24]], align 8 436207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP26:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP12]], i32 0, i32 1 437207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP27:%.*]] = load i32*, i32** [[TMP26]], align 8 438207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP28:%.*]] = load i32, i32* [[TMP27]], align 4 439207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP29:%.*]] = sext i32 [[TMP28]] to i64 440207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[LB_ADD_LEN_I:%.*]] = add nsw i64 -1, [[TMP29]] 441207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP30:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP12]], i32 0, i32 2 442207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP31:%.*]] = load i8**, i8*** [[TMP30]], align 8 443207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[ARRAYIDX2_I:%.*]] = getelementptr inbounds i8*, i8** [[TMP31]], i64 9 444207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP32:%.*]] = load i8*, i8** [[ARRAYIDX2_I]], align 8 445207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[ARRAYIDX3_I:%.*]] = getelementptr inbounds i8, i8* [[TMP32]], i64 [[LB_ADD_LEN_I]] 446207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP33:%.*]] = ptrtoint i8* [[ARRAYIDX3_I]] to i64 447207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP34:%.*]] = ptrtoint i8* [[TMP25]] to i64 448207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP35:%.*]] = sub i64 [[TMP33]], [[TMP34]] 449207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP36:%.*]] = sdiv exact i64 [[TMP35]], ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64) 450207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP37:%.*]] = add nuw i64 [[TMP36]], 1 451207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP38:%.*]] = mul nuw i64 [[TMP37]], ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64) 452207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i64 [[TMP37]], i64* @{{reduction_size[.].+[.]}}, align 8 453207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP39:%.*]] = load i8*, i8** [[TMP16]], align 8 454207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP40:%.*]] = call i8* @__kmpc_task_reduction_get_th_data(i32 [[TMP20]], i8* [[TMP39]], i8* [[TMP25]]) #[[ATTR5]] 455207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP41:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP12]], i32 0, i32 2 456207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP42:%.*]] = load i8**, i8*** [[TMP41]], align 8 457207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP43:%.*]] = load i8*, i8** [[TMP42]], align 8 458207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP44:%.*]] = ptrtoint i8* [[TMP43]] to i64 459207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP45:%.*]] = ptrtoint i8* [[TMP25]] to i64 460207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP46:%.*]] = sub i64 [[TMP44]], [[TMP45]] 461207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP47:%.*]] = sdiv exact i64 [[TMP46]], ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64) 462207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP48:%.*]] = getelementptr i8, i8* [[TMP40]], i64 [[TMP47]] 463207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8** [[TMP4_I]], i8*** [[TMP_I]], align 8, !noalias !11 464207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP48]], i8** [[TMP4_I]], align 8, !noalias !11 465207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: ret i32 0 466207b08a9SGiorgis Georgakoudis // 467207b08a9SGiorgis Georgakoudis // 468207b08a9SGiorgis Georgakoudis // CHECK1-LABEL: define {{[^@]+}}@.omp.reduction.reduction_func 469207b08a9SGiorgis Georgakoudis // CHECK1-SAME: (i8* [[TMP0:%.*]], i8* [[TMP1:%.*]]) #[[ATTR3]] { 470207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: entry: 471207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca i8*, align 8 472207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca i8*, align 8 473207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP0]], i8** [[DOTADDR]], align 8 474207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP1]], i8** [[DOTADDR1]], align 8 475207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP2:%.*]] = load i8*, i8** [[DOTADDR]], align 8 476207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP3:%.*]] = bitcast i8* [[TMP2]] to [3 x i8*]* 477207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP4:%.*]] = load i8*, i8** [[DOTADDR1]], align 8 478207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP5:%.*]] = bitcast i8* [[TMP4]] to [3 x i8*]* 479207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP6:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[TMP5]], i64 0, i64 0 480207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP7:%.*]] = load i8*, i8** [[TMP6]], align 8 481207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP8:%.*]] = bitcast i8* [[TMP7]] to i32* 482207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP9:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[TMP3]], i64 0, i64 0 483207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP10:%.*]] = load i8*, i8** [[TMP9]], align 8 484207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP11:%.*]] = bitcast i8* [[TMP10]] to i32* 485207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP12:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[TMP5]], i64 0, i64 1 486207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP13:%.*]] = load i8*, i8** [[TMP12]], align 8 487207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP14:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[TMP3]], i64 0, i64 1 488207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP15:%.*]] = load i8*, i8** [[TMP14]], align 8 489207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP16:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[TMP3]], i64 0, i64 2 490207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP17:%.*]] = load i8*, i8** [[TMP16]], align 8 491207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP18:%.*]] = ptrtoint i8* [[TMP17]] to i64 492207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP19:%.*]] = load i32, i32* [[TMP11]], align 4 493207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP20:%.*]] = load i32, i32* [[TMP8]], align 4 494207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP19]], [[TMP20]] 495207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i32 [[ADD]], i32* [[TMP11]], align 4 496207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP21:%.*]] = getelementptr i8, i8* [[TMP15]], i64 [[TMP18]] 497207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq i8* [[TMP15]], [[TMP21]] 498207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE5:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]] 499207b08a9SGiorgis Georgakoudis // CHECK1: omp.arraycpy.body: 500207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi i8* [ [[TMP13]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ] 501207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi i8* [ [[TMP15]], [[ENTRY]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ] 502207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP22:%.*]] = load i8, i8* [[OMP_ARRAYCPY_DESTELEMENTPAST]], align 1 503207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[CONV:%.*]] = sext i8 [[TMP22]] to i32 504207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP23:%.*]] = load i8, i8* [[OMP_ARRAYCPY_SRCELEMENTPAST]], align 1 505207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[CONV2:%.*]] = sext i8 [[TMP23]] to i32 506207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[ADD3:%.*]] = add nsw i32 [[CONV]], [[CONV2]] 507207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[CONV4:%.*]] = trunc i32 [[ADD3]] to i8 508207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8 [[CONV4]], i8* [[OMP_ARRAYCPY_DESTELEMENTPAST]], align 1 509207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr i8, i8* [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1 510207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr i8, i8* [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1 511207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq i8* [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP21]] 512207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYCPY_DONE5]], label [[OMP_ARRAYCPY_BODY]] 513207b08a9SGiorgis Georgakoudis // CHECK1: omp.arraycpy.done5: 514207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: ret void 515207b08a9SGiorgis Georgakoudis // 516207b08a9SGiorgis Georgakoudis // 517207b08a9SGiorgis Georgakoudis // CHECK2-LABEL: define {{[^@]+}}@main 518207b08a9SGiorgis Georgakoudis // CHECK2-SAME: (i32 [[ARGC:%.*]], i8** [[ARGV:%.*]]) #[[ATTR0:[0-9]+]] { 519207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: entry: 520207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[ARGC_ADDR:%.*]] = alloca i32, align 4 521207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[ARGV_ADDR:%.*]] = alloca i8**, align 8 522207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i32 [[ARGC]], i32* [[ARGC_ADDR]], align 4 523207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8** [[ARGV]], i8*** [[ARGV_ADDR]], align 8 524207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP0:%.*]] = load i8**, i8*** [[ARGV_ADDR]], align 8 525207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 2, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i8**)* @.omp_outlined. to void (i32*, i32*, ...)*), i32* [[ARGC_ADDR]], i8** [[TMP0]]) 526207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: ret i32 0 527207b08a9SGiorgis Georgakoudis // 528207b08a9SGiorgis Georgakoudis // 529207b08a9SGiorgis Georgakoudis // CHECK2-LABEL: define {{[^@]+}}@.omp_outlined. 530207b08a9SGiorgis Georgakoudis // CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[ARGC:%.*]], i8** [[ARGV:%.*]]) #[[ATTR1:[0-9]+]] { 531207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: entry: 532207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8 533207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8 534207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[ARGC_ADDR:%.*]] = alloca i32*, align 8 535207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[ARGV_ADDR:%.*]] = alloca i8**, align 8 536207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[ARGC1:%.*]] = alloca i32, align 4 537207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[SAVED_STACK:%.*]] = alloca i8*, align 8 538207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[__VLA_EXPR0:%.*]] = alloca i64, align 8 539207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP:%.*]] = alloca i8**, align 8 540207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[_TMP5:%.*]] = alloca i8*, align 8 541207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTRD_INPUT_:%.*]] = alloca [2 x %struct.kmp_taskred_input_t], align 8 542207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTTASK_RED_:%.*]] = alloca i8*, align 8 543207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[AGG_CAPTURED:%.*]] = alloca [[STRUCT_ANON:%.*]], align 8 544207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTOMP_REDUCTION_RED_LIST:%.*]] = alloca [3 x i8*], align 8 545207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[ATOMIC_TEMP:%.*]] = alloca i8, align 1 546207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[_TMP24:%.*]] = alloca i8, align 1 547207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8 548207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8 549207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i32* [[ARGC]], i32** [[ARGC_ADDR]], align 8 550207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8** [[ARGV]], i8*** [[ARGV_ADDR]], align 8 551207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP0:%.*]] = load i32*, i32** [[ARGC_ADDR]], align 8 552207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i32 0, i32* [[ARGC1]], align 4 553207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP1:%.*]] = load i8**, i8*** [[ARGV_ADDR]], align 8 554207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds i8*, i8** [[TMP1]], i64 0 555207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP2:%.*]] = load i8*, i8** [[ARRAYIDX]], align 8 556207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[ARRAYIDX2:%.*]] = getelementptr inbounds i8, i8* [[TMP2]], i64 0 557207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP0]], align 4 558207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP4:%.*]] = sext i32 [[TMP3]] to i64 559207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[LB_ADD_LEN:%.*]] = add nsw i64 -1, [[TMP4]] 560207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP5:%.*]] = load i8**, i8*** [[ARGV_ADDR]], align 8 561207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[ARRAYIDX3:%.*]] = getelementptr inbounds i8*, i8** [[TMP5]], i64 9 562207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP6:%.*]] = load i8*, i8** [[ARRAYIDX3]], align 8 563207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[ARRAYIDX4:%.*]] = getelementptr inbounds i8, i8* [[TMP6]], i64 [[LB_ADD_LEN]] 564207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP7:%.*]] = ptrtoint i8* [[ARRAYIDX4]] to i64 565207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP8:%.*]] = ptrtoint i8* [[ARRAYIDX2]] to i64 566207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP9:%.*]] = sub i64 [[TMP7]], [[TMP8]] 567207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP10:%.*]] = sdiv exact i64 [[TMP9]], ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64) 568207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP11:%.*]] = add nuw i64 [[TMP10]], 1 569207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP12:%.*]] = mul nuw i64 [[TMP11]], ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64) 570207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP13:%.*]] = call i8* @llvm.stacksave() 571207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP13]], i8** [[SAVED_STACK]], align 8 572207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[VLA:%.*]] = alloca i8, i64 [[TMP11]], align 16 573207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i64 [[TMP11]], i64* [[__VLA_EXPR0]], align 8 574207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP14:%.*]] = getelementptr i8, i8* [[VLA]], i64 [[TMP11]] 575207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYINIT_ISEMPTY:%.*]] = icmp eq i8* [[VLA]], [[TMP14]] 576207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: br i1 [[OMP_ARRAYINIT_ISEMPTY]], label [[OMP_ARRAYINIT_DONE:%.*]], label [[OMP_ARRAYINIT_BODY:%.*]] 577207b08a9SGiorgis Georgakoudis // CHECK2: omp.arrayinit.body: 578207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi i8* [ [[VLA]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYINIT_BODY]] ] 579207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8 0, i8* [[OMP_ARRAYCPY_DESTELEMENTPAST]], align 1 580207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr i8, i8* [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1 581207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq i8* [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP14]] 582207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYINIT_DONE]], label [[OMP_ARRAYINIT_BODY]] 583207b08a9SGiorgis Georgakoudis // CHECK2: omp.arrayinit.done: 584207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP15:%.*]] = load i8**, i8*** [[ARGV_ADDR]], align 8 585207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP16:%.*]] = load i8*, i8** [[TMP15]], align 8 586207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP17:%.*]] = ptrtoint i8* [[TMP16]] to i64 587207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP18:%.*]] = ptrtoint i8* [[ARRAYIDX2]] to i64 588207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP19:%.*]] = sub i64 [[TMP17]], [[TMP18]] 589207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP20:%.*]] = sdiv exact i64 [[TMP19]], ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64) 590207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP21:%.*]] = getelementptr i8, i8* [[VLA]], i64 [[TMP20]] 591207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8** [[_TMP5]], i8*** [[TMP]], align 8 592207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP21]], i8** [[_TMP5]], align 8 593207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTRD_INPUT_GEP_:%.*]] = getelementptr inbounds [2 x %struct.kmp_taskred_input_t], [2 x %struct.kmp_taskred_input_t]* [[DOTRD_INPUT_]], i64 0, i64 0 594207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP22:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T:%.*]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 0 595207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP23:%.*]] = bitcast i32* [[ARGC1]] to i8* 596207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP23]], i8** [[TMP22]], align 8 597207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP24:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 1 598207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP25:%.*]] = bitcast i32* [[TMP0]] to i8* 599207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP25]], i8** [[TMP24]], align 8 600207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP26:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 2 601207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i64 4, i64* [[TMP26]], align 8 602207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP27:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 3 603207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* bitcast (void (i8*, i8*)* @.red_init. to i8*), i8** [[TMP27]], align 8 604207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP28:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 4 605207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* null, i8** [[TMP28]], align 8 606207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP29:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 5 607207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* bitcast (void (i8*, i8*)* @.red_comb. to i8*), i8** [[TMP29]], align 8 608207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP30:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 6 609207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP31:%.*]] = bitcast i32* [[TMP30]] to i8* 610207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: call void @llvm.memset.p0i8.i64(i8* align 8 [[TMP31]], i8 0, i64 4, i1 false) 611207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTRD_INPUT_GEP_6:%.*]] = getelementptr inbounds [2 x %struct.kmp_taskred_input_t], [2 x %struct.kmp_taskred_input_t]* [[DOTRD_INPUT_]], i64 0, i64 1 612207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP32:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_6]], i32 0, i32 0 613207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP33:%.*]] = load i8**, i8*** [[ARGV_ADDR]], align 8 614207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[ARRAYIDX7:%.*]] = getelementptr inbounds i8*, i8** [[TMP33]], i64 0 615207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP34:%.*]] = load i8*, i8** [[ARRAYIDX7]], align 8 616207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[ARRAYIDX8:%.*]] = getelementptr inbounds i8, i8* [[TMP34]], i64 0 617207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP35:%.*]] = load i32, i32* [[TMP0]], align 4 618207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP36:%.*]] = sext i32 [[TMP35]] to i64 619207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[LB_ADD_LEN9:%.*]] = add nsw i64 -1, [[TMP36]] 620207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP37:%.*]] = load i8**, i8*** [[ARGV_ADDR]], align 8 621207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[ARRAYIDX10:%.*]] = getelementptr inbounds i8*, i8** [[TMP37]], i64 9 622207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP38:%.*]] = load i8*, i8** [[ARRAYIDX10]], align 8 623207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[ARRAYIDX11:%.*]] = getelementptr inbounds i8, i8* [[TMP38]], i64 [[LB_ADD_LEN9]] 624207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[VLA]], i8** [[TMP32]], align 8 625207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP39:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_6]], i32 0, i32 1 626207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[ARRAYIDX8]], i8** [[TMP39]], align 8 627207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP40:%.*]] = ptrtoint i8* [[ARRAYIDX11]] to i64 628207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP41:%.*]] = ptrtoint i8* [[ARRAYIDX8]] to i64 629207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP42:%.*]] = sub i64 [[TMP40]], [[TMP41]] 630207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP43:%.*]] = sdiv exact i64 [[TMP42]], ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64) 631207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP44:%.*]] = add nuw i64 [[TMP43]], 1 632207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP45:%.*]] = mul nuw i64 [[TMP44]], ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64) 633207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP46:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_6]], i32 0, i32 2 634207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i64 [[TMP45]], i64* [[TMP46]], align 8 635207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP47:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_6]], i32 0, i32 3 636207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* bitcast (void (i8*, i8*)* @.red_init..1 to i8*), i8** [[TMP47]], align 8 637207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP48:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_6]], i32 0, i32 4 638207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* null, i8** [[TMP48]], align 8 639207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP49:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_6]], i32 0, i32 5 640207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* bitcast (void (i8*, i8*)* @.red_comb..2 to i8*), i8** [[TMP49]], align 8 641207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP50:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_6]], i32 0, i32 6 642207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i32 1, i32* [[TMP50]], align 8 643207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP51:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8 644207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP52:%.*]] = load i32, i32* [[TMP51]], align 4 645207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP53:%.*]] = bitcast [2 x %struct.kmp_taskred_input_t]* [[DOTRD_INPUT_]] to i8* 646207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP54:%.*]] = call i8* @__kmpc_taskred_modifier_init(%struct.ident_t* @[[GLOB1]], i32 [[TMP52]], i32 0, i32 2, i8* [[TMP53]]) 647207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP54]], i8** [[DOTTASK_RED_]], align 8 648207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP55:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8 649207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP56:%.*]] = load i32, i32* [[TMP55]], align 4 650207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP57:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP56]]) 651207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP58:%.*]] = icmp ne i32 [[TMP57]], 0 652207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: br i1 [[TMP58]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]] 653207b08a9SGiorgis Georgakoudis // CHECK2: omp_if.then: 654207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP59:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[AGG_CAPTURED]], i32 0, i32 0 655207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8** [[DOTTASK_RED_]], i8*** [[TMP59]], align 8 656207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP60:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[AGG_CAPTURED]], i32 0, i32 1 657207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i32* [[ARGC1]], i32** [[TMP60]], align 8 658207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP61:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[AGG_CAPTURED]], i32 0, i32 2 659207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP62:%.*]] = load i8**, i8*** [[TMP]], align 8 660207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8** [[TMP62]], i8*** [[TMP61]], align 8 661207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP63:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8 662207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP64:%.*]] = load i32, i32* [[TMP63]], align 4 663207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP65:%.*]] = call i8* @__kmpc_omp_task_alloc(%struct.ident_t* @[[GLOB1]], i32 [[TMP64]], i32 1, i64 48, i64 24, i32 (i32, i8*)* bitcast (i32 (i32, %struct.kmp_task_t_with_privates*)* @.omp_task_entry. to i32 (i32, i8*)*)) 664207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP66:%.*]] = bitcast i8* [[TMP65]] to %struct.kmp_task_t_with_privates* 665207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP67:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES:%.*]], %struct.kmp_task_t_with_privates* [[TMP66]], i32 0, i32 0 666207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP68:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T:%.*]], %struct.kmp_task_t* [[TMP67]], i32 0, i32 0 667207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP69:%.*]] = load i8*, i8** [[TMP68]], align 8 668207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP70:%.*]] = bitcast %struct.anon* [[AGG_CAPTURED]] to i8* 669207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 [[TMP69]], i8* align 8 [[TMP70]], i64 24, i1 false) 670207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP71:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES]], %struct.kmp_task_t_with_privates* [[TMP66]], i32 0, i32 1 671207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP72:%.*]] = getelementptr inbounds [[STRUCT__KMP_PRIVATES_T:%.*]], %struct..kmp_privates.t* [[TMP71]], i32 0, i32 0 672207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP73:%.*]] = load i8*, i8** [[DOTTASK_RED_]], align 8 673207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP73]], i8** [[TMP72]], align 8 674207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP74:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8 675207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP75:%.*]] = load i32, i32* [[TMP74]], align 4 676207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP76:%.*]] = call i32 @__kmpc_omp_task(%struct.ident_t* @[[GLOB1]], i32 [[TMP75]], i8* [[TMP65]]) 677207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP56]]) 678207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: br label [[OMP_IF_END]] 679207b08a9SGiorgis Georgakoudis // CHECK2: omp_if.end: 680207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP77:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8 681207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP78:%.*]] = load i32, i32* [[TMP77]], align 4 682207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: call void @__kmpc_task_reduction_modifier_fini(%struct.ident_t* @[[GLOB1]], i32 [[TMP78]], i32 0) 683207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP79:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOMP_REDUCTION_RED_LIST]], i64 0, i64 0 684207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP80:%.*]] = bitcast i32* [[ARGC1]] to i8* 685207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP80]], i8** [[TMP79]], align 8 686207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP81:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOMP_REDUCTION_RED_LIST]], i64 0, i64 1 687207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[VLA]], i8** [[TMP81]], align 8 688207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP82:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOMP_REDUCTION_RED_LIST]], i64 0, i64 2 689207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP83:%.*]] = inttoptr i64 [[TMP11]] to i8* 690207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP83]], i8** [[TMP82]], align 8 691207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP84:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8 692207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP85:%.*]] = load i32, i32* [[TMP84]], align 4 693207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP86:%.*]] = bitcast [3 x i8*]* [[DOTOMP_REDUCTION_RED_LIST]] to i8* 694207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP87:%.*]] = call i32 @__kmpc_reduce_nowait(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 [[TMP85]], i32 2, i64 24, i8* [[TMP86]], void (i8*, i8*)* @.omp.reduction.reduction_func, [8 x i32]* @.gomp_critical_user_.reduction.var) 695207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: switch i32 [[TMP87]], label [[DOTOMP_REDUCTION_DEFAULT:%.*]] [ 696207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: i32 1, label [[DOTOMP_REDUCTION_CASE1:%.*]] 697207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: i32 2, label [[DOTOMP_REDUCTION_CASE2:%.*]] 698207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: ] 699207b08a9SGiorgis Georgakoudis // CHECK2: .omp.reduction.case1: 700207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP88:%.*]] = load i32, i32* [[TMP0]], align 4 701207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP89:%.*]] = load i32, i32* [[ARGC1]], align 4 702207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP88]], [[TMP89]] 703207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i32 [[ADD]], i32* [[TMP0]], align 4 704207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP90:%.*]] = getelementptr i8, i8* [[ARRAYIDX2]], i64 [[TMP11]] 705207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq i8* [[ARRAYIDX2]], [[TMP90]] 706207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE18:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]] 707207b08a9SGiorgis Georgakoudis // CHECK2: omp.arraycpy.body: 708207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi i8* [ [[VLA]], [[DOTOMP_REDUCTION_CASE1]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ] 709207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST12:%.*]] = phi i8* [ [[ARRAYIDX2]], [[DOTOMP_REDUCTION_CASE1]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT16:%.*]], [[OMP_ARRAYCPY_BODY]] ] 710207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP91:%.*]] = load i8, i8* [[OMP_ARRAYCPY_DESTELEMENTPAST12]], align 1 711207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[CONV:%.*]] = sext i8 [[TMP91]] to i32 712207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP92:%.*]] = load i8, i8* [[OMP_ARRAYCPY_SRCELEMENTPAST]], align 1 713207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[CONV13:%.*]] = sext i8 [[TMP92]] to i32 714207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[ADD14:%.*]] = add nsw i32 [[CONV]], [[CONV13]] 715207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[CONV15:%.*]] = trunc i32 [[ADD14]] to i8 716207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8 [[CONV15]], i8* [[OMP_ARRAYCPY_DESTELEMENTPAST12]], align 1 717207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT16]] = getelementptr i8, i8* [[OMP_ARRAYCPY_DESTELEMENTPAST12]], i32 1 718207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr i8, i8* [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1 719207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYCPY_DONE17:%.*]] = icmp eq i8* [[OMP_ARRAYCPY_DEST_ELEMENT16]], [[TMP90]] 720207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: br i1 [[OMP_ARRAYCPY_DONE17]], label [[OMP_ARRAYCPY_DONE18]], label [[OMP_ARRAYCPY_BODY]] 721207b08a9SGiorgis Georgakoudis // CHECK2: omp.arraycpy.done18: 722207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: call void @__kmpc_end_reduce_nowait(%struct.ident_t* @[[GLOB2]], i32 [[TMP85]], [8 x i32]* @.gomp_critical_user_.reduction.var) 723207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: br label [[DOTOMP_REDUCTION_DEFAULT]] 724207b08a9SGiorgis Georgakoudis // CHECK2: .omp.reduction.case2: 725207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP93:%.*]] = load i32, i32* [[ARGC1]], align 4 726207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP94:%.*]] = atomicrmw add i32* [[TMP0]], i32 [[TMP93]] monotonic, align 4 727207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP95:%.*]] = getelementptr i8, i8* [[ARRAYIDX2]], i64 [[TMP11]] 728207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYCPY_ISEMPTY19:%.*]] = icmp eq i8* [[ARRAYIDX2]], [[TMP95]] 729207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY19]], label [[OMP_ARRAYCPY_DONE32:%.*]], label [[OMP_ARRAYCPY_BODY20:%.*]] 730207b08a9SGiorgis Georgakoudis // CHECK2: omp.arraycpy.body20: 731207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST21:%.*]] = phi i8* [ [[VLA]], [[DOTOMP_REDUCTION_CASE2]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT30:%.*]], [[ATOMIC_EXIT:%.*]] ] 732207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST22:%.*]] = phi i8* [ [[ARRAYIDX2]], [[DOTOMP_REDUCTION_CASE2]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT29:%.*]], [[ATOMIC_EXIT]] ] 733207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP96:%.*]] = load i8, i8* [[OMP_ARRAYCPY_SRCELEMENTPAST21]], align 1 734207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[CONV23:%.*]] = sext i8 [[TMP96]] to i32 735207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[ATOMIC_LOAD:%.*]] = load atomic i8, i8* [[OMP_ARRAYCPY_DESTELEMENTPAST22]] monotonic, align 1 736207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: br label [[ATOMIC_CONT:%.*]] 737207b08a9SGiorgis Georgakoudis // CHECK2: atomic_cont: 738207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP97:%.*]] = phi i8 [ [[ATOMIC_LOAD]], [[OMP_ARRAYCPY_BODY20]] ], [ [[TMP102:%.*]], [[ATOMIC_CONT]] ] 739207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8 [[TMP97]], i8* [[_TMP24]], align 1 740207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP98:%.*]] = load i8, i8* [[_TMP24]], align 1 741207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[CONV25:%.*]] = sext i8 [[TMP98]] to i32 742207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP99:%.*]] = load i8, i8* [[OMP_ARRAYCPY_SRCELEMENTPAST21]], align 1 743207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[CONV26:%.*]] = sext i8 [[TMP99]] to i32 744207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[ADD27:%.*]] = add nsw i32 [[CONV25]], [[CONV26]] 745207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[CONV28:%.*]] = trunc i32 [[ADD27]] to i8 746207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8 [[CONV28]], i8* [[ATOMIC_TEMP]], align 1 747207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP100:%.*]] = load i8, i8* [[ATOMIC_TEMP]], align 1 748207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP101:%.*]] = cmpxchg i8* [[OMP_ARRAYCPY_DESTELEMENTPAST22]], i8 [[TMP97]], i8 [[TMP100]] monotonic monotonic, align 1 749207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP102]] = extractvalue { i8, i1 } [[TMP101]], 0 750207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP103:%.*]] = extractvalue { i8, i1 } [[TMP101]], 1 751207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: br i1 [[TMP103]], label [[ATOMIC_EXIT]], label [[ATOMIC_CONT]] 752207b08a9SGiorgis Georgakoudis // CHECK2: atomic_exit: 753207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT29]] = getelementptr i8, i8* [[OMP_ARRAYCPY_DESTELEMENTPAST22]], i32 1 754207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT30]] = getelementptr i8, i8* [[OMP_ARRAYCPY_SRCELEMENTPAST21]], i32 1 755207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYCPY_DONE31:%.*]] = icmp eq i8* [[OMP_ARRAYCPY_DEST_ELEMENT29]], [[TMP95]] 756207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: br i1 [[OMP_ARRAYCPY_DONE31]], label [[OMP_ARRAYCPY_DONE32]], label [[OMP_ARRAYCPY_BODY20]] 757207b08a9SGiorgis Georgakoudis // CHECK2: omp.arraycpy.done32: 758207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: br label [[DOTOMP_REDUCTION_DEFAULT]] 759207b08a9SGiorgis Georgakoudis // CHECK2: .omp.reduction.default: 760207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP104:%.*]] = load i8*, i8** [[SAVED_STACK]], align 8 761207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: call void @llvm.stackrestore(i8* [[TMP104]]) 762207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: ret void 763207b08a9SGiorgis Georgakoudis // 764207b08a9SGiorgis Georgakoudis // 765207b08a9SGiorgis Georgakoudis // CHECK2-LABEL: define {{[^@]+}}@.red_init. 766207b08a9SGiorgis Georgakoudis // CHECK2-SAME: (i8* noalias [[TMP0:%.*]], i8* noalias [[TMP1:%.*]]) #[[ATTR3:[0-9]+]] { 767207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: entry: 768207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTADDR:%.*]] = alloca i8*, align 8 769207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTADDR1:%.*]] = alloca i8*, align 8 770207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP0]], i8** [[DOTADDR]], align 8 771207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP1]], i8** [[DOTADDR1]], align 8 772207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP2:%.*]] = load i8*, i8** [[DOTADDR]], align 8 773207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP3:%.*]] = bitcast i8* [[TMP2]] to i32* 774207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i32 0, i32* [[TMP3]], align 8 775207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: ret void 776207b08a9SGiorgis Georgakoudis // 777207b08a9SGiorgis Georgakoudis // 778207b08a9SGiorgis Georgakoudis // CHECK2-LABEL: define {{[^@]+}}@.red_comb. 779207b08a9SGiorgis Georgakoudis // CHECK2-SAME: (i8* [[TMP0:%.*]], i8* [[TMP1:%.*]]) #[[ATTR3]] { 780207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: entry: 781207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTADDR:%.*]] = alloca i8*, align 8 782207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTADDR1:%.*]] = alloca i8*, align 8 783207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP0]], i8** [[DOTADDR]], align 8 784207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP1]], i8** [[DOTADDR1]], align 8 785207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP2:%.*]] = load i8*, i8** [[DOTADDR]], align 8 786207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP3:%.*]] = bitcast i8* [[TMP2]] to i32* 787207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP4:%.*]] = load i8*, i8** [[DOTADDR1]], align 8 788207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP5:%.*]] = bitcast i8* [[TMP4]] to i32* 789207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP6:%.*]] = load i32, i32* [[TMP3]], align 8 790207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP7:%.*]] = load i32, i32* [[TMP5]], align 8 791207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP6]], [[TMP7]] 792207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i32 [[ADD]], i32* [[TMP3]], align 8 793207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: ret void 794207b08a9SGiorgis Georgakoudis // 795207b08a9SGiorgis Georgakoudis // 796207b08a9SGiorgis Georgakoudis // CHECK2-LABEL: define {{[^@]+}}@.red_init..1 797207b08a9SGiorgis Georgakoudis // CHECK2-SAME: (i8* noalias [[TMP0:%.*]], i8* noalias [[TMP1:%.*]]) #[[ATTR3]] { 798207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: entry: 799207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTADDR:%.*]] = alloca i8*, align 8 800207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTADDR1:%.*]] = alloca i8*, align 8 801207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP0]], i8** [[DOTADDR]], align 8 802207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP1]], i8** [[DOTADDR1]], align 8 803207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP2:%.*]] = load i8*, i8** [[DOTADDR]], align 8 804207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP3:%.*]] = load i64, i64* @{{reduction_size[.].+[.]}}, align 8 805207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP4:%.*]] = getelementptr i8, i8* [[TMP2]], i64 [[TMP3]] 806207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYINIT_ISEMPTY:%.*]] = icmp eq i8* [[TMP2]], [[TMP4]] 807207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: br i1 [[OMP_ARRAYINIT_ISEMPTY]], label [[OMP_ARRAYINIT_DONE:%.*]], label [[OMP_ARRAYINIT_BODY:%.*]] 808207b08a9SGiorgis Georgakoudis // CHECK2: omp.arrayinit.body: 809207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi i8* [ [[TMP2]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYINIT_BODY]] ] 810207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8 0, i8* [[OMP_ARRAYCPY_DESTELEMENTPAST]], align 1 811207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr i8, i8* [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1 812207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq i8* [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP4]] 813207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYINIT_DONE]], label [[OMP_ARRAYINIT_BODY]] 814207b08a9SGiorgis Georgakoudis // CHECK2: omp.arrayinit.done: 815207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: ret void 816207b08a9SGiorgis Georgakoudis // 817207b08a9SGiorgis Georgakoudis // 818207b08a9SGiorgis Georgakoudis // CHECK2-LABEL: define {{[^@]+}}@.red_comb..2 819207b08a9SGiorgis Georgakoudis // CHECK2-SAME: (i8* [[TMP0:%.*]], i8* [[TMP1:%.*]]) #[[ATTR3]] { 820207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: entry: 821207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTADDR:%.*]] = alloca i8*, align 8 822207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTADDR1:%.*]] = alloca i8*, align 8 823207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP0]], i8** [[DOTADDR]], align 8 824207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP1]], i8** [[DOTADDR1]], align 8 825207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP2:%.*]] = load i64, i64* @{{reduction_size[.].+[.]}}, align 8 826207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP3:%.*]] = load i8*, i8** [[DOTADDR]], align 8 827207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP4:%.*]] = load i8*, i8** [[DOTADDR1]], align 8 828207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP5:%.*]] = getelementptr i8, i8* [[TMP3]], i64 [[TMP2]] 829207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq i8* [[TMP3]], [[TMP5]] 830207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE4:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]] 831207b08a9SGiorgis Georgakoudis // CHECK2: omp.arraycpy.body: 832207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi i8* [ [[TMP4]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ] 833207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi i8* [ [[TMP3]], [[ENTRY]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ] 834207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP6:%.*]] = load i8, i8* [[OMP_ARRAYCPY_DESTELEMENTPAST]], align 1 835207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[CONV:%.*]] = sext i8 [[TMP6]] to i32 836207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP7:%.*]] = load i8, i8* [[OMP_ARRAYCPY_SRCELEMENTPAST]], align 1 837207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[CONV2:%.*]] = sext i8 [[TMP7]] to i32 838207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[ADD:%.*]] = add nsw i32 [[CONV]], [[CONV2]] 839207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[CONV3:%.*]] = trunc i32 [[ADD]] to i8 840207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8 [[CONV3]], i8* [[OMP_ARRAYCPY_DESTELEMENTPAST]], align 1 841207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr i8, i8* [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1 842207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr i8, i8* [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1 843207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq i8* [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP5]] 844207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYCPY_DONE4]], label [[OMP_ARRAYCPY_BODY]] 845207b08a9SGiorgis Georgakoudis // CHECK2: omp.arraycpy.done4: 846207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: ret void 847207b08a9SGiorgis Georgakoudis // 848207b08a9SGiorgis Georgakoudis // 849207b08a9SGiorgis Georgakoudis // CHECK2-LABEL: define {{[^@]+}}@.omp_task_privates_map. 850207b08a9SGiorgis Georgakoudis // CHECK2-SAME: (%struct..kmp_privates.t* noalias [[TMP0:%.*]], i8*** noalias [[TMP1:%.*]]) #[[ATTR6:[0-9]+]] { 851207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: entry: 852207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTADDR:%.*]] = alloca %struct..kmp_privates.t*, align 8 853207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTADDR1:%.*]] = alloca i8***, align 8 854207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store %struct..kmp_privates.t* [[TMP0]], %struct..kmp_privates.t** [[DOTADDR]], align 8 855207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8*** [[TMP1]], i8**** [[DOTADDR1]], align 8 856207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP2:%.*]] = load %struct..kmp_privates.t*, %struct..kmp_privates.t** [[DOTADDR]], align 8 857207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT__KMP_PRIVATES_T:%.*]], %struct..kmp_privates.t* [[TMP2]], i32 0, i32 0 858207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP4:%.*]] = load i8***, i8**** [[DOTADDR1]], align 8 859207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8** [[TMP3]], i8*** [[TMP4]], align 8 860207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: ret void 861207b08a9SGiorgis Georgakoudis // 862207b08a9SGiorgis Georgakoudis // 863207b08a9SGiorgis Georgakoudis // CHECK2-LABEL: define {{[^@]+}}@.omp_task_entry. 864207b08a9SGiorgis Georgakoudis // CHECK2-SAME: (i32 [[TMP0:%.*]], %struct.kmp_task_t_with_privates* noalias [[TMP1:%.*]]) #[[ATTR3]] { 865207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: entry: 866207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTGLOBAL_TID__ADDR_I:%.*]] = alloca i32, align 4 867207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTPART_ID__ADDR_I:%.*]] = alloca i32*, align 8 868207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTPRIVATES__ADDR_I:%.*]] = alloca i8*, align 8 869207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTCOPY_FN__ADDR_I:%.*]] = alloca void (i8*, ...)*, align 8 870207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTTASK_T__ADDR_I:%.*]] = alloca i8*, align 8 871207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[__CONTEXT_ADDR_I:%.*]] = alloca %struct.anon*, align 8 872207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTFIRSTPRIV_PTR_ADDR_I:%.*]] = alloca i8**, align 8 873207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP_I:%.*]] = alloca i8**, align 8 874207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP4_I:%.*]] = alloca i8*, align 8 875207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTADDR:%.*]] = alloca i32, align 4 876207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTADDR1:%.*]] = alloca %struct.kmp_task_t_with_privates*, align 8 877207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i32 [[TMP0]], i32* [[DOTADDR]], align 4 878207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store %struct.kmp_task_t_with_privates* [[TMP1]], %struct.kmp_task_t_with_privates** [[DOTADDR1]], align 8 879207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP2:%.*]] = load i32, i32* [[DOTADDR]], align 4 880207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP3:%.*]] = load %struct.kmp_task_t_with_privates*, %struct.kmp_task_t_with_privates** [[DOTADDR1]], align 8 881207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP4:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES:%.*]], %struct.kmp_task_t_with_privates* [[TMP3]], i32 0, i32 0 882207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T:%.*]], %struct.kmp_task_t* [[TMP4]], i32 0, i32 2 883207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP4]], i32 0, i32 0 884207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP7:%.*]] = load i8*, i8** [[TMP6]], align 8 885207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP8:%.*]] = bitcast i8* [[TMP7]] to %struct.anon* 886207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP9:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES]], %struct.kmp_task_t_with_privates* [[TMP3]], i32 0, i32 1 887207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP10:%.*]] = bitcast %struct..kmp_privates.t* [[TMP9]] to i8* 888207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP11:%.*]] = bitcast %struct.kmp_task_t_with_privates* [[TMP3]] to i8* 889207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META2:![0-9]+]]) 890207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META5:![0-9]+]]) 891207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META7:![0-9]+]]) 892207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META9:![0-9]+]]) 893207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i32 [[TMP2]], i32* [[DOTGLOBAL_TID__ADDR_I]], align 4, !noalias !11 894207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i32* [[TMP5]], i32** [[DOTPART_ID__ADDR_I]], align 8, !noalias !11 895207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP10]], i8** [[DOTPRIVATES__ADDR_I]], align 8, !noalias !11 896207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store void (i8*, ...)* bitcast (void (%struct..kmp_privates.t*, i8***)* @.omp_task_privates_map. to void (i8*, ...)*), void (i8*, ...)** [[DOTCOPY_FN__ADDR_I]], align 8, !noalias !11 897207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP11]], i8** [[DOTTASK_T__ADDR_I]], align 8, !noalias !11 898207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store %struct.anon* [[TMP8]], %struct.anon** [[__CONTEXT_ADDR_I]], align 8, !noalias !11 899207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP12:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR_I]], align 8, !noalias !11 900207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP13:%.*]] = load void (i8*, ...)*, void (i8*, ...)** [[DOTCOPY_FN__ADDR_I]], align 8, !noalias !11 901207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP14:%.*]] = load i8*, i8** [[DOTPRIVATES__ADDR_I]], align 8, !noalias !11 902207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP15:%.*]] = bitcast void (i8*, ...)* [[TMP13]] to void (i8*, i8***)* 903207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: call void [[TMP15]](i8* [[TMP14]], i8*** [[DOTFIRSTPRIV_PTR_ADDR_I]]) #[[ATTR5:[0-9]+]] 904207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP16:%.*]] = load i8**, i8*** [[DOTFIRSTPRIV_PTR_ADDR_I]], align 8, !noalias !11 905207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP17:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP12]], i32 0, i32 1 906207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP18:%.*]] = load i32*, i32** [[TMP17]], align 8 907207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP19:%.*]] = load i8*, i8** [[TMP16]], align 8 908207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP20:%.*]] = load i32, i32* [[DOTGLOBAL_TID__ADDR_I]], align 4, !noalias !11 909207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP21:%.*]] = bitcast i32* [[TMP18]] to i8* 910207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP22:%.*]] = call i8* @__kmpc_task_reduction_get_th_data(i32 [[TMP20]], i8* [[TMP19]], i8* [[TMP21]]) #[[ATTR5]] 911207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[CONV_I:%.*]] = bitcast i8* [[TMP22]] to i32* 912207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP23:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP12]], i32 0, i32 2 913207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP24:%.*]] = load i8**, i8*** [[TMP23]], align 8 914207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP25:%.*]] = load i8*, i8** [[TMP24]], align 8 915207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP26:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP12]], i32 0, i32 1 916207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP27:%.*]] = load i32*, i32** [[TMP26]], align 8 917207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP28:%.*]] = load i32, i32* [[TMP27]], align 4 918207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP29:%.*]] = sext i32 [[TMP28]] to i64 919207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[LB_ADD_LEN_I:%.*]] = add nsw i64 -1, [[TMP29]] 920207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP30:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP12]], i32 0, i32 2 921207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP31:%.*]] = load i8**, i8*** [[TMP30]], align 8 922207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[ARRAYIDX2_I:%.*]] = getelementptr inbounds i8*, i8** [[TMP31]], i64 9 923207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP32:%.*]] = load i8*, i8** [[ARRAYIDX2_I]], align 8 924207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[ARRAYIDX3_I:%.*]] = getelementptr inbounds i8, i8* [[TMP32]], i64 [[LB_ADD_LEN_I]] 925207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP33:%.*]] = ptrtoint i8* [[ARRAYIDX3_I]] to i64 926207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP34:%.*]] = ptrtoint i8* [[TMP25]] to i64 927207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP35:%.*]] = sub i64 [[TMP33]], [[TMP34]] 928207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP36:%.*]] = sdiv exact i64 [[TMP35]], ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64) 929207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP37:%.*]] = add nuw i64 [[TMP36]], 1 930207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP38:%.*]] = mul nuw i64 [[TMP37]], ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64) 931207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i64 [[TMP37]], i64* @{{reduction_size[.].+[.]}}, align 8 932207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP39:%.*]] = load i8*, i8** [[TMP16]], align 8 933207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP40:%.*]] = call i8* @__kmpc_task_reduction_get_th_data(i32 [[TMP20]], i8* [[TMP39]], i8* [[TMP25]]) #[[ATTR5]] 934207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP41:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP12]], i32 0, i32 2 935207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP42:%.*]] = load i8**, i8*** [[TMP41]], align 8 936207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP43:%.*]] = load i8*, i8** [[TMP42]], align 8 937207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP44:%.*]] = ptrtoint i8* [[TMP43]] to i64 938207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP45:%.*]] = ptrtoint i8* [[TMP25]] to i64 939207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP46:%.*]] = sub i64 [[TMP44]], [[TMP45]] 940207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP47:%.*]] = sdiv exact i64 [[TMP46]], ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64) 941207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP48:%.*]] = getelementptr i8, i8* [[TMP40]], i64 [[TMP47]] 942207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8** [[TMP4_I]], i8*** [[TMP_I]], align 8, !noalias !11 943207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP48]], i8** [[TMP4_I]], align 8, !noalias !11 944207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: ret i32 0 945207b08a9SGiorgis Georgakoudis // 946207b08a9SGiorgis Georgakoudis // 947207b08a9SGiorgis Georgakoudis // CHECK2-LABEL: define {{[^@]+}}@.omp.reduction.reduction_func 948207b08a9SGiorgis Georgakoudis // CHECK2-SAME: (i8* [[TMP0:%.*]], i8* [[TMP1:%.*]]) #[[ATTR3]] { 949207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: entry: 950207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTADDR:%.*]] = alloca i8*, align 8 951207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTADDR1:%.*]] = alloca i8*, align 8 952207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP0]], i8** [[DOTADDR]], align 8 953207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP1]], i8** [[DOTADDR1]], align 8 954207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP2:%.*]] = load i8*, i8** [[DOTADDR]], align 8 955207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP3:%.*]] = bitcast i8* [[TMP2]] to [3 x i8*]* 956207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP4:%.*]] = load i8*, i8** [[DOTADDR1]], align 8 957207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP5:%.*]] = bitcast i8* [[TMP4]] to [3 x i8*]* 958207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP6:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[TMP5]], i64 0, i64 0 959207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP7:%.*]] = load i8*, i8** [[TMP6]], align 8 960207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP8:%.*]] = bitcast i8* [[TMP7]] to i32* 961207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP9:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[TMP3]], i64 0, i64 0 962207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP10:%.*]] = load i8*, i8** [[TMP9]], align 8 963207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP11:%.*]] = bitcast i8* [[TMP10]] to i32* 964207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP12:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[TMP5]], i64 0, i64 1 965207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP13:%.*]] = load i8*, i8** [[TMP12]], align 8 966207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP14:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[TMP3]], i64 0, i64 1 967207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP15:%.*]] = load i8*, i8** [[TMP14]], align 8 968207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP16:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[TMP3]], i64 0, i64 2 969207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP17:%.*]] = load i8*, i8** [[TMP16]], align 8 970207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP18:%.*]] = ptrtoint i8* [[TMP17]] to i64 971207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP19:%.*]] = load i32, i32* [[TMP11]], align 4 972207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP20:%.*]] = load i32, i32* [[TMP8]], align 4 973207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP19]], [[TMP20]] 974207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i32 [[ADD]], i32* [[TMP11]], align 4 975207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP21:%.*]] = getelementptr i8, i8* [[TMP15]], i64 [[TMP18]] 976207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq i8* [[TMP15]], [[TMP21]] 977207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE5:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]] 978207b08a9SGiorgis Georgakoudis // CHECK2: omp.arraycpy.body: 979207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi i8* [ [[TMP13]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ] 980207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi i8* [ [[TMP15]], [[ENTRY]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ] 981207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP22:%.*]] = load i8, i8* [[OMP_ARRAYCPY_DESTELEMENTPAST]], align 1 982207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[CONV:%.*]] = sext i8 [[TMP22]] to i32 983207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP23:%.*]] = load i8, i8* [[OMP_ARRAYCPY_SRCELEMENTPAST]], align 1 984207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[CONV2:%.*]] = sext i8 [[TMP23]] to i32 985207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[ADD3:%.*]] = add nsw i32 [[CONV]], [[CONV2]] 986207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[CONV4:%.*]] = trunc i32 [[ADD3]] to i8 987207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8 [[CONV4]], i8* [[OMP_ARRAYCPY_DESTELEMENTPAST]], align 1 988207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr i8, i8* [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1 989207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr i8, i8* [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1 990207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq i8* [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP21]] 991207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYCPY_DONE5]], label [[OMP_ARRAYCPY_BODY]] 992207b08a9SGiorgis Georgakoudis // CHECK2: omp.arraycpy.done5: 993207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: ret void 994207b08a9SGiorgis Georgakoudis // 995207b08a9SGiorgis Georgakoudis //