1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --check-globals --replace-value-regex "__omp_offloading_[0-9a-z]+_[0-9a-z]+" --prefix-filecheck-ir-name _ --global-value-regex ".offload_maptypes.*" ".offload_sizes.*" --global-hex-value-regex ".offload_maptypes.*" 2 // expected-no-diagnostics 3 #ifndef HEADER 4 #define HEADER 5 6 //-------------------------------------------------- 7 // With -DUSE. 8 //-------------------------------------------------- 9 10 // powerpc64le-ibm-linux-gnu 11 12 // RUN: %clang_cc1 -no-opaque-pointers -DUSE -verify -fopenmp -fopenmp-extensions \ 13 // RUN: -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ \ 14 // RUN: -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | \ 15 // RUN: FileCheck %s --check-prefixes=CHECK-USE-PPC64LE 16 // RUN: %clang_cc1 -no-opaque-pointers -DUSE -fopenmp -fopenmp-extensions \ 17 // RUN: -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 \ 18 // RUN: -triple powerpc64le-unknown-unknown -emit-pch -o %t %s 19 // RUN: %clang_cc1 -no-opaque-pointers -DUSE -fopenmp -fopenmp-extensions \ 20 // RUN: -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ \ 21 // RUN: -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t \ 22 // RUN: -verify %s -emit-llvm -o - | \ 23 // RUN: FileCheck %s --check-prefixes=CHECK-USE-PPC64LE 24 25 // i386-pc-linux-gnu 26 27 // RUN: %clang_cc1 -no-opaque-pointers -DUSE -verify -fopenmp -fopenmp-extensions \ 28 // RUN: -fopenmp-targets=i386-pc-linux-gnu -x c++ \ 29 // RUN: -triple i386-unknown-unknown -emit-llvm %s -o - | \ 30 // RUN: FileCheck %s --check-prefixes=CHECK-USE-I386 31 // RUN: %clang_cc1 -no-opaque-pointers -DUSE -fopenmp -fopenmp-extensions \ 32 // RUN: -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 \ 33 // RUN: -triple i386-unknown-unknown -emit-pch -o %t %s 34 // RUN: %clang_cc1 -no-opaque-pointers -DUSE -fopenmp -fopenmp-extensions \ 35 // RUN: -fopenmp-targets=i386-pc-linux-gnu -x c++ \ 36 // RUN: -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify %s \ 37 // RUN: -emit-llvm -o - | \ 38 // RUN: FileCheck %s --check-prefixes=CHECK-USE-I386 39 40 //-------------------------------------------------- 41 // Without -DUSE. 42 //-------------------------------------------------- 43 44 // powerpc64le-ibm-linux-gnu 45 46 // RUN: %clang_cc1 -no-opaque-pointers -verify -fopenmp -fopenmp-extensions \ 47 // RUN: -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ \ 48 // RUN: -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | \ 49 // RUN: FileCheck %s --check-prefixes=CHECK-NOUSE-PPC64LE 50 // RUN: %clang_cc1 -no-opaque-pointers -fopenmp -fopenmp-extensions \ 51 // RUN: -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 \ 52 // RUN: -triple powerpc64le-unknown-unknown -emit-pch -o %t %s 53 // RUN: %clang_cc1 -no-opaque-pointers -fopenmp -fopenmp-extensions \ 54 // RUN: -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ \ 55 // RUN: -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t \ 56 // RUN: -verify %s -emit-llvm -o - | \ 57 // RUN: FileCheck %s --check-prefixes=CHECK-NOUSE-PPC64LE 58 59 // i386-pc-linux-gnu 60 61 // RUN: %clang_cc1 -no-opaque-pointers -verify -fopenmp -fopenmp-extensions \ 62 // RUN: -fopenmp-targets=i386-pc-linux-gnu -x c++ \ 63 // RUN: -triple i386-unknown-unknown -emit-llvm %s -o - | \ 64 // RUN: FileCheck %s --check-prefixes=CHECK-NOUSE-I386 65 // RUN: %clang_cc1 -no-opaque-pointers -fopenmp -fopenmp-extensions \ 66 // RUN: -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 \ 67 // RUN: -triple i386-unknown-unknown -emit-pch -o %t %s 68 // RUN: %clang_cc1 -no-opaque-pointers -fopenmp -fopenmp-extensions \ 69 // RUN: -fopenmp-targets=i386-pc-linux-gnu -x c++ \ 70 // RUN: -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify %s \ 71 // RUN: -emit-llvm -o - | \ 72 // RUN: FileCheck %s --check-prefixes=CHECK-NOUSE-I386 73 74 // Map flags used in @.offload_maptypes* below: 75 // 76 // TO = 0x1 77 // FROM = 0x2 78 // ALWAYS = 0x4 79 // TARGET_PARAM = 0x20 80 // CLOSE = 0x400 81 // OMPX_HOLD = 0x2000 82 // MEMBER_OF_1 = 0x1000000000000 83 // MEMBER_OF_5 = 0x5000000000000 84 85 //. 86 // CHECK-USE-PPC64LE: @.offload_sizes = private unnamed_addr constant [7 x i64] [i64 0, i64 4, i64 4, i64 4, i64 0, i64 4, i64 4] 87 // CHECK-USE-PPC64LE: @.offload_maptypes = private unnamed_addr constant [7 x i64] [i64 [[#0x2020]], i64 [[#0x1000000002003]], i64 [[#0x1000000002003]], i64 [[#0x2023]], i64 [[#0x2020]], i64 [[#0x5000000002003]], i64 [[#0x5000000002003]]] 88 // CHECK-USE-PPC64LE: @.offload_sizes.1 = private unnamed_addr constant [1 x i64] [i64 4] 89 // CHECK-USE-PPC64LE: @.offload_maptypes.2 = private unnamed_addr constant [1 x i64] [i64 [[#0x2427]]] 90 // CHECK-USE-PPC64LE: @.offload_sizes.3 = private unnamed_addr constant [3 x i64] [i64 0, i64 4, i64 4] 91 // CHECK-USE-PPC64LE: @.offload_maptypes.4 = private unnamed_addr constant [3 x i64] [i64 [[#0x2020]], i64 [[#0x1000000002003]], i64 [[#0x1000000002003]]] 92 //. 93 // CHECK-USE-I386: @.offload_sizes = private unnamed_addr constant [7 x i64] [i64 0, i64 4, i64 4, i64 4, i64 0, i64 4, i64 4] 94 // CHECK-USE-I386: @.offload_maptypes = private unnamed_addr constant [7 x i64] [i64 [[#0x2020]], i64 [[#0x1000000002003]], i64 [[#0x1000000002003]], i64 [[#0x2023]], i64 [[#0x2020]], i64 [[#0x5000000002003]], i64 [[#0x5000000002003]]] 95 // CHECK-USE-I386: @.offload_sizes.1 = private unnamed_addr constant [1 x i64] [i64 4] 96 // CHECK-USE-I386: @.offload_maptypes.2 = private unnamed_addr constant [1 x i64] [i64 [[#0x2427]]] 97 // CHECK-USE-I386: @.offload_sizes.3 = private unnamed_addr constant [3 x i64] [i64 0, i64 4, i64 4] 98 // CHECK-USE-I386: @.offload_maptypes.4 = private unnamed_addr constant [3 x i64] [i64 [[#0x2020]], i64 [[#0x1000000002003]], i64 [[#0x1000000002003]]] 99 //. 100 // CHECK-NOUSE-PPC64LE: @.offload_sizes = private unnamed_addr constant [7 x i64] [i64 0, i64 4, i64 4, i64 4, i64 0, i64 4, i64 4] 101 // CHECK-NOUSE-PPC64LE: @.offload_maptypes = private unnamed_addr constant [7 x i64] [i64 [[#0x2000]], i64 [[#0x1000000002003]], i64 [[#0x1000000002003]], i64 [[#0x2003]], i64 [[#0x2000]], i64 [[#0x5000000002003]], i64 [[#0x5000000002003]]] 102 // CHECK-NOUSE-PPC64LE: @.offload_sizes.1 = private unnamed_addr constant [1 x i64] [i64 4] 103 // CHECK-NOUSE-PPC64LE: @.offload_maptypes.2 = private unnamed_addr constant [1 x i64] [i64 [[#0x2407]]] 104 // CHECK-NOUSE-PPC64LE: @.offload_sizes.3 = private unnamed_addr constant [3 x i64] [i64 0, i64 4, i64 4] 105 // CHECK-NOUSE-PPC64LE: @.offload_maptypes.4 = private unnamed_addr constant [3 x i64] [i64 [[#0x2000]], i64 [[#0x1000000002003]], i64 [[#0x1000000002003]]] 106 //. 107 // CHECK-NOUSE-I386: @.offload_sizes = private unnamed_addr constant [7 x i64] [i64 0, i64 4, i64 4, i64 4, i64 0, i64 4, i64 4] 108 // CHECK-NOUSE-I386: @.offload_maptypes = private unnamed_addr constant [7 x i64] [i64 [[#0x2000]], i64 [[#0x1000000002003]], i64 [[#0x1000000002003]], i64 [[#0x2003]], i64 [[#0x2000]], i64 [[#0x5000000002003]], i64 [[#0x5000000002003]]] 109 // CHECK-NOUSE-I386: @.offload_sizes.1 = private unnamed_addr constant [1 x i64] [i64 4] 110 // CHECK-NOUSE-I386: @.offload_maptypes.2 = private unnamed_addr constant [1 x i64] [i64 [[#0x2407]]] 111 // CHECK-NOUSE-I386: @.offload_sizes.3 = private unnamed_addr constant [3 x i64] [i64 0, i64 4, i64 4] 112 // CHECK-NOUSE-I386: @.offload_maptypes.4 = private unnamed_addr constant [3 x i64] [i64 [[#0x2000]], i64 [[#0x1000000002003]], i64 [[#0x1000000002003]]] 113 //. 114 struct ST { 115 int i; 116 int j; 117 void test_present_members(); 118 }; 119 120 // CHECK-USE-PPC64LE-LABEL: @_Z20explicit_maps_singlei( 121 // CHECK-USE-PPC64LE-NEXT: entry: 122 // CHECK-USE-PPC64LE-NEXT: [[II_ADDR:%.*]] = alloca i32, align 4 123 // CHECK-USE-PPC64LE-NEXT: [[A:%.*]] = alloca i32, align 4 124 // CHECK-USE-PPC64LE-NEXT: [[ST1:%.*]] = alloca [[STRUCT_ST:%.*]], align 4 125 // CHECK-USE-PPC64LE-NEXT: [[ST2:%.*]] = alloca [[STRUCT_ST]], align 4 126 // CHECK-USE-PPC64LE-NEXT: [[DOTOFFLOAD_BASEPTRS:%.*]] = alloca [7 x i8*], align 8 127 // CHECK-USE-PPC64LE-NEXT: [[DOTOFFLOAD_PTRS:%.*]] = alloca [7 x i8*], align 8 128 // CHECK-USE-PPC64LE-NEXT: [[DOTOFFLOAD_MAPPERS:%.*]] = alloca [7 x i8*], align 8 129 // CHECK-USE-PPC64LE-NEXT: [[DOTOFFLOAD_SIZES:%.*]] = alloca [7 x i64], align 8 130 // CHECK-USE-PPC64LE-NEXT: [[DOTOFFLOAD_BASEPTRS3:%.*]] = alloca [1 x i8*], align 8 131 // CHECK-USE-PPC64LE-NEXT: [[DOTOFFLOAD_PTRS4:%.*]] = alloca [1 x i8*], align 8 132 // CHECK-USE-PPC64LE-NEXT: [[DOTOFFLOAD_MAPPERS5:%.*]] = alloca [1 x i8*], align 8 133 // CHECK-USE-PPC64LE-NEXT: store i32 [[II:%.*]], i32* [[II_ADDR]], align 4 134 // CHECK-USE-PPC64LE-NEXT: [[TMP0:%.*]] = load i32, i32* [[II_ADDR]], align 4 135 // CHECK-USE-PPC64LE-NEXT: store i32 [[TMP0]], i32* [[A]], align 4 136 // CHECK-USE-PPC64LE-NEXT: [[I:%.*]] = getelementptr inbounds [[STRUCT_ST]], %struct.ST* [[ST1]], i32 0, i32 0 137 // CHECK-USE-PPC64LE-NEXT: [[J:%.*]] = getelementptr inbounds [[STRUCT_ST]], %struct.ST* [[ST1]], i32 0, i32 1 138 // CHECK-USE-PPC64LE-NEXT: [[TMP1:%.*]] = getelementptr i32, i32* [[J]], i32 1 139 // CHECK-USE-PPC64LE-NEXT: [[TMP2:%.*]] = bitcast i32* [[I]] to i8* 140 // CHECK-USE-PPC64LE-NEXT: [[TMP3:%.*]] = bitcast i32* [[TMP1]] to i8* 141 // CHECK-USE-PPC64LE-NEXT: [[TMP4:%.*]] = ptrtoint i8* [[TMP3]] to i64 142 // CHECK-USE-PPC64LE-NEXT: [[TMP5:%.*]] = ptrtoint i8* [[TMP2]] to i64 143 // CHECK-USE-PPC64LE-NEXT: [[TMP6:%.*]] = sub i64 [[TMP4]], [[TMP5]] 144 // CHECK-USE-PPC64LE-NEXT: [[TMP7:%.*]] = sdiv exact i64 [[TMP6]], ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64) 145 // CHECK-USE-PPC64LE-NEXT: [[I1:%.*]] = getelementptr inbounds [[STRUCT_ST]], %struct.ST* [[ST2]], i32 0, i32 0 146 // CHECK-USE-PPC64LE-NEXT: [[J2:%.*]] = getelementptr inbounds [[STRUCT_ST]], %struct.ST* [[ST2]], i32 0, i32 1 147 // CHECK-USE-PPC64LE-NEXT: [[TMP8:%.*]] = getelementptr i32, i32* [[J2]], i32 1 148 // CHECK-USE-PPC64LE-NEXT: [[TMP9:%.*]] = bitcast i32* [[I1]] to i8* 149 // CHECK-USE-PPC64LE-NEXT: [[TMP10:%.*]] = bitcast i32* [[TMP8]] to i8* 150 // CHECK-USE-PPC64LE-NEXT: [[TMP11:%.*]] = ptrtoint i8* [[TMP10]] to i64 151 // CHECK-USE-PPC64LE-NEXT: [[TMP12:%.*]] = ptrtoint i8* [[TMP9]] to i64 152 // CHECK-USE-PPC64LE-NEXT: [[TMP13:%.*]] = sub i64 [[TMP11]], [[TMP12]] 153 // CHECK-USE-PPC64LE-NEXT: [[TMP14:%.*]] = sdiv exact i64 [[TMP13]], ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64) 154 // CHECK-USE-PPC64LE-NEXT: [[TMP15:%.*]] = bitcast [7 x i64]* [[DOTOFFLOAD_SIZES]] to i8* 155 // CHECK-USE-PPC64LE-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 [[TMP15]], i8* align 8 bitcast ([7 x i64]* @.offload_sizes to i8*), i64 56, i1 false) 156 // CHECK-USE-PPC64LE-NEXT: [[TMP16:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0 157 // CHECK-USE-PPC64LE-NEXT: [[TMP17:%.*]] = bitcast i8** [[TMP16]] to %struct.ST** 158 // CHECK-USE-PPC64LE-NEXT: store %struct.ST* [[ST1]], %struct.ST** [[TMP17]], align 8 159 // CHECK-USE-PPC64LE-NEXT: [[TMP18:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_PTRS]], i32 0, i32 0 160 // CHECK-USE-PPC64LE-NEXT: [[TMP19:%.*]] = bitcast i8** [[TMP18]] to i32** 161 // CHECK-USE-PPC64LE-NEXT: store i32* [[I]], i32** [[TMP19]], align 8 162 // CHECK-USE-PPC64LE-NEXT: [[TMP20:%.*]] = getelementptr inbounds [7 x i64], [7 x i64]* [[DOTOFFLOAD_SIZES]], i32 0, i32 0 163 // CHECK-USE-PPC64LE-NEXT: store i64 [[TMP7]], i64* [[TMP20]], align 8 164 // CHECK-USE-PPC64LE-NEXT: [[TMP21:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_MAPPERS]], i64 0, i64 0 165 // CHECK-USE-PPC64LE-NEXT: store i8* null, i8** [[TMP21]], align 8 166 // CHECK-USE-PPC64LE-NEXT: [[TMP22:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 1 167 // CHECK-USE-PPC64LE-NEXT: [[TMP23:%.*]] = bitcast i8** [[TMP22]] to %struct.ST** 168 // CHECK-USE-PPC64LE-NEXT: store %struct.ST* [[ST1]], %struct.ST** [[TMP23]], align 8 169 // CHECK-USE-PPC64LE-NEXT: [[TMP24:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_PTRS]], i32 0, i32 1 170 // CHECK-USE-PPC64LE-NEXT: [[TMP25:%.*]] = bitcast i8** [[TMP24]] to i32** 171 // CHECK-USE-PPC64LE-NEXT: store i32* [[I]], i32** [[TMP25]], align 8 172 // CHECK-USE-PPC64LE-NEXT: [[TMP26:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_MAPPERS]], i64 0, i64 1 173 // CHECK-USE-PPC64LE-NEXT: store i8* null, i8** [[TMP26]], align 8 174 // CHECK-USE-PPC64LE-NEXT: [[TMP27:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 2 175 // CHECK-USE-PPC64LE-NEXT: [[TMP28:%.*]] = bitcast i8** [[TMP27]] to %struct.ST** 176 // CHECK-USE-PPC64LE-NEXT: store %struct.ST* [[ST1]], %struct.ST** [[TMP28]], align 8 177 // CHECK-USE-PPC64LE-NEXT: [[TMP29:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_PTRS]], i32 0, i32 2 178 // CHECK-USE-PPC64LE-NEXT: [[TMP30:%.*]] = bitcast i8** [[TMP29]] to i32** 179 // CHECK-USE-PPC64LE-NEXT: store i32* [[J]], i32** [[TMP30]], align 8 180 // CHECK-USE-PPC64LE-NEXT: [[TMP31:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_MAPPERS]], i64 0, i64 2 181 // CHECK-USE-PPC64LE-NEXT: store i8* null, i8** [[TMP31]], align 8 182 // CHECK-USE-PPC64LE-NEXT: [[TMP32:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 3 183 // CHECK-USE-PPC64LE-NEXT: [[TMP33:%.*]] = bitcast i8** [[TMP32]] to i32** 184 // CHECK-USE-PPC64LE-NEXT: store i32* [[A]], i32** [[TMP33]], align 8 185 // CHECK-USE-PPC64LE-NEXT: [[TMP34:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_PTRS]], i32 0, i32 3 186 // CHECK-USE-PPC64LE-NEXT: [[TMP35:%.*]] = bitcast i8** [[TMP34]] to i32** 187 // CHECK-USE-PPC64LE-NEXT: store i32* [[A]], i32** [[TMP35]], align 8 188 // CHECK-USE-PPC64LE-NEXT: [[TMP36:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_MAPPERS]], i64 0, i64 3 189 // CHECK-USE-PPC64LE-NEXT: store i8* null, i8** [[TMP36]], align 8 190 // CHECK-USE-PPC64LE-NEXT: [[TMP37:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 4 191 // CHECK-USE-PPC64LE-NEXT: [[TMP38:%.*]] = bitcast i8** [[TMP37]] to %struct.ST** 192 // CHECK-USE-PPC64LE-NEXT: store %struct.ST* [[ST2]], %struct.ST** [[TMP38]], align 8 193 // CHECK-USE-PPC64LE-NEXT: [[TMP39:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_PTRS]], i32 0, i32 4 194 // CHECK-USE-PPC64LE-NEXT: [[TMP40:%.*]] = bitcast i8** [[TMP39]] to i32** 195 // CHECK-USE-PPC64LE-NEXT: store i32* [[I1]], i32** [[TMP40]], align 8 196 // CHECK-USE-PPC64LE-NEXT: [[TMP41:%.*]] = getelementptr inbounds [7 x i64], [7 x i64]* [[DOTOFFLOAD_SIZES]], i32 0, i32 4 197 // CHECK-USE-PPC64LE-NEXT: store i64 [[TMP14]], i64* [[TMP41]], align 8 198 // CHECK-USE-PPC64LE-NEXT: [[TMP42:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_MAPPERS]], i64 0, i64 4 199 // CHECK-USE-PPC64LE-NEXT: store i8* null, i8** [[TMP42]], align 8 200 // CHECK-USE-PPC64LE-NEXT: [[TMP43:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 5 201 // CHECK-USE-PPC64LE-NEXT: [[TMP44:%.*]] = bitcast i8** [[TMP43]] to %struct.ST** 202 // CHECK-USE-PPC64LE-NEXT: store %struct.ST* [[ST2]], %struct.ST** [[TMP44]], align 8 203 // CHECK-USE-PPC64LE-NEXT: [[TMP45:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_PTRS]], i32 0, i32 5 204 // CHECK-USE-PPC64LE-NEXT: [[TMP46:%.*]] = bitcast i8** [[TMP45]] to i32** 205 // CHECK-USE-PPC64LE-NEXT: store i32* [[I1]], i32** [[TMP46]], align 8 206 // CHECK-USE-PPC64LE-NEXT: [[TMP47:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_MAPPERS]], i64 0, i64 5 207 // CHECK-USE-PPC64LE-NEXT: store i8* null, i8** [[TMP47]], align 8 208 // CHECK-USE-PPC64LE-NEXT: [[TMP48:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 6 209 // CHECK-USE-PPC64LE-NEXT: [[TMP49:%.*]] = bitcast i8** [[TMP48]] to %struct.ST** 210 // CHECK-USE-PPC64LE-NEXT: store %struct.ST* [[ST2]], %struct.ST** [[TMP49]], align 8 211 // CHECK-USE-PPC64LE-NEXT: [[TMP50:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_PTRS]], i32 0, i32 6 212 // CHECK-USE-PPC64LE-NEXT: [[TMP51:%.*]] = bitcast i8** [[TMP50]] to i32** 213 // CHECK-USE-PPC64LE-NEXT: store i32* [[J2]], i32** [[TMP51]], align 8 214 // CHECK-USE-PPC64LE-NEXT: [[TMP52:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_MAPPERS]], i64 0, i64 6 215 // CHECK-USE-PPC64LE-NEXT: store i8* null, i8** [[TMP52]], align 8 216 // CHECK-USE-PPC64LE-NEXT: [[TMP53:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0 217 // CHECK-USE-PPC64LE-NEXT: [[TMP54:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_PTRS]], i32 0, i32 0 218 // CHECK-USE-PPC64LE-NEXT: [[TMP55:%.*]] = getelementptr inbounds [7 x i64], [7 x i64]* [[DOTOFFLOAD_SIZES]], i32 0, i32 0 219 // CHECK-USE-PPC64LE-NEXT: [[TMP56:%.*]] = call i32 @__tgt_target_mapper(%struct.ident_t* @[[GLOB1:[0-9]+]], i64 -1, i8* @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z20explicit_maps_singlei_l630.region_id, i32 7, i8** [[TMP53]], i8** [[TMP54]], i64* [[TMP55]], i64* getelementptr inbounds ([7 x i64], [7 x i64]* @.offload_maptypes, i32 0, i32 0), i8** null, i8** null) 220 // CHECK-USE-PPC64LE-NEXT: [[TMP57:%.*]] = icmp ne i32 [[TMP56]], 0 221 // CHECK-USE-PPC64LE-NEXT: br i1 [[TMP57]], label [[OMP_OFFLOAD_FAILED:%.*]], label [[OMP_OFFLOAD_CONT:%.*]] 222 // CHECK-USE-PPC64LE: omp_offload.failed: 223 // CHECK-USE-PPC64LE-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z20explicit_maps_singlei_l630(%struct.ST* [[ST1]], i32* [[A]], %struct.ST* [[ST2]]) #[[ATTR3:[0-9]+]] 224 // CHECK-USE-PPC64LE-NEXT: br label [[OMP_OFFLOAD_CONT]] 225 // CHECK-USE-PPC64LE: omp_offload.cont: 226 // CHECK-USE-PPC64LE-NEXT: [[TMP58:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[DOTOFFLOAD_BASEPTRS3]], i32 0, i32 0 227 // CHECK-USE-PPC64LE-NEXT: [[TMP59:%.*]] = bitcast i8** [[TMP58]] to i32** 228 // CHECK-USE-PPC64LE-NEXT: store i32* [[A]], i32** [[TMP59]], align 8 229 // CHECK-USE-PPC64LE-NEXT: [[TMP60:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[DOTOFFLOAD_PTRS4]], i32 0, i32 0 230 // CHECK-USE-PPC64LE-NEXT: [[TMP61:%.*]] = bitcast i8** [[TMP60]] to i32** 231 // CHECK-USE-PPC64LE-NEXT: store i32* [[A]], i32** [[TMP61]], align 8 232 // CHECK-USE-PPC64LE-NEXT: [[TMP62:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[DOTOFFLOAD_MAPPERS5]], i64 0, i64 0 233 // CHECK-USE-PPC64LE-NEXT: store i8* null, i8** [[TMP62]], align 8 234 // CHECK-USE-PPC64LE-NEXT: [[TMP63:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[DOTOFFLOAD_BASEPTRS3]], i32 0, i32 0 235 // CHECK-USE-PPC64LE-NEXT: [[TMP64:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[DOTOFFLOAD_PTRS4]], i32 0, i32 0 236 // CHECK-USE-PPC64LE-NEXT: [[TMP65:%.*]] = call i32 @__tgt_target_mapper(%struct.ident_t* @[[GLOB1]], i64 -1, i8* @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z20explicit_maps_singlei_l644.region_id, i32 1, i8** [[TMP63]], i8** [[TMP64]], i64* getelementptr inbounds ([1 x i64], [1 x i64]* @.offload_sizes.1, i32 0, i32 0), i64* getelementptr inbounds ([1 x i64], [1 x i64]* @.offload_maptypes.2, i32 0, i32 0), i8** null, i8** null) 237 // CHECK-USE-PPC64LE-NEXT: [[TMP66:%.*]] = icmp ne i32 [[TMP65]], 0 238 // CHECK-USE-PPC64LE-NEXT: br i1 [[TMP66]], label [[OMP_OFFLOAD_FAILED6:%.*]], label [[OMP_OFFLOAD_CONT7:%.*]] 239 // CHECK-USE-PPC64LE: omp_offload.failed6: 240 // CHECK-USE-PPC64LE-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z20explicit_maps_singlei_l644(i32* [[A]]) #[[ATTR3]] 241 // CHECK-USE-PPC64LE-NEXT: br label [[OMP_OFFLOAD_CONT7]] 242 // CHECK-USE-PPC64LE: omp_offload.cont7: 243 // CHECK-USE-PPC64LE-NEXT: ret void 244 // 245 // CHECK-USE-I386-LABEL: @_Z20explicit_maps_singlei( 246 // CHECK-USE-I386-NEXT: entry: 247 // CHECK-USE-I386-NEXT: [[II_ADDR:%.*]] = alloca i32, align 4 248 // CHECK-USE-I386-NEXT: [[A:%.*]] = alloca i32, align 4 249 // CHECK-USE-I386-NEXT: [[ST1:%.*]] = alloca [[STRUCT_ST:%.*]], align 4 250 // CHECK-USE-I386-NEXT: [[ST2:%.*]] = alloca [[STRUCT_ST]], align 4 251 // CHECK-USE-I386-NEXT: [[DOTOFFLOAD_BASEPTRS:%.*]] = alloca [7 x i8*], align 4 252 // CHECK-USE-I386-NEXT: [[DOTOFFLOAD_PTRS:%.*]] = alloca [7 x i8*], align 4 253 // CHECK-USE-I386-NEXT: [[DOTOFFLOAD_MAPPERS:%.*]] = alloca [7 x i8*], align 4 254 // CHECK-USE-I386-NEXT: [[DOTOFFLOAD_SIZES:%.*]] = alloca [7 x i64], align 4 255 // CHECK-USE-I386-NEXT: [[DOTOFFLOAD_BASEPTRS3:%.*]] = alloca [1 x i8*], align 4 256 // CHECK-USE-I386-NEXT: [[DOTOFFLOAD_PTRS4:%.*]] = alloca [1 x i8*], align 4 257 // CHECK-USE-I386-NEXT: [[DOTOFFLOAD_MAPPERS5:%.*]] = alloca [1 x i8*], align 4 258 // CHECK-USE-I386-NEXT: store i32 [[II:%.*]], i32* [[II_ADDR]], align 4 259 // CHECK-USE-I386-NEXT: [[TMP0:%.*]] = load i32, i32* [[II_ADDR]], align 4 260 // CHECK-USE-I386-NEXT: store i32 [[TMP0]], i32* [[A]], align 4 261 // CHECK-USE-I386-NEXT: [[I:%.*]] = getelementptr inbounds [[STRUCT_ST]], %struct.ST* [[ST1]], i32 0, i32 0 262 // CHECK-USE-I386-NEXT: [[J:%.*]] = getelementptr inbounds [[STRUCT_ST]], %struct.ST* [[ST1]], i32 0, i32 1 263 // CHECK-USE-I386-NEXT: [[TMP1:%.*]] = getelementptr i32, i32* [[J]], i32 1 264 // CHECK-USE-I386-NEXT: [[TMP2:%.*]] = bitcast i32* [[I]] to i8* 265 // CHECK-USE-I386-NEXT: [[TMP3:%.*]] = bitcast i32* [[TMP1]] to i8* 266 // CHECK-USE-I386-NEXT: [[TMP4:%.*]] = ptrtoint i8* [[TMP3]] to i64 267 // CHECK-USE-I386-NEXT: [[TMP5:%.*]] = ptrtoint i8* [[TMP2]] to i64 268 // CHECK-USE-I386-NEXT: [[TMP6:%.*]] = sub i64 [[TMP4]], [[TMP5]] 269 // CHECK-USE-I386-NEXT: [[TMP7:%.*]] = sdiv exact i64 [[TMP6]], ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64) 270 // CHECK-USE-I386-NEXT: [[I1:%.*]] = getelementptr inbounds [[STRUCT_ST]], %struct.ST* [[ST2]], i32 0, i32 0 271 // CHECK-USE-I386-NEXT: [[J2:%.*]] = getelementptr inbounds [[STRUCT_ST]], %struct.ST* [[ST2]], i32 0, i32 1 272 // CHECK-USE-I386-NEXT: [[TMP8:%.*]] = getelementptr i32, i32* [[J2]], i32 1 273 // CHECK-USE-I386-NEXT: [[TMP9:%.*]] = bitcast i32* [[I1]] to i8* 274 // CHECK-USE-I386-NEXT: [[TMP10:%.*]] = bitcast i32* [[TMP8]] to i8* 275 // CHECK-USE-I386-NEXT: [[TMP11:%.*]] = ptrtoint i8* [[TMP10]] to i64 276 // CHECK-USE-I386-NEXT: [[TMP12:%.*]] = ptrtoint i8* [[TMP9]] to i64 277 // CHECK-USE-I386-NEXT: [[TMP13:%.*]] = sub i64 [[TMP11]], [[TMP12]] 278 // CHECK-USE-I386-NEXT: [[TMP14:%.*]] = sdiv exact i64 [[TMP13]], ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64) 279 // CHECK-USE-I386-NEXT: [[TMP15:%.*]] = bitcast [7 x i64]* [[DOTOFFLOAD_SIZES]] to i8* 280 // CHECK-USE-I386-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 [[TMP15]], i8* align 4 bitcast ([7 x i64]* @.offload_sizes to i8*), i32 56, i1 false) 281 // CHECK-USE-I386-NEXT: [[TMP16:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0 282 // CHECK-USE-I386-NEXT: [[TMP17:%.*]] = bitcast i8** [[TMP16]] to %struct.ST** 283 // CHECK-USE-I386-NEXT: store %struct.ST* [[ST1]], %struct.ST** [[TMP17]], align 4 284 // CHECK-USE-I386-NEXT: [[TMP18:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_PTRS]], i32 0, i32 0 285 // CHECK-USE-I386-NEXT: [[TMP19:%.*]] = bitcast i8** [[TMP18]] to i32** 286 // CHECK-USE-I386-NEXT: store i32* [[I]], i32** [[TMP19]], align 4 287 // CHECK-USE-I386-NEXT: [[TMP20:%.*]] = getelementptr inbounds [7 x i64], [7 x i64]* [[DOTOFFLOAD_SIZES]], i32 0, i32 0 288 // CHECK-USE-I386-NEXT: store i64 [[TMP7]], i64* [[TMP20]], align 4 289 // CHECK-USE-I386-NEXT: [[TMP21:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_MAPPERS]], i32 0, i32 0 290 // CHECK-USE-I386-NEXT: store i8* null, i8** [[TMP21]], align 4 291 // CHECK-USE-I386-NEXT: [[TMP22:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 1 292 // CHECK-USE-I386-NEXT: [[TMP23:%.*]] = bitcast i8** [[TMP22]] to %struct.ST** 293 // CHECK-USE-I386-NEXT: store %struct.ST* [[ST1]], %struct.ST** [[TMP23]], align 4 294 // CHECK-USE-I386-NEXT: [[TMP24:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_PTRS]], i32 0, i32 1 295 // CHECK-USE-I386-NEXT: [[TMP25:%.*]] = bitcast i8** [[TMP24]] to i32** 296 // CHECK-USE-I386-NEXT: store i32* [[I]], i32** [[TMP25]], align 4 297 // CHECK-USE-I386-NEXT: [[TMP26:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_MAPPERS]], i32 0, i32 1 298 // CHECK-USE-I386-NEXT: store i8* null, i8** [[TMP26]], align 4 299 // CHECK-USE-I386-NEXT: [[TMP27:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 2 300 // CHECK-USE-I386-NEXT: [[TMP28:%.*]] = bitcast i8** [[TMP27]] to %struct.ST** 301 // CHECK-USE-I386-NEXT: store %struct.ST* [[ST1]], %struct.ST** [[TMP28]], align 4 302 // CHECK-USE-I386-NEXT: [[TMP29:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_PTRS]], i32 0, i32 2 303 // CHECK-USE-I386-NEXT: [[TMP30:%.*]] = bitcast i8** [[TMP29]] to i32** 304 // CHECK-USE-I386-NEXT: store i32* [[J]], i32** [[TMP30]], align 4 305 // CHECK-USE-I386-NEXT: [[TMP31:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_MAPPERS]], i32 0, i32 2 306 // CHECK-USE-I386-NEXT: store i8* null, i8** [[TMP31]], align 4 307 // CHECK-USE-I386-NEXT: [[TMP32:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 3 308 // CHECK-USE-I386-NEXT: [[TMP33:%.*]] = bitcast i8** [[TMP32]] to i32** 309 // CHECK-USE-I386-NEXT: store i32* [[A]], i32** [[TMP33]], align 4 310 // CHECK-USE-I386-NEXT: [[TMP34:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_PTRS]], i32 0, i32 3 311 // CHECK-USE-I386-NEXT: [[TMP35:%.*]] = bitcast i8** [[TMP34]] to i32** 312 // CHECK-USE-I386-NEXT: store i32* [[A]], i32** [[TMP35]], align 4 313 // CHECK-USE-I386-NEXT: [[TMP36:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_MAPPERS]], i32 0, i32 3 314 // CHECK-USE-I386-NEXT: store i8* null, i8** [[TMP36]], align 4 315 // CHECK-USE-I386-NEXT: [[TMP37:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 4 316 // CHECK-USE-I386-NEXT: [[TMP38:%.*]] = bitcast i8** [[TMP37]] to %struct.ST** 317 // CHECK-USE-I386-NEXT: store %struct.ST* [[ST2]], %struct.ST** [[TMP38]], align 4 318 // CHECK-USE-I386-NEXT: [[TMP39:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_PTRS]], i32 0, i32 4 319 // CHECK-USE-I386-NEXT: [[TMP40:%.*]] = bitcast i8** [[TMP39]] to i32** 320 // CHECK-USE-I386-NEXT: store i32* [[I1]], i32** [[TMP40]], align 4 321 // CHECK-USE-I386-NEXT: [[TMP41:%.*]] = getelementptr inbounds [7 x i64], [7 x i64]* [[DOTOFFLOAD_SIZES]], i32 0, i32 4 322 // CHECK-USE-I386-NEXT: store i64 [[TMP14]], i64* [[TMP41]], align 4 323 // CHECK-USE-I386-NEXT: [[TMP42:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_MAPPERS]], i32 0, i32 4 324 // CHECK-USE-I386-NEXT: store i8* null, i8** [[TMP42]], align 4 325 // CHECK-USE-I386-NEXT: [[TMP43:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 5 326 // CHECK-USE-I386-NEXT: [[TMP44:%.*]] = bitcast i8** [[TMP43]] to %struct.ST** 327 // CHECK-USE-I386-NEXT: store %struct.ST* [[ST2]], %struct.ST** [[TMP44]], align 4 328 // CHECK-USE-I386-NEXT: [[TMP45:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_PTRS]], i32 0, i32 5 329 // CHECK-USE-I386-NEXT: [[TMP46:%.*]] = bitcast i8** [[TMP45]] to i32** 330 // CHECK-USE-I386-NEXT: store i32* [[I1]], i32** [[TMP46]], align 4 331 // CHECK-USE-I386-NEXT: [[TMP47:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_MAPPERS]], i32 0, i32 5 332 // CHECK-USE-I386-NEXT: store i8* null, i8** [[TMP47]], align 4 333 // CHECK-USE-I386-NEXT: [[TMP48:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 6 334 // CHECK-USE-I386-NEXT: [[TMP49:%.*]] = bitcast i8** [[TMP48]] to %struct.ST** 335 // CHECK-USE-I386-NEXT: store %struct.ST* [[ST2]], %struct.ST** [[TMP49]], align 4 336 // CHECK-USE-I386-NEXT: [[TMP50:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_PTRS]], i32 0, i32 6 337 // CHECK-USE-I386-NEXT: [[TMP51:%.*]] = bitcast i8** [[TMP50]] to i32** 338 // CHECK-USE-I386-NEXT: store i32* [[J2]], i32** [[TMP51]], align 4 339 // CHECK-USE-I386-NEXT: [[TMP52:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_MAPPERS]], i32 0, i32 6 340 // CHECK-USE-I386-NEXT: store i8* null, i8** [[TMP52]], align 4 341 // CHECK-USE-I386-NEXT: [[TMP53:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0 342 // CHECK-USE-I386-NEXT: [[TMP54:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_PTRS]], i32 0, i32 0 343 // CHECK-USE-I386-NEXT: [[TMP55:%.*]] = getelementptr inbounds [7 x i64], [7 x i64]* [[DOTOFFLOAD_SIZES]], i32 0, i32 0 344 // CHECK-USE-I386-NEXT: [[TMP56:%.*]] = call i32 @__tgt_target_mapper(%struct.ident_t* @[[GLOB1:[0-9]+]], i64 -1, i8* @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z20explicit_maps_singlei_l630.region_id, i32 7, i8** [[TMP53]], i8** [[TMP54]], i64* [[TMP55]], i64* getelementptr inbounds ([7 x i64], [7 x i64]* @.offload_maptypes, i32 0, i32 0), i8** null, i8** null) 345 // CHECK-USE-I386-NEXT: [[TMP57:%.*]] = icmp ne i32 [[TMP56]], 0 346 // CHECK-USE-I386-NEXT: br i1 [[TMP57]], label [[OMP_OFFLOAD_FAILED:%.*]], label [[OMP_OFFLOAD_CONT:%.*]] 347 // CHECK-USE-I386: omp_offload.failed: 348 // CHECK-USE-I386-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z20explicit_maps_singlei_l630(%struct.ST* [[ST1]], i32* [[A]], %struct.ST* [[ST2]]) #[[ATTR3:[0-9]+]] 349 // CHECK-USE-I386-NEXT: br label [[OMP_OFFLOAD_CONT]] 350 // CHECK-USE-I386: omp_offload.cont: 351 // CHECK-USE-I386-NEXT: [[TMP58:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[DOTOFFLOAD_BASEPTRS3]], i32 0, i32 0 352 // CHECK-USE-I386-NEXT: [[TMP59:%.*]] = bitcast i8** [[TMP58]] to i32** 353 // CHECK-USE-I386-NEXT: store i32* [[A]], i32** [[TMP59]], align 4 354 // CHECK-USE-I386-NEXT: [[TMP60:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[DOTOFFLOAD_PTRS4]], i32 0, i32 0 355 // CHECK-USE-I386-NEXT: [[TMP61:%.*]] = bitcast i8** [[TMP60]] to i32** 356 // CHECK-USE-I386-NEXT: store i32* [[A]], i32** [[TMP61]], align 4 357 // CHECK-USE-I386-NEXT: [[TMP62:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[DOTOFFLOAD_MAPPERS5]], i32 0, i32 0 358 // CHECK-USE-I386-NEXT: store i8* null, i8** [[TMP62]], align 4 359 // CHECK-USE-I386-NEXT: [[TMP63:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[DOTOFFLOAD_BASEPTRS3]], i32 0, i32 0 360 // CHECK-USE-I386-NEXT: [[TMP64:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[DOTOFFLOAD_PTRS4]], i32 0, i32 0 361 // CHECK-USE-I386-NEXT: [[TMP65:%.*]] = call i32 @__tgt_target_mapper(%struct.ident_t* @[[GLOB1]], i64 -1, i8* @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z20explicit_maps_singlei_l644.region_id, i32 1, i8** [[TMP63]], i8** [[TMP64]], i64* getelementptr inbounds ([1 x i64], [1 x i64]* @.offload_sizes.1, i32 0, i32 0), i64* getelementptr inbounds ([1 x i64], [1 x i64]* @.offload_maptypes.2, i32 0, i32 0), i8** null, i8** null) 362 // CHECK-USE-I386-NEXT: [[TMP66:%.*]] = icmp ne i32 [[TMP65]], 0 363 // CHECK-USE-I386-NEXT: br i1 [[TMP66]], label [[OMP_OFFLOAD_FAILED6:%.*]], label [[OMP_OFFLOAD_CONT7:%.*]] 364 // CHECK-USE-I386: omp_offload.failed6: 365 // CHECK-USE-I386-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z20explicit_maps_singlei_l644(i32* [[A]]) #[[ATTR3]] 366 // CHECK-USE-I386-NEXT: br label [[OMP_OFFLOAD_CONT7]] 367 // CHECK-USE-I386: omp_offload.cont7: 368 // CHECK-USE-I386-NEXT: ret void 369 // 370 // CHECK-NOUSE-PPC64LE-LABEL: @_Z20explicit_maps_singlei( 371 // CHECK-NOUSE-PPC64LE-NEXT: entry: 372 // CHECK-NOUSE-PPC64LE-NEXT: [[II_ADDR:%.*]] = alloca i32, align 4 373 // CHECK-NOUSE-PPC64LE-NEXT: [[A:%.*]] = alloca i32, align 4 374 // CHECK-NOUSE-PPC64LE-NEXT: [[ST1:%.*]] = alloca [[STRUCT_ST:%.*]], align 4 375 // CHECK-NOUSE-PPC64LE-NEXT: [[ST2:%.*]] = alloca [[STRUCT_ST]], align 4 376 // CHECK-NOUSE-PPC64LE-NEXT: [[DOTOFFLOAD_BASEPTRS:%.*]] = alloca [7 x i8*], align 8 377 // CHECK-NOUSE-PPC64LE-NEXT: [[DOTOFFLOAD_PTRS:%.*]] = alloca [7 x i8*], align 8 378 // CHECK-NOUSE-PPC64LE-NEXT: [[DOTOFFLOAD_MAPPERS:%.*]] = alloca [7 x i8*], align 8 379 // CHECK-NOUSE-PPC64LE-NEXT: [[DOTOFFLOAD_SIZES:%.*]] = alloca [7 x i64], align 8 380 // CHECK-NOUSE-PPC64LE-NEXT: [[DOTOFFLOAD_BASEPTRS3:%.*]] = alloca [1 x i8*], align 8 381 // CHECK-NOUSE-PPC64LE-NEXT: [[DOTOFFLOAD_PTRS4:%.*]] = alloca [1 x i8*], align 8 382 // CHECK-NOUSE-PPC64LE-NEXT: [[DOTOFFLOAD_MAPPERS5:%.*]] = alloca [1 x i8*], align 8 383 // CHECK-NOUSE-PPC64LE-NEXT: store i32 [[II:%.*]], i32* [[II_ADDR]], align 4 384 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP0:%.*]] = load i32, i32* [[II_ADDR]], align 4 385 // CHECK-NOUSE-PPC64LE-NEXT: store i32 [[TMP0]], i32* [[A]], align 4 386 // CHECK-NOUSE-PPC64LE-NEXT: [[I:%.*]] = getelementptr inbounds [[STRUCT_ST]], %struct.ST* [[ST1]], i32 0, i32 0 387 // CHECK-NOUSE-PPC64LE-NEXT: [[J:%.*]] = getelementptr inbounds [[STRUCT_ST]], %struct.ST* [[ST1]], i32 0, i32 1 388 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP1:%.*]] = getelementptr i32, i32* [[J]], i32 1 389 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP2:%.*]] = bitcast i32* [[I]] to i8* 390 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP3:%.*]] = bitcast i32* [[TMP1]] to i8* 391 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP4:%.*]] = ptrtoint i8* [[TMP3]] to i64 392 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP5:%.*]] = ptrtoint i8* [[TMP2]] to i64 393 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP6:%.*]] = sub i64 [[TMP4]], [[TMP5]] 394 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP7:%.*]] = sdiv exact i64 [[TMP6]], ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64) 395 // CHECK-NOUSE-PPC64LE-NEXT: [[I1:%.*]] = getelementptr inbounds [[STRUCT_ST]], %struct.ST* [[ST2]], i32 0, i32 0 396 // CHECK-NOUSE-PPC64LE-NEXT: [[J2:%.*]] = getelementptr inbounds [[STRUCT_ST]], %struct.ST* [[ST2]], i32 0, i32 1 397 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP8:%.*]] = getelementptr i32, i32* [[J2]], i32 1 398 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP9:%.*]] = bitcast i32* [[I1]] to i8* 399 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP10:%.*]] = bitcast i32* [[TMP8]] to i8* 400 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP11:%.*]] = ptrtoint i8* [[TMP10]] to i64 401 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP12:%.*]] = ptrtoint i8* [[TMP9]] to i64 402 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP13:%.*]] = sub i64 [[TMP11]], [[TMP12]] 403 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP14:%.*]] = sdiv exact i64 [[TMP13]], ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64) 404 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP15:%.*]] = bitcast [7 x i64]* [[DOTOFFLOAD_SIZES]] to i8* 405 // CHECK-NOUSE-PPC64LE-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 [[TMP15]], i8* align 8 bitcast ([7 x i64]* @.offload_sizes to i8*), i64 56, i1 false) 406 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP16:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0 407 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP17:%.*]] = bitcast i8** [[TMP16]] to %struct.ST** 408 // CHECK-NOUSE-PPC64LE-NEXT: store %struct.ST* [[ST1]], %struct.ST** [[TMP17]], align 8 409 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP18:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_PTRS]], i32 0, i32 0 410 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP19:%.*]] = bitcast i8** [[TMP18]] to i32** 411 // CHECK-NOUSE-PPC64LE-NEXT: store i32* [[I]], i32** [[TMP19]], align 8 412 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP20:%.*]] = getelementptr inbounds [7 x i64], [7 x i64]* [[DOTOFFLOAD_SIZES]], i32 0, i32 0 413 // CHECK-NOUSE-PPC64LE-NEXT: store i64 [[TMP7]], i64* [[TMP20]], align 8 414 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP21:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_MAPPERS]], i64 0, i64 0 415 // CHECK-NOUSE-PPC64LE-NEXT: store i8* null, i8** [[TMP21]], align 8 416 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP22:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 1 417 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP23:%.*]] = bitcast i8** [[TMP22]] to %struct.ST** 418 // CHECK-NOUSE-PPC64LE-NEXT: store %struct.ST* [[ST1]], %struct.ST** [[TMP23]], align 8 419 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP24:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_PTRS]], i32 0, i32 1 420 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP25:%.*]] = bitcast i8** [[TMP24]] to i32** 421 // CHECK-NOUSE-PPC64LE-NEXT: store i32* [[I]], i32** [[TMP25]], align 8 422 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP26:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_MAPPERS]], i64 0, i64 1 423 // CHECK-NOUSE-PPC64LE-NEXT: store i8* null, i8** [[TMP26]], align 8 424 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP27:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 2 425 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP28:%.*]] = bitcast i8** [[TMP27]] to %struct.ST** 426 // CHECK-NOUSE-PPC64LE-NEXT: store %struct.ST* [[ST1]], %struct.ST** [[TMP28]], align 8 427 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP29:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_PTRS]], i32 0, i32 2 428 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP30:%.*]] = bitcast i8** [[TMP29]] to i32** 429 // CHECK-NOUSE-PPC64LE-NEXT: store i32* [[J]], i32** [[TMP30]], align 8 430 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP31:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_MAPPERS]], i64 0, i64 2 431 // CHECK-NOUSE-PPC64LE-NEXT: store i8* null, i8** [[TMP31]], align 8 432 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP32:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 3 433 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP33:%.*]] = bitcast i8** [[TMP32]] to i32** 434 // CHECK-NOUSE-PPC64LE-NEXT: store i32* [[A]], i32** [[TMP33]], align 8 435 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP34:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_PTRS]], i32 0, i32 3 436 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP35:%.*]] = bitcast i8** [[TMP34]] to i32** 437 // CHECK-NOUSE-PPC64LE-NEXT: store i32* [[A]], i32** [[TMP35]], align 8 438 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP36:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_MAPPERS]], i64 0, i64 3 439 // CHECK-NOUSE-PPC64LE-NEXT: store i8* null, i8** [[TMP36]], align 8 440 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP37:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 4 441 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP38:%.*]] = bitcast i8** [[TMP37]] to %struct.ST** 442 // CHECK-NOUSE-PPC64LE-NEXT: store %struct.ST* [[ST2]], %struct.ST** [[TMP38]], align 8 443 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP39:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_PTRS]], i32 0, i32 4 444 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP40:%.*]] = bitcast i8** [[TMP39]] to i32** 445 // CHECK-NOUSE-PPC64LE-NEXT: store i32* [[I1]], i32** [[TMP40]], align 8 446 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP41:%.*]] = getelementptr inbounds [7 x i64], [7 x i64]* [[DOTOFFLOAD_SIZES]], i32 0, i32 4 447 // CHECK-NOUSE-PPC64LE-NEXT: store i64 [[TMP14]], i64* [[TMP41]], align 8 448 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP42:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_MAPPERS]], i64 0, i64 4 449 // CHECK-NOUSE-PPC64LE-NEXT: store i8* null, i8** [[TMP42]], align 8 450 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP43:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 5 451 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP44:%.*]] = bitcast i8** [[TMP43]] to %struct.ST** 452 // CHECK-NOUSE-PPC64LE-NEXT: store %struct.ST* [[ST2]], %struct.ST** [[TMP44]], align 8 453 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP45:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_PTRS]], i32 0, i32 5 454 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP46:%.*]] = bitcast i8** [[TMP45]] to i32** 455 // CHECK-NOUSE-PPC64LE-NEXT: store i32* [[I1]], i32** [[TMP46]], align 8 456 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP47:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_MAPPERS]], i64 0, i64 5 457 // CHECK-NOUSE-PPC64LE-NEXT: store i8* null, i8** [[TMP47]], align 8 458 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP48:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 6 459 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP49:%.*]] = bitcast i8** [[TMP48]] to %struct.ST** 460 // CHECK-NOUSE-PPC64LE-NEXT: store %struct.ST* [[ST2]], %struct.ST** [[TMP49]], align 8 461 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP50:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_PTRS]], i32 0, i32 6 462 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP51:%.*]] = bitcast i8** [[TMP50]] to i32** 463 // CHECK-NOUSE-PPC64LE-NEXT: store i32* [[J2]], i32** [[TMP51]], align 8 464 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP52:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_MAPPERS]], i64 0, i64 6 465 // CHECK-NOUSE-PPC64LE-NEXT: store i8* null, i8** [[TMP52]], align 8 466 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP53:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0 467 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP54:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_PTRS]], i32 0, i32 0 468 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP55:%.*]] = getelementptr inbounds [7 x i64], [7 x i64]* [[DOTOFFLOAD_SIZES]], i32 0, i32 0 469 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP56:%.*]] = call i32 @__tgt_target_mapper(%struct.ident_t* @[[GLOB1:[0-9]+]], i64 -1, i8* @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z20explicit_maps_singlei_l630.region_id, i32 7, i8** [[TMP53]], i8** [[TMP54]], i64* [[TMP55]], i64* getelementptr inbounds ([7 x i64], [7 x i64]* @.offload_maptypes, i32 0, i32 0), i8** null, i8** null) 470 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP57:%.*]] = icmp ne i32 [[TMP56]], 0 471 // CHECK-NOUSE-PPC64LE-NEXT: br i1 [[TMP57]], label [[OMP_OFFLOAD_FAILED:%.*]], label [[OMP_OFFLOAD_CONT:%.*]] 472 // CHECK-NOUSE-PPC64LE: omp_offload.failed: 473 // CHECK-NOUSE-PPC64LE-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z20explicit_maps_singlei_l630() #[[ATTR3:[0-9]+]] 474 // CHECK-NOUSE-PPC64LE-NEXT: br label [[OMP_OFFLOAD_CONT]] 475 // CHECK-NOUSE-PPC64LE: omp_offload.cont: 476 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP58:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[DOTOFFLOAD_BASEPTRS3]], i32 0, i32 0 477 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP59:%.*]] = bitcast i8** [[TMP58]] to i32** 478 // CHECK-NOUSE-PPC64LE-NEXT: store i32* [[A]], i32** [[TMP59]], align 8 479 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP60:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[DOTOFFLOAD_PTRS4]], i32 0, i32 0 480 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP61:%.*]] = bitcast i8** [[TMP60]] to i32** 481 // CHECK-NOUSE-PPC64LE-NEXT: store i32* [[A]], i32** [[TMP61]], align 8 482 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP62:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[DOTOFFLOAD_MAPPERS5]], i64 0, i64 0 483 // CHECK-NOUSE-PPC64LE-NEXT: store i8* null, i8** [[TMP62]], align 8 484 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP63:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[DOTOFFLOAD_BASEPTRS3]], i32 0, i32 0 485 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP64:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[DOTOFFLOAD_PTRS4]], i32 0, i32 0 486 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP65:%.*]] = call i32 @__tgt_target_mapper(%struct.ident_t* @[[GLOB1]], i64 -1, i8* @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z20explicit_maps_singlei_l644.region_id, i32 1, i8** [[TMP63]], i8** [[TMP64]], i64* getelementptr inbounds ([1 x i64], [1 x i64]* @.offload_sizes.1, i32 0, i32 0), i64* getelementptr inbounds ([1 x i64], [1 x i64]* @.offload_maptypes.2, i32 0, i32 0), i8** null, i8** null) 487 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP66:%.*]] = icmp ne i32 [[TMP65]], 0 488 // CHECK-NOUSE-PPC64LE-NEXT: br i1 [[TMP66]], label [[OMP_OFFLOAD_FAILED6:%.*]], label [[OMP_OFFLOAD_CONT7:%.*]] 489 // CHECK-NOUSE-PPC64LE: omp_offload.failed6: 490 // CHECK-NOUSE-PPC64LE-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z20explicit_maps_singlei_l644() #[[ATTR3]] 491 // CHECK-NOUSE-PPC64LE-NEXT: br label [[OMP_OFFLOAD_CONT7]] 492 // CHECK-NOUSE-PPC64LE: omp_offload.cont7: 493 // CHECK-NOUSE-PPC64LE-NEXT: ret void 494 // 495 // CHECK-NOUSE-I386-LABEL: @_Z20explicit_maps_singlei( 496 // CHECK-NOUSE-I386-NEXT: entry: 497 // CHECK-NOUSE-I386-NEXT: [[II_ADDR:%.*]] = alloca i32, align 4 498 // CHECK-NOUSE-I386-NEXT: [[A:%.*]] = alloca i32, align 4 499 // CHECK-NOUSE-I386-NEXT: [[ST1:%.*]] = alloca [[STRUCT_ST:%.*]], align 4 500 // CHECK-NOUSE-I386-NEXT: [[ST2:%.*]] = alloca [[STRUCT_ST]], align 4 501 // CHECK-NOUSE-I386-NEXT: [[DOTOFFLOAD_BASEPTRS:%.*]] = alloca [7 x i8*], align 4 502 // CHECK-NOUSE-I386-NEXT: [[DOTOFFLOAD_PTRS:%.*]] = alloca [7 x i8*], align 4 503 // CHECK-NOUSE-I386-NEXT: [[DOTOFFLOAD_MAPPERS:%.*]] = alloca [7 x i8*], align 4 504 // CHECK-NOUSE-I386-NEXT: [[DOTOFFLOAD_SIZES:%.*]] = alloca [7 x i64], align 4 505 // CHECK-NOUSE-I386-NEXT: [[DOTOFFLOAD_BASEPTRS3:%.*]] = alloca [1 x i8*], align 4 506 // CHECK-NOUSE-I386-NEXT: [[DOTOFFLOAD_PTRS4:%.*]] = alloca [1 x i8*], align 4 507 // CHECK-NOUSE-I386-NEXT: [[DOTOFFLOAD_MAPPERS5:%.*]] = alloca [1 x i8*], align 4 508 // CHECK-NOUSE-I386-NEXT: store i32 [[II:%.*]], i32* [[II_ADDR]], align 4 509 // CHECK-NOUSE-I386-NEXT: [[TMP0:%.*]] = load i32, i32* [[II_ADDR]], align 4 510 // CHECK-NOUSE-I386-NEXT: store i32 [[TMP0]], i32* [[A]], align 4 511 // CHECK-NOUSE-I386-NEXT: [[I:%.*]] = getelementptr inbounds [[STRUCT_ST]], %struct.ST* [[ST1]], i32 0, i32 0 512 // CHECK-NOUSE-I386-NEXT: [[J:%.*]] = getelementptr inbounds [[STRUCT_ST]], %struct.ST* [[ST1]], i32 0, i32 1 513 // CHECK-NOUSE-I386-NEXT: [[TMP1:%.*]] = getelementptr i32, i32* [[J]], i32 1 514 // CHECK-NOUSE-I386-NEXT: [[TMP2:%.*]] = bitcast i32* [[I]] to i8* 515 // CHECK-NOUSE-I386-NEXT: [[TMP3:%.*]] = bitcast i32* [[TMP1]] to i8* 516 // CHECK-NOUSE-I386-NEXT: [[TMP4:%.*]] = ptrtoint i8* [[TMP3]] to i64 517 // CHECK-NOUSE-I386-NEXT: [[TMP5:%.*]] = ptrtoint i8* [[TMP2]] to i64 518 // CHECK-NOUSE-I386-NEXT: [[TMP6:%.*]] = sub i64 [[TMP4]], [[TMP5]] 519 // CHECK-NOUSE-I386-NEXT: [[TMP7:%.*]] = sdiv exact i64 [[TMP6]], ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64) 520 // CHECK-NOUSE-I386-NEXT: [[I1:%.*]] = getelementptr inbounds [[STRUCT_ST]], %struct.ST* [[ST2]], i32 0, i32 0 521 // CHECK-NOUSE-I386-NEXT: [[J2:%.*]] = getelementptr inbounds [[STRUCT_ST]], %struct.ST* [[ST2]], i32 0, i32 1 522 // CHECK-NOUSE-I386-NEXT: [[TMP8:%.*]] = getelementptr i32, i32* [[J2]], i32 1 523 // CHECK-NOUSE-I386-NEXT: [[TMP9:%.*]] = bitcast i32* [[I1]] to i8* 524 // CHECK-NOUSE-I386-NEXT: [[TMP10:%.*]] = bitcast i32* [[TMP8]] to i8* 525 // CHECK-NOUSE-I386-NEXT: [[TMP11:%.*]] = ptrtoint i8* [[TMP10]] to i64 526 // CHECK-NOUSE-I386-NEXT: [[TMP12:%.*]] = ptrtoint i8* [[TMP9]] to i64 527 // CHECK-NOUSE-I386-NEXT: [[TMP13:%.*]] = sub i64 [[TMP11]], [[TMP12]] 528 // CHECK-NOUSE-I386-NEXT: [[TMP14:%.*]] = sdiv exact i64 [[TMP13]], ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64) 529 // CHECK-NOUSE-I386-NEXT: [[TMP15:%.*]] = bitcast [7 x i64]* [[DOTOFFLOAD_SIZES]] to i8* 530 // CHECK-NOUSE-I386-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 [[TMP15]], i8* align 4 bitcast ([7 x i64]* @.offload_sizes to i8*), i32 56, i1 false) 531 // CHECK-NOUSE-I386-NEXT: [[TMP16:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0 532 // CHECK-NOUSE-I386-NEXT: [[TMP17:%.*]] = bitcast i8** [[TMP16]] to %struct.ST** 533 // CHECK-NOUSE-I386-NEXT: store %struct.ST* [[ST1]], %struct.ST** [[TMP17]], align 4 534 // CHECK-NOUSE-I386-NEXT: [[TMP18:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_PTRS]], i32 0, i32 0 535 // CHECK-NOUSE-I386-NEXT: [[TMP19:%.*]] = bitcast i8** [[TMP18]] to i32** 536 // CHECK-NOUSE-I386-NEXT: store i32* [[I]], i32** [[TMP19]], align 4 537 // CHECK-NOUSE-I386-NEXT: [[TMP20:%.*]] = getelementptr inbounds [7 x i64], [7 x i64]* [[DOTOFFLOAD_SIZES]], i32 0, i32 0 538 // CHECK-NOUSE-I386-NEXT: store i64 [[TMP7]], i64* [[TMP20]], align 4 539 // CHECK-NOUSE-I386-NEXT: [[TMP21:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_MAPPERS]], i32 0, i32 0 540 // CHECK-NOUSE-I386-NEXT: store i8* null, i8** [[TMP21]], align 4 541 // CHECK-NOUSE-I386-NEXT: [[TMP22:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 1 542 // CHECK-NOUSE-I386-NEXT: [[TMP23:%.*]] = bitcast i8** [[TMP22]] to %struct.ST** 543 // CHECK-NOUSE-I386-NEXT: store %struct.ST* [[ST1]], %struct.ST** [[TMP23]], align 4 544 // CHECK-NOUSE-I386-NEXT: [[TMP24:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_PTRS]], i32 0, i32 1 545 // CHECK-NOUSE-I386-NEXT: [[TMP25:%.*]] = bitcast i8** [[TMP24]] to i32** 546 // CHECK-NOUSE-I386-NEXT: store i32* [[I]], i32** [[TMP25]], align 4 547 // CHECK-NOUSE-I386-NEXT: [[TMP26:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_MAPPERS]], i32 0, i32 1 548 // CHECK-NOUSE-I386-NEXT: store i8* null, i8** [[TMP26]], align 4 549 // CHECK-NOUSE-I386-NEXT: [[TMP27:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 2 550 // CHECK-NOUSE-I386-NEXT: [[TMP28:%.*]] = bitcast i8** [[TMP27]] to %struct.ST** 551 // CHECK-NOUSE-I386-NEXT: store %struct.ST* [[ST1]], %struct.ST** [[TMP28]], align 4 552 // CHECK-NOUSE-I386-NEXT: [[TMP29:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_PTRS]], i32 0, i32 2 553 // CHECK-NOUSE-I386-NEXT: [[TMP30:%.*]] = bitcast i8** [[TMP29]] to i32** 554 // CHECK-NOUSE-I386-NEXT: store i32* [[J]], i32** [[TMP30]], align 4 555 // CHECK-NOUSE-I386-NEXT: [[TMP31:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_MAPPERS]], i32 0, i32 2 556 // CHECK-NOUSE-I386-NEXT: store i8* null, i8** [[TMP31]], align 4 557 // CHECK-NOUSE-I386-NEXT: [[TMP32:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 3 558 // CHECK-NOUSE-I386-NEXT: [[TMP33:%.*]] = bitcast i8** [[TMP32]] to i32** 559 // CHECK-NOUSE-I386-NEXT: store i32* [[A]], i32** [[TMP33]], align 4 560 // CHECK-NOUSE-I386-NEXT: [[TMP34:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_PTRS]], i32 0, i32 3 561 // CHECK-NOUSE-I386-NEXT: [[TMP35:%.*]] = bitcast i8** [[TMP34]] to i32** 562 // CHECK-NOUSE-I386-NEXT: store i32* [[A]], i32** [[TMP35]], align 4 563 // CHECK-NOUSE-I386-NEXT: [[TMP36:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_MAPPERS]], i32 0, i32 3 564 // CHECK-NOUSE-I386-NEXT: store i8* null, i8** [[TMP36]], align 4 565 // CHECK-NOUSE-I386-NEXT: [[TMP37:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 4 566 // CHECK-NOUSE-I386-NEXT: [[TMP38:%.*]] = bitcast i8** [[TMP37]] to %struct.ST** 567 // CHECK-NOUSE-I386-NEXT: store %struct.ST* [[ST2]], %struct.ST** [[TMP38]], align 4 568 // CHECK-NOUSE-I386-NEXT: [[TMP39:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_PTRS]], i32 0, i32 4 569 // CHECK-NOUSE-I386-NEXT: [[TMP40:%.*]] = bitcast i8** [[TMP39]] to i32** 570 // CHECK-NOUSE-I386-NEXT: store i32* [[I1]], i32** [[TMP40]], align 4 571 // CHECK-NOUSE-I386-NEXT: [[TMP41:%.*]] = getelementptr inbounds [7 x i64], [7 x i64]* [[DOTOFFLOAD_SIZES]], i32 0, i32 4 572 // CHECK-NOUSE-I386-NEXT: store i64 [[TMP14]], i64* [[TMP41]], align 4 573 // CHECK-NOUSE-I386-NEXT: [[TMP42:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_MAPPERS]], i32 0, i32 4 574 // CHECK-NOUSE-I386-NEXT: store i8* null, i8** [[TMP42]], align 4 575 // CHECK-NOUSE-I386-NEXT: [[TMP43:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 5 576 // CHECK-NOUSE-I386-NEXT: [[TMP44:%.*]] = bitcast i8** [[TMP43]] to %struct.ST** 577 // CHECK-NOUSE-I386-NEXT: store %struct.ST* [[ST2]], %struct.ST** [[TMP44]], align 4 578 // CHECK-NOUSE-I386-NEXT: [[TMP45:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_PTRS]], i32 0, i32 5 579 // CHECK-NOUSE-I386-NEXT: [[TMP46:%.*]] = bitcast i8** [[TMP45]] to i32** 580 // CHECK-NOUSE-I386-NEXT: store i32* [[I1]], i32** [[TMP46]], align 4 581 // CHECK-NOUSE-I386-NEXT: [[TMP47:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_MAPPERS]], i32 0, i32 5 582 // CHECK-NOUSE-I386-NEXT: store i8* null, i8** [[TMP47]], align 4 583 // CHECK-NOUSE-I386-NEXT: [[TMP48:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 6 584 // CHECK-NOUSE-I386-NEXT: [[TMP49:%.*]] = bitcast i8** [[TMP48]] to %struct.ST** 585 // CHECK-NOUSE-I386-NEXT: store %struct.ST* [[ST2]], %struct.ST** [[TMP49]], align 4 586 // CHECK-NOUSE-I386-NEXT: [[TMP50:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_PTRS]], i32 0, i32 6 587 // CHECK-NOUSE-I386-NEXT: [[TMP51:%.*]] = bitcast i8** [[TMP50]] to i32** 588 // CHECK-NOUSE-I386-NEXT: store i32* [[J2]], i32** [[TMP51]], align 4 589 // CHECK-NOUSE-I386-NEXT: [[TMP52:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_MAPPERS]], i32 0, i32 6 590 // CHECK-NOUSE-I386-NEXT: store i8* null, i8** [[TMP52]], align 4 591 // CHECK-NOUSE-I386-NEXT: [[TMP53:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0 592 // CHECK-NOUSE-I386-NEXT: [[TMP54:%.*]] = getelementptr inbounds [7 x i8*], [7 x i8*]* [[DOTOFFLOAD_PTRS]], i32 0, i32 0 593 // CHECK-NOUSE-I386-NEXT: [[TMP55:%.*]] = getelementptr inbounds [7 x i64], [7 x i64]* [[DOTOFFLOAD_SIZES]], i32 0, i32 0 594 // CHECK-NOUSE-I386-NEXT: [[TMP56:%.*]] = call i32 @__tgt_target_mapper(%struct.ident_t* @[[GLOB1:[0-9]+]], i64 -1, i8* @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z20explicit_maps_singlei_l630.region_id, i32 7, i8** [[TMP53]], i8** [[TMP54]], i64* [[TMP55]], i64* getelementptr inbounds ([7 x i64], [7 x i64]* @.offload_maptypes, i32 0, i32 0), i8** null, i8** null) 595 // CHECK-NOUSE-I386-NEXT: [[TMP57:%.*]] = icmp ne i32 [[TMP56]], 0 596 // CHECK-NOUSE-I386-NEXT: br i1 [[TMP57]], label [[OMP_OFFLOAD_FAILED:%.*]], label [[OMP_OFFLOAD_CONT:%.*]] 597 // CHECK-NOUSE-I386: omp_offload.failed: 598 // CHECK-NOUSE-I386-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z20explicit_maps_singlei_l630() #[[ATTR3:[0-9]+]] 599 // CHECK-NOUSE-I386-NEXT: br label [[OMP_OFFLOAD_CONT]] 600 // CHECK-NOUSE-I386: omp_offload.cont: 601 // CHECK-NOUSE-I386-NEXT: [[TMP58:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[DOTOFFLOAD_BASEPTRS3]], i32 0, i32 0 602 // CHECK-NOUSE-I386-NEXT: [[TMP59:%.*]] = bitcast i8** [[TMP58]] to i32** 603 // CHECK-NOUSE-I386-NEXT: store i32* [[A]], i32** [[TMP59]], align 4 604 // CHECK-NOUSE-I386-NEXT: [[TMP60:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[DOTOFFLOAD_PTRS4]], i32 0, i32 0 605 // CHECK-NOUSE-I386-NEXT: [[TMP61:%.*]] = bitcast i8** [[TMP60]] to i32** 606 // CHECK-NOUSE-I386-NEXT: store i32* [[A]], i32** [[TMP61]], align 4 607 // CHECK-NOUSE-I386-NEXT: [[TMP62:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[DOTOFFLOAD_MAPPERS5]], i32 0, i32 0 608 // CHECK-NOUSE-I386-NEXT: store i8* null, i8** [[TMP62]], align 4 609 // CHECK-NOUSE-I386-NEXT: [[TMP63:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[DOTOFFLOAD_BASEPTRS3]], i32 0, i32 0 610 // CHECK-NOUSE-I386-NEXT: [[TMP64:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[DOTOFFLOAD_PTRS4]], i32 0, i32 0 611 // CHECK-NOUSE-I386-NEXT: [[TMP65:%.*]] = call i32 @__tgt_target_mapper(%struct.ident_t* @[[GLOB1]], i64 -1, i8* @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z20explicit_maps_singlei_l644.region_id, i32 1, i8** [[TMP63]], i8** [[TMP64]], i64* getelementptr inbounds ([1 x i64], [1 x i64]* @.offload_sizes.1, i32 0, i32 0), i64* getelementptr inbounds ([1 x i64], [1 x i64]* @.offload_maptypes.2, i32 0, i32 0), i8** null, i8** null) 612 // CHECK-NOUSE-I386-NEXT: [[TMP66:%.*]] = icmp ne i32 [[TMP65]], 0 613 // CHECK-NOUSE-I386-NEXT: br i1 [[TMP66]], label [[OMP_OFFLOAD_FAILED6:%.*]], label [[OMP_OFFLOAD_CONT7:%.*]] 614 // CHECK-NOUSE-I386: omp_offload.failed6: 615 // CHECK-NOUSE-I386-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z20explicit_maps_singlei_l644() #[[ATTR3]] 616 // CHECK-NOUSE-I386-NEXT: br label [[OMP_OFFLOAD_CONT7]] 617 // CHECK-NOUSE-I386: omp_offload.cont7: 618 // CHECK-NOUSE-I386-NEXT: ret void 619 // 620 void explicit_maps_single(int ii) { 621 622 // Map of a scalar. 623 int a = ii; 624 625 struct ST st1; 626 struct ST st2; 627 628 // Make sure the struct picks up ompx_hold even if another element of the 629 // struct doesn't have ompx_hold. 630 #pragma omp target map(tofrom : st1.i) \ 631 map(ompx_hold, tofrom : a, st1.j, st2.i) \ 632 map(tofrom : st2.j) 633 { 634 #ifdef USE 635 st1.i++; 636 a++; 637 st1.j++; 638 st2.i++; 639 st2.j++; 640 #endif 641 } 642 643 // Always Close Hold. 644 #pragma omp target map(always close ompx_hold tofrom: a) 645 { 646 #ifdef USE 647 a++; 648 #endif 649 } 650 } 651 652 // CHECK-USE-PPC64LE-LABEL: @_ZN2ST20test_present_membersEv( 653 // CHECK-USE-PPC64LE-NEXT: entry: 654 // CHECK-USE-PPC64LE-NEXT: [[THIS_ADDR:%.*]] = alloca %struct.ST*, align 8 655 // CHECK-USE-PPC64LE-NEXT: [[DOTOFFLOAD_BASEPTRS:%.*]] = alloca [3 x i8*], align 8 656 // CHECK-USE-PPC64LE-NEXT: [[DOTOFFLOAD_PTRS:%.*]] = alloca [3 x i8*], align 8 657 // CHECK-USE-PPC64LE-NEXT: [[DOTOFFLOAD_MAPPERS:%.*]] = alloca [3 x i8*], align 8 658 // CHECK-USE-PPC64LE-NEXT: [[DOTOFFLOAD_SIZES:%.*]] = alloca [3 x i64], align 8 659 // CHECK-USE-PPC64LE-NEXT: store %struct.ST* [[THIS:%.*]], %struct.ST** [[THIS_ADDR]], align 8 660 // CHECK-USE-PPC64LE-NEXT: [[THIS1:%.*]] = load %struct.ST*, %struct.ST** [[THIS_ADDR]], align 8 661 // CHECK-USE-PPC64LE-NEXT: [[I:%.*]] = getelementptr inbounds [[STRUCT_ST:%.*]], %struct.ST* [[THIS1]], i32 0, i32 0 662 // CHECK-USE-PPC64LE-NEXT: [[J:%.*]] = getelementptr inbounds [[STRUCT_ST]], %struct.ST* [[THIS1]], i32 0, i32 1 663 // CHECK-USE-PPC64LE-NEXT: [[TMP0:%.*]] = getelementptr i32, i32* [[J]], i32 1 664 // CHECK-USE-PPC64LE-NEXT: [[TMP1:%.*]] = bitcast i32* [[I]] to i8* 665 // CHECK-USE-PPC64LE-NEXT: [[TMP2:%.*]] = bitcast i32* [[TMP0]] to i8* 666 // CHECK-USE-PPC64LE-NEXT: [[TMP3:%.*]] = ptrtoint i8* [[TMP2]] to i64 667 // CHECK-USE-PPC64LE-NEXT: [[TMP4:%.*]] = ptrtoint i8* [[TMP1]] to i64 668 // CHECK-USE-PPC64LE-NEXT: [[TMP5:%.*]] = sub i64 [[TMP3]], [[TMP4]] 669 // CHECK-USE-PPC64LE-NEXT: [[TMP6:%.*]] = sdiv exact i64 [[TMP5]], ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64) 670 // CHECK-USE-PPC64LE-NEXT: [[TMP7:%.*]] = bitcast [3 x i64]* [[DOTOFFLOAD_SIZES]] to i8* 671 // CHECK-USE-PPC64LE-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 [[TMP7]], i8* align 8 bitcast ([3 x i64]* @.offload_sizes.3 to i8*), i64 24, i1 false) 672 // CHECK-USE-PPC64LE-NEXT: [[TMP8:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0 673 // CHECK-USE-PPC64LE-NEXT: [[TMP9:%.*]] = bitcast i8** [[TMP8]] to %struct.ST** 674 // CHECK-USE-PPC64LE-NEXT: store %struct.ST* [[THIS1]], %struct.ST** [[TMP9]], align 8 675 // CHECK-USE-PPC64LE-NEXT: [[TMP10:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOFFLOAD_PTRS]], i32 0, i32 0 676 // CHECK-USE-PPC64LE-NEXT: [[TMP11:%.*]] = bitcast i8** [[TMP10]] to i32** 677 // CHECK-USE-PPC64LE-NEXT: store i32* [[I]], i32** [[TMP11]], align 8 678 // CHECK-USE-PPC64LE-NEXT: [[TMP12:%.*]] = getelementptr inbounds [3 x i64], [3 x i64]* [[DOTOFFLOAD_SIZES]], i32 0, i32 0 679 // CHECK-USE-PPC64LE-NEXT: store i64 [[TMP6]], i64* [[TMP12]], align 8 680 // CHECK-USE-PPC64LE-NEXT: [[TMP13:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOFFLOAD_MAPPERS]], i64 0, i64 0 681 // CHECK-USE-PPC64LE-NEXT: store i8* null, i8** [[TMP13]], align 8 682 // CHECK-USE-PPC64LE-NEXT: [[TMP14:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 1 683 // CHECK-USE-PPC64LE-NEXT: [[TMP15:%.*]] = bitcast i8** [[TMP14]] to %struct.ST** 684 // CHECK-USE-PPC64LE-NEXT: store %struct.ST* [[THIS1]], %struct.ST** [[TMP15]], align 8 685 // CHECK-USE-PPC64LE-NEXT: [[TMP16:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOFFLOAD_PTRS]], i32 0, i32 1 686 // CHECK-USE-PPC64LE-NEXT: [[TMP17:%.*]] = bitcast i8** [[TMP16]] to i32** 687 // CHECK-USE-PPC64LE-NEXT: store i32* [[I]], i32** [[TMP17]], align 8 688 // CHECK-USE-PPC64LE-NEXT: [[TMP18:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOFFLOAD_MAPPERS]], i64 0, i64 1 689 // CHECK-USE-PPC64LE-NEXT: store i8* null, i8** [[TMP18]], align 8 690 // CHECK-USE-PPC64LE-NEXT: [[TMP19:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 2 691 // CHECK-USE-PPC64LE-NEXT: [[TMP20:%.*]] = bitcast i8** [[TMP19]] to %struct.ST** 692 // CHECK-USE-PPC64LE-NEXT: store %struct.ST* [[THIS1]], %struct.ST** [[TMP20]], align 8 693 // CHECK-USE-PPC64LE-NEXT: [[TMP21:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOFFLOAD_PTRS]], i32 0, i32 2 694 // CHECK-USE-PPC64LE-NEXT: [[TMP22:%.*]] = bitcast i8** [[TMP21]] to i32** 695 // CHECK-USE-PPC64LE-NEXT: store i32* [[J]], i32** [[TMP22]], align 8 696 // CHECK-USE-PPC64LE-NEXT: [[TMP23:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOFFLOAD_MAPPERS]], i64 0, i64 2 697 // CHECK-USE-PPC64LE-NEXT: store i8* null, i8** [[TMP23]], align 8 698 // CHECK-USE-PPC64LE-NEXT: [[TMP24:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0 699 // CHECK-USE-PPC64LE-NEXT: [[TMP25:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOFFLOAD_PTRS]], i32 0, i32 0 700 // CHECK-USE-PPC64LE-NEXT: [[TMP26:%.*]] = getelementptr inbounds [3 x i64], [3 x i64]* [[DOTOFFLOAD_SIZES]], i32 0, i32 0 701 // CHECK-USE-PPC64LE-NEXT: [[TMP27:%.*]] = call i32 @__tgt_target_mapper(%struct.ident_t* @[[GLOB1]], i64 -1, i8* @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2ST20test_present_membersEv_l887.region_id, i32 3, i8** [[TMP24]], i8** [[TMP25]], i64* [[TMP26]], i64* getelementptr inbounds ([3 x i64], [3 x i64]* @.offload_maptypes.4, i32 0, i32 0), i8** null, i8** null) 702 // CHECK-USE-PPC64LE-NEXT: [[TMP28:%.*]] = icmp ne i32 [[TMP27]], 0 703 // CHECK-USE-PPC64LE-NEXT: br i1 [[TMP28]], label [[OMP_OFFLOAD_FAILED:%.*]], label [[OMP_OFFLOAD_CONT:%.*]] 704 // CHECK-USE-PPC64LE: omp_offload.failed: 705 // CHECK-USE-PPC64LE-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2ST20test_present_membersEv_l887(%struct.ST* [[THIS1]]) #[[ATTR3]] 706 // CHECK-USE-PPC64LE-NEXT: br label [[OMP_OFFLOAD_CONT]] 707 // CHECK-USE-PPC64LE: omp_offload.cont: 708 // CHECK-USE-PPC64LE-NEXT: ret void 709 // 710 // CHECK-USE-I386-LABEL: @_ZN2ST20test_present_membersEv( 711 // CHECK-USE-I386-NEXT: entry: 712 // CHECK-USE-I386-NEXT: [[THIS_ADDR:%.*]] = alloca %struct.ST*, align 4 713 // CHECK-USE-I386-NEXT: [[DOTOFFLOAD_BASEPTRS:%.*]] = alloca [3 x i8*], align 4 714 // CHECK-USE-I386-NEXT: [[DOTOFFLOAD_PTRS:%.*]] = alloca [3 x i8*], align 4 715 // CHECK-USE-I386-NEXT: [[DOTOFFLOAD_MAPPERS:%.*]] = alloca [3 x i8*], align 4 716 // CHECK-USE-I386-NEXT: [[DOTOFFLOAD_SIZES:%.*]] = alloca [3 x i64], align 4 717 // CHECK-USE-I386-NEXT: store %struct.ST* [[THIS:%.*]], %struct.ST** [[THIS_ADDR]], align 4 718 // CHECK-USE-I386-NEXT: [[THIS1:%.*]] = load %struct.ST*, %struct.ST** [[THIS_ADDR]], align 4 719 // CHECK-USE-I386-NEXT: [[I:%.*]] = getelementptr inbounds [[STRUCT_ST:%.*]], %struct.ST* [[THIS1]], i32 0, i32 0 720 // CHECK-USE-I386-NEXT: [[J:%.*]] = getelementptr inbounds [[STRUCT_ST]], %struct.ST* [[THIS1]], i32 0, i32 1 721 // CHECK-USE-I386-NEXT: [[TMP0:%.*]] = getelementptr i32, i32* [[J]], i32 1 722 // CHECK-USE-I386-NEXT: [[TMP1:%.*]] = bitcast i32* [[I]] to i8* 723 // CHECK-USE-I386-NEXT: [[TMP2:%.*]] = bitcast i32* [[TMP0]] to i8* 724 // CHECK-USE-I386-NEXT: [[TMP3:%.*]] = ptrtoint i8* [[TMP2]] to i64 725 // CHECK-USE-I386-NEXT: [[TMP4:%.*]] = ptrtoint i8* [[TMP1]] to i64 726 // CHECK-USE-I386-NEXT: [[TMP5:%.*]] = sub i64 [[TMP3]], [[TMP4]] 727 // CHECK-USE-I386-NEXT: [[TMP6:%.*]] = sdiv exact i64 [[TMP5]], ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64) 728 // CHECK-USE-I386-NEXT: [[TMP7:%.*]] = bitcast [3 x i64]* [[DOTOFFLOAD_SIZES]] to i8* 729 // CHECK-USE-I386-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 [[TMP7]], i8* align 4 bitcast ([3 x i64]* @.offload_sizes.3 to i8*), i32 24, i1 false) 730 // CHECK-USE-I386-NEXT: [[TMP8:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0 731 // CHECK-USE-I386-NEXT: [[TMP9:%.*]] = bitcast i8** [[TMP8]] to %struct.ST** 732 // CHECK-USE-I386-NEXT: store %struct.ST* [[THIS1]], %struct.ST** [[TMP9]], align 4 733 // CHECK-USE-I386-NEXT: [[TMP10:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOFFLOAD_PTRS]], i32 0, i32 0 734 // CHECK-USE-I386-NEXT: [[TMP11:%.*]] = bitcast i8** [[TMP10]] to i32** 735 // CHECK-USE-I386-NEXT: store i32* [[I]], i32** [[TMP11]], align 4 736 // CHECK-USE-I386-NEXT: [[TMP12:%.*]] = getelementptr inbounds [3 x i64], [3 x i64]* [[DOTOFFLOAD_SIZES]], i32 0, i32 0 737 // CHECK-USE-I386-NEXT: store i64 [[TMP6]], i64* [[TMP12]], align 4 738 // CHECK-USE-I386-NEXT: [[TMP13:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOFFLOAD_MAPPERS]], i32 0, i32 0 739 // CHECK-USE-I386-NEXT: store i8* null, i8** [[TMP13]], align 4 740 // CHECK-USE-I386-NEXT: [[TMP14:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 1 741 // CHECK-USE-I386-NEXT: [[TMP15:%.*]] = bitcast i8** [[TMP14]] to %struct.ST** 742 // CHECK-USE-I386-NEXT: store %struct.ST* [[THIS1]], %struct.ST** [[TMP15]], align 4 743 // CHECK-USE-I386-NEXT: [[TMP16:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOFFLOAD_PTRS]], i32 0, i32 1 744 // CHECK-USE-I386-NEXT: [[TMP17:%.*]] = bitcast i8** [[TMP16]] to i32** 745 // CHECK-USE-I386-NEXT: store i32* [[I]], i32** [[TMP17]], align 4 746 // CHECK-USE-I386-NEXT: [[TMP18:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOFFLOAD_MAPPERS]], i32 0, i32 1 747 // CHECK-USE-I386-NEXT: store i8* null, i8** [[TMP18]], align 4 748 // CHECK-USE-I386-NEXT: [[TMP19:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 2 749 // CHECK-USE-I386-NEXT: [[TMP20:%.*]] = bitcast i8** [[TMP19]] to %struct.ST** 750 // CHECK-USE-I386-NEXT: store %struct.ST* [[THIS1]], %struct.ST** [[TMP20]], align 4 751 // CHECK-USE-I386-NEXT: [[TMP21:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOFFLOAD_PTRS]], i32 0, i32 2 752 // CHECK-USE-I386-NEXT: [[TMP22:%.*]] = bitcast i8** [[TMP21]] to i32** 753 // CHECK-USE-I386-NEXT: store i32* [[J]], i32** [[TMP22]], align 4 754 // CHECK-USE-I386-NEXT: [[TMP23:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOFFLOAD_MAPPERS]], i32 0, i32 2 755 // CHECK-USE-I386-NEXT: store i8* null, i8** [[TMP23]], align 4 756 // CHECK-USE-I386-NEXT: [[TMP24:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0 757 // CHECK-USE-I386-NEXT: [[TMP25:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOFFLOAD_PTRS]], i32 0, i32 0 758 // CHECK-USE-I386-NEXT: [[TMP26:%.*]] = getelementptr inbounds [3 x i64], [3 x i64]* [[DOTOFFLOAD_SIZES]], i32 0, i32 0 759 // CHECK-USE-I386-NEXT: [[TMP27:%.*]] = call i32 @__tgt_target_mapper(%struct.ident_t* @[[GLOB1]], i64 -1, i8* @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2ST20test_present_membersEv_l887.region_id, i32 3, i8** [[TMP24]], i8** [[TMP25]], i64* [[TMP26]], i64* getelementptr inbounds ([3 x i64], [3 x i64]* @.offload_maptypes.4, i32 0, i32 0), i8** null, i8** null) 760 // CHECK-USE-I386-NEXT: [[TMP28:%.*]] = icmp ne i32 [[TMP27]], 0 761 // CHECK-USE-I386-NEXT: br i1 [[TMP28]], label [[OMP_OFFLOAD_FAILED:%.*]], label [[OMP_OFFLOAD_CONT:%.*]] 762 // CHECK-USE-I386: omp_offload.failed: 763 // CHECK-USE-I386-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2ST20test_present_membersEv_l887(%struct.ST* [[THIS1]]) #[[ATTR3]] 764 // CHECK-USE-I386-NEXT: br label [[OMP_OFFLOAD_CONT]] 765 // CHECK-USE-I386: omp_offload.cont: 766 // CHECK-USE-I386-NEXT: ret void 767 // 768 // CHECK-NOUSE-PPC64LE-LABEL: @_ZN2ST20test_present_membersEv( 769 // CHECK-NOUSE-PPC64LE-NEXT: entry: 770 // CHECK-NOUSE-PPC64LE-NEXT: [[THIS_ADDR:%.*]] = alloca %struct.ST*, align 8 771 // CHECK-NOUSE-PPC64LE-NEXT: [[DOTOFFLOAD_BASEPTRS:%.*]] = alloca [3 x i8*], align 8 772 // CHECK-NOUSE-PPC64LE-NEXT: [[DOTOFFLOAD_PTRS:%.*]] = alloca [3 x i8*], align 8 773 // CHECK-NOUSE-PPC64LE-NEXT: [[DOTOFFLOAD_MAPPERS:%.*]] = alloca [3 x i8*], align 8 774 // CHECK-NOUSE-PPC64LE-NEXT: [[DOTOFFLOAD_SIZES:%.*]] = alloca [3 x i64], align 8 775 // CHECK-NOUSE-PPC64LE-NEXT: store %struct.ST* [[THIS:%.*]], %struct.ST** [[THIS_ADDR]], align 8 776 // CHECK-NOUSE-PPC64LE-NEXT: [[THIS1:%.*]] = load %struct.ST*, %struct.ST** [[THIS_ADDR]], align 8 777 // CHECK-NOUSE-PPC64LE-NEXT: [[I:%.*]] = getelementptr inbounds [[STRUCT_ST:%.*]], %struct.ST* [[THIS1]], i32 0, i32 0 778 // CHECK-NOUSE-PPC64LE-NEXT: [[J:%.*]] = getelementptr inbounds [[STRUCT_ST]], %struct.ST* [[THIS1]], i32 0, i32 1 779 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP0:%.*]] = getelementptr i32, i32* [[J]], i32 1 780 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP1:%.*]] = bitcast i32* [[I]] to i8* 781 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP2:%.*]] = bitcast i32* [[TMP0]] to i8* 782 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP3:%.*]] = ptrtoint i8* [[TMP2]] to i64 783 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP4:%.*]] = ptrtoint i8* [[TMP1]] to i64 784 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP5:%.*]] = sub i64 [[TMP3]], [[TMP4]] 785 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP6:%.*]] = sdiv exact i64 [[TMP5]], ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64) 786 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP7:%.*]] = bitcast [3 x i64]* [[DOTOFFLOAD_SIZES]] to i8* 787 // CHECK-NOUSE-PPC64LE-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 [[TMP7]], i8* align 8 bitcast ([3 x i64]* @.offload_sizes.3 to i8*), i64 24, i1 false) 788 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP8:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0 789 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP9:%.*]] = bitcast i8** [[TMP8]] to %struct.ST** 790 // CHECK-NOUSE-PPC64LE-NEXT: store %struct.ST* [[THIS1]], %struct.ST** [[TMP9]], align 8 791 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP10:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOFFLOAD_PTRS]], i32 0, i32 0 792 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP11:%.*]] = bitcast i8** [[TMP10]] to i32** 793 // CHECK-NOUSE-PPC64LE-NEXT: store i32* [[I]], i32** [[TMP11]], align 8 794 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP12:%.*]] = getelementptr inbounds [3 x i64], [3 x i64]* [[DOTOFFLOAD_SIZES]], i32 0, i32 0 795 // CHECK-NOUSE-PPC64LE-NEXT: store i64 [[TMP6]], i64* [[TMP12]], align 8 796 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP13:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOFFLOAD_MAPPERS]], i64 0, i64 0 797 // CHECK-NOUSE-PPC64LE-NEXT: store i8* null, i8** [[TMP13]], align 8 798 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP14:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 1 799 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP15:%.*]] = bitcast i8** [[TMP14]] to %struct.ST** 800 // CHECK-NOUSE-PPC64LE-NEXT: store %struct.ST* [[THIS1]], %struct.ST** [[TMP15]], align 8 801 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP16:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOFFLOAD_PTRS]], i32 0, i32 1 802 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP17:%.*]] = bitcast i8** [[TMP16]] to i32** 803 // CHECK-NOUSE-PPC64LE-NEXT: store i32* [[I]], i32** [[TMP17]], align 8 804 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP18:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOFFLOAD_MAPPERS]], i64 0, i64 1 805 // CHECK-NOUSE-PPC64LE-NEXT: store i8* null, i8** [[TMP18]], align 8 806 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP19:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 2 807 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP20:%.*]] = bitcast i8** [[TMP19]] to %struct.ST** 808 // CHECK-NOUSE-PPC64LE-NEXT: store %struct.ST* [[THIS1]], %struct.ST** [[TMP20]], align 8 809 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP21:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOFFLOAD_PTRS]], i32 0, i32 2 810 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP22:%.*]] = bitcast i8** [[TMP21]] to i32** 811 // CHECK-NOUSE-PPC64LE-NEXT: store i32* [[J]], i32** [[TMP22]], align 8 812 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP23:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOFFLOAD_MAPPERS]], i64 0, i64 2 813 // CHECK-NOUSE-PPC64LE-NEXT: store i8* null, i8** [[TMP23]], align 8 814 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP24:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0 815 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP25:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOFFLOAD_PTRS]], i32 0, i32 0 816 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP26:%.*]] = getelementptr inbounds [3 x i64], [3 x i64]* [[DOTOFFLOAD_SIZES]], i32 0, i32 0 817 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP27:%.*]] = call i32 @__tgt_target_mapper(%struct.ident_t* @[[GLOB1]], i64 -1, i8* @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2ST20test_present_membersEv_l887.region_id, i32 3, i8** [[TMP24]], i8** [[TMP25]], i64* [[TMP26]], i64* getelementptr inbounds ([3 x i64], [3 x i64]* @.offload_maptypes.4, i32 0, i32 0), i8** null, i8** null) 818 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP28:%.*]] = icmp ne i32 [[TMP27]], 0 819 // CHECK-NOUSE-PPC64LE-NEXT: br i1 [[TMP28]], label [[OMP_OFFLOAD_FAILED:%.*]], label [[OMP_OFFLOAD_CONT:%.*]] 820 // CHECK-NOUSE-PPC64LE: omp_offload.failed: 821 // CHECK-NOUSE-PPC64LE-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2ST20test_present_membersEv_l887() #[[ATTR3]] 822 // CHECK-NOUSE-PPC64LE-NEXT: br label [[OMP_OFFLOAD_CONT]] 823 // CHECK-NOUSE-PPC64LE: omp_offload.cont: 824 // CHECK-NOUSE-PPC64LE-NEXT: ret void 825 // 826 // CHECK-NOUSE-I386-LABEL: @_ZN2ST20test_present_membersEv( 827 // CHECK-NOUSE-I386-NEXT: entry: 828 // CHECK-NOUSE-I386-NEXT: [[THIS_ADDR:%.*]] = alloca %struct.ST*, align 4 829 // CHECK-NOUSE-I386-NEXT: [[DOTOFFLOAD_BASEPTRS:%.*]] = alloca [3 x i8*], align 4 830 // CHECK-NOUSE-I386-NEXT: [[DOTOFFLOAD_PTRS:%.*]] = alloca [3 x i8*], align 4 831 // CHECK-NOUSE-I386-NEXT: [[DOTOFFLOAD_MAPPERS:%.*]] = alloca [3 x i8*], align 4 832 // CHECK-NOUSE-I386-NEXT: [[DOTOFFLOAD_SIZES:%.*]] = alloca [3 x i64], align 4 833 // CHECK-NOUSE-I386-NEXT: store %struct.ST* [[THIS:%.*]], %struct.ST** [[THIS_ADDR]], align 4 834 // CHECK-NOUSE-I386-NEXT: [[THIS1:%.*]] = load %struct.ST*, %struct.ST** [[THIS_ADDR]], align 4 835 // CHECK-NOUSE-I386-NEXT: [[I:%.*]] = getelementptr inbounds [[STRUCT_ST:%.*]], %struct.ST* [[THIS1]], i32 0, i32 0 836 // CHECK-NOUSE-I386-NEXT: [[J:%.*]] = getelementptr inbounds [[STRUCT_ST]], %struct.ST* [[THIS1]], i32 0, i32 1 837 // CHECK-NOUSE-I386-NEXT: [[TMP0:%.*]] = getelementptr i32, i32* [[J]], i32 1 838 // CHECK-NOUSE-I386-NEXT: [[TMP1:%.*]] = bitcast i32* [[I]] to i8* 839 // CHECK-NOUSE-I386-NEXT: [[TMP2:%.*]] = bitcast i32* [[TMP0]] to i8* 840 // CHECK-NOUSE-I386-NEXT: [[TMP3:%.*]] = ptrtoint i8* [[TMP2]] to i64 841 // CHECK-NOUSE-I386-NEXT: [[TMP4:%.*]] = ptrtoint i8* [[TMP1]] to i64 842 // CHECK-NOUSE-I386-NEXT: [[TMP5:%.*]] = sub i64 [[TMP3]], [[TMP4]] 843 // CHECK-NOUSE-I386-NEXT: [[TMP6:%.*]] = sdiv exact i64 [[TMP5]], ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64) 844 // CHECK-NOUSE-I386-NEXT: [[TMP7:%.*]] = bitcast [3 x i64]* [[DOTOFFLOAD_SIZES]] to i8* 845 // CHECK-NOUSE-I386-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 [[TMP7]], i8* align 4 bitcast ([3 x i64]* @.offload_sizes.3 to i8*), i32 24, i1 false) 846 // CHECK-NOUSE-I386-NEXT: [[TMP8:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0 847 // CHECK-NOUSE-I386-NEXT: [[TMP9:%.*]] = bitcast i8** [[TMP8]] to %struct.ST** 848 // CHECK-NOUSE-I386-NEXT: store %struct.ST* [[THIS1]], %struct.ST** [[TMP9]], align 4 849 // CHECK-NOUSE-I386-NEXT: [[TMP10:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOFFLOAD_PTRS]], i32 0, i32 0 850 // CHECK-NOUSE-I386-NEXT: [[TMP11:%.*]] = bitcast i8** [[TMP10]] to i32** 851 // CHECK-NOUSE-I386-NEXT: store i32* [[I]], i32** [[TMP11]], align 4 852 // CHECK-NOUSE-I386-NEXT: [[TMP12:%.*]] = getelementptr inbounds [3 x i64], [3 x i64]* [[DOTOFFLOAD_SIZES]], i32 0, i32 0 853 // CHECK-NOUSE-I386-NEXT: store i64 [[TMP6]], i64* [[TMP12]], align 4 854 // CHECK-NOUSE-I386-NEXT: [[TMP13:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOFFLOAD_MAPPERS]], i32 0, i32 0 855 // CHECK-NOUSE-I386-NEXT: store i8* null, i8** [[TMP13]], align 4 856 // CHECK-NOUSE-I386-NEXT: [[TMP14:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 1 857 // CHECK-NOUSE-I386-NEXT: [[TMP15:%.*]] = bitcast i8** [[TMP14]] to %struct.ST** 858 // CHECK-NOUSE-I386-NEXT: store %struct.ST* [[THIS1]], %struct.ST** [[TMP15]], align 4 859 // CHECK-NOUSE-I386-NEXT: [[TMP16:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOFFLOAD_PTRS]], i32 0, i32 1 860 // CHECK-NOUSE-I386-NEXT: [[TMP17:%.*]] = bitcast i8** [[TMP16]] to i32** 861 // CHECK-NOUSE-I386-NEXT: store i32* [[I]], i32** [[TMP17]], align 4 862 // CHECK-NOUSE-I386-NEXT: [[TMP18:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOFFLOAD_MAPPERS]], i32 0, i32 1 863 // CHECK-NOUSE-I386-NEXT: store i8* null, i8** [[TMP18]], align 4 864 // CHECK-NOUSE-I386-NEXT: [[TMP19:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 2 865 // CHECK-NOUSE-I386-NEXT: [[TMP20:%.*]] = bitcast i8** [[TMP19]] to %struct.ST** 866 // CHECK-NOUSE-I386-NEXT: store %struct.ST* [[THIS1]], %struct.ST** [[TMP20]], align 4 867 // CHECK-NOUSE-I386-NEXT: [[TMP21:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOFFLOAD_PTRS]], i32 0, i32 2 868 // CHECK-NOUSE-I386-NEXT: [[TMP22:%.*]] = bitcast i8** [[TMP21]] to i32** 869 // CHECK-NOUSE-I386-NEXT: store i32* [[J]], i32** [[TMP22]], align 4 870 // CHECK-NOUSE-I386-NEXT: [[TMP23:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOFFLOAD_MAPPERS]], i32 0, i32 2 871 // CHECK-NOUSE-I386-NEXT: store i8* null, i8** [[TMP23]], align 4 872 // CHECK-NOUSE-I386-NEXT: [[TMP24:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0 873 // CHECK-NOUSE-I386-NEXT: [[TMP25:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOFFLOAD_PTRS]], i32 0, i32 0 874 // CHECK-NOUSE-I386-NEXT: [[TMP26:%.*]] = getelementptr inbounds [3 x i64], [3 x i64]* [[DOTOFFLOAD_SIZES]], i32 0, i32 0 875 // CHECK-NOUSE-I386-NEXT: [[TMP27:%.*]] = call i32 @__tgt_target_mapper(%struct.ident_t* @[[GLOB1]], i64 -1, i8* @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2ST20test_present_membersEv_l887.region_id, i32 3, i8** [[TMP24]], i8** [[TMP25]], i64* [[TMP26]], i64* getelementptr inbounds ([3 x i64], [3 x i64]* @.offload_maptypes.4, i32 0, i32 0), i8** null, i8** null) 876 // CHECK-NOUSE-I386-NEXT: [[TMP28:%.*]] = icmp ne i32 [[TMP27]], 0 877 // CHECK-NOUSE-I386-NEXT: br i1 [[TMP28]], label [[OMP_OFFLOAD_FAILED:%.*]], label [[OMP_OFFLOAD_CONT:%.*]] 878 // CHECK-NOUSE-I386: omp_offload.failed: 879 // CHECK-NOUSE-I386-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2ST20test_present_membersEv_l887() #[[ATTR3]] 880 // CHECK-NOUSE-I386-NEXT: br label [[OMP_OFFLOAD_CONT]] 881 // CHECK-NOUSE-I386: omp_offload.cont: 882 // CHECK-NOUSE-I386-NEXT: ret void 883 // 884 void ST::test_present_members() { 885 // Make sure the struct picks up ompx_hold even if another element of the 886 // struct doesn't have ompx_hold. 887 #pragma omp target map(tofrom : i) map(ompx_hold, tofrom : j) 888 { 889 #ifdef USE 890 i++; 891 j++; 892 #endif 893 } 894 } 895 896 #endif 897