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 _ 2b529744cShyeongyukim // RUN: %clang_cc1 -no-enable-noundef-analysis -verify -triple x86_64-apple-darwin10 -fopenmp -x c++ -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK1 3b529744cShyeongyukim // RUN: %clang_cc1 -no-enable-noundef-analysis -fopenmp -x c++ -triple x86_64-apple-darwin10 -emit-pch -o %t %s 4b529744cShyeongyukim // RUN: %clang_cc1 -no-enable-noundef-analysis -fopenmp -x c++ -triple x86_64-apple-darwin10 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK2 560e51c48SAlexey Bataev 6b529744cShyeongyukim // RUN: %clang_cc1 -no-enable-noundef-analysis -verify -triple x86_64-apple-darwin10 -fopenmp-simd -x c++ -emit-llvm %s -o - | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}" 7b529744cShyeongyukim // RUN: %clang_cc1 -no-enable-noundef-analysis -fopenmp-simd -x c++ -triple x86_64-apple-darwin10 -emit-pch -o %t %s 8b529744cShyeongyukim // RUN: %clang_cc1 -no-enable-noundef-analysis -fopenmp-simd -x c++ -triple x86_64-apple-darwin10 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}" 960e51c48SAlexey Bataev // expected-no-diagnostics 1060e51c48SAlexey Bataev #ifndef HEADER 1160e51c48SAlexey Bataev #define HEADER 1260e51c48SAlexey Bataev 1360e51c48SAlexey Bataev 1460e51c48SAlexey Bataev struct S { 1560e51c48SAlexey Bataev int a; 1660e51c48SAlexey Bataev S() : a(0) {} 1760e51c48SAlexey Bataev S(const S&) {} 1860e51c48SAlexey Bataev S& operator=(const S&) {return *this;} 1960e51c48SAlexey Bataev ~S() {} 2060e51c48SAlexey Bataev friend S operator+(const S&a, const S&b) {return a;} 2160e51c48SAlexey Bataev }; 2260e51c48SAlexey Bataev 2360e51c48SAlexey Bataev 2460e51c48SAlexey Bataev int main(int argc, char **argv) { 2560e51c48SAlexey Bataev int a; 2660e51c48SAlexey Bataev float b; 2760e51c48SAlexey Bataev S c[5]; 2860e51c48SAlexey Bataev short d[argc]; 2960e51c48SAlexey Bataev #pragma omp taskgroup task_reduction(+: a, b, argc) 3060e51c48SAlexey Bataev { 3160e51c48SAlexey Bataev #pragma omp taskgroup task_reduction(-:c, d) 3260e51c48SAlexey Bataev #pragma omp parallel 3360e51c48SAlexey Bataev #pragma omp master taskloop in_reduction(+:a) in_reduction(-:d) 3460e51c48SAlexey Bataev for (int i = 0; i < 5; ++i) 3560e51c48SAlexey Bataev a += d[a]; 3660e51c48SAlexey Bataev } 3760e51c48SAlexey Bataev return 0; 3860e51c48SAlexey Bataev } 3960e51c48SAlexey Bataev 4060e51c48SAlexey Bataev 4160e51c48SAlexey Bataev 4260e51c48SAlexey Bataev #endif 43207b08a9SGiorgis Georgakoudis // CHECK1-LABEL: define {{[^@]+}}@main 44207b08a9SGiorgis Georgakoudis // CHECK1-SAME: (i32 [[ARGC:%.*]], i8** [[ARGV:%.*]]) #[[ATTR0:[0-9]+]] { 45207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: entry: 46207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[RETVAL:%.*]] = alloca i32, align 4 47207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[ARGC_ADDR:%.*]] = alloca i32, align 4 48207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[ARGV_ADDR:%.*]] = alloca i8**, align 8 49207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[A:%.*]] = alloca i32, align 4 50207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[B:%.*]] = alloca float, align 4 51207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[C:%.*]] = alloca [5 x %struct.S], align 16 52207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[SAVED_STACK:%.*]] = alloca i8*, align 8 53207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[__VLA_EXPR0:%.*]] = alloca i64, align 8 54207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTRD_INPUT_:%.*]] = alloca [3 x %struct.kmp_taskred_input_t], align 8 55207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTTASK_RED_:%.*]] = alloca i8*, align 8 56207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTRD_INPUT_3:%.*]] = alloca [2 x %struct.kmp_taskred_input_t.0], align 8 57207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTTASK_RED_6:%.*]] = alloca i8*, align 8 58207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1:[0-9]+]]) 59207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i32 0, i32* [[RETVAL]], align 4 60207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i32 [[ARGC]], i32* [[ARGC_ADDR]], align 4 61207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8** [[ARGV]], i8*** [[ARGV_ADDR]], align 8 62207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [5 x %struct.S], [5 x %struct.S]* [[C]], i32 0, i32 0 63207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[ARRAYCTOR_END:%.*]] = getelementptr inbounds [[STRUCT_S:%.*]], %struct.S* [[ARRAY_BEGIN]], i64 5 64207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: br label [[ARRAYCTOR_LOOP:%.*]] 65207b08a9SGiorgis Georgakoudis // CHECK1: arrayctor.loop: 66207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[ARRAYCTOR_CUR:%.*]] = phi %struct.S* [ [[ARRAY_BEGIN]], [[ENTRY:%.*]] ], [ [[ARRAYCTOR_NEXT:%.*]], [[ARRAYCTOR_LOOP]] ] 6716d03818SRoman Lebedev // CHECK1-NEXT: call void @_ZN1SC1Ev(%struct.S* nonnull align 4 dereferenceable(4) [[ARRAYCTOR_CUR]]) 68207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[ARRAYCTOR_NEXT]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[ARRAYCTOR_CUR]], i64 1 69207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[ARRAYCTOR_DONE:%.*]] = icmp eq %struct.S* [[ARRAYCTOR_NEXT]], [[ARRAYCTOR_END]] 70207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: br i1 [[ARRAYCTOR_DONE]], label [[ARRAYCTOR_CONT:%.*]], label [[ARRAYCTOR_LOOP]] 71207b08a9SGiorgis Georgakoudis // CHECK1: arrayctor.cont: 72207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP1:%.*]] = load i32, i32* [[ARGC_ADDR]], align 4 73207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP2:%.*]] = zext i32 [[TMP1]] to i64 74207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP3:%.*]] = call i8* @llvm.stacksave() 75207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP3]], i8** [[SAVED_STACK]], align 8 76207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[VLA:%.*]] = alloca i16, i64 [[TMP2]], align 16 77207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i64 [[TMP2]], i64* [[__VLA_EXPR0]], align 8 78207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: call void @__kmpc_taskgroup(%struct.ident_t* @[[GLOB1]], i32 [[TMP0]]) 79207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTRD_INPUT_GEP_:%.*]] = getelementptr inbounds [3 x %struct.kmp_taskred_input_t], [3 x %struct.kmp_taskred_input_t]* [[DOTRD_INPUT_]], i64 0, i64 0 80207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP4:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T:%.*]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 0 81207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP5:%.*]] = bitcast i32* [[A]] to i8* 82207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP5]], i8** [[TMP4]], align 8 83207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 1 84207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP7:%.*]] = bitcast i32* [[A]] to i8* 85207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP7]], i8** [[TMP6]], align 8 86207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP8:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 2 87207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i64 4, i64* [[TMP8]], align 8 88207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP9:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 3 89207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* bitcast (void (i8*, i8*)* @.red_init. to i8*), i8** [[TMP9]], align 8 90207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP10:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 4 91207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* null, i8** [[TMP10]], align 8 92207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP11:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 5 93207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* bitcast (void (i8*, i8*)* @.red_comb. to i8*), i8** [[TMP11]], align 8 94207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP12:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 6 95207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP13:%.*]] = bitcast i32* [[TMP12]] to i8* 96207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: call void @llvm.memset.p0i8.i64(i8* align 8 [[TMP13]], i8 0, i64 4, i1 false) 97207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTRD_INPUT_GEP_1:%.*]] = getelementptr inbounds [3 x %struct.kmp_taskred_input_t], [3 x %struct.kmp_taskred_input_t]* [[DOTRD_INPUT_]], i64 0, i64 1 98207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP14:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_1]], i32 0, i32 0 99207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP15:%.*]] = bitcast float* [[B]] to i8* 100207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP15]], i8** [[TMP14]], align 8 101207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP16:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_1]], i32 0, i32 1 102207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP17:%.*]] = bitcast float* [[B]] to i8* 103207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP17]], i8** [[TMP16]], align 8 104207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP18:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_1]], i32 0, i32 2 105207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i64 4, i64* [[TMP18]], align 8 106207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP19:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_1]], i32 0, i32 3 107207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* bitcast (void (i8*, i8*)* @.red_init..1 to i8*), i8** [[TMP19]], align 8 108207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP20:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_1]], i32 0, i32 4 109207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* null, i8** [[TMP20]], align 8 110207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP21:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_1]], i32 0, i32 5 111207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* bitcast (void (i8*, i8*)* @.red_comb..2 to i8*), i8** [[TMP21]], align 8 112207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP22:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_1]], i32 0, i32 6 113207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP23:%.*]] = bitcast i32* [[TMP22]] to i8* 114207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: call void @llvm.memset.p0i8.i64(i8* align 8 [[TMP23]], i8 0, i64 4, i1 false) 115207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTRD_INPUT_GEP_2:%.*]] = getelementptr inbounds [3 x %struct.kmp_taskred_input_t], [3 x %struct.kmp_taskred_input_t]* [[DOTRD_INPUT_]], i64 0, i64 2 116207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP24:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_2]], i32 0, i32 0 117207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP25:%.*]] = bitcast i32* [[ARGC_ADDR]] to i8* 118207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP25]], i8** [[TMP24]], align 8 119207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP26:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_2]], i32 0, i32 1 120207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP27:%.*]] = bitcast i32* [[ARGC_ADDR]] to i8* 121207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP27]], i8** [[TMP26]], align 8 122207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP28:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_2]], i32 0, i32 2 123207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i64 4, i64* [[TMP28]], align 8 124207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP29:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_2]], i32 0, i32 3 125207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* bitcast (void (i8*, i8*)* @.red_init..3 to i8*), i8** [[TMP29]], align 8 126207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP30:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_2]], i32 0, i32 4 127207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* null, i8** [[TMP30]], align 8 128207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP31:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_2]], i32 0, i32 5 129207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* bitcast (void (i8*, i8*)* @.red_comb..4 to i8*), i8** [[TMP31]], align 8 130207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP32:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_2]], i32 0, i32 6 131207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP33:%.*]] = bitcast i32* [[TMP32]] to i8* 132207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: call void @llvm.memset.p0i8.i64(i8* align 8 [[TMP33]], i8 0, i64 4, i1 false) 133207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP34:%.*]] = bitcast [3 x %struct.kmp_taskred_input_t]* [[DOTRD_INPUT_]] to i8* 134207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP35:%.*]] = call i8* @__kmpc_taskred_init(i32 [[TMP0]], i32 3, i8* [[TMP34]]) 135207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP35]], i8** [[DOTTASK_RED_]], align 8 136207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: call void @__kmpc_taskgroup(%struct.ident_t* @[[GLOB1]], i32 [[TMP0]]) 137207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTRD_INPUT_GEP_4:%.*]] = getelementptr inbounds [2 x %struct.kmp_taskred_input_t.0], [2 x %struct.kmp_taskred_input_t.0]* [[DOTRD_INPUT_3]], i64 0, i64 0 138207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP36:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T_0:%.*]], %struct.kmp_taskred_input_t.0* [[DOTRD_INPUT_GEP_4]], i32 0, i32 0 139207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP37:%.*]] = bitcast [5 x %struct.S]* [[C]] to i8* 140207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP37]], i8** [[TMP36]], align 8 141207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP38:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T_0]], %struct.kmp_taskred_input_t.0* [[DOTRD_INPUT_GEP_4]], i32 0, i32 1 142207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP39:%.*]] = bitcast [5 x %struct.S]* [[C]] to i8* 143207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP39]], i8** [[TMP38]], align 8 144207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP40:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T_0]], %struct.kmp_taskred_input_t.0* [[DOTRD_INPUT_GEP_4]], i32 0, i32 2 145207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i64 20, i64* [[TMP40]], align 8 146207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP41:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T_0]], %struct.kmp_taskred_input_t.0* [[DOTRD_INPUT_GEP_4]], i32 0, i32 3 147207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* bitcast (void (i8*, i8*)* @.red_init..5 to i8*), i8** [[TMP41]], align 8 148207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP42:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T_0]], %struct.kmp_taskred_input_t.0* [[DOTRD_INPUT_GEP_4]], i32 0, i32 4 149207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* bitcast (void (i8*)* @.red_fini. to i8*), i8** [[TMP42]], align 8 150207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP43:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T_0]], %struct.kmp_taskred_input_t.0* [[DOTRD_INPUT_GEP_4]], i32 0, i32 5 151207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* bitcast (void (i8*, i8*)* @.red_comb..6 to i8*), i8** [[TMP43]], align 8 152207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP44:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T_0]], %struct.kmp_taskred_input_t.0* [[DOTRD_INPUT_GEP_4]], i32 0, i32 6 153207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP45:%.*]] = bitcast i32* [[TMP44]] to i8* 154207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: call void @llvm.memset.p0i8.i64(i8* align 8 [[TMP45]], i8 0, i64 4, i1 false) 155207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTRD_INPUT_GEP_5:%.*]] = getelementptr inbounds [2 x %struct.kmp_taskred_input_t.0], [2 x %struct.kmp_taskred_input_t.0]* [[DOTRD_INPUT_3]], i64 0, i64 1 156207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP46:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T_0]], %struct.kmp_taskred_input_t.0* [[DOTRD_INPUT_GEP_5]], i32 0, i32 0 157207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP47:%.*]] = bitcast i16* [[VLA]] to i8* 158207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP47]], i8** [[TMP46]], align 8 159207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP48:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T_0]], %struct.kmp_taskred_input_t.0* [[DOTRD_INPUT_GEP_5]], i32 0, i32 1 160207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP49:%.*]] = bitcast i16* [[VLA]] to i8* 161207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP49]], i8** [[TMP48]], align 8 162207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP50:%.*]] = mul nuw i64 [[TMP2]], 2 163207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP51:%.*]] = udiv exact i64 [[TMP50]], ptrtoint (i16* getelementptr (i16, i16* null, i32 1) to i64) 164207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP52:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T_0]], %struct.kmp_taskred_input_t.0* [[DOTRD_INPUT_GEP_5]], i32 0, i32 2 165207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i64 [[TMP50]], i64* [[TMP52]], align 8 166207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP53:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T_0]], %struct.kmp_taskred_input_t.0* [[DOTRD_INPUT_GEP_5]], i32 0, i32 3 167207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* bitcast (void (i8*, i8*)* @.red_init..7 to i8*), i8** [[TMP53]], align 8 168207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP54:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T_0]], %struct.kmp_taskred_input_t.0* [[DOTRD_INPUT_GEP_5]], i32 0, i32 4 169207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* null, i8** [[TMP54]], align 8 170207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP55:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T_0]], %struct.kmp_taskred_input_t.0* [[DOTRD_INPUT_GEP_5]], i32 0, i32 5 171207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* bitcast (void (i8*, i8*)* @.red_comb..8 to i8*), i8** [[TMP55]], align 8 172207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP56:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T_0]], %struct.kmp_taskred_input_t.0* [[DOTRD_INPUT_GEP_5]], i32 0, i32 6 173207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i32 1, i32* [[TMP56]], align 8 174207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP57:%.*]] = bitcast [2 x %struct.kmp_taskred_input_t.0]* [[DOTRD_INPUT_3]] to i8* 175207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP58:%.*]] = call i8* @__kmpc_taskred_init(i32 [[TMP0]], i32 2, i8* [[TMP57]]) 176207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP58]], i8** [[DOTTASK_RED_6]], align 8 177ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 5, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i64, i16*, i8**, i8**)* @.omp_outlined. to void (i32*, i32*, ...)*), i32* [[A]], i64 [[TMP2]], i16* [[VLA]], i8** [[DOTTASK_RED_]], i8** [[DOTTASK_RED_6]]) 178207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: call void @__kmpc_end_taskgroup(%struct.ident_t* @[[GLOB1]], i32 [[TMP0]]) 179207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: call void @__kmpc_end_taskgroup(%struct.ident_t* @[[GLOB1]], i32 [[TMP0]]) 180207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i32 0, i32* [[RETVAL]], align 4 181ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP59:%.*]] = load i8*, i8** [[SAVED_STACK]], align 8 182ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: call void @llvm.stackrestore(i8* [[TMP59]]) 183207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[ARRAY_BEGIN7:%.*]] = getelementptr inbounds [5 x %struct.S], [5 x %struct.S]* [[C]], i32 0, i32 0 184ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP60:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[ARRAY_BEGIN7]], i64 5 185207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: br label [[ARRAYDESTROY_BODY:%.*]] 186207b08a9SGiorgis Georgakoudis // CHECK1: arraydestroy.body: 187ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi %struct.S* [ [[TMP60]], [[ARRAYCTOR_CONT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ] 188207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[ARRAYDESTROY_ELEMENTPAST]], i64 -1 18916d03818SRoman Lebedev // CHECK1-NEXT: call void @_ZN1SD1Ev(%struct.S* nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR3:[0-9]+]] 190207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq %struct.S* [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN7]] 191207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE8:%.*]], label [[ARRAYDESTROY_BODY]] 192207b08a9SGiorgis Georgakoudis // CHECK1: arraydestroy.done8: 193ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP61:%.*]] = load i32, i32* [[RETVAL]], align 4 194ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: ret i32 [[TMP61]] 195207b08a9SGiorgis Georgakoudis // 196207b08a9SGiorgis Georgakoudis // 197207b08a9SGiorgis Georgakoudis // CHECK1-LABEL: define {{[^@]+}}@_ZN1SC1Ev 19816d03818SRoman Lebedev // CHECK1-SAME: (%struct.S* nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1:[0-9]+]] align 2 { 199207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: entry: 200207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca %struct.S*, align 8 201207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store %struct.S* [[THIS]], %struct.S** [[THIS_ADDR]], align 8 202207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[THIS1:%.*]] = load %struct.S*, %struct.S** [[THIS_ADDR]], align 8 20316d03818SRoman Lebedev // CHECK1-NEXT: call void @_ZN1SC2Ev(%struct.S* nonnull align 4 dereferenceable(4) [[THIS1]]) 204207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: ret void 205207b08a9SGiorgis Georgakoudis // 206207b08a9SGiorgis Georgakoudis // 207207b08a9SGiorgis Georgakoudis // CHECK1-LABEL: define {{[^@]+}}@.red_init. 208207b08a9SGiorgis Georgakoudis // CHECK1-SAME: (i8* noalias [[TMP0:%.*]], i8* noalias [[TMP1:%.*]]) #[[ATTR5:[0-9]+]] { 209207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: entry: 210207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca i8*, align 8 211207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca i8*, align 8 212207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP0]], i8** [[DOTADDR]], align 8 213207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP1]], i8** [[DOTADDR1]], align 8 214*b6f85d85SNikita Popov // CHECK1-NEXT: [[TMP2:%.*]] = bitcast i8** [[DOTADDR]] to i32** 215*b6f85d85SNikita Popov // CHECK1-NEXT: [[TMP3:%.*]] = load i32*, i32** [[TMP2]], align 8 216*b6f85d85SNikita Popov // CHECK1-NEXT: store i32 0, i32* [[TMP3]], align 4 217207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: ret void 218207b08a9SGiorgis Georgakoudis // 219207b08a9SGiorgis Georgakoudis // 220207b08a9SGiorgis Georgakoudis // CHECK1-LABEL: define {{[^@]+}}@.red_comb. 221207b08a9SGiorgis Georgakoudis // CHECK1-SAME: (i8* [[TMP0:%.*]], i8* [[TMP1:%.*]]) #[[ATTR5]] { 222207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: entry: 223207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca i8*, align 8 224207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca i8*, align 8 225207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP0]], i8** [[DOTADDR]], align 8 226207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP1]], i8** [[DOTADDR1]], align 8 22752cc65d4SNikita Popov // CHECK1-NEXT: [[TMP2:%.*]] = bitcast i8** [[DOTADDR]] to i32** 22852cc65d4SNikita Popov // CHECK1-NEXT: [[TMP3:%.*]] = load i32*, i32** [[TMP2]], align 8 22952cc65d4SNikita Popov // CHECK1-NEXT: [[TMP4:%.*]] = bitcast i8** [[DOTADDR1]] to i32** 23052cc65d4SNikita Popov // CHECK1-NEXT: [[TMP5:%.*]] = load i32*, i32** [[TMP4]], align 8 23152cc65d4SNikita Popov // CHECK1-NEXT: [[TMP6:%.*]] = load i32, i32* [[TMP3]], align 4 23252cc65d4SNikita Popov // CHECK1-NEXT: [[TMP7:%.*]] = load i32, i32* [[TMP5]], align 4 233207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP6]], [[TMP7]] 23452cc65d4SNikita Popov // CHECK1-NEXT: store i32 [[ADD]], i32* [[TMP3]], align 4 235207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: ret void 236207b08a9SGiorgis Georgakoudis // 237207b08a9SGiorgis Georgakoudis // 238207b08a9SGiorgis Georgakoudis // CHECK1-LABEL: define {{[^@]+}}@.red_init..1 239207b08a9SGiorgis Georgakoudis // CHECK1-SAME: (i8* noalias [[TMP0:%.*]], i8* noalias [[TMP1:%.*]]) #[[ATTR5]] { 240207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: entry: 241207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca i8*, align 8 242207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca i8*, align 8 243207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP0]], i8** [[DOTADDR]], align 8 244207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP1]], i8** [[DOTADDR1]], align 8 245*b6f85d85SNikita Popov // CHECK1-NEXT: [[TMP2:%.*]] = bitcast i8** [[DOTADDR]] to float** 246*b6f85d85SNikita Popov // CHECK1-NEXT: [[TMP3:%.*]] = load float*, float** [[TMP2]], align 8 247*b6f85d85SNikita Popov // CHECK1-NEXT: store float 0.000000e+00, float* [[TMP3]], align 4 248207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: ret void 249207b08a9SGiorgis Georgakoudis // 250207b08a9SGiorgis Georgakoudis // 251207b08a9SGiorgis Georgakoudis // CHECK1-LABEL: define {{[^@]+}}@.red_comb..2 252207b08a9SGiorgis Georgakoudis // CHECK1-SAME: (i8* [[TMP0:%.*]], i8* [[TMP1:%.*]]) #[[ATTR5]] { 253207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: entry: 254207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca i8*, align 8 255207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca i8*, align 8 256207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP0]], i8** [[DOTADDR]], align 8 257207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP1]], i8** [[DOTADDR1]], align 8 25852cc65d4SNikita Popov // CHECK1-NEXT: [[TMP2:%.*]] = bitcast i8** [[DOTADDR]] to float** 25952cc65d4SNikita Popov // CHECK1-NEXT: [[TMP3:%.*]] = load float*, float** [[TMP2]], align 8 26052cc65d4SNikita Popov // CHECK1-NEXT: [[TMP4:%.*]] = bitcast i8** [[DOTADDR1]] to float** 26152cc65d4SNikita Popov // CHECK1-NEXT: [[TMP5:%.*]] = load float*, float** [[TMP4]], align 8 26252cc65d4SNikita Popov // CHECK1-NEXT: [[TMP6:%.*]] = load float, float* [[TMP3]], align 4 26352cc65d4SNikita Popov // CHECK1-NEXT: [[TMP7:%.*]] = load float, float* [[TMP5]], align 4 264207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[ADD:%.*]] = fadd float [[TMP6]], [[TMP7]] 26552cc65d4SNikita Popov // CHECK1-NEXT: store float [[ADD]], float* [[TMP3]], align 4 266207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: ret void 267207b08a9SGiorgis Georgakoudis // 268207b08a9SGiorgis Georgakoudis // 269207b08a9SGiorgis Georgakoudis // CHECK1-LABEL: define {{[^@]+}}@.red_init..3 270207b08a9SGiorgis Georgakoudis // CHECK1-SAME: (i8* noalias [[TMP0:%.*]], i8* noalias [[TMP1:%.*]]) #[[ATTR5]] { 271207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: entry: 272207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca i8*, align 8 273207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca i8*, align 8 274207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP0]], i8** [[DOTADDR]], align 8 275207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP1]], i8** [[DOTADDR1]], align 8 276*b6f85d85SNikita Popov // CHECK1-NEXT: [[TMP2:%.*]] = bitcast i8** [[DOTADDR]] to i32** 277*b6f85d85SNikita Popov // CHECK1-NEXT: [[TMP3:%.*]] = load i32*, i32** [[TMP2]], align 8 278*b6f85d85SNikita Popov // CHECK1-NEXT: store i32 0, i32* [[TMP3]], align 4 279207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: ret void 280207b08a9SGiorgis Georgakoudis // 281207b08a9SGiorgis Georgakoudis // 282207b08a9SGiorgis Georgakoudis // CHECK1-LABEL: define {{[^@]+}}@.red_comb..4 283207b08a9SGiorgis Georgakoudis // CHECK1-SAME: (i8* [[TMP0:%.*]], i8* [[TMP1:%.*]]) #[[ATTR5]] { 284207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: entry: 285207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca i8*, align 8 286207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca i8*, align 8 287207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP0]], i8** [[DOTADDR]], align 8 288207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP1]], i8** [[DOTADDR1]], align 8 28952cc65d4SNikita Popov // CHECK1-NEXT: [[TMP2:%.*]] = bitcast i8** [[DOTADDR]] to i32** 29052cc65d4SNikita Popov // CHECK1-NEXT: [[TMP3:%.*]] = load i32*, i32** [[TMP2]], align 8 29152cc65d4SNikita Popov // CHECK1-NEXT: [[TMP4:%.*]] = bitcast i8** [[DOTADDR1]] to i32** 29252cc65d4SNikita Popov // CHECK1-NEXT: [[TMP5:%.*]] = load i32*, i32** [[TMP4]], align 8 29352cc65d4SNikita Popov // CHECK1-NEXT: [[TMP6:%.*]] = load i32, i32* [[TMP3]], align 4 29452cc65d4SNikita Popov // CHECK1-NEXT: [[TMP7:%.*]] = load i32, i32* [[TMP5]], align 4 295207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP6]], [[TMP7]] 29652cc65d4SNikita Popov // CHECK1-NEXT: store i32 [[ADD]], i32* [[TMP3]], align 4 297207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: ret void 298207b08a9SGiorgis Georgakoudis // 299207b08a9SGiorgis Georgakoudis // 300207b08a9SGiorgis Georgakoudis // CHECK1-LABEL: define {{[^@]+}}@.red_init..5 301207b08a9SGiorgis Georgakoudis // CHECK1-SAME: (i8* noalias [[TMP0:%.*]], i8* noalias [[TMP1:%.*]]) #[[ATTR5]] { 302207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: entry: 303207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca i8*, align 8 304207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca i8*, align 8 305207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP0]], i8** [[DOTADDR]], align 8 306207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP1]], i8** [[DOTADDR1]], align 8 307*b6f85d85SNikita Popov // CHECK1-NEXT: [[TMP2:%.*]] = bitcast i8** [[DOTADDR]] to [5 x %struct.S]** 308*b6f85d85SNikita Popov // CHECK1-NEXT: [[TMP3:%.*]] = load [5 x %struct.S]*, [5 x %struct.S]** [[TMP2]], align 8 309207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [5 x %struct.S], [5 x %struct.S]* [[TMP3]], i32 0, i32 0 310207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP4:%.*]] = getelementptr [[STRUCT_S:%.*]], %struct.S* [[ARRAY_BEGIN]], i64 5 311207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYINIT_ISEMPTY:%.*]] = icmp eq %struct.S* [[ARRAY_BEGIN]], [[TMP4]] 312207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: br i1 [[OMP_ARRAYINIT_ISEMPTY]], label [[OMP_ARRAYINIT_DONE:%.*]], label [[OMP_ARRAYINIT_BODY:%.*]] 313207b08a9SGiorgis Georgakoudis // CHECK1: omp.arrayinit.body: 314207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi %struct.S* [ [[ARRAY_BEGIN]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYINIT_BODY]] ] 31516d03818SRoman Lebedev // CHECK1-NEXT: call void @_ZN1SC1Ev(%struct.S* nonnull align 4 dereferenceable(4) [[OMP_ARRAYCPY_DESTELEMENTPAST]]) 316207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr [[STRUCT_S]], %struct.S* [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1 317207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq %struct.S* [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP4]] 318207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYINIT_DONE]], label [[OMP_ARRAYINIT_BODY]] 319207b08a9SGiorgis Georgakoudis // CHECK1: omp.arrayinit.done: 320207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: ret void 321207b08a9SGiorgis Georgakoudis // 322207b08a9SGiorgis Georgakoudis // 323207b08a9SGiorgis Georgakoudis // CHECK1-LABEL: define {{[^@]+}}@.red_fini. 324207b08a9SGiorgis Georgakoudis // CHECK1-SAME: (i8* [[TMP0:%.*]]) #[[ATTR5]] { 325207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: entry: 326207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca i8*, align 8 327207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP0]], i8** [[DOTADDR]], align 8 328207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP1:%.*]] = load i8*, i8** [[DOTADDR]], align 8 329207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP2:%.*]] = bitcast i8* [[TMP1]] to [5 x %struct.S]* 330207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [5 x %struct.S], [5 x %struct.S]* [[TMP2]], i32 0, i32 0 331207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_S:%.*]], %struct.S* [[ARRAY_BEGIN]], i64 5 332207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: br label [[ARRAYDESTROY_BODY:%.*]] 333207b08a9SGiorgis Georgakoudis // CHECK1: arraydestroy.body: 334207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi %struct.S* [ [[TMP3]], [[ENTRY:%.*]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ] 335207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[ARRAYDESTROY_ELEMENTPAST]], i64 -1 33616d03818SRoman Lebedev // CHECK1-NEXT: call void @_ZN1SD1Ev(%struct.S* nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR3]] 337207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq %struct.S* [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN]] 338207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE1:%.*]], label [[ARRAYDESTROY_BODY]] 339207b08a9SGiorgis Georgakoudis // CHECK1: arraydestroy.done1: 340207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: ret void 341207b08a9SGiorgis Georgakoudis // 342207b08a9SGiorgis Georgakoudis // 343207b08a9SGiorgis Georgakoudis // CHECK1-LABEL: define {{[^@]+}}@_ZN1SD1Ev 34416d03818SRoman Lebedev // CHECK1-SAME: (%struct.S* nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] align 2 { 345207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: entry: 346207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca %struct.S*, align 8 347207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store %struct.S* [[THIS]], %struct.S** [[THIS_ADDR]], align 8 348207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[THIS1:%.*]] = load %struct.S*, %struct.S** [[THIS_ADDR]], align 8 34916d03818SRoman Lebedev // CHECK1-NEXT: call void @_ZN1SD2Ev(%struct.S* nonnull align 4 dereferenceable(4) [[THIS1]]) #[[ATTR3]] 350207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: ret void 351207b08a9SGiorgis Georgakoudis // 352207b08a9SGiorgis Georgakoudis // 353207b08a9SGiorgis Georgakoudis // CHECK1-LABEL: define {{[^@]+}}@.red_comb..6 354207b08a9SGiorgis Georgakoudis // CHECK1-SAME: (i8* [[TMP0:%.*]], i8* [[TMP1:%.*]]) #[[ATTR5]] { 355207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: entry: 356207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca i8*, align 8 357207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca i8*, align 8 358207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[REF_TMP:%.*]] = alloca [[STRUCT_S:%.*]], align 4 359207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP0]], i8** [[DOTADDR]], align 8 360207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP1]], i8** [[DOTADDR1]], align 8 36152cc65d4SNikita Popov // CHECK1-NEXT: [[TMP2:%.*]] = bitcast i8** [[DOTADDR]] to %struct.S** 36252cc65d4SNikita Popov // CHECK1-NEXT: [[TMP3:%.*]] = load %struct.S*, %struct.S** [[TMP2]], align 8 36352cc65d4SNikita Popov // CHECK1-NEXT: [[TMP4:%.*]] = bitcast i8** [[DOTADDR1]] to %struct.S** 36452cc65d4SNikita Popov // CHECK1-NEXT: [[TMP5:%.*]] = load %struct.S*, %struct.S** [[TMP4]], align 8 365207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP6:%.*]] = getelementptr [[STRUCT_S]], %struct.S* [[TMP3]], i64 5 366207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq %struct.S* [[TMP3]], [[TMP6]] 367207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE2:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]] 368207b08a9SGiorgis Georgakoudis // CHECK1: omp.arraycpy.body: 369207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi %struct.S* [ [[TMP5]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ] 370207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi %struct.S* [ [[TMP3]], [[ENTRY]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ] 371207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: call void @_ZplRK1SS1_(%struct.S* sret([[STRUCT_S]]) align 4 [[REF_TMP]], %struct.S* nonnull align 4 dereferenceable(4) [[OMP_ARRAYCPY_DESTELEMENTPAST]], %struct.S* nonnull align 4 dereferenceable(4) [[OMP_ARRAYCPY_SRCELEMENTPAST]]) 37216d03818SRoman Lebedev // CHECK1-NEXT: [[CALL:%.*]] = call nonnull align 4 dereferenceable(4) %struct.S* @_ZN1SaSERKS_(%struct.S* nonnull align 4 dereferenceable(4) [[OMP_ARRAYCPY_DESTELEMENTPAST]], %struct.S* nonnull align 4 dereferenceable(4) [[REF_TMP]]) 37316d03818SRoman Lebedev // CHECK1-NEXT: call void @_ZN1SD1Ev(%struct.S* nonnull align 4 dereferenceable(4) [[REF_TMP]]) #[[ATTR3]] 374207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr [[STRUCT_S]], %struct.S* [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1 375207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr [[STRUCT_S]], %struct.S* [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1 376207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq %struct.S* [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP6]] 377207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYCPY_DONE2]], label [[OMP_ARRAYCPY_BODY]] 378207b08a9SGiorgis Georgakoudis // CHECK1: omp.arraycpy.done2: 379207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: ret void 380207b08a9SGiorgis Georgakoudis // 381207b08a9SGiorgis Georgakoudis // 382207b08a9SGiorgis Georgakoudis // CHECK1-LABEL: define {{[^@]+}}@_ZplRK1SS1_ 383207b08a9SGiorgis Georgakoudis // CHECK1-SAME: (%struct.S* noalias sret([[STRUCT_S:%.*]]) align 4 [[AGG_RESULT:%.*]], %struct.S* nonnull align 4 dereferenceable(4) [[A:%.*]], %struct.S* nonnull align 4 dereferenceable(4) [[B:%.*]]) #[[ATTR7:[0-9]+]] { 384207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: entry: 385207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[RESULT_PTR:%.*]] = alloca i8*, align 8 386207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[A_ADDR:%.*]] = alloca %struct.S*, align 8 387207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[B_ADDR:%.*]] = alloca %struct.S*, align 8 388207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP0:%.*]] = bitcast %struct.S* [[AGG_RESULT]] to i8* 389207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP0]], i8** [[RESULT_PTR]], align 8 390207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store %struct.S* [[A]], %struct.S** [[A_ADDR]], align 8 391207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store %struct.S* [[B]], %struct.S** [[B_ADDR]], align 8 392207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP1:%.*]] = load %struct.S*, %struct.S** [[A_ADDR]], align 8 39316d03818SRoman Lebedev // CHECK1-NEXT: call void @_ZN1SC1ERKS_(%struct.S* nonnull align 4 dereferenceable(4) [[AGG_RESULT]], %struct.S* nonnull align 4 dereferenceable(4) [[TMP1]]) 394207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: ret void 395207b08a9SGiorgis Georgakoudis // 396207b08a9SGiorgis Georgakoudis // 397207b08a9SGiorgis Georgakoudis // CHECK1-LABEL: define {{[^@]+}}@_ZN1SaSERKS_ 39816d03818SRoman Lebedev // CHECK1-SAME: (%struct.S* nonnull align 4 dereferenceable(4) [[THIS:%.*]], %struct.S* nonnull align 4 dereferenceable(4) [[TMP0:%.*]]) #[[ATTR7]] align 2 { 399207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: entry: 400207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca %struct.S*, align 8 401207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca %struct.S*, align 8 402207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store %struct.S* [[THIS]], %struct.S** [[THIS_ADDR]], align 8 403207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store %struct.S* [[TMP0]], %struct.S** [[DOTADDR]], align 8 404207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[THIS1:%.*]] = load %struct.S*, %struct.S** [[THIS_ADDR]], align 8 405207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: ret %struct.S* [[THIS1]] 406207b08a9SGiorgis Georgakoudis // 407207b08a9SGiorgis Georgakoudis // 408207b08a9SGiorgis Georgakoudis // CHECK1-LABEL: define {{[^@]+}}@.red_init..7 409207b08a9SGiorgis Georgakoudis // CHECK1-SAME: (i8* noalias [[TMP0:%.*]], i8* noalias [[TMP1:%.*]]) #[[ATTR5]] { 410207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: entry: 411207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca i8*, align 8 412207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca i8*, align 8 413207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]]) 414207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP0]], i8** [[DOTADDR]], align 8 415207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP1]], i8** [[DOTADDR1]], align 8 416*b6f85d85SNikita Popov // CHECK1-NEXT: [[TMP3:%.*]] = bitcast i8** [[DOTADDR]] to i16** 417*b6f85d85SNikita Popov // CHECK1-NEXT: [[TMP4:%.*]] = load i16*, i16** [[TMP3]], align 8 418*b6f85d85SNikita Popov // CHECK1-NEXT: [[TMP5:%.*]] = call i8* @__kmpc_threadprivate_cached(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]], i8* bitcast (i64* @{{reduction_size[.].+[.]}}) 419*b6f85d85SNikita Popov // CHECK1-NEXT: [[TMP6:%.*]] = bitcast i8* [[TMP5]] to i64* 420*b6f85d85SNikita Popov // CHECK1-NEXT: [[TMP7:%.*]] = load i64, i64* [[TMP6]], align 8 421*b6f85d85SNikita Popov // CHECK1-NEXT: [[TMP8:%.*]] = getelementptr i16, i16* [[TMP4]], i64 [[TMP7]] 422*b6f85d85SNikita Popov // CHECK1-NEXT: [[OMP_ARRAYINIT_ISEMPTY:%.*]] = icmp eq i16* [[TMP4]], [[TMP8]] 423207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: br i1 [[OMP_ARRAYINIT_ISEMPTY]], label [[OMP_ARRAYINIT_DONE:%.*]], label [[OMP_ARRAYINIT_BODY:%.*]] 424207b08a9SGiorgis Georgakoudis // CHECK1: omp.arrayinit.body: 425*b6f85d85SNikita Popov // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi i16* [ [[TMP4]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYINIT_BODY]] ] 426207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i16 0, i16* [[OMP_ARRAYCPY_DESTELEMENTPAST]], align 2 427207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr i16, i16* [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1 428207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq i16* [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP8]] 429207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYINIT_DONE]], label [[OMP_ARRAYINIT_BODY]] 430207b08a9SGiorgis Georgakoudis // CHECK1: omp.arrayinit.done: 431207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: ret void 432207b08a9SGiorgis Georgakoudis // 433207b08a9SGiorgis Georgakoudis // 434207b08a9SGiorgis Georgakoudis // CHECK1-LABEL: define {{[^@]+}}@.red_comb..8 435207b08a9SGiorgis Georgakoudis // CHECK1-SAME: (i8* [[TMP0:%.*]], i8* [[TMP1:%.*]]) #[[ATTR5]] { 436207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: entry: 437207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca i8*, align 8 438207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca i8*, align 8 439207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]]) 440207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP0]], i8** [[DOTADDR]], align 8 441207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP1]], i8** [[DOTADDR1]], align 8 442207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP3:%.*]] = call i8* @__kmpc_threadprivate_cached(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]], i8* bitcast (i64* @{{reduction_size[.].+[.]}}) 443207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP4:%.*]] = bitcast i8* [[TMP3]] to i64* 444207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP5:%.*]] = load i64, i64* [[TMP4]], align 8 44552cc65d4SNikita Popov // CHECK1-NEXT: [[TMP6:%.*]] = bitcast i8** [[DOTADDR]] to i16** 44652cc65d4SNikita Popov // CHECK1-NEXT: [[TMP7:%.*]] = load i16*, i16** [[TMP6]], align 8 44752cc65d4SNikita Popov // CHECK1-NEXT: [[TMP8:%.*]] = bitcast i8** [[DOTADDR1]] to i16** 44852cc65d4SNikita Popov // CHECK1-NEXT: [[TMP9:%.*]] = load i16*, i16** [[TMP8]], align 8 449207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP10:%.*]] = getelementptr i16, i16* [[TMP7]], i64 [[TMP5]] 450207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq i16* [[TMP7]], [[TMP10]] 451207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE4:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]] 452207b08a9SGiorgis Georgakoudis // CHECK1: omp.arraycpy.body: 453207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi i16* [ [[TMP9]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ] 454207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi i16* [ [[TMP7]], [[ENTRY]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ] 455207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP11:%.*]] = load i16, i16* [[OMP_ARRAYCPY_DESTELEMENTPAST]], align 2 456207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[CONV:%.*]] = sext i16 [[TMP11]] to i32 457207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP12:%.*]] = load i16, i16* [[OMP_ARRAYCPY_SRCELEMENTPAST]], align 2 458207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[CONV2:%.*]] = sext i16 [[TMP12]] to i32 459207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 [[CONV]], [[CONV2]] 460207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[CONV3:%.*]] = trunc i32 [[ADD]] to i16 461207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i16 [[CONV3]], i16* [[OMP_ARRAYCPY_DESTELEMENTPAST]], align 2 462207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr i16, i16* [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1 463207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr i16, i16* [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1 464207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq i16* [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP10]] 465207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYCPY_DONE4]], label [[OMP_ARRAYCPY_BODY]] 466207b08a9SGiorgis Georgakoudis // CHECK1: omp.arraycpy.done4: 467207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: ret void 468207b08a9SGiorgis Georgakoudis // 469207b08a9SGiorgis Georgakoudis // 470207b08a9SGiorgis Georgakoudis // CHECK1-LABEL: define {{[^@]+}}@.omp_outlined. 471ac90dfc4SGiorgis Georgakoudis // CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[A:%.*]], i64 [[VLA:%.*]], i16* nonnull align 2 dereferenceable(2) [[D:%.*]], i8** nonnull align 8 dereferenceable(8) [[DOTTASK_RED_:%.*]], i8** nonnull align 8 dereferenceable(8) [[DOTTASK_RED_1:%.*]]) #[[ATTR8:[0-9]+]] { 472207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: entry: 473207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8 474207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8 475ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: [[A_ADDR:%.*]] = alloca i32*, align 8 476ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: [[VLA_ADDR:%.*]] = alloca i64, align 8 477ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: [[D_ADDR:%.*]] = alloca i16*, align 8 478ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTTASK_RED__ADDR:%.*]] = alloca i8**, align 8 479ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTTASK_RED__ADDR2:%.*]] = alloca i8**, align 8 480ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: [[AGG_CAPTURED:%.*]] = alloca [[STRUCT_ANON:%.*]], align 8 481207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP:%.*]] = alloca i32, align 4 482207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8 483207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8 484ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 8 485ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: store i64 [[VLA]], i64* [[VLA_ADDR]], align 8 486ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: store i16* [[D]], i16** [[D_ADDR]], align 8 487ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: store i8** [[DOTTASK_RED_]], i8*** [[DOTTASK_RED__ADDR]], align 8 488ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: store i8** [[DOTTASK_RED_1]], i8*** [[DOTTASK_RED__ADDR2]], align 8 489ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP0:%.*]] = load i32*, i32** [[A_ADDR]], align 8 490ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP1:%.*]] = load i64, i64* [[VLA_ADDR]], align 8 491ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP2:%.*]] = load i16*, i16** [[D_ADDR]], align 8 492ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP3:%.*]] = load i8**, i8*** [[DOTTASK_RED__ADDR]], align 8 493ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP4:%.*]] = load i8**, i8*** [[DOTTASK_RED__ADDR2]], align 8 494ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP5:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8 495ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP6:%.*]] = load i32, i32* [[TMP5]], align 4 496ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP7:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP6]]) 497ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP8:%.*]] = icmp ne i32 [[TMP7]], 0 498ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: br i1 [[TMP8]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]] 499207b08a9SGiorgis Georgakoudis // CHECK1: omp_if.then: 500ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP9:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[AGG_CAPTURED]], i32 0, i32 0 501ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: store i32* [[TMP0]], i32** [[TMP9]], align 8 502ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP10:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[AGG_CAPTURED]], i32 0, i32 1 503ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: store i64 [[TMP1]], i64* [[TMP10]], align 8 504ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP11:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[AGG_CAPTURED]], i32 0, i32 2 505ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: store i16* [[TMP2]], i16** [[TMP11]], align 8 506ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP12:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[AGG_CAPTURED]], i32 0, i32 3 507ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: store i8** [[TMP3]], i8*** [[TMP12]], align 8 508ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP13:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[AGG_CAPTURED]], i32 0, i32 4 509ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: store i8** [[TMP4]], i8*** [[TMP13]], align 8 510ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: call void @__kmpc_taskgroup(%struct.ident_t* @[[GLOB1]], i32 [[TMP6]]) 511ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP14:%.*]] = call i8* @__kmpc_omp_task_alloc(%struct.ident_t* @[[GLOB1]], i32 [[TMP6]], i32 1, i64 96, i64 40, i32 (i32, i8*)* bitcast (i32 (i32, %struct.kmp_task_t_with_privates*)* @.omp_task_entry. to i32 (i32, i8*)*)) 512ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP15:%.*]] = bitcast i8* [[TMP14]] to %struct.kmp_task_t_with_privates* 513ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP16:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES:%.*]], %struct.kmp_task_t_with_privates* [[TMP15]], i32 0, i32 0 514ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP17:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T:%.*]], %struct.kmp_task_t* [[TMP16]], i32 0, i32 0 515ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP18:%.*]] = load i8*, i8** [[TMP17]], align 8 516ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP19:%.*]] = bitcast %struct.anon* [[AGG_CAPTURED]] to i8* 517ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 [[TMP18]], i8* align 8 [[TMP19]], i64 40, i1 false) 518ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP20:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES]], %struct.kmp_task_t_with_privates* [[TMP15]], i32 0, i32 1 519ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP21:%.*]] = getelementptr inbounds [[STRUCT__KMP_PRIVATES_T:%.*]], %struct..kmp_privates.t* [[TMP20]], i32 0, i32 0 520ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP22:%.*]] = load i8*, i8** [[TMP3]], align 8 521ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP22]], i8** [[TMP21]], align 8 522ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP23:%.*]] = getelementptr inbounds [[STRUCT__KMP_PRIVATES_T]], %struct..kmp_privates.t* [[TMP20]], i32 0, i32 1 523ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP24:%.*]] = load i8*, i8** [[TMP4]], align 8 524ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: store i8* [[TMP24]], i8** [[TMP23]], align 8 525ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP25:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP16]], i32 0, i32 5 526ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: store i64 0, i64* [[TMP25]], align 8 527ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP26:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP16]], i32 0, i32 6 528ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: store i64 4, i64* [[TMP26]], align 8 529ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP27:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP16]], i32 0, i32 7 530ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: store i64 1, i64* [[TMP27]], align 8 531ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP28:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP16]], i32 0, i32 9 532ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP29:%.*]] = bitcast i8** [[TMP28]] to i8* 533ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: call void @llvm.memset.p0i8.i64(i8* align 8 [[TMP29]], i8 0, i64 8, i1 false) 534ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP30:%.*]] = load i64, i64* [[TMP27]], align 8 535ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: call void @__kmpc_taskloop(%struct.ident_t* @[[GLOB1]], i32 [[TMP6]], i8* [[TMP14]], i32 1, i64* [[TMP25]], i64* [[TMP26]], i64 [[TMP30]], i32 1, i32 0, i64 0, i8* null) 536ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: call void @__kmpc_end_taskgroup(%struct.ident_t* @[[GLOB1]], i32 [[TMP6]]) 537ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP6]]) 538207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: br label [[OMP_IF_END]] 539207b08a9SGiorgis Georgakoudis // CHECK1: omp_if.end: 540207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: ret void 541207b08a9SGiorgis Georgakoudis // 542207b08a9SGiorgis Georgakoudis // 543207b08a9SGiorgis Georgakoudis // CHECK1-LABEL: define {{[^@]+}}@.omp_task_privates_map. 544207b08a9SGiorgis Georgakoudis // CHECK1-SAME: (%struct..kmp_privates.t* noalias [[TMP0:%.*]], i8*** noalias [[TMP1:%.*]], i8*** noalias [[TMP2:%.*]]) #[[ATTR9:[0-9]+]] { 545207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: entry: 546207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca %struct..kmp_privates.t*, align 8 547207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca i8***, align 8 548207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTADDR2:%.*]] = alloca i8***, align 8 549207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store %struct..kmp_privates.t* [[TMP0]], %struct..kmp_privates.t** [[DOTADDR]], align 8 550207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8*** [[TMP1]], i8**** [[DOTADDR1]], align 8 551207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8*** [[TMP2]], i8**** [[DOTADDR2]], align 8 552207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP3:%.*]] = load %struct..kmp_privates.t*, %struct..kmp_privates.t** [[DOTADDR]], align 8 553207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP4:%.*]] = getelementptr inbounds [[STRUCT__KMP_PRIVATES_T:%.*]], %struct..kmp_privates.t* [[TMP3]], i32 0, i32 0 554207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP5:%.*]] = load i8***, i8**** [[DOTADDR1]], align 8 555207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8** [[TMP4]], i8*** [[TMP5]], align 8 556207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[STRUCT__KMP_PRIVATES_T]], %struct..kmp_privates.t* [[TMP3]], i32 0, i32 1 557207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP7:%.*]] = load i8***, i8**** [[DOTADDR2]], align 8 558207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i8** [[TMP6]], i8*** [[TMP7]], align 8 559207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: ret void 560207b08a9SGiorgis Georgakoudis // 561207b08a9SGiorgis Georgakoudis // 562207b08a9SGiorgis Georgakoudis // CHECK1-LABEL: define {{[^@]+}}@.omp_task_entry. 563207b08a9SGiorgis Georgakoudis // CHECK1-SAME: (i32 [[TMP0:%.*]], %struct.kmp_task_t_with_privates* noalias [[TMP1:%.*]]) #[[ATTR5]] { 564207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: entry: 565207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR_I:%.*]] = alloca i32, align 4 566207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTPART_ID__ADDR_I:%.*]] = alloca i32*, align 8 567207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTPRIVATES__ADDR_I:%.*]] = alloca i8*, align 8 568207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTCOPY_FN__ADDR_I:%.*]] = alloca void (i8*, ...)*, align 8 569207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTTASK_T__ADDR_I:%.*]] = alloca i8*, align 8 570207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTLB__ADDR_I:%.*]] = alloca i64, align 8 571207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTUB__ADDR_I:%.*]] = alloca i64, align 8 572207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTST__ADDR_I:%.*]] = alloca i64, align 8 573207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTLITER__ADDR_I:%.*]] = alloca i32, align 4 574207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTREDUCTIONS__ADDR_I:%.*]] = alloca i8*, align 8 575ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: [[__CONTEXT_ADDR_I:%.*]] = alloca %struct.anon*, align 8 576207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTFIRSTPRIV_PTR_ADDR_I:%.*]] = alloca i8**, align 8 577207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTFIRSTPRIV_PTR_ADDR1_I:%.*]] = alloca i8**, align 8 578207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[I_I:%.*]] = alloca i32, align 4 579207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTOMP_IV_I:%.*]] = alloca i32, align 4 580207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca i32, align 4 581207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca %struct.kmp_task_t_with_privates*, align 8 582207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i32 [[TMP0]], i32* [[DOTADDR]], align 4 583207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store %struct.kmp_task_t_with_privates* [[TMP1]], %struct.kmp_task_t_with_privates** [[DOTADDR1]], align 8 584207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP2:%.*]] = load i32, i32* [[DOTADDR]], align 4 585207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP3:%.*]] = load %struct.kmp_task_t_with_privates*, %struct.kmp_task_t_with_privates** [[DOTADDR1]], align 8 586207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP4:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES:%.*]], %struct.kmp_task_t_with_privates* [[TMP3]], i32 0, i32 0 587207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T:%.*]], %struct.kmp_task_t* [[TMP4]], i32 0, i32 2 588207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP4]], i32 0, i32 0 589207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP7:%.*]] = load i8*, i8** [[TMP6]], align 8 590ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP8:%.*]] = bitcast i8* [[TMP7]] to %struct.anon* 591207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP9:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES]], %struct.kmp_task_t_with_privates* [[TMP3]], i32 0, i32 1 592207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP10:%.*]] = bitcast %struct..kmp_privates.t* [[TMP9]] to i8* 593207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP11:%.*]] = bitcast %struct.kmp_task_t_with_privates* [[TMP3]] to i8* 594207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP12:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP4]], i32 0, i32 5 595207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP13:%.*]] = load i64, i64* [[TMP12]], align 8 596207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP14:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP4]], i32 0, i32 6 597207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP15:%.*]] = load i64, i64* [[TMP14]], align 8 598207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP16:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP4]], i32 0, i32 7 599207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP17:%.*]] = load i64, i64* [[TMP16]], align 8 600207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP18:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP4]], i32 0, i32 8 601207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP19:%.*]] = load i32, i32* [[TMP18]], align 8 602207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP20:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP4]], i32 0, i32 9 603207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP21:%.*]] = load i8*, i8** [[TMP20]], align 8 6049ce02ea8SJoseph Huber // CHECK1-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META3:![0-9]+]]) 6059ce02ea8SJoseph Huber // CHECK1-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META6:![0-9]+]]) 6069ce02ea8SJoseph Huber // CHECK1-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META8:![0-9]+]]) 6079ce02ea8SJoseph Huber // CHECK1-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META10:![0-9]+]]) 6089ce02ea8SJoseph Huber // CHECK1-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META12:![0-9]+]]) 6099ce02ea8SJoseph Huber // CHECK1-NEXT: store i32 [[TMP2]], i32* [[DOTGLOBAL_TID__ADDR_I]], align 4, !noalias !14 6109ce02ea8SJoseph Huber // CHECK1-NEXT: store i32* [[TMP5]], i32** [[DOTPART_ID__ADDR_I]], align 8, !noalias !14 6119ce02ea8SJoseph Huber // CHECK1-NEXT: store i8* [[TMP10]], i8** [[DOTPRIVATES__ADDR_I]], align 8, !noalias !14 6129ce02ea8SJoseph Huber // CHECK1-NEXT: store void (i8*, ...)* bitcast (void (%struct..kmp_privates.t*, i8***, i8***)* @.omp_task_privates_map. to void (i8*, ...)*), void (i8*, ...)** [[DOTCOPY_FN__ADDR_I]], align 8, !noalias !14 6139ce02ea8SJoseph Huber // CHECK1-NEXT: store i8* [[TMP11]], i8** [[DOTTASK_T__ADDR_I]], align 8, !noalias !14 6149ce02ea8SJoseph Huber // CHECK1-NEXT: store i64 [[TMP13]], i64* [[DOTLB__ADDR_I]], align 8, !noalias !14 6159ce02ea8SJoseph Huber // CHECK1-NEXT: store i64 [[TMP15]], i64* [[DOTUB__ADDR_I]], align 8, !noalias !14 6169ce02ea8SJoseph Huber // CHECK1-NEXT: store i64 [[TMP17]], i64* [[DOTST__ADDR_I]], align 8, !noalias !14 6179ce02ea8SJoseph Huber // CHECK1-NEXT: store i32 [[TMP19]], i32* [[DOTLITER__ADDR_I]], align 4, !noalias !14 6189ce02ea8SJoseph Huber // CHECK1-NEXT: store i8* [[TMP21]], i8** [[DOTREDUCTIONS__ADDR_I]], align 8, !noalias !14 619ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: store %struct.anon* [[TMP8]], %struct.anon** [[__CONTEXT_ADDR_I]], align 8, !noalias !14 620ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP22:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR_I]], align 8, !noalias !14 621ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP23:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP22]], i32 0, i32 1 622207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP24:%.*]] = load i64, i64* [[TMP23]], align 8 6239ce02ea8SJoseph Huber // CHECK1-NEXT: [[TMP25:%.*]] = load void (i8*, ...)*, void (i8*, ...)** [[DOTCOPY_FN__ADDR_I]], align 8, !noalias !14 6249ce02ea8SJoseph Huber // CHECK1-NEXT: [[TMP26:%.*]] = load i8*, i8** [[DOTPRIVATES__ADDR_I]], align 8, !noalias !14 625207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP27:%.*]] = bitcast void (i8*, ...)* [[TMP25]] to void (i8*, i8***, i8***)* 626207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: call void [[TMP27]](i8* [[TMP26]], i8*** [[DOTFIRSTPRIV_PTR_ADDR_I]], i8*** [[DOTFIRSTPRIV_PTR_ADDR1_I]]) #[[ATTR3]] 6279ce02ea8SJoseph Huber // CHECK1-NEXT: [[TMP28:%.*]] = load i8**, i8*** [[DOTFIRSTPRIV_PTR_ADDR_I]], align 8, !noalias !14 6289ce02ea8SJoseph Huber // CHECK1-NEXT: [[TMP29:%.*]] = load i8**, i8*** [[DOTFIRSTPRIV_PTR_ADDR1_I]], align 8, !noalias !14 629ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP30:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP22]], i32 0, i32 0 630207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP31:%.*]] = load i32*, i32** [[TMP30]], align 8 631207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP32:%.*]] = load i8*, i8** [[TMP28]], align 8 6329ce02ea8SJoseph Huber // CHECK1-NEXT: [[TMP33:%.*]] = load i32, i32* [[DOTGLOBAL_TID__ADDR_I]], align 4, !noalias !14 633207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP34:%.*]] = bitcast i32* [[TMP31]] to i8* 634207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP35:%.*]] = call i8* @__kmpc_task_reduction_get_th_data(i32 [[TMP33]], i8* [[TMP32]], i8* [[TMP34]]) #[[ATTR3]] 635207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[CONV_I:%.*]] = bitcast i8* [[TMP35]] to i32* 636ac90dfc4SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP36:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP22]], i32 0, i32 2 637207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP37:%.*]] = load i16*, i16** [[TMP36]], align 8 638207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP38:%.*]] = mul nuw i64 [[TMP24]], 2 639207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP39:%.*]] = udiv exact i64 [[TMP38]], ptrtoint (i16* getelementptr (i16, i16* null, i32 1) to i64) 640207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP40:%.*]] = call i8* @__kmpc_threadprivate_cached(%struct.ident_t* @[[GLOB1]], i32 [[TMP33]], i8* bitcast (i64* @{{reduction_size[.].+[.]}}) #[[ATTR3]] 641207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP41:%.*]] = bitcast i8* [[TMP40]] to i64* 642207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i64 [[TMP39]], i64* [[TMP41]], align 8 643207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP42:%.*]] = load i8*, i8** [[TMP29]], align 8 644207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP43:%.*]] = bitcast i16* [[TMP37]] to i8* 645207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP44:%.*]] = call i8* @__kmpc_task_reduction_get_th_data(i32 [[TMP33]], i8* [[TMP42]], i8* [[TMP43]]) #[[ATTR3]] 646207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[CONV2_I:%.*]] = bitcast i8* [[TMP44]] to i16* 6479ce02ea8SJoseph Huber // CHECK1-NEXT: [[TMP45:%.*]] = load i64, i64* [[DOTLB__ADDR_I]], align 8, !noalias !14 648207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[CONV3_I:%.*]] = trunc i64 [[TMP45]] to i32 6499ce02ea8SJoseph Huber // CHECK1-NEXT: store i32 [[CONV3_I]], i32* [[DOTOMP_IV_I]], align 4, !noalias !14 650207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: br label [[OMP_INNER_FOR_COND_I:%.*]] 651207b08a9SGiorgis Georgakoudis // CHECK1: omp.inner.for.cond.i: 6529ce02ea8SJoseph Huber // CHECK1-NEXT: [[TMP46:%.*]] = load i32, i32* [[DOTOMP_IV_I]], align 4, !noalias !14 653207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[CONV4_I:%.*]] = sext i32 [[TMP46]] to i64 6549ce02ea8SJoseph Huber // CHECK1-NEXT: [[TMP47:%.*]] = load i64, i64* [[DOTUB__ADDR_I]], align 8, !noalias !14 655207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[CMP_I:%.*]] = icmp ule i64 [[CONV4_I]], [[TMP47]] 656207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: br i1 [[CMP_I]], label [[OMP_INNER_FOR_BODY_I:%.*]], label [[DOTOMP_OUTLINED__9_EXIT:%.*]] 657207b08a9SGiorgis Georgakoudis // CHECK1: omp.inner.for.body.i: 6589ce02ea8SJoseph Huber // CHECK1-NEXT: [[TMP48:%.*]] = load i32, i32* [[DOTOMP_IV_I]], align 4, !noalias !14 6599ce02ea8SJoseph Huber // CHECK1-NEXT: store i32 [[TMP48]], i32* [[I_I]], align 4, !noalias !14 660207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP49:%.*]] = load i32, i32* [[CONV_I]], align 4 661207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[IDXPROM_I:%.*]] = sext i32 [[TMP49]] to i64 662207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[ARRAYIDX_I:%.*]] = getelementptr inbounds i16, i16* [[CONV2_I]], i64 [[IDXPROM_I]] 663207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP50:%.*]] = load i16, i16* [[ARRAYIDX_I]], align 2 664207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[CONV5_I:%.*]] = sext i16 [[TMP50]] to i32 665207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP51:%.*]] = load i32, i32* [[CONV_I]], align 4 666207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[ADD6_I:%.*]] = add nsw i32 [[TMP51]], [[CONV5_I]] 667207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i32 [[ADD6_I]], i32* [[CONV_I]], align 4 6689ce02ea8SJoseph Huber // CHECK1-NEXT: [[TMP52:%.*]] = load i32, i32* [[DOTOMP_IV_I]], align 4, !noalias !14 669207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[ADD7_I:%.*]] = add nsw i32 [[TMP52]], 1 6709ce02ea8SJoseph Huber // CHECK1-NEXT: store i32 [[ADD7_I]], i32* [[DOTOMP_IV_I]], align 4, !noalias !14 671207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: br label [[OMP_INNER_FOR_COND_I]] 672207b08a9SGiorgis Georgakoudis // CHECK1: .omp_outlined..9.exit: 673207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: ret i32 0 674207b08a9SGiorgis Georgakoudis // 675207b08a9SGiorgis Georgakoudis // 676207b08a9SGiorgis Georgakoudis // CHECK1-LABEL: define {{[^@]+}}@_ZN1SC2Ev 67716d03818SRoman Lebedev // CHECK1-SAME: (%struct.S* nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] align 2 { 678207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: entry: 679207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca %struct.S*, align 8 680207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store %struct.S* [[THIS]], %struct.S** [[THIS_ADDR]], align 8 681207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[THIS1:%.*]] = load %struct.S*, %struct.S** [[THIS_ADDR]], align 8 682207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[A:%.*]] = getelementptr inbounds [[STRUCT_S:%.*]], %struct.S* [[THIS1]], i32 0, i32 0 683207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store i32 0, i32* [[A]], align 4 684207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: ret void 685207b08a9SGiorgis Georgakoudis // 686207b08a9SGiorgis Georgakoudis // 687207b08a9SGiorgis Georgakoudis // CHECK1-LABEL: define {{[^@]+}}@_ZN1SD2Ev 68816d03818SRoman Lebedev // CHECK1-SAME: (%struct.S* nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] align 2 { 689207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: entry: 690207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca %struct.S*, align 8 691207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store %struct.S* [[THIS]], %struct.S** [[THIS_ADDR]], align 8 692207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[THIS1:%.*]] = load %struct.S*, %struct.S** [[THIS_ADDR]], align 8 693207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: ret void 694207b08a9SGiorgis Georgakoudis // 695207b08a9SGiorgis Georgakoudis // 696207b08a9SGiorgis Georgakoudis // CHECK1-LABEL: define {{[^@]+}}@_ZN1SC1ERKS_ 69716d03818SRoman Lebedev // CHECK1-SAME: (%struct.S* nonnull align 4 dereferenceable(4) [[THIS:%.*]], %struct.S* nonnull align 4 dereferenceable(4) [[TMP0:%.*]]) unnamed_addr #[[ATTR1]] align 2 { 698207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: entry: 699207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca %struct.S*, align 8 700207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca %struct.S*, align 8 701207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store %struct.S* [[THIS]], %struct.S** [[THIS_ADDR]], align 8 702207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store %struct.S* [[TMP0]], %struct.S** [[DOTADDR]], align 8 703207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[THIS1:%.*]] = load %struct.S*, %struct.S** [[THIS_ADDR]], align 8 704207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[TMP1:%.*]] = load %struct.S*, %struct.S** [[DOTADDR]], align 8 70516d03818SRoman Lebedev // CHECK1-NEXT: call void @_ZN1SC2ERKS_(%struct.S* nonnull align 4 dereferenceable(4) [[THIS1]], %struct.S* nonnull align 4 dereferenceable(4) [[TMP1]]) 706207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: ret void 707207b08a9SGiorgis Georgakoudis // 708207b08a9SGiorgis Georgakoudis // 709207b08a9SGiorgis Georgakoudis // CHECK1-LABEL: define {{[^@]+}}@_ZN1SC2ERKS_ 71016d03818SRoman Lebedev // CHECK1-SAME: (%struct.S* nonnull align 4 dereferenceable(4) [[THIS:%.*]], %struct.S* nonnull align 4 dereferenceable(4) [[TMP0:%.*]]) unnamed_addr #[[ATTR1]] align 2 { 711207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: entry: 712207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca %struct.S*, align 8 713207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca %struct.S*, align 8 714207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store %struct.S* [[THIS]], %struct.S** [[THIS_ADDR]], align 8 715207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: store %struct.S* [[TMP0]], %struct.S** [[DOTADDR]], align 8 716207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: [[THIS1:%.*]] = load %struct.S*, %struct.S** [[THIS_ADDR]], align 8 717207b08a9SGiorgis Georgakoudis // CHECK1-NEXT: ret void 718207b08a9SGiorgis Georgakoudis // 719207b08a9SGiorgis Georgakoudis // 720207b08a9SGiorgis Georgakoudis // CHECK2-LABEL: define {{[^@]+}}@main 721207b08a9SGiorgis Georgakoudis // CHECK2-SAME: (i32 [[ARGC:%.*]], i8** [[ARGV:%.*]]) #[[ATTR0:[0-9]+]] { 722207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: entry: 723207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[RETVAL:%.*]] = alloca i32, align 4 724207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[ARGC_ADDR:%.*]] = alloca i32, align 4 725207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[ARGV_ADDR:%.*]] = alloca i8**, align 8 726207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[A:%.*]] = alloca i32, align 4 727207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[B:%.*]] = alloca float, align 4 728207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[C:%.*]] = alloca [5 x %struct.S], align 16 729207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[SAVED_STACK:%.*]] = alloca i8*, align 8 730207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[__VLA_EXPR0:%.*]] = alloca i64, align 8 731207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTRD_INPUT_:%.*]] = alloca [3 x %struct.kmp_taskred_input_t], align 8 732207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTTASK_RED_:%.*]] = alloca i8*, align 8 733207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTRD_INPUT_3:%.*]] = alloca [2 x %struct.kmp_taskred_input_t.0], align 8 734207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTTASK_RED_6:%.*]] = alloca i8*, align 8 735207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1:[0-9]+]]) 736207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i32 0, i32* [[RETVAL]], align 4 737207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i32 [[ARGC]], i32* [[ARGC_ADDR]], align 4 738207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8** [[ARGV]], i8*** [[ARGV_ADDR]], align 8 739207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [5 x %struct.S], [5 x %struct.S]* [[C]], i32 0, i32 0 740207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[ARRAYCTOR_END:%.*]] = getelementptr inbounds [[STRUCT_S:%.*]], %struct.S* [[ARRAY_BEGIN]], i64 5 741207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: br label [[ARRAYCTOR_LOOP:%.*]] 742207b08a9SGiorgis Georgakoudis // CHECK2: arrayctor.loop: 743207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[ARRAYCTOR_CUR:%.*]] = phi %struct.S* [ [[ARRAY_BEGIN]], [[ENTRY:%.*]] ], [ [[ARRAYCTOR_NEXT:%.*]], [[ARRAYCTOR_LOOP]] ] 74416d03818SRoman Lebedev // CHECK2-NEXT: call void @_ZN1SC1Ev(%struct.S* nonnull align 4 dereferenceable(4) [[ARRAYCTOR_CUR]]) 745207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[ARRAYCTOR_NEXT]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[ARRAYCTOR_CUR]], i64 1 746207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[ARRAYCTOR_DONE:%.*]] = icmp eq %struct.S* [[ARRAYCTOR_NEXT]], [[ARRAYCTOR_END]] 747207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: br i1 [[ARRAYCTOR_DONE]], label [[ARRAYCTOR_CONT:%.*]], label [[ARRAYCTOR_LOOP]] 748207b08a9SGiorgis Georgakoudis // CHECK2: arrayctor.cont: 749207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP1:%.*]] = load i32, i32* [[ARGC_ADDR]], align 4 750207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP2:%.*]] = zext i32 [[TMP1]] to i64 751207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP3:%.*]] = call i8* @llvm.stacksave() 752207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP3]], i8** [[SAVED_STACK]], align 8 753207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[VLA:%.*]] = alloca i16, i64 [[TMP2]], align 16 754207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i64 [[TMP2]], i64* [[__VLA_EXPR0]], align 8 755207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: call void @__kmpc_taskgroup(%struct.ident_t* @[[GLOB1]], i32 [[TMP0]]) 756207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTRD_INPUT_GEP_:%.*]] = getelementptr inbounds [3 x %struct.kmp_taskred_input_t], [3 x %struct.kmp_taskred_input_t]* [[DOTRD_INPUT_]], i64 0, i64 0 757207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP4:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T:%.*]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 0 758207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP5:%.*]] = bitcast i32* [[A]] to i8* 759207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP5]], i8** [[TMP4]], align 8 760207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 1 761207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP7:%.*]] = bitcast i32* [[A]] to i8* 762207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP7]], i8** [[TMP6]], align 8 763207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP8:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 2 764207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i64 4, i64* [[TMP8]], align 8 765207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP9:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 3 766207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* bitcast (void (i8*, i8*)* @.red_init. to i8*), i8** [[TMP9]], align 8 767207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP10:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 4 768207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* null, i8** [[TMP10]], align 8 769207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP11:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 5 770207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* bitcast (void (i8*, i8*)* @.red_comb. to i8*), i8** [[TMP11]], align 8 771207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP12:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 6 772207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP13:%.*]] = bitcast i32* [[TMP12]] to i8* 773207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: call void @llvm.memset.p0i8.i64(i8* align 8 [[TMP13]], i8 0, i64 4, i1 false) 774207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTRD_INPUT_GEP_1:%.*]] = getelementptr inbounds [3 x %struct.kmp_taskred_input_t], [3 x %struct.kmp_taskred_input_t]* [[DOTRD_INPUT_]], i64 0, i64 1 775207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP14:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_1]], i32 0, i32 0 776207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP15:%.*]] = bitcast float* [[B]] to i8* 777207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP15]], i8** [[TMP14]], align 8 778207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP16:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_1]], i32 0, i32 1 779207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP17:%.*]] = bitcast float* [[B]] to i8* 780207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP17]], i8** [[TMP16]], align 8 781207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP18:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_1]], i32 0, i32 2 782207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i64 4, i64* [[TMP18]], align 8 783207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP19:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_1]], i32 0, i32 3 784207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* bitcast (void (i8*, i8*)* @.red_init..1 to i8*), i8** [[TMP19]], align 8 785207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP20:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_1]], i32 0, i32 4 786207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* null, i8** [[TMP20]], align 8 787207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP21:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_1]], i32 0, i32 5 788207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* bitcast (void (i8*, i8*)* @.red_comb..2 to i8*), i8** [[TMP21]], align 8 789207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP22:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_1]], i32 0, i32 6 790207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP23:%.*]] = bitcast i32* [[TMP22]] to i8* 791207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: call void @llvm.memset.p0i8.i64(i8* align 8 [[TMP23]], i8 0, i64 4, i1 false) 792207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTRD_INPUT_GEP_2:%.*]] = getelementptr inbounds [3 x %struct.kmp_taskred_input_t], [3 x %struct.kmp_taskred_input_t]* [[DOTRD_INPUT_]], i64 0, i64 2 793207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP24:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_2]], i32 0, i32 0 794207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP25:%.*]] = bitcast i32* [[ARGC_ADDR]] to i8* 795207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP25]], i8** [[TMP24]], align 8 796207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP26:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_2]], i32 0, i32 1 797207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP27:%.*]] = bitcast i32* [[ARGC_ADDR]] to i8* 798207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP27]], i8** [[TMP26]], align 8 799207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP28:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_2]], i32 0, i32 2 800207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i64 4, i64* [[TMP28]], align 8 801207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP29:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_2]], i32 0, i32 3 802207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* bitcast (void (i8*, i8*)* @.red_init..3 to i8*), i8** [[TMP29]], align 8 803207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP30:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_2]], i32 0, i32 4 804207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* null, i8** [[TMP30]], align 8 805207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP31:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_2]], i32 0, i32 5 806207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* bitcast (void (i8*, i8*)* @.red_comb..4 to i8*), i8** [[TMP31]], align 8 807207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP32:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_2]], i32 0, i32 6 808207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP33:%.*]] = bitcast i32* [[TMP32]] to i8* 809207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: call void @llvm.memset.p0i8.i64(i8* align 8 [[TMP33]], i8 0, i64 4, i1 false) 810207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP34:%.*]] = bitcast [3 x %struct.kmp_taskred_input_t]* [[DOTRD_INPUT_]] to i8* 811207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP35:%.*]] = call i8* @__kmpc_taskred_init(i32 [[TMP0]], i32 3, i8* [[TMP34]]) 812207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP35]], i8** [[DOTTASK_RED_]], align 8 813207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: call void @__kmpc_taskgroup(%struct.ident_t* @[[GLOB1]], i32 [[TMP0]]) 814207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTRD_INPUT_GEP_4:%.*]] = getelementptr inbounds [2 x %struct.kmp_taskred_input_t.0], [2 x %struct.kmp_taskred_input_t.0]* [[DOTRD_INPUT_3]], i64 0, i64 0 815207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP36:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T_0:%.*]], %struct.kmp_taskred_input_t.0* [[DOTRD_INPUT_GEP_4]], i32 0, i32 0 816207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP37:%.*]] = bitcast [5 x %struct.S]* [[C]] to i8* 817207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP37]], i8** [[TMP36]], align 8 818207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP38:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T_0]], %struct.kmp_taskred_input_t.0* [[DOTRD_INPUT_GEP_4]], i32 0, i32 1 819207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP39:%.*]] = bitcast [5 x %struct.S]* [[C]] to i8* 820207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP39]], i8** [[TMP38]], align 8 821207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP40:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T_0]], %struct.kmp_taskred_input_t.0* [[DOTRD_INPUT_GEP_4]], i32 0, i32 2 822207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i64 20, i64* [[TMP40]], align 8 823207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP41:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T_0]], %struct.kmp_taskred_input_t.0* [[DOTRD_INPUT_GEP_4]], i32 0, i32 3 824207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* bitcast (void (i8*, i8*)* @.red_init..5 to i8*), i8** [[TMP41]], align 8 825207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP42:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T_0]], %struct.kmp_taskred_input_t.0* [[DOTRD_INPUT_GEP_4]], i32 0, i32 4 826207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* bitcast (void (i8*)* @.red_fini. to i8*), i8** [[TMP42]], align 8 827207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP43:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T_0]], %struct.kmp_taskred_input_t.0* [[DOTRD_INPUT_GEP_4]], i32 0, i32 5 828207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* bitcast (void (i8*, i8*)* @.red_comb..6 to i8*), i8** [[TMP43]], align 8 829207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP44:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T_0]], %struct.kmp_taskred_input_t.0* [[DOTRD_INPUT_GEP_4]], i32 0, i32 6 830207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP45:%.*]] = bitcast i32* [[TMP44]] to i8* 831207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: call void @llvm.memset.p0i8.i64(i8* align 8 [[TMP45]], i8 0, i64 4, i1 false) 832207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTRD_INPUT_GEP_5:%.*]] = getelementptr inbounds [2 x %struct.kmp_taskred_input_t.0], [2 x %struct.kmp_taskred_input_t.0]* [[DOTRD_INPUT_3]], i64 0, i64 1 833207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP46:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T_0]], %struct.kmp_taskred_input_t.0* [[DOTRD_INPUT_GEP_5]], i32 0, i32 0 834207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP47:%.*]] = bitcast i16* [[VLA]] to i8* 835207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP47]], i8** [[TMP46]], align 8 836207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP48:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T_0]], %struct.kmp_taskred_input_t.0* [[DOTRD_INPUT_GEP_5]], i32 0, i32 1 837207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP49:%.*]] = bitcast i16* [[VLA]] to i8* 838207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP49]], i8** [[TMP48]], align 8 839207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP50:%.*]] = mul nuw i64 [[TMP2]], 2 840207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP51:%.*]] = udiv exact i64 [[TMP50]], ptrtoint (i16* getelementptr (i16, i16* null, i32 1) to i64) 841207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP52:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T_0]], %struct.kmp_taskred_input_t.0* [[DOTRD_INPUT_GEP_5]], i32 0, i32 2 842207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i64 [[TMP50]], i64* [[TMP52]], align 8 843207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP53:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T_0]], %struct.kmp_taskred_input_t.0* [[DOTRD_INPUT_GEP_5]], i32 0, i32 3 844207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* bitcast (void (i8*, i8*)* @.red_init..7 to i8*), i8** [[TMP53]], align 8 845207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP54:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T_0]], %struct.kmp_taskred_input_t.0* [[DOTRD_INPUT_GEP_5]], i32 0, i32 4 846207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* null, i8** [[TMP54]], align 8 847207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP55:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T_0]], %struct.kmp_taskred_input_t.0* [[DOTRD_INPUT_GEP_5]], i32 0, i32 5 848207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* bitcast (void (i8*, i8*)* @.red_comb..8 to i8*), i8** [[TMP55]], align 8 849207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP56:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T_0]], %struct.kmp_taskred_input_t.0* [[DOTRD_INPUT_GEP_5]], i32 0, i32 6 850207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i32 1, i32* [[TMP56]], align 8 851207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP57:%.*]] = bitcast [2 x %struct.kmp_taskred_input_t.0]* [[DOTRD_INPUT_3]] to i8* 852207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP58:%.*]] = call i8* @__kmpc_taskred_init(i32 [[TMP0]], i32 2, i8* [[TMP57]]) 853207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP58]], i8** [[DOTTASK_RED_6]], align 8 854ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 5, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i64, i16*, i8**, i8**)* @.omp_outlined. to void (i32*, i32*, ...)*), i32* [[A]], i64 [[TMP2]], i16* [[VLA]], i8** [[DOTTASK_RED_]], i8** [[DOTTASK_RED_6]]) 855207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: call void @__kmpc_end_taskgroup(%struct.ident_t* @[[GLOB1]], i32 [[TMP0]]) 856207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: call void @__kmpc_end_taskgroup(%struct.ident_t* @[[GLOB1]], i32 [[TMP0]]) 857207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i32 0, i32* [[RETVAL]], align 4 858ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP59:%.*]] = load i8*, i8** [[SAVED_STACK]], align 8 859ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: call void @llvm.stackrestore(i8* [[TMP59]]) 860207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[ARRAY_BEGIN7:%.*]] = getelementptr inbounds [5 x %struct.S], [5 x %struct.S]* [[C]], i32 0, i32 0 861ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP60:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[ARRAY_BEGIN7]], i64 5 862207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: br label [[ARRAYDESTROY_BODY:%.*]] 863207b08a9SGiorgis Georgakoudis // CHECK2: arraydestroy.body: 864ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi %struct.S* [ [[TMP60]], [[ARRAYCTOR_CONT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ] 865207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[ARRAYDESTROY_ELEMENTPAST]], i64 -1 86616d03818SRoman Lebedev // CHECK2-NEXT: call void @_ZN1SD1Ev(%struct.S* nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR3:[0-9]+]] 867207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq %struct.S* [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN7]] 868207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE8:%.*]], label [[ARRAYDESTROY_BODY]] 869207b08a9SGiorgis Georgakoudis // CHECK2: arraydestroy.done8: 870ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP61:%.*]] = load i32, i32* [[RETVAL]], align 4 871ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: ret i32 [[TMP61]] 872207b08a9SGiorgis Georgakoudis // 873207b08a9SGiorgis Georgakoudis // 874207b08a9SGiorgis Georgakoudis // CHECK2-LABEL: define {{[^@]+}}@_ZN1SC1Ev 87516d03818SRoman Lebedev // CHECK2-SAME: (%struct.S* nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1:[0-9]+]] align 2 { 876207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: entry: 877207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[THIS_ADDR:%.*]] = alloca %struct.S*, align 8 878207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store %struct.S* [[THIS]], %struct.S** [[THIS_ADDR]], align 8 879207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[THIS1:%.*]] = load %struct.S*, %struct.S** [[THIS_ADDR]], align 8 88016d03818SRoman Lebedev // CHECK2-NEXT: call void @_ZN1SC2Ev(%struct.S* nonnull align 4 dereferenceable(4) [[THIS1]]) 881207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: ret void 882207b08a9SGiorgis Georgakoudis // 883207b08a9SGiorgis Georgakoudis // 884207b08a9SGiorgis Georgakoudis // CHECK2-LABEL: define {{[^@]+}}@.red_init. 885207b08a9SGiorgis Georgakoudis // CHECK2-SAME: (i8* noalias [[TMP0:%.*]], i8* noalias [[TMP1:%.*]]) #[[ATTR5:[0-9]+]] { 886207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: entry: 887207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTADDR:%.*]] = alloca i8*, align 8 888207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTADDR1:%.*]] = alloca i8*, align 8 889207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP0]], i8** [[DOTADDR]], align 8 890207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP1]], i8** [[DOTADDR1]], align 8 891*b6f85d85SNikita Popov // CHECK2-NEXT: [[TMP2:%.*]] = bitcast i8** [[DOTADDR]] to i32** 892*b6f85d85SNikita Popov // CHECK2-NEXT: [[TMP3:%.*]] = load i32*, i32** [[TMP2]], align 8 893*b6f85d85SNikita Popov // CHECK2-NEXT: store i32 0, i32* [[TMP3]], align 4 894207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: ret void 895207b08a9SGiorgis Georgakoudis // 896207b08a9SGiorgis Georgakoudis // 897207b08a9SGiorgis Georgakoudis // CHECK2-LABEL: define {{[^@]+}}@.red_comb. 898207b08a9SGiorgis Georgakoudis // CHECK2-SAME: (i8* [[TMP0:%.*]], i8* [[TMP1:%.*]]) #[[ATTR5]] { 899207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: entry: 900207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTADDR:%.*]] = alloca i8*, align 8 901207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTADDR1:%.*]] = alloca i8*, align 8 902207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP0]], i8** [[DOTADDR]], align 8 903207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP1]], i8** [[DOTADDR1]], align 8 90452cc65d4SNikita Popov // CHECK2-NEXT: [[TMP2:%.*]] = bitcast i8** [[DOTADDR]] to i32** 90552cc65d4SNikita Popov // CHECK2-NEXT: [[TMP3:%.*]] = load i32*, i32** [[TMP2]], align 8 90652cc65d4SNikita Popov // CHECK2-NEXT: [[TMP4:%.*]] = bitcast i8** [[DOTADDR1]] to i32** 90752cc65d4SNikita Popov // CHECK2-NEXT: [[TMP5:%.*]] = load i32*, i32** [[TMP4]], align 8 90852cc65d4SNikita Popov // CHECK2-NEXT: [[TMP6:%.*]] = load i32, i32* [[TMP3]], align 4 90952cc65d4SNikita Popov // CHECK2-NEXT: [[TMP7:%.*]] = load i32, i32* [[TMP5]], align 4 910207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP6]], [[TMP7]] 91152cc65d4SNikita Popov // CHECK2-NEXT: store i32 [[ADD]], i32* [[TMP3]], align 4 912207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: ret void 913207b08a9SGiorgis Georgakoudis // 914207b08a9SGiorgis Georgakoudis // 915207b08a9SGiorgis Georgakoudis // CHECK2-LABEL: define {{[^@]+}}@.red_init..1 916207b08a9SGiorgis Georgakoudis // CHECK2-SAME: (i8* noalias [[TMP0:%.*]], i8* noalias [[TMP1:%.*]]) #[[ATTR5]] { 917207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: entry: 918207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTADDR:%.*]] = alloca i8*, align 8 919207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTADDR1:%.*]] = alloca i8*, align 8 920207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP0]], i8** [[DOTADDR]], align 8 921207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP1]], i8** [[DOTADDR1]], align 8 922*b6f85d85SNikita Popov // CHECK2-NEXT: [[TMP2:%.*]] = bitcast i8** [[DOTADDR]] to float** 923*b6f85d85SNikita Popov // CHECK2-NEXT: [[TMP3:%.*]] = load float*, float** [[TMP2]], align 8 924*b6f85d85SNikita Popov // CHECK2-NEXT: store float 0.000000e+00, float* [[TMP3]], align 4 925207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: ret void 926207b08a9SGiorgis Georgakoudis // 927207b08a9SGiorgis Georgakoudis // 928207b08a9SGiorgis Georgakoudis // CHECK2-LABEL: define {{[^@]+}}@.red_comb..2 929207b08a9SGiorgis Georgakoudis // CHECK2-SAME: (i8* [[TMP0:%.*]], i8* [[TMP1:%.*]]) #[[ATTR5]] { 930207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: entry: 931207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTADDR:%.*]] = alloca i8*, align 8 932207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTADDR1:%.*]] = alloca i8*, align 8 933207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP0]], i8** [[DOTADDR]], align 8 934207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP1]], i8** [[DOTADDR1]], align 8 93552cc65d4SNikita Popov // CHECK2-NEXT: [[TMP2:%.*]] = bitcast i8** [[DOTADDR]] to float** 93652cc65d4SNikita Popov // CHECK2-NEXT: [[TMP3:%.*]] = load float*, float** [[TMP2]], align 8 93752cc65d4SNikita Popov // CHECK2-NEXT: [[TMP4:%.*]] = bitcast i8** [[DOTADDR1]] to float** 93852cc65d4SNikita Popov // CHECK2-NEXT: [[TMP5:%.*]] = load float*, float** [[TMP4]], align 8 93952cc65d4SNikita Popov // CHECK2-NEXT: [[TMP6:%.*]] = load float, float* [[TMP3]], align 4 94052cc65d4SNikita Popov // CHECK2-NEXT: [[TMP7:%.*]] = load float, float* [[TMP5]], align 4 941207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[ADD:%.*]] = fadd float [[TMP6]], [[TMP7]] 94252cc65d4SNikita Popov // CHECK2-NEXT: store float [[ADD]], float* [[TMP3]], align 4 943207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: ret void 944207b08a9SGiorgis Georgakoudis // 945207b08a9SGiorgis Georgakoudis // 946207b08a9SGiorgis Georgakoudis // CHECK2-LABEL: define {{[^@]+}}@.red_init..3 947207b08a9SGiorgis Georgakoudis // CHECK2-SAME: (i8* noalias [[TMP0:%.*]], i8* noalias [[TMP1:%.*]]) #[[ATTR5]] { 948207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: entry: 949207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTADDR:%.*]] = alloca i8*, align 8 950207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTADDR1:%.*]] = alloca i8*, align 8 951207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP0]], i8** [[DOTADDR]], align 8 952207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP1]], i8** [[DOTADDR1]], align 8 953*b6f85d85SNikita Popov // CHECK2-NEXT: [[TMP2:%.*]] = bitcast i8** [[DOTADDR]] to i32** 954*b6f85d85SNikita Popov // CHECK2-NEXT: [[TMP3:%.*]] = load i32*, i32** [[TMP2]], align 8 955*b6f85d85SNikita Popov // CHECK2-NEXT: store i32 0, i32* [[TMP3]], align 4 956207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: ret void 957207b08a9SGiorgis Georgakoudis // 958207b08a9SGiorgis Georgakoudis // 959207b08a9SGiorgis Georgakoudis // CHECK2-LABEL: define {{[^@]+}}@.red_comb..4 960207b08a9SGiorgis Georgakoudis // CHECK2-SAME: (i8* [[TMP0:%.*]], i8* [[TMP1:%.*]]) #[[ATTR5]] { 961207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: entry: 962207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTADDR:%.*]] = alloca i8*, align 8 963207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTADDR1:%.*]] = alloca i8*, align 8 964207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP0]], i8** [[DOTADDR]], align 8 965207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP1]], i8** [[DOTADDR1]], align 8 96652cc65d4SNikita Popov // CHECK2-NEXT: [[TMP2:%.*]] = bitcast i8** [[DOTADDR]] to i32** 96752cc65d4SNikita Popov // CHECK2-NEXT: [[TMP3:%.*]] = load i32*, i32** [[TMP2]], align 8 96852cc65d4SNikita Popov // CHECK2-NEXT: [[TMP4:%.*]] = bitcast i8** [[DOTADDR1]] to i32** 96952cc65d4SNikita Popov // CHECK2-NEXT: [[TMP5:%.*]] = load i32*, i32** [[TMP4]], align 8 97052cc65d4SNikita Popov // CHECK2-NEXT: [[TMP6:%.*]] = load i32, i32* [[TMP3]], align 4 97152cc65d4SNikita Popov // CHECK2-NEXT: [[TMP7:%.*]] = load i32, i32* [[TMP5]], align 4 972207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP6]], [[TMP7]] 97352cc65d4SNikita Popov // CHECK2-NEXT: store i32 [[ADD]], i32* [[TMP3]], align 4 974207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: ret void 975207b08a9SGiorgis Georgakoudis // 976207b08a9SGiorgis Georgakoudis // 977207b08a9SGiorgis Georgakoudis // CHECK2-LABEL: define {{[^@]+}}@.red_init..5 978207b08a9SGiorgis Georgakoudis // CHECK2-SAME: (i8* noalias [[TMP0:%.*]], i8* noalias [[TMP1:%.*]]) #[[ATTR5]] { 979207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: entry: 980207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTADDR:%.*]] = alloca i8*, align 8 981207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTADDR1:%.*]] = alloca i8*, align 8 982207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP0]], i8** [[DOTADDR]], align 8 983207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP1]], i8** [[DOTADDR1]], align 8 984*b6f85d85SNikita Popov // CHECK2-NEXT: [[TMP2:%.*]] = bitcast i8** [[DOTADDR]] to [5 x %struct.S]** 985*b6f85d85SNikita Popov // CHECK2-NEXT: [[TMP3:%.*]] = load [5 x %struct.S]*, [5 x %struct.S]** [[TMP2]], align 8 986207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [5 x %struct.S], [5 x %struct.S]* [[TMP3]], i32 0, i32 0 987207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP4:%.*]] = getelementptr [[STRUCT_S:%.*]], %struct.S* [[ARRAY_BEGIN]], i64 5 988207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYINIT_ISEMPTY:%.*]] = icmp eq %struct.S* [[ARRAY_BEGIN]], [[TMP4]] 989207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: br i1 [[OMP_ARRAYINIT_ISEMPTY]], label [[OMP_ARRAYINIT_DONE:%.*]], label [[OMP_ARRAYINIT_BODY:%.*]] 990207b08a9SGiorgis Georgakoudis // CHECK2: omp.arrayinit.body: 991207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi %struct.S* [ [[ARRAY_BEGIN]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYINIT_BODY]] ] 99216d03818SRoman Lebedev // CHECK2-NEXT: call void @_ZN1SC1Ev(%struct.S* nonnull align 4 dereferenceable(4) [[OMP_ARRAYCPY_DESTELEMENTPAST]]) 993207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr [[STRUCT_S]], %struct.S* [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1 994207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq %struct.S* [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP4]] 995207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYINIT_DONE]], label [[OMP_ARRAYINIT_BODY]] 996207b08a9SGiorgis Georgakoudis // CHECK2: omp.arrayinit.done: 997207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: ret void 998207b08a9SGiorgis Georgakoudis // 999207b08a9SGiorgis Georgakoudis // 1000207b08a9SGiorgis Georgakoudis // CHECK2-LABEL: define {{[^@]+}}@.red_fini. 1001207b08a9SGiorgis Georgakoudis // CHECK2-SAME: (i8* [[TMP0:%.*]]) #[[ATTR5]] { 1002207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: entry: 1003207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTADDR:%.*]] = alloca i8*, align 8 1004207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP0]], i8** [[DOTADDR]], align 8 1005207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP1:%.*]] = load i8*, i8** [[DOTADDR]], align 8 1006207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP2:%.*]] = bitcast i8* [[TMP1]] to [5 x %struct.S]* 1007207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [5 x %struct.S], [5 x %struct.S]* [[TMP2]], i32 0, i32 0 1008207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_S:%.*]], %struct.S* [[ARRAY_BEGIN]], i64 5 1009207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: br label [[ARRAYDESTROY_BODY:%.*]] 1010207b08a9SGiorgis Georgakoudis // CHECK2: arraydestroy.body: 1011207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi %struct.S* [ [[TMP3]], [[ENTRY:%.*]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ] 1012207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[ARRAYDESTROY_ELEMENTPAST]], i64 -1 101316d03818SRoman Lebedev // CHECK2-NEXT: call void @_ZN1SD1Ev(%struct.S* nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR3]] 1014207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq %struct.S* [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN]] 1015207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE1:%.*]], label [[ARRAYDESTROY_BODY]] 1016207b08a9SGiorgis Georgakoudis // CHECK2: arraydestroy.done1: 1017207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: ret void 1018207b08a9SGiorgis Georgakoudis // 1019207b08a9SGiorgis Georgakoudis // 1020207b08a9SGiorgis Georgakoudis // CHECK2-LABEL: define {{[^@]+}}@_ZN1SD1Ev 102116d03818SRoman Lebedev // CHECK2-SAME: (%struct.S* nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] align 2 { 1022207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: entry: 1023207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[THIS_ADDR:%.*]] = alloca %struct.S*, align 8 1024207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store %struct.S* [[THIS]], %struct.S** [[THIS_ADDR]], align 8 1025207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[THIS1:%.*]] = load %struct.S*, %struct.S** [[THIS_ADDR]], align 8 102616d03818SRoman Lebedev // CHECK2-NEXT: call void @_ZN1SD2Ev(%struct.S* nonnull align 4 dereferenceable(4) [[THIS1]]) #[[ATTR3]] 1027207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: ret void 1028207b08a9SGiorgis Georgakoudis // 1029207b08a9SGiorgis Georgakoudis // 1030207b08a9SGiorgis Georgakoudis // CHECK2-LABEL: define {{[^@]+}}@.red_comb..6 1031207b08a9SGiorgis Georgakoudis // CHECK2-SAME: (i8* [[TMP0:%.*]], i8* [[TMP1:%.*]]) #[[ATTR5]] { 1032207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: entry: 1033207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTADDR:%.*]] = alloca i8*, align 8 1034207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTADDR1:%.*]] = alloca i8*, align 8 1035207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[REF_TMP:%.*]] = alloca [[STRUCT_S:%.*]], align 4 1036207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP0]], i8** [[DOTADDR]], align 8 1037207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP1]], i8** [[DOTADDR1]], align 8 103852cc65d4SNikita Popov // CHECK2-NEXT: [[TMP2:%.*]] = bitcast i8** [[DOTADDR]] to %struct.S** 103952cc65d4SNikita Popov // CHECK2-NEXT: [[TMP3:%.*]] = load %struct.S*, %struct.S** [[TMP2]], align 8 104052cc65d4SNikita Popov // CHECK2-NEXT: [[TMP4:%.*]] = bitcast i8** [[DOTADDR1]] to %struct.S** 104152cc65d4SNikita Popov // CHECK2-NEXT: [[TMP5:%.*]] = load %struct.S*, %struct.S** [[TMP4]], align 8 1042207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP6:%.*]] = getelementptr [[STRUCT_S]], %struct.S* [[TMP3]], i64 5 1043207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq %struct.S* [[TMP3]], [[TMP6]] 1044207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE2:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]] 1045207b08a9SGiorgis Georgakoudis // CHECK2: omp.arraycpy.body: 1046207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi %struct.S* [ [[TMP5]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ] 1047207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi %struct.S* [ [[TMP3]], [[ENTRY]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ] 1048207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: call void @_ZplRK1SS1_(%struct.S* sret([[STRUCT_S]]) align 4 [[REF_TMP]], %struct.S* nonnull align 4 dereferenceable(4) [[OMP_ARRAYCPY_DESTELEMENTPAST]], %struct.S* nonnull align 4 dereferenceable(4) [[OMP_ARRAYCPY_SRCELEMENTPAST]]) 104916d03818SRoman Lebedev // CHECK2-NEXT: [[CALL:%.*]] = call nonnull align 4 dereferenceable(4) %struct.S* @_ZN1SaSERKS_(%struct.S* nonnull align 4 dereferenceable(4) [[OMP_ARRAYCPY_DESTELEMENTPAST]], %struct.S* nonnull align 4 dereferenceable(4) [[REF_TMP]]) 105016d03818SRoman Lebedev // CHECK2-NEXT: call void @_ZN1SD1Ev(%struct.S* nonnull align 4 dereferenceable(4) [[REF_TMP]]) #[[ATTR3]] 1051207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr [[STRUCT_S]], %struct.S* [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1 1052207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr [[STRUCT_S]], %struct.S* [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1 1053207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq %struct.S* [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP6]] 1054207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYCPY_DONE2]], label [[OMP_ARRAYCPY_BODY]] 1055207b08a9SGiorgis Georgakoudis // CHECK2: omp.arraycpy.done2: 1056207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: ret void 1057207b08a9SGiorgis Georgakoudis // 1058207b08a9SGiorgis Georgakoudis // 1059207b08a9SGiorgis Georgakoudis // CHECK2-LABEL: define {{[^@]+}}@_ZplRK1SS1_ 1060207b08a9SGiorgis Georgakoudis // CHECK2-SAME: (%struct.S* noalias sret([[STRUCT_S:%.*]]) align 4 [[AGG_RESULT:%.*]], %struct.S* nonnull align 4 dereferenceable(4) [[A:%.*]], %struct.S* nonnull align 4 dereferenceable(4) [[B:%.*]]) #[[ATTR7:[0-9]+]] { 1061207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: entry: 1062207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[RESULT_PTR:%.*]] = alloca i8*, align 8 1063207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[A_ADDR:%.*]] = alloca %struct.S*, align 8 1064207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[B_ADDR:%.*]] = alloca %struct.S*, align 8 1065207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP0:%.*]] = bitcast %struct.S* [[AGG_RESULT]] to i8* 1066207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP0]], i8** [[RESULT_PTR]], align 8 1067207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store %struct.S* [[A]], %struct.S** [[A_ADDR]], align 8 1068207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store %struct.S* [[B]], %struct.S** [[B_ADDR]], align 8 1069207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP1:%.*]] = load %struct.S*, %struct.S** [[A_ADDR]], align 8 107016d03818SRoman Lebedev // CHECK2-NEXT: call void @_ZN1SC1ERKS_(%struct.S* nonnull align 4 dereferenceable(4) [[AGG_RESULT]], %struct.S* nonnull align 4 dereferenceable(4) [[TMP1]]) 1071207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: ret void 1072207b08a9SGiorgis Georgakoudis // 1073207b08a9SGiorgis Georgakoudis // 1074207b08a9SGiorgis Georgakoudis // CHECK2-LABEL: define {{[^@]+}}@_ZN1SaSERKS_ 107516d03818SRoman Lebedev // CHECK2-SAME: (%struct.S* nonnull align 4 dereferenceable(4) [[THIS:%.*]], %struct.S* nonnull align 4 dereferenceable(4) [[TMP0:%.*]]) #[[ATTR7]] align 2 { 1076207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: entry: 1077207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[THIS_ADDR:%.*]] = alloca %struct.S*, align 8 1078207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTADDR:%.*]] = alloca %struct.S*, align 8 1079207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store %struct.S* [[THIS]], %struct.S** [[THIS_ADDR]], align 8 1080207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store %struct.S* [[TMP0]], %struct.S** [[DOTADDR]], align 8 1081207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[THIS1:%.*]] = load %struct.S*, %struct.S** [[THIS_ADDR]], align 8 1082207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: ret %struct.S* [[THIS1]] 1083207b08a9SGiorgis Georgakoudis // 1084207b08a9SGiorgis Georgakoudis // 1085207b08a9SGiorgis Georgakoudis // CHECK2-LABEL: define {{[^@]+}}@.red_init..7 1086207b08a9SGiorgis Georgakoudis // CHECK2-SAME: (i8* noalias [[TMP0:%.*]], i8* noalias [[TMP1:%.*]]) #[[ATTR5]] { 1087207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: entry: 1088207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTADDR:%.*]] = alloca i8*, align 8 1089207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTADDR1:%.*]] = alloca i8*, align 8 1090207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]]) 1091207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP0]], i8** [[DOTADDR]], align 8 1092207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP1]], i8** [[DOTADDR1]], align 8 1093*b6f85d85SNikita Popov // CHECK2-NEXT: [[TMP3:%.*]] = bitcast i8** [[DOTADDR]] to i16** 1094*b6f85d85SNikita Popov // CHECK2-NEXT: [[TMP4:%.*]] = load i16*, i16** [[TMP3]], align 8 1095*b6f85d85SNikita Popov // CHECK2-NEXT: [[TMP5:%.*]] = call i8* @__kmpc_threadprivate_cached(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]], i8* bitcast (i64* @{{reduction_size[.].+[.]}}) 1096*b6f85d85SNikita Popov // CHECK2-NEXT: [[TMP6:%.*]] = bitcast i8* [[TMP5]] to i64* 1097*b6f85d85SNikita Popov // CHECK2-NEXT: [[TMP7:%.*]] = load i64, i64* [[TMP6]], align 8 1098*b6f85d85SNikita Popov // CHECK2-NEXT: [[TMP8:%.*]] = getelementptr i16, i16* [[TMP4]], i64 [[TMP7]] 1099*b6f85d85SNikita Popov // CHECK2-NEXT: [[OMP_ARRAYINIT_ISEMPTY:%.*]] = icmp eq i16* [[TMP4]], [[TMP8]] 1100207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: br i1 [[OMP_ARRAYINIT_ISEMPTY]], label [[OMP_ARRAYINIT_DONE:%.*]], label [[OMP_ARRAYINIT_BODY:%.*]] 1101207b08a9SGiorgis Georgakoudis // CHECK2: omp.arrayinit.body: 1102*b6f85d85SNikita Popov // CHECK2-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi i16* [ [[TMP4]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYINIT_BODY]] ] 1103207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i16 0, i16* [[OMP_ARRAYCPY_DESTELEMENTPAST]], align 2 1104207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr i16, i16* [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1 1105207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq i16* [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP8]] 1106207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYINIT_DONE]], label [[OMP_ARRAYINIT_BODY]] 1107207b08a9SGiorgis Georgakoudis // CHECK2: omp.arrayinit.done: 1108207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: ret void 1109207b08a9SGiorgis Georgakoudis // 1110207b08a9SGiorgis Georgakoudis // 1111207b08a9SGiorgis Georgakoudis // CHECK2-LABEL: define {{[^@]+}}@.red_comb..8 1112207b08a9SGiorgis Georgakoudis // CHECK2-SAME: (i8* [[TMP0:%.*]], i8* [[TMP1:%.*]]) #[[ATTR5]] { 1113207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: entry: 1114207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTADDR:%.*]] = alloca i8*, align 8 1115207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTADDR1:%.*]] = alloca i8*, align 8 1116207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]]) 1117207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP0]], i8** [[DOTADDR]], align 8 1118207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP1]], i8** [[DOTADDR1]], align 8 1119207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP3:%.*]] = call i8* @__kmpc_threadprivate_cached(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]], i8* bitcast (i64* @{{reduction_size[.].+[.]}}) 1120207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP4:%.*]] = bitcast i8* [[TMP3]] to i64* 1121207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP5:%.*]] = load i64, i64* [[TMP4]], align 8 112252cc65d4SNikita Popov // CHECK2-NEXT: [[TMP6:%.*]] = bitcast i8** [[DOTADDR]] to i16** 112352cc65d4SNikita Popov // CHECK2-NEXT: [[TMP7:%.*]] = load i16*, i16** [[TMP6]], align 8 112452cc65d4SNikita Popov // CHECK2-NEXT: [[TMP8:%.*]] = bitcast i8** [[DOTADDR1]] to i16** 112552cc65d4SNikita Popov // CHECK2-NEXT: [[TMP9:%.*]] = load i16*, i16** [[TMP8]], align 8 1126207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP10:%.*]] = getelementptr i16, i16* [[TMP7]], i64 [[TMP5]] 1127207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq i16* [[TMP7]], [[TMP10]] 1128207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE4:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]] 1129207b08a9SGiorgis Georgakoudis // CHECK2: omp.arraycpy.body: 1130207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi i16* [ [[TMP9]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ] 1131207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi i16* [ [[TMP7]], [[ENTRY]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ] 1132207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP11:%.*]] = load i16, i16* [[OMP_ARRAYCPY_DESTELEMENTPAST]], align 2 1133207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[CONV:%.*]] = sext i16 [[TMP11]] to i32 1134207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP12:%.*]] = load i16, i16* [[OMP_ARRAYCPY_SRCELEMENTPAST]], align 2 1135207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[CONV2:%.*]] = sext i16 [[TMP12]] to i32 1136207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[ADD:%.*]] = add nsw i32 [[CONV]], [[CONV2]] 1137207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[CONV3:%.*]] = trunc i32 [[ADD]] to i16 1138207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i16 [[CONV3]], i16* [[OMP_ARRAYCPY_DESTELEMENTPAST]], align 2 1139207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr i16, i16* [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1 1140207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr i16, i16* [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1 1141207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq i16* [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP10]] 1142207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYCPY_DONE4]], label [[OMP_ARRAYCPY_BODY]] 1143207b08a9SGiorgis Georgakoudis // CHECK2: omp.arraycpy.done4: 1144207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: ret void 1145207b08a9SGiorgis Georgakoudis // 1146207b08a9SGiorgis Georgakoudis // 1147207b08a9SGiorgis Georgakoudis // CHECK2-LABEL: define {{[^@]+}}@.omp_outlined. 1148ac90dfc4SGiorgis Georgakoudis // CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[A:%.*]], i64 [[VLA:%.*]], i16* nonnull align 2 dereferenceable(2) [[D:%.*]], i8** nonnull align 8 dereferenceable(8) [[DOTTASK_RED_:%.*]], i8** nonnull align 8 dereferenceable(8) [[DOTTASK_RED_1:%.*]]) #[[ATTR8:[0-9]+]] { 1149207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: entry: 1150207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8 1151207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8 1152ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: [[A_ADDR:%.*]] = alloca i32*, align 8 1153ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: [[VLA_ADDR:%.*]] = alloca i64, align 8 1154ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: [[D_ADDR:%.*]] = alloca i16*, align 8 1155ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTTASK_RED__ADDR:%.*]] = alloca i8**, align 8 1156ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTTASK_RED__ADDR2:%.*]] = alloca i8**, align 8 1157ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: [[AGG_CAPTURED:%.*]] = alloca [[STRUCT_ANON:%.*]], align 8 1158207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP:%.*]] = alloca i32, align 4 1159207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8 1160207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8 1161ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 8 1162ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: store i64 [[VLA]], i64* [[VLA_ADDR]], align 8 1163ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: store i16* [[D]], i16** [[D_ADDR]], align 8 1164ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: store i8** [[DOTTASK_RED_]], i8*** [[DOTTASK_RED__ADDR]], align 8 1165ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: store i8** [[DOTTASK_RED_1]], i8*** [[DOTTASK_RED__ADDR2]], align 8 1166ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP0:%.*]] = load i32*, i32** [[A_ADDR]], align 8 1167ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP1:%.*]] = load i64, i64* [[VLA_ADDR]], align 8 1168ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP2:%.*]] = load i16*, i16** [[D_ADDR]], align 8 1169ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP3:%.*]] = load i8**, i8*** [[DOTTASK_RED__ADDR]], align 8 1170ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP4:%.*]] = load i8**, i8*** [[DOTTASK_RED__ADDR2]], align 8 1171ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP5:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8 1172ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP6:%.*]] = load i32, i32* [[TMP5]], align 4 1173ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP7:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP6]]) 1174ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP8:%.*]] = icmp ne i32 [[TMP7]], 0 1175ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: br i1 [[TMP8]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]] 1176207b08a9SGiorgis Georgakoudis // CHECK2: omp_if.then: 1177ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP9:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[AGG_CAPTURED]], i32 0, i32 0 1178ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: store i32* [[TMP0]], i32** [[TMP9]], align 8 1179ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP10:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[AGG_CAPTURED]], i32 0, i32 1 1180ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: store i64 [[TMP1]], i64* [[TMP10]], align 8 1181ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP11:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[AGG_CAPTURED]], i32 0, i32 2 1182ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: store i16* [[TMP2]], i16** [[TMP11]], align 8 1183ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP12:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[AGG_CAPTURED]], i32 0, i32 3 1184ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: store i8** [[TMP3]], i8*** [[TMP12]], align 8 1185ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP13:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[AGG_CAPTURED]], i32 0, i32 4 1186ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: store i8** [[TMP4]], i8*** [[TMP13]], align 8 1187ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: call void @__kmpc_taskgroup(%struct.ident_t* @[[GLOB1]], i32 [[TMP6]]) 1188ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP14:%.*]] = call i8* @__kmpc_omp_task_alloc(%struct.ident_t* @[[GLOB1]], i32 [[TMP6]], i32 1, i64 96, i64 40, i32 (i32, i8*)* bitcast (i32 (i32, %struct.kmp_task_t_with_privates*)* @.omp_task_entry. to i32 (i32, i8*)*)) 1189ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP15:%.*]] = bitcast i8* [[TMP14]] to %struct.kmp_task_t_with_privates* 1190ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP16:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES:%.*]], %struct.kmp_task_t_with_privates* [[TMP15]], i32 0, i32 0 1191ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP17:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T:%.*]], %struct.kmp_task_t* [[TMP16]], i32 0, i32 0 1192ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP18:%.*]] = load i8*, i8** [[TMP17]], align 8 1193ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP19:%.*]] = bitcast %struct.anon* [[AGG_CAPTURED]] to i8* 1194ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 [[TMP18]], i8* align 8 [[TMP19]], i64 40, i1 false) 1195ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP20:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES]], %struct.kmp_task_t_with_privates* [[TMP15]], i32 0, i32 1 1196ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP21:%.*]] = getelementptr inbounds [[STRUCT__KMP_PRIVATES_T:%.*]], %struct..kmp_privates.t* [[TMP20]], i32 0, i32 0 1197ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP22:%.*]] = load i8*, i8** [[TMP3]], align 8 1198ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP22]], i8** [[TMP21]], align 8 1199ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP23:%.*]] = getelementptr inbounds [[STRUCT__KMP_PRIVATES_T]], %struct..kmp_privates.t* [[TMP20]], i32 0, i32 1 1200ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP24:%.*]] = load i8*, i8** [[TMP4]], align 8 1201ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: store i8* [[TMP24]], i8** [[TMP23]], align 8 1202ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP25:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP16]], i32 0, i32 5 1203ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: store i64 0, i64* [[TMP25]], align 8 1204ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP26:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP16]], i32 0, i32 6 1205ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: store i64 4, i64* [[TMP26]], align 8 1206ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP27:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP16]], i32 0, i32 7 1207ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: store i64 1, i64* [[TMP27]], align 8 1208ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP28:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP16]], i32 0, i32 9 1209ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP29:%.*]] = bitcast i8** [[TMP28]] to i8* 1210ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: call void @llvm.memset.p0i8.i64(i8* align 8 [[TMP29]], i8 0, i64 8, i1 false) 1211ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP30:%.*]] = load i64, i64* [[TMP27]], align 8 1212ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: call void @__kmpc_taskloop(%struct.ident_t* @[[GLOB1]], i32 [[TMP6]], i8* [[TMP14]], i32 1, i64* [[TMP25]], i64* [[TMP26]], i64 [[TMP30]], i32 1, i32 0, i64 0, i8* null) 1213ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: call void @__kmpc_end_taskgroup(%struct.ident_t* @[[GLOB1]], i32 [[TMP6]]) 1214ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP6]]) 1215207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: br label [[OMP_IF_END]] 1216207b08a9SGiorgis Georgakoudis // CHECK2: omp_if.end: 1217207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: ret void 1218207b08a9SGiorgis Georgakoudis // 1219207b08a9SGiorgis Georgakoudis // 1220207b08a9SGiorgis Georgakoudis // CHECK2-LABEL: define {{[^@]+}}@.omp_task_privates_map. 1221207b08a9SGiorgis Georgakoudis // CHECK2-SAME: (%struct..kmp_privates.t* noalias [[TMP0:%.*]], i8*** noalias [[TMP1:%.*]], i8*** noalias [[TMP2:%.*]]) #[[ATTR9:[0-9]+]] { 1222207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: entry: 1223207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTADDR:%.*]] = alloca %struct..kmp_privates.t*, align 8 1224207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTADDR1:%.*]] = alloca i8***, align 8 1225207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTADDR2:%.*]] = alloca i8***, align 8 1226207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store %struct..kmp_privates.t* [[TMP0]], %struct..kmp_privates.t** [[DOTADDR]], align 8 1227207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8*** [[TMP1]], i8**** [[DOTADDR1]], align 8 1228207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8*** [[TMP2]], i8**** [[DOTADDR2]], align 8 1229207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP3:%.*]] = load %struct..kmp_privates.t*, %struct..kmp_privates.t** [[DOTADDR]], align 8 1230207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP4:%.*]] = getelementptr inbounds [[STRUCT__KMP_PRIVATES_T:%.*]], %struct..kmp_privates.t* [[TMP3]], i32 0, i32 0 1231207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP5:%.*]] = load i8***, i8**** [[DOTADDR1]], align 8 1232207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8** [[TMP4]], i8*** [[TMP5]], align 8 1233207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[STRUCT__KMP_PRIVATES_T]], %struct..kmp_privates.t* [[TMP3]], i32 0, i32 1 1234207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP7:%.*]] = load i8***, i8**** [[DOTADDR2]], align 8 1235207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i8** [[TMP6]], i8*** [[TMP7]], align 8 1236207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: ret void 1237207b08a9SGiorgis Georgakoudis // 1238207b08a9SGiorgis Georgakoudis // 1239207b08a9SGiorgis Georgakoudis // CHECK2-LABEL: define {{[^@]+}}@.omp_task_entry. 1240207b08a9SGiorgis Georgakoudis // CHECK2-SAME: (i32 [[TMP0:%.*]], %struct.kmp_task_t_with_privates* noalias [[TMP1:%.*]]) #[[ATTR5]] { 1241207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: entry: 1242207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTGLOBAL_TID__ADDR_I:%.*]] = alloca i32, align 4 1243207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTPART_ID__ADDR_I:%.*]] = alloca i32*, align 8 1244207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTPRIVATES__ADDR_I:%.*]] = alloca i8*, align 8 1245207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTCOPY_FN__ADDR_I:%.*]] = alloca void (i8*, ...)*, align 8 1246207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTTASK_T__ADDR_I:%.*]] = alloca i8*, align 8 1247207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTLB__ADDR_I:%.*]] = alloca i64, align 8 1248207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTUB__ADDR_I:%.*]] = alloca i64, align 8 1249207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTST__ADDR_I:%.*]] = alloca i64, align 8 1250207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTLITER__ADDR_I:%.*]] = alloca i32, align 4 1251207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTREDUCTIONS__ADDR_I:%.*]] = alloca i8*, align 8 1252ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: [[__CONTEXT_ADDR_I:%.*]] = alloca %struct.anon*, align 8 1253207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTFIRSTPRIV_PTR_ADDR_I:%.*]] = alloca i8**, align 8 1254207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTFIRSTPRIV_PTR_ADDR1_I:%.*]] = alloca i8**, align 8 1255207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[I_I:%.*]] = alloca i32, align 4 1256207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTOMP_IV_I:%.*]] = alloca i32, align 4 1257207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTADDR:%.*]] = alloca i32, align 4 1258207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTADDR1:%.*]] = alloca %struct.kmp_task_t_with_privates*, align 8 1259207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i32 [[TMP0]], i32* [[DOTADDR]], align 4 1260207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store %struct.kmp_task_t_with_privates* [[TMP1]], %struct.kmp_task_t_with_privates** [[DOTADDR1]], align 8 1261207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP2:%.*]] = load i32, i32* [[DOTADDR]], align 4 1262207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP3:%.*]] = load %struct.kmp_task_t_with_privates*, %struct.kmp_task_t_with_privates** [[DOTADDR1]], align 8 1263207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP4:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES:%.*]], %struct.kmp_task_t_with_privates* [[TMP3]], i32 0, i32 0 1264207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T:%.*]], %struct.kmp_task_t* [[TMP4]], i32 0, i32 2 1265207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP4]], i32 0, i32 0 1266207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP7:%.*]] = load i8*, i8** [[TMP6]], align 8 1267ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP8:%.*]] = bitcast i8* [[TMP7]] to %struct.anon* 1268207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP9:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES]], %struct.kmp_task_t_with_privates* [[TMP3]], i32 0, i32 1 1269207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP10:%.*]] = bitcast %struct..kmp_privates.t* [[TMP9]] to i8* 1270207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP11:%.*]] = bitcast %struct.kmp_task_t_with_privates* [[TMP3]] to i8* 1271207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP12:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP4]], i32 0, i32 5 1272207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP13:%.*]] = load i64, i64* [[TMP12]], align 8 1273207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP14:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP4]], i32 0, i32 6 1274207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP15:%.*]] = load i64, i64* [[TMP14]], align 8 1275207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP16:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP4]], i32 0, i32 7 1276207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP17:%.*]] = load i64, i64* [[TMP16]], align 8 1277207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP18:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP4]], i32 0, i32 8 1278207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP19:%.*]] = load i32, i32* [[TMP18]], align 8 1279207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP20:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP4]], i32 0, i32 9 1280207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP21:%.*]] = load i8*, i8** [[TMP20]], align 8 12819ce02ea8SJoseph Huber // CHECK2-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META3:![0-9]+]]) 12829ce02ea8SJoseph Huber // CHECK2-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META6:![0-9]+]]) 12839ce02ea8SJoseph Huber // CHECK2-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META8:![0-9]+]]) 12849ce02ea8SJoseph Huber // CHECK2-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META10:![0-9]+]]) 12859ce02ea8SJoseph Huber // CHECK2-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META12:![0-9]+]]) 12869ce02ea8SJoseph Huber // CHECK2-NEXT: store i32 [[TMP2]], i32* [[DOTGLOBAL_TID__ADDR_I]], align 4, !noalias !14 12879ce02ea8SJoseph Huber // CHECK2-NEXT: store i32* [[TMP5]], i32** [[DOTPART_ID__ADDR_I]], align 8, !noalias !14 12889ce02ea8SJoseph Huber // CHECK2-NEXT: store i8* [[TMP10]], i8** [[DOTPRIVATES__ADDR_I]], align 8, !noalias !14 12899ce02ea8SJoseph Huber // CHECK2-NEXT: store void (i8*, ...)* bitcast (void (%struct..kmp_privates.t*, i8***, i8***)* @.omp_task_privates_map. to void (i8*, ...)*), void (i8*, ...)** [[DOTCOPY_FN__ADDR_I]], align 8, !noalias !14 12909ce02ea8SJoseph Huber // CHECK2-NEXT: store i8* [[TMP11]], i8** [[DOTTASK_T__ADDR_I]], align 8, !noalias !14 12919ce02ea8SJoseph Huber // CHECK2-NEXT: store i64 [[TMP13]], i64* [[DOTLB__ADDR_I]], align 8, !noalias !14 12929ce02ea8SJoseph Huber // CHECK2-NEXT: store i64 [[TMP15]], i64* [[DOTUB__ADDR_I]], align 8, !noalias !14 12939ce02ea8SJoseph Huber // CHECK2-NEXT: store i64 [[TMP17]], i64* [[DOTST__ADDR_I]], align 8, !noalias !14 12949ce02ea8SJoseph Huber // CHECK2-NEXT: store i32 [[TMP19]], i32* [[DOTLITER__ADDR_I]], align 4, !noalias !14 12959ce02ea8SJoseph Huber // CHECK2-NEXT: store i8* [[TMP21]], i8** [[DOTREDUCTIONS__ADDR_I]], align 8, !noalias !14 1296ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: store %struct.anon* [[TMP8]], %struct.anon** [[__CONTEXT_ADDR_I]], align 8, !noalias !14 1297ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP22:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR_I]], align 8, !noalias !14 1298ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP23:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP22]], i32 0, i32 1 1299207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP24:%.*]] = load i64, i64* [[TMP23]], align 8 13009ce02ea8SJoseph Huber // CHECK2-NEXT: [[TMP25:%.*]] = load void (i8*, ...)*, void (i8*, ...)** [[DOTCOPY_FN__ADDR_I]], align 8, !noalias !14 13019ce02ea8SJoseph Huber // CHECK2-NEXT: [[TMP26:%.*]] = load i8*, i8** [[DOTPRIVATES__ADDR_I]], align 8, !noalias !14 1302207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP27:%.*]] = bitcast void (i8*, ...)* [[TMP25]] to void (i8*, i8***, i8***)* 1303207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: call void [[TMP27]](i8* [[TMP26]], i8*** [[DOTFIRSTPRIV_PTR_ADDR_I]], i8*** [[DOTFIRSTPRIV_PTR_ADDR1_I]]) #[[ATTR3]] 13049ce02ea8SJoseph Huber // CHECK2-NEXT: [[TMP28:%.*]] = load i8**, i8*** [[DOTFIRSTPRIV_PTR_ADDR_I]], align 8, !noalias !14 13059ce02ea8SJoseph Huber // CHECK2-NEXT: [[TMP29:%.*]] = load i8**, i8*** [[DOTFIRSTPRIV_PTR_ADDR1_I]], align 8, !noalias !14 1306ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP30:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP22]], i32 0, i32 0 1307207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP31:%.*]] = load i32*, i32** [[TMP30]], align 8 1308207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP32:%.*]] = load i8*, i8** [[TMP28]], align 8 13099ce02ea8SJoseph Huber // CHECK2-NEXT: [[TMP33:%.*]] = load i32, i32* [[DOTGLOBAL_TID__ADDR_I]], align 4, !noalias !14 1310207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP34:%.*]] = bitcast i32* [[TMP31]] to i8* 1311207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP35:%.*]] = call i8* @__kmpc_task_reduction_get_th_data(i32 [[TMP33]], i8* [[TMP32]], i8* [[TMP34]]) #[[ATTR3]] 1312207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[CONV_I:%.*]] = bitcast i8* [[TMP35]] to i32* 1313ac90dfc4SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP36:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP22]], i32 0, i32 2 1314207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP37:%.*]] = load i16*, i16** [[TMP36]], align 8 1315207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP38:%.*]] = mul nuw i64 [[TMP24]], 2 1316207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP39:%.*]] = udiv exact i64 [[TMP38]], ptrtoint (i16* getelementptr (i16, i16* null, i32 1) to i64) 1317207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP40:%.*]] = call i8* @__kmpc_threadprivate_cached(%struct.ident_t* @[[GLOB1]], i32 [[TMP33]], i8* bitcast (i64* @{{reduction_size[.].+[.]}}) #[[ATTR3]] 1318207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP41:%.*]] = bitcast i8* [[TMP40]] to i64* 1319207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i64 [[TMP39]], i64* [[TMP41]], align 8 1320207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP42:%.*]] = load i8*, i8** [[TMP29]], align 8 1321207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP43:%.*]] = bitcast i16* [[TMP37]] to i8* 1322207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP44:%.*]] = call i8* @__kmpc_task_reduction_get_th_data(i32 [[TMP33]], i8* [[TMP42]], i8* [[TMP43]]) #[[ATTR3]] 1323207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[CONV2_I:%.*]] = bitcast i8* [[TMP44]] to i16* 13249ce02ea8SJoseph Huber // CHECK2-NEXT: [[TMP45:%.*]] = load i64, i64* [[DOTLB__ADDR_I]], align 8, !noalias !14 1325207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[CONV3_I:%.*]] = trunc i64 [[TMP45]] to i32 13269ce02ea8SJoseph Huber // CHECK2-NEXT: store i32 [[CONV3_I]], i32* [[DOTOMP_IV_I]], align 4, !noalias !14 1327207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: br label [[OMP_INNER_FOR_COND_I:%.*]] 1328207b08a9SGiorgis Georgakoudis // CHECK2: omp.inner.for.cond.i: 13299ce02ea8SJoseph Huber // CHECK2-NEXT: [[TMP46:%.*]] = load i32, i32* [[DOTOMP_IV_I]], align 4, !noalias !14 1330207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[CONV4_I:%.*]] = sext i32 [[TMP46]] to i64 13319ce02ea8SJoseph Huber // CHECK2-NEXT: [[TMP47:%.*]] = load i64, i64* [[DOTUB__ADDR_I]], align 8, !noalias !14 1332207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[CMP_I:%.*]] = icmp ule i64 [[CONV4_I]], [[TMP47]] 1333207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: br i1 [[CMP_I]], label [[OMP_INNER_FOR_BODY_I:%.*]], label [[DOTOMP_OUTLINED__9_EXIT:%.*]] 1334207b08a9SGiorgis Georgakoudis // CHECK2: omp.inner.for.body.i: 13359ce02ea8SJoseph Huber // CHECK2-NEXT: [[TMP48:%.*]] = load i32, i32* [[DOTOMP_IV_I]], align 4, !noalias !14 13369ce02ea8SJoseph Huber // CHECK2-NEXT: store i32 [[TMP48]], i32* [[I_I]], align 4, !noalias !14 1337207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP49:%.*]] = load i32, i32* [[CONV_I]], align 4 1338207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[IDXPROM_I:%.*]] = sext i32 [[TMP49]] to i64 1339207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[ARRAYIDX_I:%.*]] = getelementptr inbounds i16, i16* [[CONV2_I]], i64 [[IDXPROM_I]] 1340207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP50:%.*]] = load i16, i16* [[ARRAYIDX_I]], align 2 1341207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[CONV5_I:%.*]] = sext i16 [[TMP50]] to i32 1342207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP51:%.*]] = load i32, i32* [[CONV_I]], align 4 1343207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[ADD6_I:%.*]] = add nsw i32 [[TMP51]], [[CONV5_I]] 1344207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i32 [[ADD6_I]], i32* [[CONV_I]], align 4 13459ce02ea8SJoseph Huber // CHECK2-NEXT: [[TMP52:%.*]] = load i32, i32* [[DOTOMP_IV_I]], align 4, !noalias !14 1346207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[ADD7_I:%.*]] = add nsw i32 [[TMP52]], 1 13479ce02ea8SJoseph Huber // CHECK2-NEXT: store i32 [[ADD7_I]], i32* [[DOTOMP_IV_I]], align 4, !noalias !14 1348207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: br label [[OMP_INNER_FOR_COND_I]] 1349207b08a9SGiorgis Georgakoudis // CHECK2: .omp_outlined..9.exit: 1350207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: ret i32 0 1351207b08a9SGiorgis Georgakoudis // 1352207b08a9SGiorgis Georgakoudis // 1353207b08a9SGiorgis Georgakoudis // CHECK2-LABEL: define {{[^@]+}}@_ZN1SC2Ev 135416d03818SRoman Lebedev // CHECK2-SAME: (%struct.S* nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] align 2 { 1355207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: entry: 1356207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[THIS_ADDR:%.*]] = alloca %struct.S*, align 8 1357207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store %struct.S* [[THIS]], %struct.S** [[THIS_ADDR]], align 8 1358207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[THIS1:%.*]] = load %struct.S*, %struct.S** [[THIS_ADDR]], align 8 1359207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[A:%.*]] = getelementptr inbounds [[STRUCT_S:%.*]], %struct.S* [[THIS1]], i32 0, i32 0 1360207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store i32 0, i32* [[A]], align 4 1361207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: ret void 1362207b08a9SGiorgis Georgakoudis // 1363207b08a9SGiorgis Georgakoudis // 1364207b08a9SGiorgis Georgakoudis // CHECK2-LABEL: define {{[^@]+}}@_ZN1SD2Ev 136516d03818SRoman Lebedev // CHECK2-SAME: (%struct.S* nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] align 2 { 1366207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: entry: 1367207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[THIS_ADDR:%.*]] = alloca %struct.S*, align 8 1368207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store %struct.S* [[THIS]], %struct.S** [[THIS_ADDR]], align 8 1369207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[THIS1:%.*]] = load %struct.S*, %struct.S** [[THIS_ADDR]], align 8 1370207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: ret void 1371207b08a9SGiorgis Georgakoudis // 1372207b08a9SGiorgis Georgakoudis // 1373207b08a9SGiorgis Georgakoudis // CHECK2-LABEL: define {{[^@]+}}@_ZN1SC1ERKS_ 137416d03818SRoman Lebedev // CHECK2-SAME: (%struct.S* nonnull align 4 dereferenceable(4) [[THIS:%.*]], %struct.S* nonnull align 4 dereferenceable(4) [[TMP0:%.*]]) unnamed_addr #[[ATTR1]] align 2 { 1375207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: entry: 1376207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[THIS_ADDR:%.*]] = alloca %struct.S*, align 8 1377207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTADDR:%.*]] = alloca %struct.S*, align 8 1378207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store %struct.S* [[THIS]], %struct.S** [[THIS_ADDR]], align 8 1379207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store %struct.S* [[TMP0]], %struct.S** [[DOTADDR]], align 8 1380207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[THIS1:%.*]] = load %struct.S*, %struct.S** [[THIS_ADDR]], align 8 1381207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[TMP1:%.*]] = load %struct.S*, %struct.S** [[DOTADDR]], align 8 138216d03818SRoman Lebedev // CHECK2-NEXT: call void @_ZN1SC2ERKS_(%struct.S* nonnull align 4 dereferenceable(4) [[THIS1]], %struct.S* nonnull align 4 dereferenceable(4) [[TMP1]]) 1383207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: ret void 1384207b08a9SGiorgis Georgakoudis // 1385207b08a9SGiorgis Georgakoudis // 1386207b08a9SGiorgis Georgakoudis // CHECK2-LABEL: define {{[^@]+}}@_ZN1SC2ERKS_ 138716d03818SRoman Lebedev // CHECK2-SAME: (%struct.S* nonnull align 4 dereferenceable(4) [[THIS:%.*]], %struct.S* nonnull align 4 dereferenceable(4) [[TMP0:%.*]]) unnamed_addr #[[ATTR1]] align 2 { 1388207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: entry: 1389207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[THIS_ADDR:%.*]] = alloca %struct.S*, align 8 1390207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[DOTADDR:%.*]] = alloca %struct.S*, align 8 1391207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store %struct.S* [[THIS]], %struct.S** [[THIS_ADDR]], align 8 1392207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: store %struct.S* [[TMP0]], %struct.S** [[DOTADDR]], align 8 1393207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: [[THIS1:%.*]] = load %struct.S*, %struct.S** [[THIS_ADDR]], align 8 1394207b08a9SGiorgis Georgakoudis // CHECK2-NEXT: ret void 1395207b08a9SGiorgis Georgakoudis // 1396