From: Alexey Bataev Date: Thu, 29 Jun 2017 16:43:05 +0000 (+0000) Subject: [OPENMP][DEBUG] Generate second function with correct arg types. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=afca04ace56897134f5e8e809c7e5dd2d5c7daa4;p=clang [OPENMP][DEBUG] Generate second function with correct arg types. Currently, if the some of the parameters are captured by value, this argument is converted to uintptr_t type and thus we loosing the debug info about real type of the argument (captured variable): ``` void @.outlined_function.(uintptr %par); ... %a = alloca i32 %a.casted = alloca uintptr %cast = bitcast uintptr* %a.casted to i32* %a.val = load i32, i32 *%a store i32 %a.val, i32 *%cast %a.casted.val = load uintptr, uintptr* %a.casted call void @.outlined_function.(uintptr %a.casted.val) ... ``` To resolve this problem, in debug mode a speciall external wrapper function is generated, that calls the outlined function with the correct parameters types: ``` void @.wrapper.(uintptr %par) { %a = alloca i32 %cast = bitcast i32* %a to uintptr* store uintptr %par, uintptr *%cast %a.val = load i32, i32* %a call void @.outlined_function.(i32 %a) ret void } void @.outlined_function.(i32 %par); ... %a = alloca i32 %a.casted = alloca uintptr %cast = bitcast uintptr* %a.casted to i32* %a.val = load i32, i32 *%a store i32 %a.val, i32 *%cast %a.casted.val = load uintptr, uintptr* %a.casted call void @.wrapper.(uintptr %a.casted.val) ... ``` git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@306697 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGOpenMPRuntime.cpp b/lib/CodeGen/CGOpenMPRuntime.cpp index 0a8fd17c33..3df95a4e9b 100644 --- a/lib/CodeGen/CGOpenMPRuntime.cpp +++ b/lib/CodeGen/CGOpenMPRuntime.cpp @@ -5927,16 +5927,11 @@ emitOffloadingArrays(CodeGenFunction &CGF, for (unsigned i = 0; i < Info.NumberOfPtrs; ++i) { llvm::Value *BPVal = *BasePointers[i]; - if (BPVal->getType()->isPointerTy()) - BPVal = CGF.Builder.CreateBitCast(BPVal, CGM.VoidPtrTy); - else { - assert(BPVal->getType()->isIntegerTy() && - "If not a pointer, the value type must be an integer."); - BPVal = CGF.Builder.CreateIntToPtr(BPVal, CGM.VoidPtrTy); - } llvm::Value *BP = CGF.Builder.CreateConstInBoundsGEP2_32( llvm::ArrayType::get(CGM.VoidPtrTy, Info.NumberOfPtrs), Info.BasePointersArray, 0, i); + BP = CGF.Builder.CreatePointerBitCastOrAddrSpaceCast( + BP, BPVal->getType()->getPointerTo(/*AddrSpace=*/0)); Address BPAddr(BP, Ctx.getTypeAlignInChars(Ctx.VoidPtrTy)); CGF.Builder.CreateStore(BPVal, BPAddr); @@ -5945,16 +5940,11 @@ emitOffloadingArrays(CodeGenFunction &CGF, Info.CaptureDeviceAddrMap.insert(std::make_pair(DevVD, BPAddr)); llvm::Value *PVal = Pointers[i]; - if (PVal->getType()->isPointerTy()) - PVal = CGF.Builder.CreateBitCast(PVal, CGM.VoidPtrTy); - else { - assert(PVal->getType()->isIntegerTy() && - "If not a pointer, the value type must be an integer."); - PVal = CGF.Builder.CreateIntToPtr(PVal, CGM.VoidPtrTy); - } llvm::Value *P = CGF.Builder.CreateConstInBoundsGEP2_32( llvm::ArrayType::get(CGM.VoidPtrTy, Info.NumberOfPtrs), Info.PointersArray, 0, i); + P = CGF.Builder.CreatePointerBitCastOrAddrSpaceCast( + P, PVal->getType()->getPointerTo(/*AddrSpace=*/0)); Address PAddr(P, Ctx.getTypeAlignInChars(Ctx.VoidPtrTy)); CGF.Builder.CreateStore(PVal, PAddr); diff --git a/lib/CodeGen/CGStmtOpenMP.cpp b/lib/CodeGen/CGStmtOpenMP.cpp index 77f3c332a1..493cd627e4 100644 --- a/lib/CodeGen/CGStmtOpenMP.cpp +++ b/lib/CodeGen/CGStmtOpenMP.cpp @@ -239,21 +239,47 @@ static QualType getCanonicalParamType(ASTContext &C, QualType T) { return C.getCanonicalParamType(T); } -llvm::Function * -CodeGenFunction::GenerateOpenMPCapturedStmtFunction(const CapturedStmt &S) { - assert( - CapturedStmtInfo && - "CapturedStmtInfo should be set when generating the captured function"); - const CapturedDecl *CD = S.getCapturedDecl(); - const RecordDecl *RD = S.getCapturedRecordDecl(); +namespace { + /// Contains required data for proper outlined function codegen. + struct FunctionOptions { + /// Captured statement for which the function is generated. + const CapturedStmt *S = nullptr; + /// true if cast to/from UIntPtr is required for variables captured by + /// value. + bool UIntPtrCastRequired = true; + /// true if only casted argumefnts must be registered as local args or VLA + /// sizes. + bool RegisterCastedArgsOnly = false; + /// Name of the generated function. + StringRef FunctionName; + explicit FunctionOptions(const CapturedStmt *S, bool UIntPtrCastRequired, + bool RegisterCastedArgsOnly, + StringRef FunctionName) + : S(S), UIntPtrCastRequired(UIntPtrCastRequired), + RegisterCastedArgsOnly(UIntPtrCastRequired && RegisterCastedArgsOnly), + FunctionName(FunctionName) {} + }; +} + +static std::pair emitOutlinedFunctionPrologue( + CodeGenFunction &CGF, FunctionArgList &Args, + llvm::DenseMap> + &LocalAddrs, + llvm::DenseMap> + &VLASizes, + llvm::Value *&CXXThisValue, const FunctionOptions &FO) { + const CapturedDecl *CD = FO.S->getCapturedDecl(); + const RecordDecl *RD = FO.S->getCapturedRecordDecl(); assert(CD->hasBody() && "missing CapturedDecl body"); + CXXThisValue = nullptr; // Build the argument list. + CodeGenModule &CGM = CGF.CGM; ASTContext &Ctx = CGM.getContext(); - FunctionArgList Args; + bool HasUIntPtrArgs = false; Args.append(CD->param_begin(), std::next(CD->param_begin(), CD->getContextParamPosition())); - auto I = S.captures().begin(); + auto I = FO.S->captures().begin(); for (auto *FD : RD->fields()) { QualType ArgType = FD->getType(); IdentifierInfo *II = nullptr; @@ -265,23 +291,24 @@ CodeGenFunction::GenerateOpenMPCapturedStmtFunction(const CapturedStmt &S) { // deal with pointers. We can pass in the same way the VLA type sizes to the // outlined function. if ((I->capturesVariableByCopy() && !ArgType->isAnyPointerType()) || - I->capturesVariableArrayType()) - ArgType = Ctx.getUIntPtrType(); + I->capturesVariableArrayType()) { + HasUIntPtrArgs = true; + if (FO.UIntPtrCastRequired) + ArgType = Ctx.getUIntPtrType(); + } if (I->capturesVariable() || I->capturesVariableByCopy()) { CapVar = I->getCapturedVar(); II = CapVar->getIdentifier(); } else if (I->capturesThis()) - II = &getContext().Idents.get("this"); + II = &Ctx.Idents.get("this"); else { assert(I->capturesVariableArrayType()); - II = &getContext().Idents.get("vla"); + II = &Ctx.Idents.get("vla"); } - if (ArgType->isVariablyModifiedType()) { - ArgType = - getCanonicalParamType(getContext(), ArgType.getNonReferenceType()); - } - Args.push_back(ImplicitParamDecl::Create(getContext(), /*DC=*/nullptr, + if (ArgType->isVariablyModifiedType()) + ArgType = getCanonicalParamType(Ctx, ArgType.getNonReferenceType()); + Args.push_back(ImplicitParamDecl::Create(Ctx, /*DC=*/nullptr, FD->getLocation(), II, ArgType, ImplicitParamDecl::Other)); ++I; @@ -296,90 +323,166 @@ CodeGenFunction::GenerateOpenMPCapturedStmtFunction(const CapturedStmt &S) { CGM.getTypes().arrangeBuiltinFunctionDeclaration(Ctx.VoidTy, Args); llvm::FunctionType *FuncLLVMTy = CGM.getTypes().GetFunctionType(FuncInfo); - llvm::Function *F = llvm::Function::Create( - FuncLLVMTy, llvm::GlobalValue::InternalLinkage, - CapturedStmtInfo->getHelperName(), &CGM.getModule()); + llvm::Function *F = + llvm::Function::Create(FuncLLVMTy, llvm::GlobalValue::InternalLinkage, + FO.FunctionName, &CGM.getModule()); CGM.SetInternalFunctionAttributes(CD, F, FuncInfo); if (CD->isNothrow()) F->addFnAttr(llvm::Attribute::NoUnwind); // Generate the function. - StartFunction(CD, Ctx.VoidTy, F, FuncInfo, Args, CD->getLocation(), - CD->getBody()->getLocStart()); + CGF.StartFunction(CD, Ctx.VoidTy, F, FuncInfo, Args, CD->getLocation(), + CD->getBody()->getLocStart()); unsigned Cnt = CD->getContextParamPosition(); - I = S.captures().begin(); + I = FO.S->captures().begin(); for (auto *FD : RD->fields()) { // If we are capturing a pointer by copy we don't need to do anything, just // use the value that we get from the arguments. if (I->capturesVariableByCopy() && FD->getType()->isAnyPointerType()) { const VarDecl *CurVD = I->getCapturedVar(); - Address LocalAddr = GetAddrOfLocalVar(Args[Cnt]); + Address LocalAddr = CGF.GetAddrOfLocalVar(Args[Cnt]); // If the variable is a reference we need to materialize it here. if (CurVD->getType()->isReferenceType()) { - Address RefAddr = CreateMemTemp(CurVD->getType(), getPointerAlign(), - ".materialized_ref"); - EmitStoreOfScalar(LocalAddr.getPointer(), RefAddr, /*Volatile=*/false, - CurVD->getType()); + Address RefAddr = CGF.CreateMemTemp( + CurVD->getType(), CGM.getPointerAlign(), ".materialized_ref"); + CGF.EmitStoreOfScalar(LocalAddr.getPointer(), RefAddr, + /*Volatile=*/false, CurVD->getType()); LocalAddr = RefAddr; } - setAddrOfLocalVar(CurVD, LocalAddr); + if (!FO.RegisterCastedArgsOnly) + LocalAddrs.insert({Args[Cnt], {CurVD, LocalAddr}}); ++Cnt; ++I; continue; } LValueBaseInfo BaseInfo(AlignmentSource::Decl, false); - LValue ArgLVal = - MakeAddrLValue(GetAddrOfLocalVar(Args[Cnt]), Args[Cnt]->getType(), - BaseInfo); + LValue ArgLVal = CGF.MakeAddrLValue(CGF.GetAddrOfLocalVar(Args[Cnt]), + Args[Cnt]->getType(), BaseInfo); if (FD->hasCapturedVLAType()) { - LValue CastedArgLVal = - MakeAddrLValue(castValueFromUintptr(*this, FD->getType(), - Args[Cnt]->getName(), ArgLVal), - FD->getType(), BaseInfo); + if (FO.UIntPtrCastRequired) { + ArgLVal = CGF.MakeAddrLValue(castValueFromUintptr(CGF, FD->getType(), + Args[Cnt]->getName(), + ArgLVal), + FD->getType(), BaseInfo); + } auto *ExprArg = - EmitLoadOfLValue(CastedArgLVal, SourceLocation()).getScalarVal(); + CGF.EmitLoadOfLValue(ArgLVal, SourceLocation()).getScalarVal(); auto VAT = FD->getCapturedVLAType(); - VLASizeMap[VAT->getSizeExpr()] = ExprArg; + VLASizes.insert({Args[Cnt], {VAT->getSizeExpr(), ExprArg}}); } else if (I->capturesVariable()) { auto *Var = I->getCapturedVar(); QualType VarTy = Var->getType(); Address ArgAddr = ArgLVal.getAddress(); if (!VarTy->isReferenceType()) { if (ArgLVal.getType()->isLValueReferenceType()) { - ArgAddr = EmitLoadOfReference( + ArgAddr = CGF.EmitLoadOfReference( ArgAddr, ArgLVal.getType()->castAs()); } else if (!VarTy->isVariablyModifiedType() || !VarTy->isPointerType()) { assert(ArgLVal.getType()->isPointerType()); - ArgAddr = EmitLoadOfPointer( + ArgAddr = CGF.EmitLoadOfPointer( ArgAddr, ArgLVal.getType()->castAs()); } } - setAddrOfLocalVar( - Var, Address(ArgAddr.getPointer(), getContext().getDeclAlign(Var))); + if (!FO.RegisterCastedArgsOnly) { + LocalAddrs.insert( + {Args[Cnt], + {Var, Address(ArgAddr.getPointer(), Ctx.getDeclAlign(Var))}}); + } } else if (I->capturesVariableByCopy()) { assert(!FD->getType()->isAnyPointerType() && "Not expecting a captured pointer."); auto *Var = I->getCapturedVar(); QualType VarTy = Var->getType(); - setAddrOfLocalVar(Var, castValueFromUintptr(*this, FD->getType(), - Args[Cnt]->getName(), ArgLVal, - VarTy->isReferenceType())); + LocalAddrs.insert( + {Args[Cnt], + {Var, + FO.UIntPtrCastRequired + ? castValueFromUintptr(CGF, FD->getType(), Args[Cnt]->getName(), + ArgLVal, VarTy->isReferenceType()) + : ArgLVal.getAddress()}}); } else { // If 'this' is captured, load it into CXXThisValue. assert(I->capturesThis()); - CXXThisValue = - EmitLoadOfLValue(ArgLVal, Args[Cnt]->getLocation()).getScalarVal(); + CXXThisValue = CGF.EmitLoadOfLValue(ArgLVal, Args[Cnt]->getLocation()) + .getScalarVal(); + LocalAddrs.insert({Args[Cnt], {nullptr, ArgLVal.getAddress()}}); } ++Cnt; ++I; } + return {F, HasUIntPtrArgs}; +} + +llvm::Function * +CodeGenFunction::GenerateOpenMPCapturedStmtFunction(const CapturedStmt &S) { + assert( + CapturedStmtInfo && + "CapturedStmtInfo should be set when generating the captured function"); + const CapturedDecl *CD = S.getCapturedDecl(); + // Build the argument list. + bool NeedWrapperFunction = + getDebugInfo() && + CGM.getCodeGenOpts().getDebugInfo() >= codegenoptions::LimitedDebugInfo; + FunctionArgList Args; + llvm::DenseMap> LocalAddrs; + llvm::DenseMap> VLASizes; + FunctionOptions FO(&S, !NeedWrapperFunction, /*RegisterCastedArgsOnly=*/false, + CapturedStmtInfo->getHelperName()); + llvm::Function *F; + bool HasUIntPtrArgs; + std::tie(F, HasUIntPtrArgs) = emitOutlinedFunctionPrologue( + *this, Args, LocalAddrs, VLASizes, CXXThisValue, FO); + for (const auto &LocalAddrPair : LocalAddrs) { + if (LocalAddrPair.second.first) { + setAddrOfLocalVar(LocalAddrPair.second.first, + LocalAddrPair.second.second); + } + } + for (const auto &VLASizePair : VLASizes) + VLASizeMap[VLASizePair.second.first] = VLASizePair.second.second; PGO.assignRegionCounters(GlobalDecl(CD), F); CapturedStmtInfo->EmitBody(*this, CD->getBody()); FinishFunction(CD->getBodyRBrace()); - - return F; + if (!NeedWrapperFunction || !HasUIntPtrArgs) + return F; + + FunctionOptions WrapperFO(&S, /*UIntPtrCastRequired=*/true, + /*RegisterCastedArgsOnly=*/true, + ".nondebug_wrapper."); + CodeGenFunction WrapperCGF(CGM, /*suppressNewContext=*/true); + WrapperCGF.disableDebugInfo(); + Args.clear(); + LocalAddrs.clear(); + VLASizes.clear(); + llvm::Function *WrapperF = + emitOutlinedFunctionPrologue(WrapperCGF, Args, LocalAddrs, VLASizes, + WrapperCGF.CXXThisValue, WrapperFO).first; + LValueBaseInfo BaseInfo(AlignmentSource::Decl, false); + llvm::SmallVector CallArgs; + for (const auto *Arg : Args) { + llvm::Value *CallArg; + auto I = LocalAddrs.find(Arg); + if (I != LocalAddrs.end()) { + LValue LV = + WrapperCGF.MakeAddrLValue(I->second.second, Arg->getType(), BaseInfo); + CallArg = WrapperCGF.EmitLoadOfScalar(LV, SourceLocation()); + } else { + auto EI = VLASizes.find(Arg); + if (EI != VLASizes.end()) + CallArg = EI->second.second; + else { + LValue LV = WrapperCGF.MakeAddrLValue(WrapperCGF.GetAddrOfLocalVar(Arg), + Arg->getType(), BaseInfo); + CallArg = WrapperCGF.EmitLoadOfScalar(LV, SourceLocation()); + } + } + CallArgs.emplace_back(CallArg); + } + WrapperCGF.Builder.CreateCall(F, CallArgs); + WrapperCGF.FinishFunction(); + return WrapperF; } //===----------------------------------------------------------------------===// diff --git a/test/OpenMP/parallel_codegen.cpp b/test/OpenMP/parallel_codegen.cpp index c43533c6c1..23b323778b 100644 --- a/test/OpenMP/parallel_codegen.cpp +++ b/test/OpenMP/parallel_codegen.cpp @@ -64,7 +64,7 @@ int main (int argc, char **argv) { // CHECK: call {{.*}}void @{{.+terminate.*|abort}}( // CHECK-NEXT: unreachable // CHECK-NEXT: } -// CHECK-DEBUG: define internal void [[OMP_OUTLINED]](i32* noalias %.global_tid., i32* noalias %.bound_tid., i64 [[VLA_SIZE:%.+]], i32* [[VLA_ADDR:%[^)]+]]) +// CHECK-DEBUG: define internal void [[OMP_OUTLINED_DEBUG:@.+]](i32* noalias %.global_tid., i32* noalias %.bound_tid., i64 [[VLA_SIZE:%.+]], i32* [[VLA_ADDR:%[^)]+]]) // CHECK-DEBUG-SAME: #[[FN_ATTRS:[0-9]+]] // CHECK-DEBUG: store i32* [[VLA_ADDR]], i32** [[VLA_PTR_ADDR:%.+]], // CHECK-DEBUG: [[VLA_REF:%.+]] = load i32*, i32** [[VLA_PTR_ADDR]] @@ -80,6 +80,8 @@ int main (int argc, char **argv) { // CHECK-DAG: declare {{.*}}void @__kmpc_fork_call(%ident_t*, i32, void (i32*, i32*, ...)*, ...) // CHECK-DEBUG-DAG: define linkonce_odr void [[FOO]](i32 %argc) // CHECK-DEBUG-DAG: declare void @__kmpc_fork_call(%ident_t*, i32, void (i32*, i32*, ...)*, ...) +// CHECK-DEBUG-DAG: define internal void [[OMP_OUTLINED]](i32* noalias %.global_tid., i32* noalias %.bound_tid., i64 [[VLA_SIZE:%.+]], i32* [[VLA_ADDR:%[^)]+]]) +// CHECK-DEBUG-DAG: call void [[OMP_OUTLINED_DEBUG]] // CHECK: define linkonce_odr {{[a-z\_\b]*[ ]?i32}} [[TMAIN]](i8** %argc) // CHECK: store i8** %argc, i8*** [[ARGC_ADDR:%.+]], diff --git a/test/OpenMP/target_codegen.cpp b/test/OpenMP/target_codegen.cpp index aaaf5fae57..c457045c17 100644 --- a/test/OpenMP/target_codegen.cpp +++ b/test/OpenMP/target_codegen.cpp @@ -117,10 +117,10 @@ int foo(int n) { // CHECK-DAG: [[P]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[PR:%[^,]+]], i32 0, i32 0 // CHECK-DAG: [[BPADDR0:%.+]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[BPR]], i32 0, i32 [[IDX0:[0-9]+]] // CHECK-DAG: [[PADDR0:%.+]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[PR]], i32 0, i32 [[IDX0]] - // CHECK-DAG: store i8* [[BP0:%[^,]+]], i8** [[BPADDR0]] - // CHECK-DAG: store i8* [[P0:%[^,]+]], i8** [[PADDR0]] - // CHECK-DAG: [[BP0]] = inttoptr i[[SZ]] %{{.+}} to i8* - // CHECK-DAG: [[P0]] = inttoptr i[[SZ]] %{{.+}} to i8* + // CHECK-DAG: [[CBPADDR0:%.+]] = bitcast i8** [[BPADDR0]] to i[[SZ]]* + // CHECK-DAG: [[CPADDR0:%.+]] = bitcast i8** [[PADDR0]] to i[[SZ]]* + // CHECK-DAG: store i[[SZ]] [[BP0:%[^,]+]], i[[SZ]]* [[CBPADDR0]] + // CHECK-DAG: store i[[SZ]] [[P0:%[^,]+]], i[[SZ]]* [[CPADDR0]] // CHECK: store i32 [[RET]], i32* [[RHV:%.+]], align 4 // CHECK: [[RET2:%.+]] = load i32, i32* [[RHV]], align 4 @@ -144,17 +144,17 @@ int foo(int n) { // CHECK-DAG: [[BPADDR0:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[BP]], i32 0, i32 0 // CHECK-DAG: [[PADDR0:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[P]], i32 0, i32 0 - // CHECK-DAG: store i8* [[BP0:%[^,]+]], i8** [[BPADDR0]] - // CHECK-DAG: store i8* [[P0:%[^,]+]], i8** [[PADDR0]] - // CHECK-DAG: [[BP0]] = inttoptr i[[SZ]] %{{.+}} to i8* - // CHECK-DAG: [[P0]] = inttoptr i[[SZ]] %{{.+}} to i8* + // CHECK-DAG: [[CBPADDR0:%.+]] = bitcast i8** [[BPADDR0]] to i[[SZ]]* + // CHECK-DAG: [[CPADDR0:%.+]] = bitcast i8** [[PADDR0]] to i[[SZ]]* + // CHECK-DAG: store i[[SZ]] [[BP0:%[^,]+]], i[[SZ]]* [[CBPADDR0]] + // CHECK-DAG: store i[[SZ]] [[P0:%[^,]+]], i[[SZ]]* [[CPADDR0]] // CHECK-DAG: [[BPADDR1:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[BP]], i32 0, i32 1 // CHECK-DAG: [[PADDR1:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[P]], i32 0, i32 1 - // CHECK-DAG: store i8* [[BP1:%[^,]+]], i8** [[BPADDR1]] - // CHECK-DAG: store i8* [[P1:%[^,]+]], i8** [[PADDR1]] - // CHECK-DAG: [[BP1]] = inttoptr i[[SZ]] %{{.+}} to i8* - // CHECK-DAG: [[P1]] = inttoptr i[[SZ]] %{{.+}} to i8* + // CHECK-DAG: [[CBPADDR1:%.+]] = bitcast i8** [[BPADDR1]] to i[[SZ]]* + // CHECK-DAG: [[CPADDR1:%.+]] = bitcast i8** [[PADDR1]] to i[[SZ]]* + // CHECK-DAG: store i[[SZ]] [[BP1:%[^,]+]], i[[SZ]]* [[CBPADDR1]] + // CHECK-DAG: store i[[SZ]] [[P1:%[^,]+]], i[[SZ]]* [[CPADDR1]] // CHECK: store i32 [[RET]], i32* [[RHV:%.+]], align 4 // CHECK-NEXT: br label %[[IFEND:.+]] @@ -198,87 +198,89 @@ int foo(int n) { // CHECK-DAG: [[PR]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[P:%[^,]+]], i32 0, i32 0 // CHECK-DAG: [[SR]] = getelementptr inbounds [9 x i[[SZ]]], [9 x i[[SZ]]]* [[S:%[^,]+]], i32 0, i32 0 - // CHECK-DAG: [[SADDR0:%.+]] = getelementptr inbounds [9 x i[[SZ]]], [9 x i[[SZ]]]* [[S]], i32 0, i32 [[IDX0:[0-9]+]] + // CHECK-DAG: [[SADDR0:%.+]] = getelementptr inbounds [9 x i[[SZ]]], [9 x i[[SZ]]]* [[S]], i32 0, i32 [[IDX0:0]] // CHECK-DAG: [[BPADDR0:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[BP]], i32 0, i32 [[IDX0]] // CHECK-DAG: [[PADDR0:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[P]], i32 0, i32 [[IDX0]] - // CHECK-DAG: [[SADDR1:%.+]] = getelementptr inbounds [9 x i[[SZ]]], [9 x i[[SZ]]]* [[S]], i32 0, i32 [[IDX1:[0-9]+]] + // CHECK-DAG: [[SADDR1:%.+]] = getelementptr inbounds [9 x i[[SZ]]], [9 x i[[SZ]]]* [[S]], i32 0, i32 [[IDX1:1]] // CHECK-DAG: [[BPADDR1:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[BP]], i32 0, i32 [[IDX1]] // CHECK-DAG: [[PADDR1:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[P]], i32 0, i32 [[IDX1]] - // CHECK-DAG: [[SADDR2:%.+]] = getelementptr inbounds [9 x i[[SZ]]], [9 x i[[SZ]]]* [[S]], i32 0, i32 [[IDX2:[0-9]+]] + // CHECK-DAG: [[SADDR2:%.+]] = getelementptr inbounds [9 x i[[SZ]]], [9 x i[[SZ]]]* [[S]], i32 0, i32 [[IDX2:2]] // CHECK-DAG: [[BPADDR2:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[BP]], i32 0, i32 [[IDX2]] // CHECK-DAG: [[PADDR2:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[P]], i32 0, i32 [[IDX2]] - // CHECK-DAG: [[SADDR3:%.+]] = getelementptr inbounds [9 x i[[SZ]]], [9 x i[[SZ]]]* [[S]], i32 0, i32 [[IDX3:[0-9]+]] + // CHECK-DAG: [[SADDR3:%.+]] = getelementptr inbounds [9 x i[[SZ]]], [9 x i[[SZ]]]* [[S]], i32 0, i32 [[IDX3:3]] // CHECK-DAG: [[BPADDR3:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[BP]], i32 0, i32 [[IDX3]] // CHECK-DAG: [[PADDR3:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[P]], i32 0, i32 [[IDX3]] - // CHECK-DAG: [[SADDR4:%.+]] = getelementptr inbounds [9 x i[[SZ]]], [9 x i[[SZ]]]* [[S]], i32 0, i32 [[IDX4:[0-9]+]] + // CHECK-DAG: [[SADDR4:%.+]] = getelementptr inbounds [9 x i[[SZ]]], [9 x i[[SZ]]]* [[S]], i32 0, i32 [[IDX4:4]] // CHECK-DAG: [[BPADDR4:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[BP]], i32 0, i32 [[IDX4]] // CHECK-DAG: [[PADDR4:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[P]], i32 0, i32 [[IDX4]] - // CHECK-DAG: [[SADDR5:%.+]] = getelementptr inbounds [9 x i[[SZ]]], [9 x i[[SZ]]]* [[S]], i32 0, i32 [[IDX5:[0-9]+]] + // CHECK-DAG: [[SADDR5:%.+]] = getelementptr inbounds [9 x i[[SZ]]], [9 x i[[SZ]]]* [[S]], i32 0, i32 [[IDX5:5]] // CHECK-DAG: [[BPADDR5:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[BP]], i32 0, i32 [[IDX5]] // CHECK-DAG: [[PADDR5:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[P]], i32 0, i32 [[IDX5]] - // CHECK-DAG: [[SADDR6:%.+]] = getelementptr inbounds [9 x i[[SZ]]], [9 x i[[SZ]]]* [[S]], i32 0, i32 [[IDX6:[0-9]+]] + // CHECK-DAG: [[SADDR6:%.+]] = getelementptr inbounds [9 x i[[SZ]]], [9 x i[[SZ]]]* [[S]], i32 0, i32 [[IDX6:6]] // CHECK-DAG: [[BPADDR6:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[BP]], i32 0, i32 [[IDX6]] // CHECK-DAG: [[PADDR6:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[P]], i32 0, i32 [[IDX6]] - // CHECK-DAG: [[SADDR7:%.+]] = getelementptr inbounds [9 x i[[SZ]]], [9 x i[[SZ]]]* [[S]], i32 0, i32 [[IDX7:[0-9]+]] + // CHECK-DAG: [[SADDR7:%.+]] = getelementptr inbounds [9 x i[[SZ]]], [9 x i[[SZ]]]* [[S]], i32 0, i32 [[IDX7:7]] // CHECK-DAG: [[BPADDR7:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[BP]], i32 0, i32 [[IDX7]] // CHECK-DAG: [[PADDR7:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[P]], i32 0, i32 [[IDX7]] - // CHECK-DAG: [[SADDR8:%.+]] = getelementptr inbounds [9 x i[[SZ]]], [9 x i[[SZ]]]* [[S]], i32 0, i32 [[IDX8:[0-9]+]] + // CHECK-DAG: [[SADDR8:%.+]] = getelementptr inbounds [9 x i[[SZ]]], [9 x i[[SZ]]]* [[S]], i32 0, i32 [[IDX8:8]] // CHECK-DAG: [[BPADDR8:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[BP]], i32 0, i32 [[IDX8]] // CHECK-DAG: [[PADDR8:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[P]], i32 0, i32 [[IDX8]] // The names below are not necessarily consistent with the names used for the // addresses above as some are repeated. - // CHECK-DAG: [[BP0:%[^,]+]] = inttoptr i[[SZ]] [[VLA0]] to i8* - // CHECK-DAG: [[P0:%[^,]+]] = inttoptr i[[SZ]] [[VLA0]] to i8* - // CHECK-DAG: store i8* [[BP0]], i8** {{%[^,]+}} - // CHECK-DAG: store i8* [[P0]], i8** {{%[^,]+}} - // CHECK-DAG: store i[[SZ]] {{4|8}}, i[[SZ]]* {{%[^,]+}} - - // CHECK-DAG: [[BP1:%[^,]+]] = inttoptr i[[SZ]] [[VLA1]] to i8* - // CHECK-DAG: [[P1:%[^,]+]] = inttoptr i[[SZ]] [[VLA1]] to i8* - // CHECK-DAG: store i8* [[BP1]], i8** {{%[^,]+}} - // CHECK-DAG: store i8* [[P1]], i8** {{%[^,]+}} - // CHECK-DAG: store i[[SZ]] {{4|8}}, i[[SZ]]* {{%[^,]+}} - - // CHECK-DAG: store i8* inttoptr (i[[SZ]] 5 to i8*), i8** {{%[^,]+}} - // CHECK-DAG: store i8* inttoptr (i[[SZ]] 5 to i8*), i8** {{%[^,]+}} - // CHECK-DAG: store i[[SZ]] {{4|8}}, i[[SZ]]* {{%[^,]+}} - - // CHECK-DAG: [[BP3:%[^,]+]] = inttoptr i[[SZ]] [[A_CVAL]] to i8* - // CHECK-DAG: [[P3:%[^,]+]] = inttoptr i[[SZ]] [[A_CVAL]] to i8* - // CHECK-DAG: store i8* [[BP3]], i8** {{%[^,]+}} - // CHECK-DAG: store i8* [[P3]], i8** {{%[^,]+}} - // CHECK-DAG: store i[[SZ]] 4, i[[SZ]]* {{%[^,]+}} - - // CHECK-DAG: [[BP4:%[^,]+]] = bitcast [10 x float]* %{{.+}} to i8* - // CHECK-DAG: [[P4:%[^,]+]] = bitcast [10 x float]* %{{.+}} to i8* - // CHECK-DAG: store i8* [[BP4]], i8** {{%[^,]+}} - // CHECK-DAG: store i8* [[P4]], i8** {{%[^,]+}} - // CHECK-DAG: store i[[SZ]] 40, i[[SZ]]* {{%[^,]+}} - - // CHECK-DAG: [[BP5:%[^,]+]] = bitcast float* %{{.+}} to i8* - // CHECK-DAG: [[P5:%[^,]+]] = bitcast float* %{{.+}} to i8* - // CHECK-DAG: store i8* [[BP5]], i8** {{%[^,]+}} - // CHECK-DAG: store i8* [[P5]], i8** {{%[^,]+}} - // CHECK-DAG: store i[[SZ]] [[BNSIZE]], i[[SZ]]* {{%[^,]+}} - - // CHECK-DAG: [[BP6:%[^,]+]] = bitcast [5 x [10 x double]]* %{{.+}} to i8* - // CHECK-DAG: [[P6:%[^,]+]] = bitcast [5 x [10 x double]]* %{{.+}} to i8* - // CHECK-DAG: store i8* [[BP6]], i8** {{%[^,]+}} - // CHECK-DAG: store i8* [[P6]], i8** {{%[^,]+}} - // CHECK-DAG: store i[[SZ]] 400, i[[SZ]]* {{%[^,]+}} - - // CHECK-DAG: [[BP7:%[^,]+]] = bitcast double* %{{.+}} to i8* - // CHECK-DAG: [[P7:%[^,]+]] = bitcast double* %{{.+}} to i8* - // CHECK-DAG: store i8* [[BP7]], i8** {{%[^,]+}} - // CHECK-DAG: store i8* [[P7]], i8** {{%[^,]+}} - // CHECK-DAG: store i[[SZ]] [[CNSIZE]], i[[SZ]]* {{%[^,]+}} - - // CHECK-DAG: [[BP8:%[^,]+]] = bitcast [[TT]]* %{{.+}} to i8* - // CHECK-DAG: [[P8:%[^,]+]] = bitcast [[TT]]* %{{.+}} to i8* - // CHECK-DAG: store i8* [[BP8]], i8** {{%[^,]+}} - // CHECK-DAG: store i8* [[P8]], i8** {{%[^,]+}} - // CHECK-DAG: store i[[SZ]] {{12|16}}, i[[SZ]]* {{%[^,]+}} + // CHECK-DAG: [[CBPADDR2:%.+]] = bitcast i8** [[BPADDR2]] to i[[SZ]]* + // CHECK-DAG: [[CPADDR2:%.+]] = bitcast i8** [[PADDR2]] to i[[SZ]]* + // CHECK-DAG: store i[[SZ]] [[VLA0]], i[[SZ]]* [[CBPADDR2]] + // CHECK-DAG: store i[[SZ]] [[VLA0]], i[[SZ]]* [[CPADDR2]] + // CHECK-DAG: store i[[SZ]] {{4|8}}, i[[SZ]]* [[SADDR2]] + + // CHECK-DAG: [[CBPADDR6:%.+]] = bitcast i8** [[BPADDR6]] to i[[SZ]]* + // CHECK-DAG: [[CPADDR6:%.+]] = bitcast i8** [[PADDR6]] to i[[SZ]]* + // CHECK-DAG: store i[[SZ]] [[VLA1]], i[[SZ]]* [[CBPADDR6]] + // CHECK-DAG: store i[[SZ]] [[VLA1]], i[[SZ]]* [[CPADDR6]] + // CHECK-DAG: store i[[SZ]] {{4|8}}, i[[SZ]]* [[SADDR6]] + + // CHECK-DAG: [[CBPADDR5:%.+]] = bitcast i8** [[BPADDR5]] to i[[SZ]]* + // CHECK-DAG: [[CPADDR5:%.+]] = bitcast i8** [[PADDR5]] to i[[SZ]]* + // CHECK-DAG: store i[[SZ]] 5, i[[SZ]]* [[CBPADDR5]] + // CHECK-DAG: store i[[SZ]] 5, i[[SZ]]* [[CPADDR5]] + // CHECK-DAG: store i[[SZ]] {{4|8}}, i[[SZ]]* [[SADDR5]] + + // CHECK-DAG: [[CBPADDR0:%.+]] = bitcast i8** [[BPADDR0]] to i[[SZ]]* + // CHECK-DAG: [[CPADDR0:%.+]] = bitcast i8** [[PADDR0]] to i[[SZ]]* + // CHECK-DAG: store i[[SZ]] [[A_CVAL]], i[[SZ]]* [[CBPADDR0]] + // CHECK-DAG: store i[[SZ]] [[A_CVAL]], i[[SZ]]* [[CPADDR0]] + // CHECK-DAG: store i[[SZ]] 4, i[[SZ]]* [[SADDR0]] + + // CHECK-DAG: [[CBPADDR1:%.+]] = bitcast i8** [[BPADDR1]] to [10 x float]** + // CHECK-DAG: [[CPADDR1:%.+]] = bitcast i8** [[PADDR1]] to [10 x float]** + // CHECK-DAG: store [10 x float]* %{{.+}}, [10 x float]** [[CBPADDR1]] + // CHECK-DAG: store [10 x float]* %{{.+}}, [10 x float]** [[CPADDR1]] + // CHECK-DAG: store i[[SZ]] 40, i[[SZ]]* [[SADDR1]] + + // CHECK-DAG: [[CBPADDR3:%.+]] = bitcast i8** [[BPADDR3]] to float** + // CHECK-DAG: [[CPADDR3:%.+]] = bitcast i8** [[PADDR3]] to float** + // CHECK-DAG: store float* %{{.+}}, float** [[CBPADDR3]] + // CHECK-DAG: store float* %{{.+}}, float** [[CPADDR3]] + // CHECK-DAG: store i[[SZ]] [[BNSIZE]], i[[SZ]]* [[SADDR3]] + + // CHECK-DAG: [[CBPADDR4:%.+]] = bitcast i8** [[BPADDR4]] to [5 x [10 x double]]** + // CHECK-DAG: [[CPADDR4:%.+]] = bitcast i8** [[PADDR4]] to [5 x [10 x double]]** + // CHECK-DAG: store [5 x [10 x double]]* %{{.+}}, [5 x [10 x double]]** [[CBPADDR4]] + // CHECK-DAG: store [5 x [10 x double]]* %{{.+}}, [5 x [10 x double]]** [[CPADDR4]] + // CHECK-DAG: store i[[SZ]] 400, i[[SZ]]* [[SADDR4]] + + // CHECK-DAG: [[CBPADDR7:%.+]] = bitcast i8** [[BPADDR7]] to double** + // CHECK-DAG: [[CPADDR7:%.+]] = bitcast i8** [[PADDR7]] to double** + // CHECK-DAG: store double* %{{.+}}, double** [[CBPADDR7]] + // CHECK-DAG: store double* %{{.+}}, double** [[CPADDR7]] + // CHECK-DAG: store i[[SZ]] [[CNSIZE]], i[[SZ]]* [[SADDR7]] + + // CHECK-DAG: [[CBPADDR8:%.+]] = bitcast i8** [[BPADDR8]] to [[TT]]** + // CHECK-DAG: [[CPADDR8:%.+]] = bitcast i8** [[PADDR8]] to [[TT]]** + // CHECK-DAG: store [[TT]]* %{{.+}}, [[TT]]** [[CBPADDR8]] + // CHECK-DAG: store [[TT]]* %{{.+}}, [[TT]]** [[CPADDR8]] + // CHECK-DAG: store i[[SZ]] {{12|16}}, i[[SZ]]* [[SADDR8]] // CHECK: store i32 [[RET]], i32* [[RHV:%.+]], align 4 // CHECK: [[RET2:%.+]] = load i32, i32* [[RHV]], align 4 @@ -468,48 +470,53 @@ int bar(int n){ // CHECK-DAG: [[BPR]] = getelementptr inbounds [5 x i8*], [5 x i8*]* [[BP:%.+]], i32 0, i32 0 // CHECK-DAG: [[PR]] = getelementptr inbounds [5 x i8*], [5 x i8*]* [[P:%.+]], i32 0, i32 0 // CHECK-DAG: [[SR]] = getelementptr inbounds [5 x i[[SZ]]], [5 x i[[SZ]]]* [[S:%.+]], i32 0, i32 0 -// CHECK-DAG: [[SADDR0:%.+]] = getelementptr inbounds [5 x i[[SZ]]], [5 x i[[SZ]]]* [[S]], i32 [[IDX0:[0-9]+]] -// CHECK-DAG: [[BPADDR0:%.+]] = getelementptr inbounds [5 x i8*], [5 x i8*]* [[BP]], i32 [[IDX0]] -// CHECK-DAG: [[PADDR0:%.+]] = getelementptr inbounds [5 x i8*], [5 x i8*]* [[P]], i32 [[IDX0]] -// CHECK-DAG: [[SADDR1:%.+]] = getelementptr inbounds [5 x i[[SZ]]], [5 x i[[SZ]]]* [[S]], i32 [[IDX1:[0-9]+]] -// CHECK-DAG: [[BPADDR1:%.+]] = getelementptr inbounds [5 x i8*], [5 x i8*]* [[BP]], i32 [[IDX1]] -// CHECK-DAG: [[PADDR1:%.+]] = getelementptr inbounds [5 x i8*], [5 x i8*]* [[P]], i32 [[IDX1]] -// CHECK-DAG: [[SADDR2:%.+]] = getelementptr inbounds [5 x i[[SZ]]], [5 x i[[SZ]]]* [[S]], i32 [[IDX2:[0-9]+]] -// CHECK-DAG: [[BPADDR2:%.+]] = getelementptr inbounds [5 x i8*], [5 x i8*]* [[BP]], i32 [[IDX2]] -// CHECK-DAG: [[PADDR2:%.+]] = getelementptr inbounds [5 x i8*], [5 x i8*]* [[P]], i32 [[IDX2]] -// CHECK-DAG: [[SADDR3:%.+]] = getelementptr inbounds [5 x i[[SZ]]], [5 x i[[SZ]]]* [[S]], i32 [[IDX3:[0-9]+]] -// CHECK-DAG: [[BPADDR3:%.+]] = getelementptr inbounds [5 x i8*], [5 x i8*]* [[BP]], i32 [[IDX3]] -// CHECK-DAG: [[PADDR3:%.+]] = getelementptr inbounds [5 x i8*], [5 x i8*]* [[P]], i32 [[IDX3]] +// CHECK-DAG: [[SADDR0:%.+]] = getelementptr inbounds [5 x i[[SZ]]], [5 x i[[SZ]]]* [[S]], i32 0, i32 [[IDX0:0]] +// CHECK-DAG: [[BPADDR0:%.+]] = getelementptr inbounds [5 x i8*], [5 x i8*]* [[BP]], i32 0, i32 [[IDX0]] +// CHECK-DAG: [[PADDR0:%.+]] = getelementptr inbounds [5 x i8*], [5 x i8*]* [[P]], i32 0, i32 [[IDX0]] +// CHECK-DAG: [[SADDR1:%.+]] = getelementptr inbounds [5 x i[[SZ]]], [5 x i[[SZ]]]* [[S]], i32 0, i32 [[IDX1:1]] +// CHECK-DAG: [[BPADDR1:%.+]] = getelementptr inbounds [5 x i8*], [5 x i8*]* [[BP]], i32 0, i32 [[IDX1]] +// CHECK-DAG: [[PADDR1:%.+]] = getelementptr inbounds [5 x i8*], [5 x i8*]* [[P]], i32 0, i32 [[IDX1]] +// CHECK-DAG: [[SADDR2:%.+]] = getelementptr inbounds [5 x i[[SZ]]], [5 x i[[SZ]]]* [[S]], i32 0, i32 [[IDX2:2]] +// CHECK-DAG: [[BPADDR2:%.+]] = getelementptr inbounds [5 x i8*], [5 x i8*]* [[BP]], i32 0, i32 [[IDX2]] +// CHECK-DAG: [[PADDR2:%.+]] = getelementptr inbounds [5 x i8*], [5 x i8*]* [[P]], i32 0, i32 [[IDX2]] +// CHECK-DAG: [[SADDR3:%.+]] = getelementptr inbounds [5 x i[[SZ]]], [5 x i[[SZ]]]* [[S]], i32 0, i32 [[IDX3:3]] +// CHECK-DAG: [[BPADDR3:%.+]] = getelementptr inbounds [5 x i8*], [5 x i8*]* [[BP]], i32 0, i32 [[IDX3]] +// CHECK-DAG: [[PADDR3:%.+]] = getelementptr inbounds [5 x i8*], [5 x i8*]* [[P]], i32 0, i32 [[IDX3]] +// CHECK-DAG: [[SADDR4:%.+]] = getelementptr inbounds [5 x i[[SZ]]], [5 x i[[SZ]]]* [[S]], i32 0, i32 [[IDX4:4]] +// CHECK-DAG: [[BPADDR4:%.+]] = getelementptr inbounds [5 x i8*], [5 x i8*]* [[BP]], i32 0, i32 [[IDX4]] +// CHECK-DAG: [[PADDR4:%.+]] = getelementptr inbounds [5 x i8*], [5 x i8*]* [[P]], i32 0, i32 [[IDX4]] // The names below are not necessarily consistent with the names used for the // addresses above as some are repeated. -// CHECK-DAG: [[BP0:%[^,]+]] = inttoptr i[[SZ]] [[VLA0]] to i8* -// CHECK-DAG: [[P0:%[^,]+]] = inttoptr i[[SZ]] [[VLA0]] to i8* -// CHECK-DAG: store i8* [[BP0]], i8** {{%[^,]+}} -// CHECK-DAG: store i8* [[P0]], i8** {{%[^,]+}} -// CHECK-DAG: store i[[SZ]] {{4|8}}, i[[SZ]]* {{%[^,]+}} - -// CHECK-DAG: store i8* inttoptr (i[[SZ]] 2 to i8*), i8** {{%[^,]+}} -// CHECK-DAG: store i8* inttoptr (i[[SZ]] 2 to i8*), i8** {{%[^,]+}} -// CHECK-DAG: store i[[SZ]] {{4|8}}, i[[SZ]]* {{%[^,]+}} - -// CHECK-DAG: [[BP2:%[^,]+]] = inttoptr i[[SZ]] [[B_CVAL]] to i8* -// CHECK-DAG: [[P2:%[^,]+]] = inttoptr i[[SZ]] [[B_CVAL]] to i8* -// CHECK-DAG: store i8* [[BP2]], i8** {{%[^,]+}} -// CHECK-DAG: store i8* [[P2]], i8** {{%[^,]+}} -// CHECK-DAG: store i[[SZ]] 4, i[[SZ]]* {{%[^,]+}} - -// CHECK-DAG: [[BP3:%[^,]+]] = bitcast [[S1]]* %{{.+}} to i8* -// CHECK-DAG: [[P3:%[^,]+]] = bitcast [[S1]]* %{{.+}} to i8* -// CHECK-DAG: store i8* [[BP3]], i8** {{%[^,]+}} -// CHECK-DAG: store i8* [[P3]], i8** {{%[^,]+}} -// CHECK-DAG: store i[[SZ]] 8, i[[SZ]]* {{%[^,]+}} - -// CHECK-DAG: [[BP4:%[^,]+]] = bitcast i16* %{{.+}} to i8* -// CHECK-DAG: [[P4:%[^,]+]] = bitcast i16* %{{.+}} to i8* -// CHECK-DAG: store i8* [[BP4]], i8** {{%[^,]+}} -// CHECK-DAG: store i8* [[P4]], i8** {{%[^,]+}} -// CHECK-DAG: store i[[SZ]] [[CSIZE]], i[[SZ]]* {{%[^,]+}} +// CHECK-DAG: [[CBPADDR3:%.+]] = bitcast i8** [[BPADDR3]] to i[[SZ]]* +// CHECK-DAG: [[CPADDR3:%.+]] = bitcast i8** [[PADDR3]] to i[[SZ]]* +// CHECK-DAG: store i[[SZ]] [[VLA0]], i[[SZ]]* [[CBPADDR3]] +// CHECK-DAG: store i[[SZ]] [[VLA0]], i[[SZ]]* [[CPADDR3]] +// CHECK-DAG: store i[[SZ]] {{4|8}}, i[[SZ]]* [[SADDR3]] + +// CHECK-DAG: [[CBPADDR2:%.+]] = bitcast i8** [[BPADDR2]] to i[[SZ]]* +// CHECK-DAG: [[CPADDR2:%.+]] = bitcast i8** [[PADDR2]] to i[[SZ]]* +// CHECK-DAG: store i[[SZ]] 2, i[[SZ]]* [[CBPADDR2]] +// CHECK-DAG: store i[[SZ]] 2, i[[SZ]]* [[CPADDR2]] +// CHECK-DAG: store i[[SZ]] {{4|8}}, i[[SZ]]* [[SADDR2]] + +// CHECK-DAG: [[CBPADDR1:%.+]] = bitcast i8** [[BPADDR1]] to i[[SZ]]* +// CHECK-DAG: [[CPADDR1:%.+]] = bitcast i8** [[PADDR1]] to i[[SZ]]* +// CHECK-DAG: store i[[SZ]] [[B_CVAL]], i[[SZ]]* [[CBPADDR1]] +// CHECK-DAG: store i[[SZ]] [[B_CVAL]], i[[SZ]]* [[CPADDR1]] +// CHECK-DAG: store i[[SZ]] 4, i[[SZ]]* [[SADDR1]] + +// CHECK-DAG: [[CBPADDR0:%.+]] = bitcast i8** [[BPADDR0]] to [[S1]]** +// CHECK-DAG: [[CPADDR0:%.+]] = bitcast i8** [[PADDR0]] to [[S1]]** +// CHECK-DAG: store [[S1]]* %{{.+}}, [[S1]]** [[CBPADDR0]] +// CHECK-DAG: store [[S1]]* %{{.+}}, [[S1]]** [[CPADDR0]] +// CHECK-DAG: store i[[SZ]] 8, i[[SZ]]* [[SADDR0]] + +// CHECK-DAG: [[CBPADDR4:%.+]] = bitcast i8** [[BPADDR4]] to i16** +// CHECK-DAG: [[CPADDR4:%.+]] = bitcast i8** [[PADDR4]] to i16** +// CHECK-DAG: store i16* %{{.+}}, i16** [[CBPADDR4]] +// CHECK-DAG: store i16* %{{.+}}, i16** [[CPADDR4]] +// CHECK-DAG: store i[[SZ]] [[CSIZE]], i[[SZ]]* [[SADDR4]] // CHECK: store i32 [[RET]], i32* [[RHV:%.+]], align 4 // CHECK: [[RET2:%.+]] = load i32, i32* [[RHV]], align 4 @@ -533,29 +540,31 @@ int bar(int n){ // CHECK-DAG: [[BPADDR0:%.+]] = getelementptr inbounds [4 x i8*], [4 x i8*]* [[BP]], i32 0, i32 0 // CHECK-DAG: [[PADDR0:%.+]] = getelementptr inbounds [4 x i8*], [4 x i8*]* [[P]], i32 0, i32 0 -// CHECK-DAG: store i8* [[BP0:%[^,]+]], i8** [[BPADDR0]] -// CHECK-DAG: store i8* [[P0:%[^,]+]], i8** [[PADDR0]] -// CHECK-DAG: [[BP0]] = inttoptr i[[SZ]] [[VAL0:%.+]] to i8* -// CHECK-DAG: [[P0]] = inttoptr i[[SZ]] [[VAL0]] to i8* +// CHECK-DAG: [[CBPADDR0:%.+]] = bitcast i8** [[BPADDR0]] to i[[SZ]]* +// CHECK-DAG: [[CPADDR0:%.+]] = bitcast i8** [[PADDR0]] to i[[SZ]]* +// CHECK-DAG: store i[[SZ]] [[VAL0:%[^,]+]], i[[SZ]]* [[CBPADDR0]] +// CHECK-DAG: store i[[SZ]] [[VAL0]], i[[SZ]]* [[CPADDR0]] // CHECK-DAG: [[BPADDR1:%.+]] = getelementptr inbounds [4 x i8*], [4 x i8*]* [[BP]], i32 0, i32 1 // CHECK-DAG: [[PADDR1:%.+]] = getelementptr inbounds [4 x i8*], [4 x i8*]* [[P]], i32 0, i32 1 -// CHECK-DAG: store i8* [[BP1:%[^,]+]], i8** [[BPADDR1]] -// CHECK-DAG: store i8* [[P1:%[^,]+]], i8** [[PADDR1]] -// CHECK-DAG: [[BP1]] = inttoptr i[[SZ]] [[VAL1:%.+]] to i8* -// CHECK-DAG: [[P1]] = inttoptr i[[SZ]] [[VAL1]] to i8* +// CHECK-DAG: [[CBPADDR1:%.+]] = bitcast i8** [[BPADDR1]] to i[[SZ]]* +// CHECK-DAG: [[CPADDR1:%.+]] = bitcast i8** [[PADDR1]] to i[[SZ]]* +// CHECK-DAG: store i[[SZ]] [[VAL1:%[^,]+]], i[[SZ]]* [[CBPADDR1]] +// CHECK-DAG: store i[[SZ]] [[VAL1]], i[[SZ]]* [[CPADDR1]] // CHECK-DAG: [[BPADDR2:%.+]] = getelementptr inbounds [4 x i8*], [4 x i8*]* [[BP]], i32 0, i32 2 // CHECK-DAG: [[PADDR2:%.+]] = getelementptr inbounds [4 x i8*], [4 x i8*]* [[P]], i32 0, i32 2 -// CHECK-DAG: store i8* [[BP2:%[^,]+]], i8** [[BPADDR2]] -// CHECK-DAG: store i8* [[P2:%[^,]+]], i8** [[PADDR2]] +// CHECK-DAG: [[CBPADDR2:%.+]] = bitcast i8** [[BPADDR2]] to i[[SZ]]* +// CHECK-DAG: [[CPADDR2:%.+]] = bitcast i8** [[PADDR2]] to i[[SZ]]* +// CHECK-DAG: store i[[SZ]] [[VAL2:%[^,]+]], i[[SZ]]* [[CBPADDR2]] +// CHECK-DAG: store i[[SZ]] [[VAL2]], i[[SZ]]* [[CPADDR2]] // CHECK-DAG: [[BPADDR3:%.+]] = getelementptr inbounds [4 x i8*], [4 x i8*]* [[BP]], i32 0, i32 3 // CHECK-DAG: [[PADDR3:%.+]] = getelementptr inbounds [4 x i8*], [4 x i8*]* [[P]], i32 0, i32 3 -// CHECK-DAG: store i8* [[BP3:%[^,]+]], i8** [[BPADDR3]] -// CHECK-DAG: store i8* [[P3:%[^,]+]], i8** [[PADDR3]] -// CHECK-DAG: [[BP3]] = bitcast [10 x i32]* %{{.+}} to i8* -// CHECK-DAG: [[P3]] = bitcast [10 x i32]* %{{.+}} to i8* +// CHECK-DAG: [[CBPADDR3:%.+]] = bitcast i8** [[BPADDR3]] to [10 x i32]** +// CHECK-DAG: [[CPADDR3:%.+]] = bitcast i8** [[PADDR3]] to [10 x i32]** +// CHECK-DAG: store [10 x i32]* [[VAL3:%[^,]+]], [10 x i32]** [[CBPADDR3]] +// CHECK-DAG: store [10 x i32]* [[VAL3]], [10 x i32]** [[CPADDR3]] // CHECK: store i32 [[RET]], i32* [[RHV:%.+]], align 4 // CHECK-NEXT: br label %[[IFEND:.+]] @@ -585,24 +594,24 @@ int bar(int n){ // CHECK-DAG: [[BPADDR0:%.+]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[BP]], i32 0, i32 0 // CHECK-DAG: [[PADDR0:%.+]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[P]], i32 0, i32 0 -// CHECK-DAG: store i8* [[BP0:%[^,]+]], i8** [[BPADDR0]] -// CHECK-DAG: store i8* [[P0:%[^,]+]], i8** [[PADDR0]] -// CHECK-DAG: [[BP0]] = inttoptr i[[SZ]] [[VAL0:%.+]] to i8* -// CHECK-DAG: [[P0]] = inttoptr i[[SZ]] [[VAL0]] to i8* +// CHECK-DAG: [[CBPADDR0:%.+]] = bitcast i8** [[BPADDR0]] to i[[SZ]]* +// CHECK-DAG: [[CPADDR0:%.+]] = bitcast i8** [[PADDR0]] to i[[SZ]]* +// CHECK-DAG: store i[[SZ]] [[VAL0:%[^,]+]], i[[SZ]]* [[CBPADDR0]] +// CHECK-DAG: store i[[SZ]] [[VAL0]], i[[SZ]]* [[CPADDR0]] // CHECK-DAG: [[BPADDR1:%.+]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[BP]], i32 0, i32 1 // CHECK-DAG: [[PADDR1:%.+]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[P]], i32 0, i32 1 -// CHECK-DAG: store i8* [[BP1:%[^,]+]], i8** [[BPADDR1]] -// CHECK-DAG: store i8* [[P1:%[^,]+]], i8** [[PADDR1]] -// CHECK-DAG: [[BP1]] = inttoptr i[[SZ]] [[VAL1:%.+]] to i8* -// CHECK-DAG: [[P1]] = inttoptr i[[SZ]] [[VAL1]] to i8* +// CHECK-DAG: [[CBPADDR1:%.+]] = bitcast i8** [[BPADDR1]] to i[[SZ]]* +// CHECK-DAG: [[CPADDR1:%.+]] = bitcast i8** [[PADDR1]] to i[[SZ]]* +// CHECK-DAG: store i[[SZ]] [[VAL1:%[^,]+]], i[[SZ]]* [[CBPADDR1]] +// CHECK-DAG: store i[[SZ]] [[VAL1]], i[[SZ]]* [[CPADDR1]] // CHECK-DAG: [[BPADDR2:%.+]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[BP]], i32 0, i32 2 // CHECK-DAG: [[PADDR2:%.+]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[P]], i32 0, i32 2 -// CHECK-DAG: store i8* [[BP2:%[^,]+]], i8** [[BPADDR2]] -// CHECK-DAG: store i8* [[P2:%[^,]+]], i8** [[PADDR2]] -// CHECK-DAG: [[BP2]] = bitcast [10 x i32]* %{{.+}} to i8* -// CHECK-DAG: [[P2]] = bitcast [10 x i32]* %{{.+}} to i8* +// CHECK-DAG: [[CBPADDR2:%.+]] = bitcast i8** [[BPADDR2]] to [10 x i32]** +// CHECK-DAG: [[CPADDR2:%.+]] = bitcast i8** [[PADDR2]] to [10 x i32]** +// CHECK-DAG: store [10 x i32]* [[VAL2:%[^,]+]], [10 x i32]** [[CBPADDR2]] +// CHECK-DAG: store [10 x i32]* [[VAL2]], [10 x i32]** [[CPADDR2]] // CHECK: store i32 [[RET]], i32* [[RHV:%.+]], align 4 // CHECK-NEXT: br label %[[IFEND:.+]] diff --git a/test/OpenMP/target_codegen_global_capture.cpp b/test/OpenMP/target_codegen_global_capture.cpp index b08bf10f9f..eb34082b29 100644 --- a/test/OpenMP/target_codegen_global_capture.cpp +++ b/test/OpenMP/target_codegen_global_capture.cpp @@ -36,10 +36,10 @@ double Gd = 4.0; // CHECK-SAME: i16 {{[^,]*}}[[B:%[^,]+]], // CHECK-SAME: i16 {{[^,]*}}[[C:%[^,]+]], // CHECK-SAME: i16 {{[^,]*}}[[D:%[^,]+]]) -// CHECK: [[LA:%.+]] = alloca i16 -// CHECK: [[LB:%.+]] = alloca i16 -// CHECK: [[LC:%.+]] = alloca i16 -// CHECK: [[LD:%.+]] = alloca i16 +// CHECK: [[LA:%.+]] = alloca i16, +// CHECK: [[LB:%.+]] = alloca i16, +// CHECK: [[LC:%.+]] = alloca i16, +// CHECK: [[LD:%.+]] = alloca i16, int foo(short a, short b, short c, short d){ static float Sa = 5.0; static float Sb = 6.0; @@ -61,22 +61,22 @@ int foo(short a, short b, short c, short d){ // CHECK-DAG: store i16 [[VALLB]], i16* [[CONVLB:%.+]], // CHECK-DAG: [[CONVLB]] = bitcast i[[sz:64|32]]* [[CADDRLB:%.+]] to i16* // CHECK-DAG: [[CVALLB:%.+]] = load i[[sz]], i[[sz]]* [[CADDRLB]], - // CHECK-DAG: [[CPTRLB:%.+]] = inttoptr i[[sz]] [[CVALLB]] to i8* - // CHECK-DAG: store i8* [[CPTRLB]], i8** [[GEPLB:%.+]], + // CHECK-DAG: store i[[sz]] [[CVALLB]], i[[sz]]* [[CBP:%.+]], + // CHECK-DAG: [[CBP]] = bitcast i8** [[GEPLB:%.+]] to i[[sz]]* // CHECK-DAG: [[GEPLB]] = getelementptr inbounds [9 x i8*], [9 x i8*]* %{{.+}}, i32 0, i32 {{[0-8]}} // CHECK-DAG: store i16 [[VALLC]], i16* [[CONVLC:%.+]], // CHECK-DAG: [[CONVLC]] = bitcast i[[sz]]* [[CADDRLC:%.+]] to i16* // CHECK-DAG: [[CVALLC:%.+]] = load i[[sz]], i[[sz]]* [[CADDRLC]], - // CHECK-DAG: [[CPTRLC:%.+]] = inttoptr i[[sz]] [[CVALLC]] to i8* - // CHECK-DAG: store i8* [[CPTRLC]], i8** [[GEPLC:%.+]], + // CHECK-DAG: store i[[sz]] [[CVALLC]], i[[sz]]* [[CBP:%.+]], + // CHECK-DAG: [[CBP]] = bitcast i8** [[GEPLC:%.+]] to i[[sz]]* // CHECK-DAG: [[GEPLC]] = getelementptr inbounds [9 x i8*], [9 x i8*]* %{{.+}}, i32 0, i32 {{[0-8]}} // CHECK-DAG: store i16 [[VALLD]], i16* [[CONVLD:%.+]], // CHECK-DAG: [[CONVLD]] = bitcast i[[sz]]* [[CADDRLD:%.+]] to i16* // CHECK-DAG: [[CVALLD:%.+]] = load i[[sz]], i[[sz]]* [[CADDRLD]], - // CHECK-DAG: [[CPTRLD:%.+]] = inttoptr i[[sz]] [[CVALLD]] to i8* - // CHECK-DAG: store i8* [[CPTRLD]], i8** [[GEPLD:%.+]], + // CHECK-DAG: store i[[sz]] [[CVALLD]], i[[sz]]* [[CBP:%.+]], + // CHECK-DAG: [[CBP]] = bitcast i8** [[GEPLD:%.+]] to i[[sz]]* // CHECK-DAG: [[GEPLD]] = getelementptr inbounds [9 x i8*], [9 x i8*]* %{{.+}}, i32 0, i32 {{[0-8]}} // 3 static vars being captured. @@ -84,22 +84,22 @@ int foo(short a, short b, short c, short d){ // CHECK-DAG: store float [[VALFB]], float* [[CONVFB:%.+]], // CHECK-DAG: [[CONVFB]] = bitcast i[[sz]]* [[CADDRFB:%.+]] to float* // CHECK-DAG: [[CVALFB:%.+]] = load i[[sz]], i[[sz]]* [[CADDRFB]], - // CHECK-DAG: [[CPTRFB:%.+]] = inttoptr i[[sz]] [[CVALFB]] to i8* - // CHECK-DAG: store i8* [[CPTRFB]], i8** [[GEPFB:%.+]], + // CHECK-DAG: store i[[sz]] [[CVALFB]], i[[sz]]* [[CBP:%.+]], + // CHECK-DAG: [[CBP]] = bitcast i8** [[GEPFB:%.+]] to i[[sz]]* // CHECK-DAG: [[GEPFB]] = getelementptr inbounds [9 x i8*], [9 x i8*]* %{{.+}}, i32 0, i32 {{[0-8]}} // CHECK-DAG: store float [[VALFC]], float* [[CONVFC:%.+]], // CHECK-DAG: [[CONVFC]] = bitcast i[[sz]]* [[CADDRFC:%.+]] to float* // CHECK-DAG: [[CVALFC:%.+]] = load i[[sz]], i[[sz]]* [[CADDRFC]], - // CHECK-DAG: [[CPTRFC:%.+]] = inttoptr i[[sz]] [[CVALFC]] to i8* - // CHECK-DAG: store i8* [[CPTRFC]], i8** [[GEPFC:%.+]], + // CHECK-DAG: store i[[sz]] [[CVALFC]], i[[sz]]* [[CBP:%.+]], + // CHECK-DAG: [[CBP]] = bitcast i8** [[GEPFC:%.+]] to i[[sz]]* // CHECK-DAG: [[GEPFC]] = getelementptr inbounds [9 x i8*], [9 x i8*]* %{{.+}}, i32 0, i32 {{[0-8]}} // CHECK-DAG: store float [[VALFD]], float* [[CONVFD:%.+]], // CHECK-DAG: [[CONVFD]] = bitcast i[[sz]]* [[CADDRFD:%.+]] to float* // CHECK-DAG: [[CVALFD:%.+]] = load i[[sz]], i[[sz]]* [[CADDRFD]], - // CHECK-DAG: [[CPTRFD:%.+]] = inttoptr i[[sz]] [[CVALFD]] to i8* - // CHECK-DAG: store i8* [[CPTRFD]], i8** [[GEPFD:%.+]], + // CHECK-DAG: store i[[sz]] [[CVALFD]], i[[sz]]* [[CBP:%.+]], + // CHECK-DAG: [[CBP]] = bitcast i8** [[GEPFD:%.+]] to i[[sz]]* // CHECK-DAG: [[GEPFD]] = getelementptr inbounds [9 x i8*], [9 x i8*]* %{{.+}}, i32 0, i32 {{[0-8]}} // 3 static global vars being captured. @@ -107,25 +107,28 @@ int foo(short a, short b, short c, short d){ // CHECK-64-DAG: store double [[VALGB]], double* [[CONVGB:%.+]], // CHECK-64-DAG: [[CONVGB]] = bitcast i[[sz]]* [[CADDRGB:%.+]] to double* // CHECK-64-DAG: [[CVALGB:%.+]] = load i[[sz]], i[[sz]]* [[CADDRGB]], - // CHECK-64-DAG: [[CPTRGB:%.+]] = inttoptr i[[sz]] [[CVALGB]] to i8* - // CHECK-64-DAG: store i8* [[CPTRGB]], i8** [[GEPGB:%.+]], - // CHECK-32-DAG: store i8* bitcast (double* @Gb to i8*), i8** [[GEPGB:%.+]], + // CHECK-64-DAG: store i[[sz]] [[CVALGB]], i[[sz]]* [[CBP:%.+]], + // CHECK-64-DAG: [[CBP]] = bitcast i8** [[GEPGB:%.+]] to i[[sz]]* + // CHECK-32-DAG: store double* @Gb, double** [[CBP:%.+]], + // CHECK-32-DAG: [[CBP]] = bitcast i8** [[GEPGB:%.+]] to double** // CHECK-DAG: [[GEPGB]] = getelementptr inbounds [9 x i8*], [9 x i8*]* %{{.+}}, i32 0, i32 {{[0-8]}} // CHECK-64-DAG: store double [[VALGC]], double* [[CONVGC:%.+]], // CHECK-64-DAG: [[CONVGC]] = bitcast i[[sz]]* [[CADDRGC:%.+]] to double* // CHECK-64-DAG: [[CVALGC:%.+]] = load i[[sz]], i[[sz]]* [[CADDRGC]], - // CHECK-64-DAG: [[CPTRGC:%.+]] = inttoptr i[[sz]] [[CVALGC]] to i8* - // CHECK-64-DAG: store i8* [[CPTRGC]], i8** [[GEPGC:%.+]], - // CHECK-32-DAG: store i8* bitcast (double* @Gc to i8*), i8** [[GEPGC:%.+]], + // CHECK-64-DAG: store i[[sz]] [[CVALGC]], i[[sz]]* [[CBP:%.+]], + // CHECK-64-DAG: [[CBP]] = bitcast i8** [[GEPGC:%.+]] to i[[sz]]* + // CHECK-32-DAG: store double* @Gc, double** [[CBP:%.+]], + // CHECK-32-DAG: [[CBP]] = bitcast i8** [[GEPGC:%.+]] to double** // CHECK-DAG: [[GEPGC]] = getelementptr inbounds [9 x i8*], [9 x i8*]* %{{.+}}, i32 0, i32 {{[0-8]}} // CHECK-64-DAG: store double [[VALGD]], double* [[CONVGD:%.+]], // CHECK-64-DAG: [[CONVGD]] = bitcast i[[sz]]* [[CADDRGD:%.+]] to double* // CHECK-64-DAG: [[CVALGD:%.+]] = load i[[sz]], i[[sz]]* [[CADDRGD]], - // CHECK-64-DAG: [[CPTRGD:%.+]] = inttoptr i[[sz]] [[CVALGD]] to i8* - // CHECK-64-DAG: store i8* [[CPTRGD]], i8** [[GEPGD:%.+]], - // CHECK-32-DAG: store i8* bitcast (double* @Gd to i8*), i8** [[GEPGD:%.+]], + // CHECK-64-DAG: store i[[sz]] [[CVALGD]], i[[sz]]* [[CBP:%.+]], + // CHECK-64-DAG: [[CBP]] = bitcast i8** [[GEPGD:%.+]] to i[[sz]]* + // CHECK-32-DAG: store double* @Gd, double** [[CBP:%.+]], + // CHECK-32-DAG: [[CBP]] = bitcast i8** [[GEPGD:%.+]] to double** // CHECK-DAG: [[GEPGD]] = getelementptr inbounds [9 x i8*], [9 x i8*]* %{{.+}}, i32 0, i32 {{[0-8]}} // CHECK: call i32 @__tgt_target @@ -197,22 +200,22 @@ int bar(short a, short b, short c, short d){ // CHECK-DAG: store i16 [[VALLB]], i16* [[CONVLB:%.+]], // CHECK-DAG: [[CONVLB]] = bitcast i[[sz:64|32]]* [[CADDRLB:%.+]] to i16* // CHECK-DAG: [[CVALLB:%.+]] = load i[[sz]], i[[sz]]* [[CADDRLB]], - // CHECK-DAG: [[CPTRLB:%.+]] = inttoptr i[[sz]] [[CVALLB]] to i8* - // CHECK-DAG: store i8* [[CPTRLB]], i8** [[GEPLB:%.+]], + // CHECK-DAG: store i[[sz]] [[CVALLB]], i[[sz]]* [[CBP:%.+]], + // CHECK-DAG: [[CBP]] = bitcast i8** [[GEPLB:%.+]] to i[[sz]]* // CHECK-DAG: [[GEPLB]] = getelementptr inbounds [9 x i8*], [9 x i8*]* %{{.+}}, i32 0, i32 {{[0-8]}} // CHECK-DAG: store i16 [[VALLC]], i16* [[CONVLC:%.+]], // CHECK-DAG: [[CONVLC]] = bitcast i[[sz]]* [[CADDRLC:%.+]] to i16* // CHECK-DAG: [[CVALLC:%.+]] = load i[[sz]], i[[sz]]* [[CADDRLC]], - // CHECK-DAG: [[CPTRLC:%.+]] = inttoptr i[[sz]] [[CVALLC]] to i8* - // CHECK-DAG: store i8* [[CPTRLC]], i8** [[GEPLC:%.+]], + // CHECK-DAG: store i[[sz]] [[CVALLC]], i[[sz]]* [[CBP:%.+]], + // CHECK-DAG: [[CBP]] = bitcast i8** [[GEPLC:%.+]] to i[[sz]]* // CHECK-DAG: [[GEPLC]] = getelementptr inbounds [9 x i8*], [9 x i8*]* %{{.+}}, i32 0, i32 {{[0-8]}} // CHECK-DAG: store i16 [[VALLD]], i16* [[CONVLD:%.+]], // CHECK-DAG: [[CONVLD]] = bitcast i[[sz]]* [[CADDRLD:%.+]] to i16* // CHECK-DAG: [[CVALLD:%.+]] = load i[[sz]], i[[sz]]* [[CADDRLD]], - // CHECK-DAG: [[CPTRLD:%.+]] = inttoptr i[[sz]] [[CVALLD]] to i8* - // CHECK-DAG: store i8* [[CPTRLD]], i8** [[GEPLD:%.+]], + // CHECK-DAG: store i[[sz]] [[CVALLD]], i[[sz]]* [[CBP:%.+]], + // CHECK-DAG: [[CBP]] = bitcast i8** [[GEPLD:%.+]] to i[[sz]]* // CHECK-DAG: [[GEPLD]] = getelementptr inbounds [9 x i8*], [9 x i8*]* %{{.+}}, i32 0, i32 {{[0-8]}} // 3 static vars being captured. @@ -220,22 +223,22 @@ int bar(short a, short b, short c, short d){ // CHECK-DAG: store float [[VALFB]], float* [[CONVFB:%.+]], // CHECK-DAG: [[CONVFB]] = bitcast i[[sz]]* [[CADDRFB:%.+]] to float* // CHECK-DAG: [[CVALFB:%.+]] = load i[[sz]], i[[sz]]* [[CADDRFB]], - // CHECK-DAG: [[CPTRFB:%.+]] = inttoptr i[[sz]] [[CVALFB]] to i8* - // CHECK-DAG: store i8* [[CPTRFB]], i8** [[GEPFB:%.+]], + // CHECK-DAG: store i[[sz]] [[CVALFB]], i[[sz]]* [[CBP:%.+]], + // CHECK-DAG: [[CBP]] = bitcast i8** [[GEPFB:%.+]] to i[[sz]]* // CHECK-DAG: [[GEPFB]] = getelementptr inbounds [9 x i8*], [9 x i8*]* %{{.+}}, i32 0, i32 {{[0-8]}} // CHECK-DAG: store float [[VALFC]], float* [[CONVFC:%.+]], // CHECK-DAG: [[CONVFC]] = bitcast i[[sz]]* [[CADDRFC:%.+]] to float* // CHECK-DAG: [[CVALFC:%.+]] = load i[[sz]], i[[sz]]* [[CADDRFC]], - // CHECK-DAG: [[CPTRFC:%.+]] = inttoptr i[[sz]] [[CVALFC]] to i8* - // CHECK-DAG: store i8* [[CPTRFC]], i8** [[GEPFC:%.+]], + // CHECK-DAG: store i[[sz]] [[CVALFC]], i[[sz]]* [[CBP:%.+]], + // CHECK-DAG: [[CBP]] = bitcast i8** [[GEPFC:%.+]] to i[[sz]]* // CHECK-DAG: [[GEPFC]] = getelementptr inbounds [9 x i8*], [9 x i8*]* %{{.+}}, i32 0, i32 {{[0-8]}} // CHECK-DAG: store float [[VALFD]], float* [[CONVFD:%.+]], // CHECK-DAG: [[CONVFD]] = bitcast i[[sz]]* [[CADDRFD:%.+]] to float* // CHECK-DAG: [[CVALFD:%.+]] = load i[[sz]], i[[sz]]* [[CADDRFD]], - // CHECK-DAG: [[CPTRFD:%.+]] = inttoptr i[[sz]] [[CVALFD]] to i8* - // CHECK-DAG: store i8* [[CPTRFD]], i8** [[GEPFD:%.+]], + // CHECK-DAG: store i[[sz]] [[CVALFD]], i[[sz]]* [[CBP:%.+]], + // CHECK-DAG: [[CBP]] = bitcast i8** [[GEPFD:%.+]] to i[[sz]]* // CHECK-DAG: [[GEPFD]] = getelementptr inbounds [9 x i8*], [9 x i8*]* %{{.+}}, i32 0, i32 {{[0-8]}} // 3 static global vars being captured. @@ -243,25 +246,28 @@ int bar(short a, short b, short c, short d){ // CHECK-64-DAG: store double [[VALGB]], double* [[CONVGB:%.+]], // CHECK-64-DAG: [[CONVGB]] = bitcast i[[sz]]* [[CADDRGB:%.+]] to double* // CHECK-64-DAG: [[CVALGB:%.+]] = load i[[sz]], i[[sz]]* [[CADDRGB]], - // CHECK-64-DAG: [[CPTRGB:%.+]] = inttoptr i[[sz]] [[CVALGB]] to i8* - // CHECK-64-DAG: store i8* [[CPTRGB]], i8** [[GEPGB:%.+]], - // CHECK-32-DAG: store i8* bitcast (double* @Gb to i8*), i8** [[GEPGB:%.+]], + // CHECK-64-DAG: store i[[sz]] [[CVALGB]], i[[sz]]* [[CBP:%.+]], + // CHECK-64-DAG: [[CBP]] = bitcast i8** [[GEPGB:%.+]] to i[[sz]]* + // CHECK-32-DAG: store double* @Gb, double** [[CBP:%.+]], + // CHECK-32-DAG: [[CBP]] = bitcast i8** [[GEPGB:%.+]] to double** // CHECK-DAG: [[GEPGB]] = getelementptr inbounds [9 x i8*], [9 x i8*]* %{{.+}}, i32 0, i32 {{[0-8]}} // CHECK-64-DAG: store double [[VALGC]], double* [[CONVGC:%.+]], // CHECK-64-DAG: [[CONVGC]] = bitcast i[[sz]]* [[CADDRGC:%.+]] to double* // CHECK-64-DAG: [[CVALGC:%.+]] = load i[[sz]], i[[sz]]* [[CADDRGC]], - // CHECK-64-DAG: [[CPTRGC:%.+]] = inttoptr i[[sz]] [[CVALGC]] to i8* - // CHECK-64-DAG: store i8* [[CPTRGC]], i8** [[GEPGC:%.+]], - // CHECK-32-DAG: store i8* bitcast (double* @Gc to i8*), i8** [[GEPGC:%.+]], + // CHECK-64-DAG: store i[[sz]] [[CVALGC]], i[[sz]]* [[CBP:%.+]], + // CHECK-64-DAG: [[CBP]] = bitcast i8** [[GEPGC:%.+]] to i[[sz]]* + // CHECK-32-DAG: store double* @Gc, double** [[CBP:%.+]], + // CHECK-32-DAG: [[CBP]] = bitcast i8** [[GEPGC:%.+]] to double** // CHECK-DAG: [[GEPGC]] = getelementptr inbounds [9 x i8*], [9 x i8*]* %{{.+}}, i32 0, i32 {{[0-8]}} // CHECK-64-DAG: store double [[VALGD]], double* [[CONVGD:%.+]], // CHECK-64-DAG: [[CONVGD]] = bitcast i[[sz]]* [[CADDRGD:%.+]] to double* // CHECK-64-DAG: [[CVALGD:%.+]] = load i[[sz]], i[[sz]]* [[CADDRGD]], - // CHECK-64-DAG: [[CPTRGD:%.+]] = inttoptr i[[sz]] [[CVALGD]] to i8* - // CHECK-64-DAG: store i8* [[CPTRGD]], i8** [[GEPGD:%.+]], - // CHECK-32-DAG: store i8* bitcast (double* @Gd to i8*), i8** [[GEPGD:%.+]], + // CHECK-64-DAG: store i[[sz]] [[CVALGD]], i[[sz]]* [[CBP:%.+]], + // CHECK-64-DAG: [[CBP]] = bitcast i8** [[GEPGD:%.+]] to i[[sz]]* + // CHECK-32-DAG: store double* @Gd, double** [[CBP:%.+]], + // CHECK-32-DAG: [[CBP]] = bitcast i8** [[GEPGD:%.+]] to double** // CHECK-DAG: [[GEPGD]] = getelementptr inbounds [9 x i8*], [9 x i8*]* %{{.+}}, i32 0, i32 {{[0-8]}} // CHECK: call i32 @__tgt_target @@ -339,22 +345,22 @@ int tbar(T a, T b, T c, T d){ // CHECK-DAG: store i16 [[VALLB]], i16* [[CONVLB:%.+]], // CHECK-DAG: [[CONVLB]] = bitcast i[[sz:64|32]]* [[CADDRLB:%.+]] to i16* // CHECK-DAG: [[CVALLB:%.+]] = load i[[sz]], i[[sz]]* [[CADDRLB]], - // CHECK-DAG: [[CPTRLB:%.+]] = inttoptr i[[sz]] [[CVALLB]] to i8* - // CHECK-DAG: store i8* [[CPTRLB]], i8** [[GEPLB:%.+]], + // CHECK-DAG: store i[[sz]] [[CVALLB]], i[[sz]]* [[CBP:%.+]], + // CHECK-DAG: [[CBP]] = bitcast i8** [[GEPLB:%.+]] to i[[sz]]* // CHECK-DAG: [[GEPLB]] = getelementptr inbounds [9 x i8*], [9 x i8*]* %{{.+}}, i32 0, i32 {{[0-8]}} // CHECK-DAG: store i16 [[VALLC]], i16* [[CONVLC:%.+]], // CHECK-DAG: [[CONVLC]] = bitcast i[[sz]]* [[CADDRLC:%.+]] to i16* // CHECK-DAG: [[CVALLC:%.+]] = load i[[sz]], i[[sz]]* [[CADDRLC]], - // CHECK-DAG: [[CPTRLC:%.+]] = inttoptr i[[sz]] [[CVALLC]] to i8* - // CHECK-DAG: store i8* [[CPTRLC]], i8** [[GEPLC:%.+]], + // CHECK-DAG: store i[[sz]] [[CVALLC]], i[[sz]]* [[CBP:%.+]], + // CHECK-DAG: [[CBP]] = bitcast i8** [[GEPLC:%.+]] to i[[sz]]* // CHECK-DAG: [[GEPLC]] = getelementptr inbounds [9 x i8*], [9 x i8*]* %{{.+}}, i32 0, i32 {{[0-8]}} // CHECK-DAG: store i16 [[VALLD]], i16* [[CONVLD:%.+]], // CHECK-DAG: [[CONVLD]] = bitcast i[[sz]]* [[CADDRLD:%.+]] to i16* // CHECK-DAG: [[CVALLD:%.+]] = load i[[sz]], i[[sz]]* [[CADDRLD]], - // CHECK-DAG: [[CPTRLD:%.+]] = inttoptr i[[sz]] [[CVALLD]] to i8* - // CHECK-DAG: store i8* [[CPTRLD]], i8** [[GEPLD:%.+]], + // CHECK-DAG: store i[[sz]] [[CVALLD]], i[[sz]]* [[CBP:%.+]], + // CHECK-DAG: [[CBP]] = bitcast i8** [[GEPLD:%.+]] to i[[sz]]* // CHECK-DAG: [[GEPLD]] = getelementptr inbounds [9 x i8*], [9 x i8*]* %{{.+}}, i32 0, i32 {{[0-8]}} // 3 static vars being captured. @@ -362,22 +368,22 @@ int tbar(T a, T b, T c, T d){ // CHECK-DAG: store float [[VALFB]], float* [[CONVFB:%.+]], // CHECK-DAG: [[CONVFB]] = bitcast i[[sz]]* [[CADDRFB:%.+]] to float* // CHECK-DAG: [[CVALFB:%.+]] = load i[[sz]], i[[sz]]* [[CADDRFB]], - // CHECK-DAG: [[CPTRFB:%.+]] = inttoptr i[[sz]] [[CVALFB]] to i8* - // CHECK-DAG: store i8* [[CPTRFB]], i8** [[GEPFB:%.+]], + // CHECK-DAG: store i[[sz]] [[CVALFB]], i[[sz]]* [[CBP:%.+]], + // CHECK-DAG: [[CBP]] = bitcast i8** [[GEPFB:%.+]] to i[[sz]]* // CHECK-DAG: [[GEPFB]] = getelementptr inbounds [9 x i8*], [9 x i8*]* %{{.+}}, i32 0, i32 {{[0-8]}} // CHECK-DAG: store float [[VALFC]], float* [[CONVFC:%.+]], // CHECK-DAG: [[CONVFC]] = bitcast i[[sz]]* [[CADDRFC:%.+]] to float* // CHECK-DAG: [[CVALFC:%.+]] = load i[[sz]], i[[sz]]* [[CADDRFC]], - // CHECK-DAG: [[CPTRFC:%.+]] = inttoptr i[[sz]] [[CVALFC]] to i8* - // CHECK-DAG: store i8* [[CPTRFC]], i8** [[GEPFC:%.+]], + // CHECK-DAG: store i[[sz]] [[CVALFC]], i[[sz]]* [[CBP:%.+]], + // CHECK-DAG: [[CBP]] = bitcast i8** [[GEPFC:%.+]] to i[[sz]]* // CHECK-DAG: [[GEPFC]] = getelementptr inbounds [9 x i8*], [9 x i8*]* %{{.+}}, i32 0, i32 {{[0-8]}} // CHECK-DAG: store float [[VALFD]], float* [[CONVFD:%.+]], // CHECK-DAG: [[CONVFD]] = bitcast i[[sz]]* [[CADDRFD:%.+]] to float* // CHECK-DAG: [[CVALFD:%.+]] = load i[[sz]], i[[sz]]* [[CADDRFD]], - // CHECK-DAG: [[CPTRFD:%.+]] = inttoptr i[[sz]] [[CVALFD]] to i8* - // CHECK-DAG: store i8* [[CPTRFD]], i8** [[GEPFD:%.+]], + // CHECK-DAG: store i[[sz]] [[CVALFD]], i[[sz]]* [[CBP:%.+]], + // CHECK-DAG: [[CBP]] = bitcast i8** [[GEPFD:%.+]] to i[[sz]]* // CHECK-DAG: [[GEPFD]] = getelementptr inbounds [9 x i8*], [9 x i8*]* %{{.+}}, i32 0, i32 {{[0-8]}} // 3 static global vars being captured. @@ -385,25 +391,28 @@ int tbar(T a, T b, T c, T d){ // CHECK-64-DAG: store double [[VALGB]], double* [[CONVGB:%.+]], // CHECK-64-DAG: [[CONVGB]] = bitcast i[[sz]]* [[CADDRGB:%.+]] to double* // CHECK-64-DAG: [[CVALGB:%.+]] = load i[[sz]], i[[sz]]* [[CADDRGB]], - // CHECK-64-DAG: [[CPTRGB:%.+]] = inttoptr i[[sz]] [[CVALGB]] to i8* - // CHECK-64-DAG: store i8* [[CPTRGB]], i8** [[GEPGB:%.+]], - // CHECK-32-DAG: store i8* bitcast (double* @Gb to i8*), i8** [[GEPGB:%.+]], + // CHECK-64-DAG: store i[[sz]] [[CVALGB]], i[[sz]]* [[CBP:%.+]], + // CHECK-64-DAG: [[CBP]] = bitcast i8** [[GEPGB:%.+]] to i[[sz]]* + // CHECK-32-DAG: store double* @Gb, double** [[CBP:%.+]], + // CHECK-32-DAG: [[CBP]] = bitcast i8** [[GEPGB:%.+]] to double** // CHECK-DAG: [[GEPGB]] = getelementptr inbounds [9 x i8*], [9 x i8*]* %{{.+}}, i32 0, i32 {{[0-8]}} // CHECK-64-DAG: store double [[VALGC]], double* [[CONVGC:%.+]], // CHECK-64-DAG: [[CONVGC]] = bitcast i[[sz]]* [[CADDRGC:%.+]] to double* // CHECK-64-DAG: [[CVALGC:%.+]] = load i[[sz]], i[[sz]]* [[CADDRGC]], - // CHECK-64-DAG: [[CPTRGC:%.+]] = inttoptr i[[sz]] [[CVALGC]] to i8* - // CHECK-64-DAG: store i8* [[CPTRGC]], i8** [[GEPGC:%.+]], - // CHECK-32-DAG: store i8* bitcast (double* @Gc to i8*), i8** [[GEPGC:%.+]], + // CHECK-64-DAG: store i[[sz]] [[CVALGC]], i[[sz]]* [[CBP:%.+]], + // CHECK-64-DAG: [[CBP]] = bitcast i8** [[GEPGC:%.+]] to i[[sz]]* + // CHECK-32-DAG: store double* @Gc, double** [[CBP:%.+]], + // CHECK-32-DAG: [[CBP]] = bitcast i8** [[GEPGC:%.+]] to double** // CHECK-DAG: [[GEPGC]] = getelementptr inbounds [9 x i8*], [9 x i8*]* %{{.+}}, i32 0, i32 {{[0-8]}} // CHECK-64-DAG: store double [[VALGD]], double* [[CONVGD:%.+]], // CHECK-64-DAG: [[CONVGD]] = bitcast i[[sz]]* [[CADDRGD:%.+]] to double* // CHECK-64-DAG: [[CVALGD:%.+]] = load i[[sz]], i[[sz]]* [[CADDRGD]], - // CHECK-64-DAG: [[CPTRGD:%.+]] = inttoptr i[[sz]] [[CVALGD]] to i8* - // CHECK-64-DAG: store i8* [[CPTRGD]], i8** [[GEPGD:%.+]], - // CHECK-32-DAG: store i8* bitcast (double* @Gd to i8*), i8** [[GEPGD:%.+]], + // CHECK-64-DAG: store i[[sz]] [[CVALGD]], i[[sz]]* [[CBP:%.+]], + // CHECK-64-DAG: [[CBP]] = bitcast i8** [[GEPGD:%.+]] to i[[sz]]* + // CHECK-32-DAG: store double* @Gd, double** [[CBP:%.+]], + // CHECK-32-DAG: [[CBP]] = bitcast i8** [[GEPGD:%.+]] to double** // CHECK-DAG: [[GEPGD]] = getelementptr inbounds [9 x i8*], [9 x i8*]* %{{.+}}, i32 0, i32 {{[0-8]}} // CHECK: call i32 @__tgt_target diff --git a/test/OpenMP/target_data_codegen.cpp b/test/OpenMP/target_data_codegen.cpp index a149ba9332..7e5e267d13 100644 --- a/test/OpenMP/target_data_codegen.cpp +++ b/test/OpenMP/target_data_codegen.cpp @@ -45,8 +45,10 @@ void foo(int arg) { // CK1-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK1-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK1-DAG: store i8* bitcast ([100 x double]* @gc to i8*), i8** [[BP0]] - // CK1-DAG: store i8* bitcast ([100 x double]* @gc to i8*), i8** [[P0]] + // CK1-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [100 x double]** + // CK1-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [100 x double]** + // CK1-DAG: store [100 x double]* @gc, [100 x double]** [[CBP0]] + // CK1-DAG: store [100 x double]* @gc, [100 x double]** [[CP0]] // CK1: %{{.+}} = add nsw i32 %{{[^,]+}}, 1 @@ -71,10 +73,10 @@ void foo(int arg) { // CK1-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK1-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK1-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK1-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK1-DAG: [[CBPVAL0]] = bitcast i32* [[VAR0:%.+]] to i8* - // CK1-DAG: [[CPVAL0]] = bitcast i32* [[VAR0]] to i8* + // CK1-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to i32** + // CK1-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** + // CK1-DAG: store i32* [[VAR0:%.+]], i32** [[CBP0]] + // CK1-DAG: store i32* [[VAR0]], i32** [[CP0]] // CK1: br label %[[IFEND:[^,]+]] // CK1: [[IFELSE]] @@ -103,11 +105,11 @@ void foo(int arg) { // CK1-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK1-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 // CK1-DAG: [[S0:%.+]] = getelementptr inbounds {{.+}}[[S]], i{{.+}} 0, i{{.+}} 0 - // CK1-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK1-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] + // CK1-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to float** + // CK1-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to float** + // CK1-DAG: store float* [[VAR0:%.+]], float** [[CBP0]] + // CK1-DAG: store float* [[VAR0]], float** [[CP0]] // CK1-DAG: store i[[sz]] [[CSVAL0:%[^,]+]], i[[sz]]* [[S0]] - // CK1-DAG: [[CBPVAL0]] = bitcast float* [[VAR0:%.+]] to i8* - // CK1-DAG: [[CPVAL0]] = bitcast float* [[VAR0]] to i8* // CK1-DAG: [[CSVAL0]] = mul nuw i[[sz]] %{{[^,]+}}, 4 // CK1: %{{.+}} = add nsw i32 %{{[^,]+}}, 1 @@ -128,15 +130,18 @@ void foo(int arg) { // CK1-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK1-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK1-DAG: store i8* bitcast ([[ST]]* @gb to i8*), i8** [[BP0]] - // CK1-DAG: store i8* bitcast (double** getelementptr inbounds ([[ST]], [[ST]]* @gb, i32 0, i32 1) to i8*), i8** [[P0]] + // CK1-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[ST]]** + // CK1-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to double*** + // CK1-DAG: store [[ST]]* @gb, [[ST]]** [[CBP0]] + // CK1-DAG: store double** getelementptr inbounds ([[ST]], [[ST]]* @gb, i32 0, i32 1), double*** [[CP0]] // CK1-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1 // CK1-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1 - // CK1-DAG: store i8* bitcast (double** getelementptr inbounds ([[ST]], [[ST]]* @gb, i32 0, i32 1) to i8*), i8** [[BP1]] - // CK1-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]] - // CK1-DAG: [[CPVAL1]] = bitcast double* [[SEC1:%.+]] to i8* + // CK1-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to double*** + // CK1-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to double** + // CK1-DAG: store double** getelementptr inbounds ([[ST]], [[ST]]* @gb, i32 0, i32 1), double*** [[CBP1]] + // CK1-DAG: store double* [[SEC1:%.+]], double** [[CP1]] // CK1-DAG: [[SEC1]] = getelementptr inbounds {{.+}}double* [[SEC11:%[^,]+]], i{{.+}} 0 // CK1-DAG: [[SEC11]] = load double*, double** getelementptr inbounds ([[ST]], [[ST]]* @gb, i32 0, i32 1), @@ -191,19 +196,19 @@ int bar(int arg){ // CK2-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK2-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 -// CK2-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] -// CK2-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] -// CK2-DAG: [[CBPVAL0]] = bitcast [[ST]]* [[VAR0:%.+]] to i8* -// CK2-DAG: [[CPVAL0]] = bitcast double** [[SEC0:%[^,]+]] to i8* +// CK2-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[ST]]** +// CK2-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to double*** +// CK2-DAG: store [[ST]]* [[VAR0:%.+]], [[ST]]** [[CBP0]] +// CK2-DAG: store double** [[SEC0:%.+]], double*** [[CP0]] // CK2-DAG: [[SEC0]] = getelementptr inbounds {{.*}}[[ST]]* [[VAR0]], i32 0, i32 1 // CK2-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1 // CK2-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1 -// CK2-DAG: store i8* [[CBPVAL1:%[^,]+]], i8** [[BP1]] -// CK2-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]] -// CK2-DAG: [[CBPVAL1]] = bitcast double** [[SEC0]] to i8* -// CK2-DAG: [[CPVAL1]] = bitcast double* [[SEC1:%[^,]+]] to i8* +// CK2-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to double*** +// CK2-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to double** +// CK2-DAG: store double** [[SEC0]], double*** [[CBP1]] +// CK2-DAG: store double* [[SEC1:%.+]], double** [[CP1]] // CK2-DAG: [[SEC1]] = getelementptr inbounds {{.*}}double* [[SEC11:%[^,]+]], i{{.+}} 1 // CK2-DAG: [[SEC11]] = load double*, double** [[SEC111:%[^,]+]], // CK2-DAG: [[SEC111]] = getelementptr inbounds {{.*}}[[ST]]* [[VAR0]], i32 0, i32 1 diff --git a/test/OpenMP/target_data_use_device_ptr_codegen.cpp b/test/OpenMP/target_data_use_device_ptr_codegen.cpp index c4b389a4cb..5e27556517 100644 --- a/test/OpenMP/target_data_use_device_ptr_codegen.cpp +++ b/test/OpenMP/target_data_use_device_ptr_codegen.cpp @@ -33,12 +33,11 @@ void foo(float *&lr, T *&tr) { float *l; T *t; - // CK1-DAG: [[RVAL:%.+]] = bitcast double* [[T:%.+]] to i8* - // CK1-DAG: [[T]] = load double*, double** [[DECL:@g]], + // CK1: [[T:%.+]] = load double*, double** [[DECL:@g]], // CK1: [[BP:%.+]] = getelementptr inbounds [1 x i8*], [1 x i8*]* %{{.+}}, i32 0, i32 0 - // CK1: store i8* [[RVAL]], i8** [[BP]], - // CK1: call void @__tgt_target_data_begin{{.+}}[[MTYPE00]] // CK1: [[CBP:%.+]] = bitcast i8** [[BP]] to double** + // CK1: store double* [[T]], double** [[CBP]], + // CK1: call void @__tgt_target_data_begin{{.+}}[[MTYPE00]] // CK1: [[VAL:%.+]] = load double*, double** [[CBP]], // CK1-NOT: store double* [[VAL]], double** [[DECL]], // CK1: store double* [[VAL]], double** [[PVT:%.+]], @@ -53,12 +52,11 @@ void foo(float *&lr, T *&tr) { // CK1: getelementptr inbounds double, double* [[TTT]], i32 1 ++g; - // CK1-DAG: [[RVAL:%.+]] = bitcast float* [[T1:%.+]] to i8* - // CK1-DAG: [[T1]] = load float*, float** [[DECL:%.+]], + // CK1: [[T1:%.+]] = load float*, float** [[DECL:%.+]], // CK1: [[BP:%.+]] = getelementptr inbounds [1 x i8*], [1 x i8*]* %{{.+}}, i32 0, i32 0 - // CK1: store i8* [[RVAL]], i8** [[BP]], - // CK1: call void @__tgt_target_data_begin{{.+}}[[MTYPE01]] // CK1: [[CBP:%.+]] = bitcast i8** [[BP]] to float** + // CK1: store float* [[T1]], float** [[CBP]], + // CK1: call void @__tgt_target_data_begin{{.+}}[[MTYPE01]] // CK1: [[VAL:%.+]] = load float*, float** [[CBP]], // CK1-NOT: store float* [[VAL]], float** [[DECL]], // CK1: store float* [[VAL]], float** [[PVT:%.+]], @@ -85,12 +83,11 @@ void foo(float *&lr, T *&tr) { // CK1: getelementptr inbounds float, float* [[TTT]], i32 1 ++l; - // CK1-DAG: [[RVAL:%.+]] = bitcast float* [[T1:%.+]] to i8* - // CK1-DAG: [[T1]] = load float*, float** [[DECL:%.+]], + // CK1: [[T1:%.+]] = load float*, float** [[DECL:%.+]], // CK1: [[BP:%.+]] = getelementptr inbounds [1 x i8*], [1 x i8*]* %{{.+}}, i32 0, i32 0 - // CK1: store i8* [[RVAL]], i8** [[BP]], - // CK1: call void @__tgt_target_data_begin{{.+}}[[MTYPE03]] // CK1: [[CBP:%.+]] = bitcast i8** [[BP]] to float** + // CK1: store float* [[T1]], float** [[CBP]], + // CK1: call void @__tgt_target_data_begin{{.+}}[[MTYPE03]] // CK1: [[VAL:%.+]] = load float*, float** [[CBP]], // CK1-NOT: store float* [[VAL]], float** [[DECL]], // CK1: store float* [[VAL]], float** [[PVT:%.+]], @@ -109,12 +106,11 @@ void foo(float *&lr, T *&tr) { // CK1: br i1 [[CMP]], label %[[BTHEN:.+]], label %[[BELSE:.+]] // CK1: [[BTHEN]]: - // CK1-DAG: [[RVAL:%.+]] = bitcast float* [[T1:%.+]] to i8* - // CK1-DAG: [[T1]] = load float*, float** [[DECL:%.+]], + // CK1: [[T1:%.+]] = load float*, float** [[DECL:%.+]], // CK1: [[BP:%.+]] = getelementptr inbounds [1 x i8*], [1 x i8*]* %{{.+}}, i32 0, i32 0 - // CK1: store i8* [[RVAL]], i8** [[BP]], - // CK1: call void @__tgt_target_data_begin{{.+}}[[MTYPE04]] // CK1: [[CBP:%.+]] = bitcast i8** [[BP]] to float** + // CK1: store float* [[T1]], float** [[CBP]], + // CK1: call void @__tgt_target_data_begin{{.+}}[[MTYPE04]] // CK1: [[VAL:%.+]] = load float*, float** [[CBP]], // CK1-NOT: store float* [[VAL]], float** [[DECL]], // CK1: store float* [[VAL]], float** [[PVT:%.+]], @@ -146,13 +142,12 @@ void foo(float *&lr, T *&tr) { // CK1: getelementptr inbounds float, float* [[TTT]], i32 1 ++l; - // CK1-DAG: [[RVAL:%.+]] = bitcast float* [[T1:%.+]] to i8* - // CK1-DAG: [[T1]] = load float*, float** [[T2:%.+]], - // CK1-DAG: [[T2]] = load float**, float*** [[DECL:%.+]], + // CK1: [[T2:%.+]] = load float**, float*** [[DECL:%.+]], + // CK1: [[T1:%.+]] = load float*, float** [[T2]], // CK1: [[BP:%.+]] = getelementptr inbounds [1 x i8*], [1 x i8*]* %{{.+}}, i32 0, i32 0 - // CK1: store i8* [[RVAL]], i8** [[BP]], - // CK1: call void @__tgt_target_data_begin{{.+}}[[MTYPE05]] // CK1: [[CBP:%.+]] = bitcast i8** [[BP]] to float** + // CK1: store float* [[T1]], float** [[CBP]], + // CK1: call void @__tgt_target_data_begin{{.+}}[[MTYPE05]] // CK1: [[VAL:%.+]] = load float*, float** [[CBP]], // CK1: store float* [[VAL]], float** [[PVTV:%.+]], // CK1-NOT: store float** [[PVTV]], float*** [[DECL]], @@ -170,12 +165,11 @@ void foo(float *&lr, T *&tr) { // CK1: getelementptr inbounds float, float* [[TTTT]], i32 1 ++lr; - // CK1-DAG: [[RVAL:%.+]] = bitcast i32* [[T1:%.+]] to i8* - // CK1-DAG: [[T1]] = load i32*, i32** [[DECL:%.+]], + // CK1: [[T1:%.+]] = load i32*, i32** [[DECL:%.+]], // CK1: [[BP:%.+]] = getelementptr inbounds [1 x i8*], [1 x i8*]* %{{.+}}, i32 0, i32 0 - // CK1: store i8* [[RVAL]], i8** [[BP]], - // CK1: call void @__tgt_target_data_begin{{.+}}[[MTYPE06]] // CK1: [[CBP:%.+]] = bitcast i8** [[BP]] to i32** + // CK1: store i32* [[T1]], i32** [[CBP]], + // CK1: call void @__tgt_target_data_begin{{.+}}[[MTYPE06]] // CK1: [[VAL:%.+]] = load i32*, i32** [[CBP]], // CK1-NOT: store i32* [[VAL]], i32** [[DECL]], // CK1: store i32* [[VAL]], i32** [[PVT:%.+]], @@ -190,13 +184,12 @@ void foo(float *&lr, T *&tr) { // CK1: getelementptr inbounds i32, i32* [[TTT]], i32 1 ++t; - // CK1-DAG: [[RVAL:%.+]] = bitcast i32* [[T1:%.+]] to i8* - // CK1-DAG: [[T1]] = load i32*, i32** [[T2:%.+]], - // CK1-DAG: [[T2]] = load i32**, i32*** [[DECL:%.+]], + // CK1: [[T2:%.+]] = load i32**, i32*** [[DECL:%.+]], + // CK1: [[T1:%.+]] = load i32*, i32** [[T2]], // CK1: [[BP:%.+]] = getelementptr inbounds [1 x i8*], [1 x i8*]* %{{.+}}, i32 0, i32 0 - // CK1: store i8* [[RVAL]], i8** [[BP]], - // CK1: call void @__tgt_target_data_begin{{.+}}[[MTYPE07]] // CK1: [[CBP:%.+]] = bitcast i8** [[BP]] to i32** + // CK1: store i32* [[T1]], i32** [[CBP]], + // CK1: call void @__tgt_target_data_begin{{.+}}[[MTYPE07]] // CK1: [[VAL:%.+]] = load i32*, i32** [[CBP]], // CK1: store i32* [[VAL]], i32** [[PVTV:%.+]], // CK1-NOT: store i32** [[PVTV]], i32*** [[DECL]], @@ -214,12 +207,11 @@ void foo(float *&lr, T *&tr) { // CK1: getelementptr inbounds i32, i32* [[TTTT]], i32 1 ++tr; - // CK1-DAG: [[RVAL:%.+]] = bitcast float* [[T1:%.+]] to i8* - // CK1-DAG: [[T1]] = load float*, float** [[DECL:%.+]], + // CK1: [[T1:%.+]] = load float*, float** [[DECL:%.+]], // CK1: [[BP:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* %{{.+}}, i32 0, i32 - // CK1: store i8* [[RVAL]], i8** [[BP]], - // CK1: call void @__tgt_target_data_begin{{.+}}[[MTYPE08]] // CK1: [[CBP:%.+]] = bitcast i8** [[BP]] to float** + // CK1: store float* [[T1]], float** [[CBP]], + // CK1: call void @__tgt_target_data_begin{{.+}}[[MTYPE08]] // CK1: [[VAL:%.+]] = load float*, float** [[CBP]], // CK1-NOT: store float* [[VAL]], float** [[DECL]], // CK1: store float* [[VAL]], float** [[PVT:%.+]], @@ -235,11 +227,11 @@ void foo(float *&lr, T *&tr) { ++l; ++t; - // CK1: call void @__tgt_target_data_begin{{.+}}[[MTYPE09]] // CK1: [[_CBP:%.+]] = bitcast i8** {{%.+}} to float** + // CK1: [[CBP:%.+]] = bitcast i8** {{%.+}} to i32** + // CK1: call void @__tgt_target_data_begin{{.+}}[[MTYPE09]] // CK1: [[_VAL:%.+]] = load float*, float** [[_CBP]], // CK1: store float* [[_VAL]], float** [[_PVT:%.+]], - // CK1: [[CBP:%.+]] = bitcast i8** {{%.+}} to i32** // CK1: [[VAL:%.+]] = load i32*, i32** [[CBP]], // CK1: store i32* [[VAL]], i32** [[PVT:%.+]], // CK1: [[_TT1:%.+]] = load float*, float** [[_PVT]], @@ -257,11 +249,11 @@ void foo(float *&lr, T *&tr) { // CK1: getelementptr inbounds i32, i32* [[TTT]], i32 1 ++l; ++t; - // CK1: call void @__tgt_target_data_begin{{.+}}[[MTYPE10]] // CK1: [[_CBP:%.+]] = bitcast i8** {{%.+}} to float** + // CK1: [[CBP:%.+]] = bitcast i8** {{%.+}} to i32** + // CK1: call void @__tgt_target_data_begin{{.+}}[[MTYPE10]] // CK1: [[_VAL:%.+]] = load float*, float** [[_CBP]], // CK1: store float* [[_VAL]], float** [[_PVT:%.+]], - // CK1: [[CBP:%.+]] = bitcast i8** {{%.+}} to i32** // CK1: [[VAL:%.+]] = load i32*, i32** [[CBP]], // CK1: store i32* [[VAL]], i32** [[PVT:%.+]], // CK1: [[_TT1:%.+]] = load float*, float** [[_PVT]], @@ -279,12 +271,11 @@ void foo(float *&lr, T *&tr) { // CK1: getelementptr inbounds i32, i32* [[TTT]], i32 1 ++l; ++t; - // CK1-DAG: [[RVAL:%.+]] = bitcast i32* [[T1:%.+]] to i8* - // CK1-DAG: [[T1]] = load i32*, i32** [[DECL:%.+]], + // CK1: [[T1:%.+]] = load i32*, i32** [[DECL:%.+]], // CK1: [[BP:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* %{{.+}}, i32 0, i32 0 - // CK1: store i8* [[RVAL]], i8** [[BP]], - // CK1: call void @__tgt_target_data_begin{{.+}}[[MTYPE11]] // CK1: [[CBP:%.+]] = bitcast i8** [[BP]] to i32** + // CK1: store i32* [[T1]], i32** [[CBP]], + // CK1: call void @__tgt_target_data_begin{{.+}}[[MTYPE11]] // CK1: [[VAL:%.+]] = load i32*, i32** [[CBP]], // CK1-NOT: store i32* [[VAL]], i32** [[DECL]], // CK1: store i32* [[VAL]], i32** [[PVT:%.+]], @@ -299,13 +290,12 @@ void foo(float *&lr, T *&tr) { // CK1: getelementptr inbounds i32, i32* [[TTT]], i32 1 ++l; ++t; - // CK1-DAG: [[RVAL:%.+]] = bitcast i32* [[T1:%.+]] to i8* - // CK1-DAG: [[T1]] = load i32*, i32** [[T2:%.+]], - // CK1-DAG: [[T2]] = load i32**, i32*** [[DECL:%.+]], + // CK1: [[T2:%.+]] = load i32**, i32*** [[DECL:%.+]], + // CK1: [[T1:%.+]] = load i32*, i32** [[T2]], // CK1: [[BP:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* %{{.+}}, i32 0, i32 0 - // CK1: store i8* [[RVAL]], i8** [[BP]], - // CK1: call void @__tgt_target_data_begin{{.+}}[[MTYPE12]] // CK1: [[CBP:%.+]] = bitcast i8** [[BP]] to i32** + // CK1: store i32* [[T1]], i32** [[CBP]], + // CK1: call void @__tgt_target_data_begin{{.+}}[[MTYPE12]] // CK1: [[VAL:%.+]] = load i32*, i32** [[CBP]], // CK1: store i32* [[VAL]], i32** [[PVTV:%.+]], // CK1-NOT: store i32** [[PVTV]], i32*** [[DECL]], @@ -356,10 +346,11 @@ struct ST { int *la = 0; // CK2: [[BP:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* %{{.+}}, i32 0, i32 1 - // CK2: store i8* [[RVAL:%.+]], i8** [[BP]], + // CK2: [[CBP:%.+]] = bitcast i8** [[BP]] to double*** + // CK2: store double** [[RVAL:%.+]], double*** [[CBP]], // CK2: call void @__tgt_target_data_begin{{.+}}[[MTYPE00]] - // CK2: [[CBP:%.+]] = bitcast i8** [[BP]] to double** - // CK2: [[VAL:%.+]] = load double*, double** [[CBP]], + // CK2: [[CBP1:%.+]] = bitcast double*** [[CBP]] to double** + // CK2: [[VAL:%.+]] = load double*, double** [[CBP1]], // CK2: store double* [[VAL]], double** [[PVT:%.+]], // CK2: store double** [[PVT]], double*** [[PVT2:%.+]], // CK2: [[TT1:%.+]] = load double**, double*** [[PVT2]], @@ -376,10 +367,11 @@ struct ST { a++; // CK2: [[BP:%.+]] = getelementptr inbounds [3 x i8*], [3 x i8*]* %{{.+}}, i32 0, i32 2 - // CK2: store i8* [[RVAL:%.+]], i8** [[BP]], + // CK2: [[CBP:%.+]] = bitcast i8** [[BP]] to double*** + // CK2: store double** [[RVAL:%.+]], double*** [[CBP]], // CK2: call void @__tgt_target_data_begin{{.+}}[[MTYPE01]] - // CK2: [[CBP:%.+]] = bitcast i8** [[BP]] to double** - // CK2: [[VAL:%.+]] = load double*, double** [[CBP]], + // CK2: [[CBP1:%.+]] = bitcast double*** [[CBP]] to double** + // CK2: [[VAL:%.+]] = load double*, double** [[CBP1]], // CK2: store double* [[VAL]], double** [[PVT:%.+]], // CK2: store double** [[PVT]], double*** [[PVT2:%.+]], // CK2: [[TT1:%.+]] = load double**, double*** [[PVT2]], @@ -397,9 +389,9 @@ struct ST { b++; // CK2: [[BP:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* %{{.+}}, i32 0, i32 0 - // CK2: store i8* [[RVAL:%.+]], i8** [[BP]], - // CK2: call void @__tgt_target_data_begin{{.+}}[[MTYPE02]] // CK2: [[CBP:%.+]] = bitcast i8** [[BP]] to double** + // CK2: store double* [[RVAL:%.+]], double** [[CBP]], + // CK2: call void @__tgt_target_data_begin{{.+}}[[MTYPE02]] // CK2: [[VAL:%.+]] = load double*, double** [[CBP]], // CK2: store double* [[VAL]], double** [[PVT:%.+]], // CK2: store double** [[PVT]], double*** [[PVT2:%.+]], @@ -419,16 +411,17 @@ struct ST { la++; // CK2: [[BP:%.+]] = getelementptr inbounds [4 x i8*], [4 x i8*]* %{{.+}}, i32 0, i32 0 - // CK2: store i8* [[RVAL:%.+]], i8** [[BP]], + // CK2: [[CBP:%.+]] = bitcast i8** [[BP]] to double** + // CK2: store double* [[RVAL:%.+]], double** [[CBP]], // CK2: [[_BP:%.+]] = getelementptr inbounds [4 x i8*], [4 x i8*]* %{{.+}}, i32 0, i32 3 - // CK2: store i8* [[_RVAL:%.+]], i8** [[_BP]], + // CK2: [[_CBP:%.+]] = bitcast i8** [[_BP]] to double*** + // CK2: store double** [[_RVAL:%.+]], double*** [[_CBP]], // CK2: call void @__tgt_target_data_begin{{.+}}[[MTYPE03]] - // CK2: [[CBP:%.+]] = bitcast i8** [[BP]] to double** // CK2: [[VAL:%.+]] = load double*, double** [[CBP]], // CK2: store double* [[VAL]], double** [[PVT:%.+]], // CK2: store double** [[PVT]], double*** [[PVT2:%.+]], - // CK2: [[_CBP:%.+]] = bitcast i8** [[_BP]] to double** - // CK2: [[_VAL:%.+]] = load double*, double** [[_CBP]], + // CK2: [[_CBP1:%.+]] = bitcast double*** [[_CBP]] to double** + // CK2: [[_VAL:%.+]] = load double*, double** [[_CBP1]], // CK2: store double* [[_VAL]], double** [[_PVT:%.+]], // CK2: store double** [[_PVT]], double*** [[_PVT2:%.+]], // CK2: [[TT1:%.+]] = load double**, double*** [[PVT2]], diff --git a/test/OpenMP/target_enter_data_codegen.cpp b/test/OpenMP/target_enter_data_codegen.cpp index 152cd46b4a..683cd976d3 100644 --- a/test/OpenMP/target_enter_data_codegen.cpp +++ b/test/OpenMP/target_enter_data_codegen.cpp @@ -45,8 +45,10 @@ void foo(int arg) { // CK1-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK1-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK1-DAG: store i8* bitcast ([100 x double]* @gc to i8*), i8** [[BP0]] - // CK1-DAG: store i8* bitcast ([100 x double]* @gc to i8*), i8** [[P0]] + // CK1-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [100 x double]** + // CK1-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [100 x double]** + // CK1-DAG: store [100 x double]* @gc, [100 x double]** [[CBP0]] + // CK1-DAG: store [100 x double]* @gc, [100 x double]** [[CP0]] // CK1: %{{.+}} = add nsw i32 %{{[^,]+}}, 1 // CK1-NOT: __tgt_target_data_end @@ -67,10 +69,10 @@ void foo(int arg) { // CK1-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK1-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK1-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK1-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK1-DAG: [[CBPVAL0]] = bitcast i32* [[VAR0:%.+]] to i8* - // CK1-DAG: [[CPVAL0]] = bitcast i32* [[VAR0]] to i8* + // CK1-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to i32** + // CK1-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** + // CK1-DAG: store i32* [[VAR0:%.+]], i32** [[CBP0]] + // CK1-DAG: store i32* [[VAR0]], i32** [[CP0]] // CK1: br label %[[IFEND:[^,]+]] // CK1: [[IFELSE]] @@ -93,11 +95,11 @@ void foo(int arg) { // CK1-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK1-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 // CK1-DAG: [[S0:%.+]] = getelementptr inbounds {{.+}}[[S]], i{{.+}} 0, i{{.+}} 0 - // CK1-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK1-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] + // CK1-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to float** + // CK1-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to float** + // CK1-DAG: store float* [[VAR0:%.+]], float** [[CBP0]] + // CK1-DAG: store float* [[VAR0]], float** [[CP0]] // CK1-DAG: store i[[sz]] [[CSVAL0:%[^,]+]], i[[sz]]* [[S0]] - // CK1-DAG: [[CBPVAL0]] = bitcast float* [[VAR0:%.+]] to i8* - // CK1-DAG: [[CPVAL0]] = bitcast float* [[VAR0]] to i8* // CK1-DAG: [[CSVAL0]] = mul nuw i[[sz]] %{{[^,]+}}, 4 // CK1: %{{.+}} = add nsw i32 %{{[^,]+}}, 1 // CK1-NOT: __tgt_target_data_end @@ -114,15 +116,18 @@ void foo(int arg) { // CK1-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK1-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK1-DAG: store i8* bitcast ([[ST]]* @gb to i8*), i8** [[BP0]] - // CK1-DAG: store i8* bitcast (double** getelementptr inbounds ([[ST]], [[ST]]* @gb, i32 0, i32 1) to i8*), i8** [[P0]] + // CK1-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[ST]]** + // CK1-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to double*** + // CK1-DAG: store [[ST]]* @gb, [[ST]]** [[CBP0]] + // CK1-DAG: store double** getelementptr inbounds ([[ST]], [[ST]]* @gb, i32 0, i32 1), double*** [[CP0]] // CK1-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1 // CK1-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1 - // CK1-DAG: store i8* bitcast (double** getelementptr inbounds ([[ST]], [[ST]]* @gb, i32 0, i32 1) to i8*), i8** [[BP1]] - // CK1-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]] - // CK1-DAG: [[CPVAL1]] = bitcast double* [[SEC1:%.+]] to i8* + // CK1-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to double*** + // CK1-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to double** + // CK1-DAG: store double** getelementptr inbounds ([[ST]], [[ST]]* @gb, i32 0, i32 1), double*** [[CBP1]] + // CK1-DAG: store double* [[SEC1:%.+]], double** [[CP1]] // CK1-DAG: [[SEC1]] = getelementptr inbounds {{.+}}double* [[SEC11:%[^,]+]], i{{.+}} 0 // CK1-DAG: [[SEC11]] = load double*, double** getelementptr inbounds ([[ST]], [[ST]]* @gb, i32 0, i32 1), @@ -174,19 +179,19 @@ int bar(int arg){ // CK2-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK2-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 -// CK2-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] -// CK2-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] -// CK2-DAG: [[CBPVAL0]] = bitcast [[ST]]* [[VAR0:%.+]] to i8* -// CK2-DAG: [[CPVAL0]] = bitcast double** [[SEC0:%[^,]+]] to i8* +// CK2-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[ST]]** +// CK2-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to double*** +// CK2-DAG: store [[ST]]* [[VAR0:%.+]], [[ST]]** [[CBP0]] +// CK2-DAG: store double** [[SEC0:%.+]], double*** [[CP0]] // CK2-DAG: [[SEC0]] = getelementptr inbounds {{.*}}[[ST]]* [[VAR0]], i32 0, i32 1 // CK2-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1 // CK2-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1 -// CK2-DAG: store i8* [[CBPVAL1:%[^,]+]], i8** [[BP1]] -// CK2-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]] -// CK2-DAG: [[CBPVAL1]] = bitcast double** [[SEC0]] to i8* -// CK2-DAG: [[CPVAL1]] = bitcast double* [[SEC1:%[^,]+]] to i8* +// CK2-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to double*** +// CK2-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to double** +// CK2-DAG: store double** [[SEC0]], double*** [[CBP1]] +// CK2-DAG: store double* [[SEC1:%.+]], double** [[CP1]] // CK2-DAG: [[SEC1]] = getelementptr inbounds {{.*}}double* [[SEC11:%[^,]+]], i{{.+}} 1 // CK2-DAG: [[SEC11]] = load double*, double** [[SEC111:%[^,]+]], // CK2-DAG: [[SEC111]] = getelementptr inbounds {{.*}}[[ST]]* [[VAR0]], i32 0, i32 1 diff --git a/test/OpenMP/target_exit_data_codegen.cpp b/test/OpenMP/target_exit_data_codegen.cpp index d3a38592a6..a82c1c6c4a 100644 --- a/test/OpenMP/target_exit_data_codegen.cpp +++ b/test/OpenMP/target_exit_data_codegen.cpp @@ -46,8 +46,10 @@ void foo(int arg) { // CK1-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK1-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK1-DAG: store i8* bitcast ([100 x double]* @gc to i8*), i8** [[BP0]] - // CK1-DAG: store i8* bitcast ([100 x double]* @gc to i8*), i8** [[P0]] + // CK1-DAG: [[BPC0:%.+]] = bitcast i8** [[BP0]] to [100 x double]** + // CK1-DAG: [[PC0:%.+]] = bitcast i8** [[P0]] to [100 x double]** + // CK1-DAG: store [100 x double]* @gc, [100 x double]** [[BPC0]] + // CK1-DAG: store [100 x double]* @gc, [100 x double]** [[PC0]] // CK1: %{{.+}} = add nsw i32 %{{[^,]+}}, 1 #pragma omp target exit data if(1+3-5) device(arg) map(from: gc) @@ -68,10 +70,10 @@ void foo(int arg) { // CK1-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK1-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK1-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK1-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK1-DAG: [[CBPVAL0]] = bitcast i32* [[VAR0:%.+]] to i8* - // CK1-DAG: [[CPVAL0]] = bitcast i32* [[VAR0]] to i8* + // CK1-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to i32** + // CK1-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** + // CK1-DAG: store i32* [[VAL0:%[^,]+]], i32** [[CBP0]] + // CK1-DAG: store i32* [[VAL0]], i32** [[CP0]] // CK1: br label %[[IFEND:[^,]+]] // CK1: [[IFELSE]] @@ -94,11 +96,11 @@ void foo(int arg) { // CK1-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK1-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 // CK1-DAG: [[S0:%.+]] = getelementptr inbounds {{.+}}[[S]], i{{.+}} 0, i{{.+}} 0 - // CK1-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK1-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] + // CK1-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to float** + // CK1-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to float** + // CK1-DAG: store float* [[VAL0:%[^,]+]], float** [[CBP0]] + // CK1-DAG: store float* [[VAL0]], float** [[CP0]] // CK1-DAG: store i[[sz]] [[CSVAL0:%[^,]+]], i[[sz]]* [[S0]] - // CK1-DAG: [[CBPVAL0]] = bitcast float* [[VAR0:%.+]] to i8* - // CK1-DAG: [[CPVAL0]] = bitcast float* [[VAR0]] to i8* // CK1-DAG: [[CSVAL0]] = mul nuw i[[sz]] %{{[^,]+}}, 4 // CK1: %{{.+}} = add nsw i32 %{{[^,]+}}, 1 #pragma omp target exit data map(always, from: lb) @@ -115,15 +117,18 @@ void foo(int arg) { // CK1-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK1-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK1-DAG: store i8* bitcast ([[ST]]* @gb to i8*), i8** [[BP0]] - // CK1-DAG: store i8* bitcast (double** getelementptr inbounds ([[ST]], [[ST]]* @gb, i32 0, i32 1) to i8*), i8** [[P0]] + // CK1-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[ST]]** + // CK1-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to double*** + // CK1-DAG: store [[ST]]* @gb, [[ST]]** [[CBP0]] + // CK1-DAG: store double** getelementptr inbounds ([[ST]], [[ST]]* @gb, i32 0, i32 1), double*** [[CP0]] // CK1-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1 // CK1-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1 - // CK1-DAG: store i8* bitcast (double** getelementptr inbounds ([[ST]], [[ST]]* @gb, i32 0, i32 1) to i8*), i8** [[BP1]] - // CK1-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]] - // CK1-DAG: [[CPVAL1]] = bitcast double* [[SEC1:%.+]] to i8* + // CK1-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to double*** + // CK1-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to double** + // CK1-DAG: store double** getelementptr inbounds ([[ST]], [[ST]]* @gb, i32 0, i32 1), double*** [[CBP1]] + // CK1-DAG: store double* [[SEC1:%[^,]+]], double** [[CP1]] // CK1-DAG: [[SEC1]] = getelementptr inbounds {{.+}}double* [[SEC11:%[^,]+]], i{{.+}} 0 // CK1-DAG: [[SEC11]] = load double*, double** getelementptr inbounds ([[ST]], [[ST]]* @gb, i32 0, i32 1), @@ -175,19 +180,19 @@ int bar(int arg){ // CK2-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK2-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 -// CK2-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] -// CK2-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] -// CK2-DAG: [[CBPVAL0]] = bitcast [[ST]]* [[VAR0:%.+]] to i8* -// CK2-DAG: [[CPVAL0]] = bitcast double** [[SEC0:%[^,]+]] to i8* +// CK2-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[ST]]** +// CK2-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to double*** +// CK2-DAG: store [[ST]]* [[VAR0:%[^,]+]], [[ST]]** [[CBP0]] +// CK2-DAG: store double** [[SEC0:%[^,]+]], double*** [[CP0]] // CK2-DAG: [[SEC0]] = getelementptr inbounds {{.*}}[[ST]]* [[VAR0]], i32 0, i32 1 // CK2-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1 // CK2-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1 -// CK2-DAG: store i8* [[CBPVAL1:%[^,]+]], i8** [[BP1]] -// CK2-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]] -// CK2-DAG: [[CBPVAL1]] = bitcast double** [[SEC0]] to i8* -// CK2-DAG: [[CPVAL1]] = bitcast double* [[SEC1:%[^,]+]] to i8* +// CK2-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to double*** +// CK2-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to double** +// CK2-DAG: store double** [[SEC0]], double*** [[CBP1]] +// CK2-DAG: store double* [[SEC1:%[^,]+]], double** [[CP1]] // CK2-DAG: [[SEC1]] = getelementptr inbounds {{.*}}double* [[SEC11:%[^,]+]], i{{.+}} 1 // CK2-DAG: [[SEC11]] = load double*, double** [[SEC111:%[^,]+]], // CK2-DAG: [[SEC111]] = getelementptr inbounds {{.*}}[[ST]]* [[VAR0]], i32 0, i32 1 diff --git a/test/OpenMP/target_firstprivate_codegen.cpp b/test/OpenMP/target_firstprivate_codegen.cpp index a9af2d02f2..1fb0ef9e84 100644 --- a/test/OpenMP/target_firstprivate_codegen.cpp +++ b/test/OpenMP/target_firstprivate_codegen.cpp @@ -93,12 +93,12 @@ int foo(int n, double *ptr) { // CHECK-64: store i{{[0-9]+}} [[AVAL]], i{{[0-9]+}}* [[CONV]], // CHECK-32: store i{{[0-9]+}} [[AVAL]], i{{[0-9]+}}* [[ACAST]], // CHECK: [[ACAST_VAL:%.+]] = load i{{[0-9]+}}, i{{[0-9]+}}* [[ACAST]], - // CHECK: [[ACAST_TOPTR:%.+]] = inttoptr i{{[0-9]+}} [[ACAST_VAL]] to i8* // CHECK: [[BASE_PTR_GEP:%.+]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[BASE_PTR_ARR]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 - // CHECK: store i8* [[ACAST_TOPTR]], i8** [[BASE_PTR_GEP]], - // CHECK: [[ACAST_TOPTR2:%.+]] = inttoptr i{{[0-9]+}} [[ACAST_VAL]] to i8* + // CHECK: [[ACAST_TOPTR:%.+]] = bitcast i8** [[BASE_PTR_GEP]] to i{{[0-9]+}}* + // CHECK: store i{{[0-9]+}} [[ACAST_VAL]], i{{[0-9]+}}* [[ACAST_TOPTR]], // CHECK: [[PTR_GEP:%.+]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[PTR_ARR]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 - // CHECK: store i8* [[ACAST_TOPTR2]], i8** [[PTR_GEP]], + // CHECK: [[ACAST_TOPTR2:%.+]] = bitcast i8** [[PTR_GEP]] to i{{[0-9]+}}* + // CHECK: store i{{[0-9]+}} [[ACAST_VAL]], i{{[0-9]+}}* [[ACAST_TOPTR2]], // CHECK: [[BASE_PTR_GEP_ARG:%.+]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[BASE_PTR_ARR]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 // CHECK: [[PTR_GEP_ARG:%.+]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[PTR_ARR]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 // CHECK: {{.+}} = call i32 @__tgt_target(i32 -1, {{.+}}, i32 1, i8** [[BASE_PTR_GEP_ARG]], i8** [[PTR_GEP_ARG]], i[[SZ]]* getelementptr inbounds ([1 x i[[SZ]]], [1 x i[[SZ]]]* [[SIZET]], i32 0, i32 0), i32* getelementptr inbounds ([1 x i32], [1 x i32]* [[MAPT]], i32 0, i32 0)) @@ -132,85 +132,87 @@ int foo(int n, double *ptr) { // CHECK: [[CN_SIZE_2:%.+]] = mul{{.+}} i{{[0-9]+}} [[CN_SIZE_1]], 8 // firstprivate(aa) --> base_ptr = aa, ptr = aa, size = 2 (short) - // CHECK: [[A2CAST_TO_INT:%.+]] = inttoptr i{{[0-9]+}} [[A2CAST_VAL]] to i8* // CHECK: [[BASE_PTR_GEP2_0:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[BASE_PTR_ARR2]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 - // CHECK: store i8* [[A2CAST_TO_INT]], i8** [[BASE_PTR_GEP2_0]], - // CHECK: [[A2CAST_TO_INT_2:%.+]] = inttoptr i{{[0-9]+}} [[A2CAST_VAL]] to i8* + // CHECK: [[ACAST_TOPTR:%.+]] = bitcast i8** [[BASE_PTR_GEP2_0]] to i{{[0-9]+}}* + // CHECK: store i{{[0-9]+}} [[A2CAST_VAL]], i{{[0-9]+}}* [[ACAST_TOPTR]], // CHECK: [[PTR_GEP2_0:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[PTR_ARR2]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 - // CHECK: store i8* [[A2CAST_TO_INT_2]], i8** [[PTR_GEP2_0]], + // CHECK: [[ACAST_TOPTR:%.+]] = bitcast i8** [[PTR_GEP2_0]] to i{{[0-9]+}}* + // CHECK: store i{{[0-9]+}} [[A2CAST_VAL]], i{{[0-9]+}}* [[ACAST_TOPTR]], // CHECK: [[SIZE_GEPA2:%.+]] = getelementptr inbounds [9 x i{{[0-9]+}}], [9 x i{{[0-9]+}}]* [[SIZET2]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 // CHECK: store i{{[0-9]+}} 2, i{{[0-9]+}}* [[SIZE_GEPA2]], // firstprivate(b): base_ptr = &b[0], ptr = &b[0], size = 40 (sizeof(float)*10) - // CHECK: [[BCAST:%.+]] = bitcast [10 x float]* [[B]] to i8* // CHECK: [[BASE_PTR_GEP2_1:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[BASE_PTR_ARR2]], i{{[0-9]+}} 0, i{{[0-9]+}} 1 - // CHECK: store i8* [[BCAST]], i8** [[BASE_PTR_GEP2_1]], - // CHECK: [[BCAST2:%.+]] = bitcast [10 x float]* [[B]] to i8* + // CHECK: [[BCAST_TOPTR:%.+]] = bitcast i8** [[BASE_PTR_GEP2_1]] to [10 x float]** + // CHECK: store [10 x float]* [[B]], [10 x float]** [[BCAST_TOPTR]], // CHECK: [[PTR_GEP2_1:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[PTR_ARR2]], i{{[0-9]+}} 0, i{{[0-9]+}} 1 - // CHECK: store i8* [[BCAST2]], i8** [[PTR_GEP2_1]], + // CHECK: [[BCAST_TOPTR:%.+]] = bitcast i8** [[PTR_GEP2_1]] to [10 x float]** + // CHECK: store [10 x float]* [[B]], [10 x float]** [[BCAST_TOPTR]], // CHECK: [[SIZE_GEPB:%.+]] = getelementptr inbounds [9 x i{{[0-9]+}}], [9 x i{{[0-9]+}}]* [[SIZET2]], i{{[0-9]+}} 0, i{{[0-9]+}} 1 // CHECK: store i{{[0-9]+}} 40, i{{[0-9]+}}* [[SIZE_GEPB]], // firstprivate(bn), 2 entries, n and bn: (1) base_ptr = n, ptr = n, size = 8 ; (2) base_ptr = &c[0], ptr = &c[0], size = n*sizeof(float) - // CHECK-64: [[N_EXT3_1:%.+]] = inttoptr i{{[0-9]+}} [[N_EXT]] to i8* - // CHECK-32: [[N_EXT3_1:%.+]] = inttoptr i{{[0-9]+}} [[N_ADDR_VAL]] to i8* // CHECK: [[BASE_PTR_GEP2_2:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[BASE_PTR_ARR2]], i{{[0-9]+}} 0, i{{[0-9]+}} 2 - // CHECK: store i8* [[N_EXT3_1]], i8** [[BASE_PTR_GEP2_2]], - // CHECK-64: [[N_EXT3_2:%.+]] = inttoptr i{{[0-9]+}} [[N_EXT]] to i8* - // CHECK-32: [[N_EXT3_2:%.+]] = inttoptr i{{[0-9]+}} [[N_ADDR_VAL]] to i8* + // CHECK: [[BCAST_TOPTR:%.+]] = bitcast i8** [[BASE_PTR_GEP2_2]] to i{{[0-9]+}}* + // CHECK-64: store i{{[0-9]+}} [[N_EXT]], i{{[0-9]+}}* [[BCAST_TOPTR]], + // CHECK-32: store i{{[0-9]+}} [[N_ADDR_VAL]], i{{[0-9]+}}* [[BCAST_TOPTR]], // CHECK: [[PTR_GEP2_2:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[PTR_ARR2]], i{{[0-9]+}} 0, i{{[0-9]+}} 2 - // CHECK: store i8* [[N_EXT3_2]], i8** [[PTR_GEP2_2]], + // CHECK: [[BCAST_TOPTR:%.+]] = bitcast i8** [[PTR_GEP2_2]] to i{{[0-9]+}}* + // CHECK-64: store i{{[0-9]+}} [[N_EXT]], i{{[0-9]+}}* [[BCAST_TOPTR]], + // CHECK-32: store i{{[0-9]+}} [[N_ADDR_VAL]], i{{[0-9]+}}* [[BCAST_TOPTR]], // CHECK: [[SIZE_GEPBN_1:%.+]] = getelementptr inbounds [9 x i{{[0-9]+}}], [9 x i{{[0-9]+}}]* [[SIZET2]], i{{[0-9]+}} 0, i{{[0-9]+}} 2 // CHECK: store i{{[0-9]+}} {{[0-9]}}, i{{[0-9]+}}* [[SIZE_GEPBN_1]], - // CHECK: [[VLABN_BCAST:%.+]] = bitcast float* [[BN_VLA]] to i8* // CHECK: [[BASE_PTR_GEP2_3:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[BASE_PTR_ARR2]], i{{[0-9]+}} 0, i{{[0-9]+}} 3 - // CHECK: store i8* [[VLABN_BCAST]], i8** [[BASE_PTR_GEP2_3]], + // CHECK: [[BCAST_TOPTR:%.+]] = bitcast i8** [[BASE_PTR_GEP2_3]] to float** + // CHECK: store float* [[BN_VLA]], float** [[BCAST_TOPTR]], // CHECK: [[SIZE_GEPBN_3:%.+]] = getelementptr inbounds [9 x i{{[0-9]+}}], [9 x i{{[0-9]+}}]* [[SIZET2]], i{{[0-9]+}} 0, i{{[0-9]+}} 3 // CHECK: store i{{[0-9]+}} [[BN_SIZE]], i{{[0-9]+}}* [[SIZE_GEPBN_3]] // firstprivate(c): base_ptr = &c[0], ptr = &c[0], size = 400 (5*10*sizeof(double)) - // CHECK: [[C_BCAST:%.+]] = bitcast [5 x [10 x double]]* [[C]] to i8* // CHECK: [[BASE_PTR_GEP2_4:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[BASE_PTR_ARR2]], i{{[0-9]+}} 0, i{{[0-9]+}} 4 - // CHECK: store i8* [[C_BCAST]], i8** [[BASE_PTR_GEP2_4]], - // CHECK: [[C_BCAST2:%.+]] = bitcast [5 x [10 x double]]* [[C]] to i8* + // CHECK: [[BCAST_TOPTR:%.+]] = bitcast i8** [[BASE_PTR_GEP2_4]] to [5 x [10 x double]]** + // CHECK: store [5 x [10 x double]]* [[C]], [5 x [10 x double]]** [[BCAST_TOPTR]], // CHECK: [[PTR_GEP2_4:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[PTR_ARR2]], i{{[0-9]+}} 0, i{{[0-9]+}} 4 - // CHECK: store i8* [[C_BCAST2]], i8** [[PTR_GEP2_4]], + // CHECK: [[BCAST_TOPTR:%.+]] = bitcast i8** [[PTR_GEP2_4]] to [5 x [10 x double]]** + // CHECK: store [5 x [10 x double]]* [[C]], [5 x [10 x double]]** [[BCAST_TOPTR]], // CHECK: [[SIZE_GEPC_4:%.+]] = getelementptr inbounds [9 x i{{[0-9]+}}], [9 x i{{[0-9]+}}]* [[SIZET2]], i{{[0-9]+}} 0, i{{[0-9]+}} 4 // CHECK: store i{{[0-9]+}} 400, i{{[0-9]+}}* [[SIZE_GEPC_4]], // firstprivate(cn), 3 entries, 5, n, cn: (1) base_ptr = 5, ptr = 5, size = 8; (2) (1) base_ptr = n, ptr = n, size = 8; (3) base_ptr = &cn[0], ptr = &cn[0], size = 5*n*sizeof(double) // CHECK: [[BASE_PTR_GEP2_5:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[BASE_PTR_ARR2]], i{{[0-9]+}} 0, i{{[0-9]+}} 5 - // CHECK: store i8* inttoptr (i{{[0-9]+}} 5 to i8*), i8** [[BASE_PTR_GEP2_5]], + // CHECK: [[BCAST_TOPTR:%.+]] = bitcast i8** [[BASE_PTR_GEP2_5]] to i{{[0-9]+}}* + // CHECK: store i{{[0-9]+}} 5, i{{[0-9]+}}* [[BCAST_TOPTR]], // CHECK: [[PTR_GEP2_5:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[PTR_ARR2]], i{{[0-9]+}} 0, i{{[0-9]+}} 5 - // CHECK: store i8* inttoptr (i{{[0-9]+}} 5 to i8*), i8** [[PTR_GEP2_5]], + // CHECK: [[BCAST_TOPTR:%.+]] = bitcast i8** [[PTR_GEP2_5]] to i{{[0-9]+}}* + // CHECK: store i{{[0-9]+}} 5, i{{[0-9]+}}* [[BCAST_TOPTR]], // CHECK: [[SIZE_GEPCN_5:%.+]] = getelementptr inbounds [9 x i{{[0-9]+}}], [9 x i{{[0-9]+}}]* [[SIZET2]], i{{[0-9]+}} 0, i{{[0-9]+}} 5 // CHECK: store i{{[0-9]+}} {{[0-9]}}, i{{[0-9]+}}* [[SIZE_GEPCN_5]], - // CHECK-64: [[CN_SZ_2_1:%.+]] = inttoptr i{{[0-9]+}} [[N_EXT2]] to i8* - // CHECK-32: [[CN_SZ_2_1:%.+]] = inttoptr i{{[0-9]+}} [[N_ADDR_VAL2]] to i8* // CHECK: [[BASE_PTR_GEP2_6:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[BASE_PTR_ARR2]], i{{[0-9]+}} 0, i{{[0-9]+}} 6 - // CHECK: store i8* [[CN_SZ_2_1]], i8** [[BASE_PTR_GEP2_6]], - // CHECK-64: [[CN_SZ_2_2:%.+]] = inttoptr i{{[0-9]+}} [[N_EXT2]] to i8* - // CHECK-32: [[CN_SZ_2_2:%.+]] = inttoptr i{{[0-9]+}} [[N_ADDR_VAL2]] to i8* + // CHECK: [[BCAST_TOPTR:%.+]] = bitcast i8** [[BASE_PTR_GEP2_6]] to i{{[0-9]+}}* + // CHECK-64: store i{{[0-9]+}} [[N_EXT2]], i{{[0-9]+}}* [[BCAST_TOPTR]], + // CHECK-32: store i{{[0-9]+}} [[N_ADDR_VAL2]], i{{[0-9]+}}* [[BCAST_TOPTR]], // CHECK: [[PTR_GEP2_6:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[PTR_ARR2]], i{{[0-9]+}} 0, i{{[0-9]+}} 6 - // CHECK: store i8* [[CN_SZ_2_2]], i8** [[PTR_GEP2_6]], + // CHECK: [[BCAST_TOPTR:%.+]] = bitcast i8** [[PTR_GEP2_6]] to i{{[0-9]+}}* + // CHECK-64: store i{{[0-9]+}} [[N_EXT2]], i{{[0-9]+}}* [[BCAST_TOPTR]], + // CHECK-32: store i{{[0-9]+}} [[N_ADDR_VAL2]], i{{[0-9]+}}* [[BCAST_TOPTR]], // CHECK: [[SIZE_GEPCN_6:%.+]] = getelementptr inbounds [9 x i{{[0-9]+}}], [9 x i{{[0-9]+}}]* [[SIZET2]], i{{[0-9]+}} 0, i{{[0-9]+}} 6 // CHECK: store i{{[0-9]+}} {{[0-9]}}, i{{[0-9]+}}* [[SIZE_GEPCN_6]], - // CHECK: [[VLA_CN_BCAST:%.+]] = bitcast double* [[CN_VLA]] to i8* // CHECK: [[BASE_PTR_GEP2_7:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[BASE_PTR_ARR2]], i{{[0-9]+}} 0, i{{[0-9]+}} 7 - // CHECK: store i8* [[VLA_CN_BCAST]], i8** [[BASE_PTR_GEP2_7]], - // CHECK: [[VLA_CN_BCAST2:%.+]] = bitcast double* [[CN_VLA]] to i8* + // CHECK: [[BCAST_TOPTR:%.+]] = bitcast i8** [[BASE_PTR_GEP2_7]] to double** + // CHECK: store double* [[CN_VLA]], double** [[BCAST_TOPTR]], // CHECK: [[PTR_GEP2_7:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[PTR_ARR2]], i{{[0-9]+}} 0, i{{[0-9]+}} 7 - // CHECK: store i8* [[VLA_CN_BCAST2]], i8** [[PTR_GEP2_7]], + // CHECK: [[BCAST_TOPTR:%.+]] = bitcast i8** [[PTR_GEP2_7]] to double** + // CHECK: store double* [[CN_VLA]], double** [[BCAST_TOPTR]], // CHECK: [[SIZE_GEPCN_7:%.+]] = getelementptr inbounds [9 x i{{[0-9]+}}], [9 x i{{[0-9]+}}]* [[SIZET2]], i{{[0-9]+}} 0, i{{[0-9]+}} 7 // CHECK: store i{{[0-9]+}} [[CN_SIZE_2]], i{{[0-9]+}}* [[SIZE_GEPCN_7]], // firstprivate(d): base_ptr = &d, ptr = &d, size = 16 - // CHECK: [[D_REF:%.+]] = bitcast [[TT]]* [[D]] to i8* // CHECK: [[BASE_PTR_GEP2_8:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[BASE_PTR_ARR2]], i{{[0-9]+}} 0, i{{[0-9]+}} 8 - // CHECK: store i8* [[D_REF]], i8** [[BASE_PTR_GEP2_8]], - // CHECK: [[D_REF2:%.+]] = bitcast [[TT]]* [[D]] to i8* + // CHECK: [[BCAST_TOPTR:%.+]] = bitcast i8** [[BASE_PTR_GEP2_8]] to [[TT]]** + // CHECK: store [[TT]]* [[D]], [[TT]]** [[BCAST_TOPTR]], // CHECK: [[PTR_GEP2_8:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[PTR_ARR2]], i{{[0-9]+}} 0, i{{[0-9]+}} 8 - // CHECK: store i8* [[D_REF2]], i8** [[PTR_GEP2_8]], + // CHECK: [[BCAST_TOPTR:%.+]] = bitcast i8** [[PTR_GEP2_8]] to [[TT]]** + // CHECK: store [[TT]]* [[D]], [[TT]]** [[BCAST_TOPTR]], // CHECK: [[SIZE_GEPCN_8:%.+]] = getelementptr inbounds [9 x i{{[0-9]+}}], [9 x i{{[0-9]+}}]* [[SIZET2]], i{{[0-9]+}} 0, i{{[0-9]+}} 8 // CHECK: store i{{[0-9]+}} {{[0-9]+}}, i{{[0-9]+}}* [[SIZE_GEPCN_8]], @@ -299,13 +301,13 @@ int foo(int n, double *ptr) { ptr[0]++; } // CHECK: [[PTR_ADDR_REF:%.+]] = load double*, double** [[PTR_ADDR]], - // CHECK: [[PTR_ADDR_BCAST:%.+]] = bitcast double* [[PTR_ADDR_REF]] to i8* // CHECK: [[BASE_PTR_GEP3_0:%.+]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[BASE_PTR_ARR3]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 - // CHECK: store i8* [[PTR_ADDR_BCAST]], i8** [[BASE_PTR_GEP3_0]], - // CHECK: [[PTR_ADDR_BCAST2:%.+]] = bitcast double* [[PTR_ADDR_REF]] to i8* + // CHECK: [[BCAST_TOPTR:%.+]] = bitcast i8** [[BASE_PTR_GEP3_0]] to double** + // CHECK: store double* [[PTR_ADDR_REF]], double** [[BCAST_TOPTR]], // CHECK: [[PTR_GEP3_0:%.+]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[PTR_ARR3]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 - // CHECK: store i8* [[PTR_ADDR_BCAST2]], i8** [[PTR_GEP3_0]], + // CHECK: [[BCAST_TOPTR:%.+]] = bitcast i8** [[PTR_GEP3_0]] to double** + // CHECK: store double* [[PTR_ADDR_REF]], double** [[BCAST_TOPTR]], // CHECK: [[BASE_PTR_GEP_ARG3:%.+]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[BASE_PTR_ARR3]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 // CHECK: [[PTR_GEP_ARG3:%.+]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[PTR_ARR3]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 @@ -407,38 +409,40 @@ struct S1 { // CHECK: store {{.+}}, {{.+}} // firstprivate(b): base_ptr = b, ptr = b, size = 4 (pass by-value) - // CHECK: [[B_CAST_PTR:%.+]] = inttoptr i{{[0-9]+}} [[B_CAST:%.+]] to i8* // CHECK: [[BASE_PTRS_GEP4_1:%.+]] = getelementptr inbounds [5 x i8*], [5 x i8*]* [[BASE_PTRS4]], i{{[0-9]+}} 0, i{{[0-9]+}} 1 - // CHECK: store i8* [[B_CAST_PTR]], i8** [[BASE_PTRS_GEP4_1]], - // CHECK: [[B_CAST_PTR2:%.+]] = inttoptr i{{[0-9]+}} [[B_CAST:%.+]] to i8* + // CHECK: [[BCAST_TOPTR:%.+]] = bitcast i8** [[BASE_PTRS_GEP4_1]] to i{{[0-9]+}}* + // CHECK: store i{{[0-9]+}} [[B_CAST:%.+]], i{{[0-9]+}}* [[BCAST_TOPTR]], // CHECK: [[PTRS_GEP4_1:%.+]] = getelementptr inbounds [5 x i8*], [5 x i8*]* [[PTRS4]], i{{[0-9]+}} 0, i{{[0-9]+}} 1 - // CHECK: store i8* [[B_CAST_PTR2]], i8** [[PTRS_GEP4_1]], + // CHECK: [[BCAST_TOPTR:%.+]] = bitcast i8** [[PTRS_GEP4_1]] to i{{[0-9]+}}* + // CHECK: store i{{[0-9]+}} [[B_CAST]], i{{[0-9]+}}* [[BCAST_TOPTR]], // CHECK: [[SIZES_GEP4_1:%.+]] = getelementptr inbounds [5 x i{{[0-9]+}}], [5 x i{{[0-9]+}}]* [[SIZET4]], i{{[0-9]+}} 0, i{{[0-9]+}} 1 // CHECK: store i{{[0-9]+}} 4, i{{[0-9]+}}* [[SIZES_GEP4_1]], // firstprivate(c), 3 entries: 2, n, c // CHECK: [[BASE_PTRS_GEP4_2:%.+]] = getelementptr inbounds [5 x i8*], [5 x i8*]* [[BASE_PTRS4]], i{{[0-9]+}} 0, i{{[0-9]+}} 2 - // CHECK: store i8* inttoptr (i{{[0-9]+}} 2 to i8*), i8** [[BASE_PTRS_GEP4_2]], + // CHECK: [[BCAST_TOPTR:%.+]] = bitcast i8** [[BASE_PTRS_GEP4_2]] to i{{[0-9]+}}* + // CHECK: store i{{[0-9]+}} 2, i{{[0-9]+}}* [[BCAST_TOPTR]], // CHECK: [[PTRS_GEP4_2:%.+]] = getelementptr inbounds [5 x i8*], [5 x i8*]* [[PTRS4]], i{{[0-9]+}} 0, i{{[0-9]+}} 2 - // CHECK: store i8* inttoptr (i{{[0-9]+}} 2 to i8*), i8** [[PTRS_GEP4_2]], + // CHECK: [[BCAST_TOPTR:%.+]] = bitcast i8** [[PTRS_GEP4_2]] to i{{[0-9]+}}* + // CHECK: store i{{[0-9]+}} 2, i{{[0-9]+}}* [[BCAST_TOPTR]], // CHECK: [[SIZES_GEP4_2:%.+]] = getelementptr inbounds [5 x i{{[0-9]+}}], [5 x i{{[0-9]+}}]* [[SIZET4]], i{{[0-9]+}} 0, i{{[0-9]+}} 2 // CHECK-64: store i{{[0-9]+}} 8, i{{[0-9]+}}* [[SIZES_GEP4_2]], // CHECK-32: store i{{[0-9]+}} 4, i{{[0-9]+}}* [[SIZES_GEP4_2]], - // CHECK: [[N_PTR:%.+]] = inttoptr i{{[0-9]+}} [[N:%.+]] to i8* // CHECK: [[BASE_PTRS_GEP4_3:%.+]] = getelementptr inbounds [5 x i8*], [5 x i8*]* [[BASE_PTRS4]], i{{[0-9]+}} 0, i{{[0-9]+}} 3 - // CHECK: store i8* [[N_PTR]], i8** [[BASE_PTRS_GEP4_3]], - // CHECK: [[N_PTR2:%.+]] = inttoptr i{{[0-9]+}} [[N:%.+]] to i8* + // CHECK: [[BCAST_TOPTR:%.+]] = bitcast i8** [[BASE_PTRS_GEP4_3]] to i{{[0-9]+}}* + // CHECK: store i{{[0-9]+}} [[N:%.+]], i{{[0-9]+}}* [[BCAST_TOPTR]], // CHECK: [[PTRS_GEP4_3:%.+]] = getelementptr inbounds [5 x i8*], [5 x i8*]* [[PTRS4]], i{{[0-9]+}} 0, i{{[0-9]+}} 3 - // CHECK: store i8* [[N_PTR2]], i8** [[PTRS_GEP4_3]], + // CHECK: [[BCAST_TOPTR:%.+]] = bitcast i8** [[PTRS_GEP4_3]] to i{{[0-9]+}}* + // CHECK: store i{{[0-9]+}} [[N]], i{{[0-9]+}}* [[BCAST_TOPTR]], // CHECK: [[SIZES_GEP4_3:%.+]] = getelementptr inbounds [5 x i{{[0-9]+}}], [5 x i{{[0-9]+}}]* [[SIZET4]], i{{[0-9]+}} 0, i{{[0-9]+}} 3 // CHECK-64: store i{{[0-9]+}} 8, i{{[0-9]+}}* [[SIZES_GEP4_3]], // CHECK-32: store i{{[0-9]+}} 4, i{{[0-9]+}}* [[SIZES_GEP4_3]], - // CHECK: [[B_BCAST:%.+]] = bitcast i{{[0-9]+}}* [[B:%.+]] to i8* // CHECK: [[BASE_PTRS_GEP4_4:%.+]] = getelementptr inbounds [5 x i8*], [5 x i8*]* [[BASE_PTRS4]], i{{[0-9]+}} 0, i{{[0-9]+}} 4 - // CHECK: store i8* [[B_BCAST]], i8** [[BASE_PTRS_GEP4_4]], - // CHECK: [[B_BCAST2:%.+]] = bitcast i{{[0-9]+}}* [[B:%.+]] to i8* + // CHECK: [[BCAST_TOPTR:%.+]] = bitcast i8** [[BASE_PTRS_GEP4_4]] to i{{[0-9]+}}** + // CHECK: store i{{[0-9]+}}* [[B:%.+]], i{{[0-9]+}}** [[BCAST_TOPTR]], // CHECK: [[PTRS_GEP4_4:%.+]] = getelementptr inbounds [5 x i8*], [5 x i8*]* [[PTRS4]], i{{[0-9]+}} 0, i{{[0-9]+}} 4 - // CHECK: store i8* [[B_BCAST2]], i8** [[PTRS_GEP4_4]], + // CHECK: [[BCAST_TOPTR:%.+]] = bitcast i8** [[PTRS_GEP4_4]] to i{{[0-9]+}}** + // CHECK: store i{{[0-9]+}}* [[B]], i{{[0-9]+}}** [[BCAST_TOPTR]], // CHECK: [[SIZES_GEP4_4:%.+]] = getelementptr inbounds [5 x i{{[0-9]+}}], [5 x i{{[0-9]+}}]* [[SIZET4]], i{{[0-9]+}} 0, i{{[0-9]+}} 4 // CHECK: store i{{[0-9]+}} [[B_SIZE:%.+]], i{{[0-9]+}}* [[SIZES_GEP4_4]], @@ -492,28 +496,28 @@ struct S1 { // CHECK: [[PTRS5:%.+]] = alloca [3 x i8*], // firstprivate(a): by value - // CHECK: [[A_CAST_PTR:%.+]] = inttoptr i{{[0-9]+}} [[A_CAST:%.+]] to i8* // CHECK: [[BASE_PTRS_GEP5_0:%.+]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[BASE_PTRS5]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 - // CHECK: store i8* [[A_CAST_PTR]], i8** [[BASE_PTRS_GEP5_0]], - // CHECK: [[A_CAST_PTR2:%.+]] = inttoptr i{{[0-9]+}} [[A_CAST:%.+]] to i8* + // CHECK: [[BCAST_TOPTR:%.+]] = bitcast i8** [[BASE_PTRS_GEP5_0]] to i{{[0-9]+}}* + // CHECK: store i{{[0-9]+}} [[A_CAST:%.+]], i{{[0-9]+}}* [[BCAST_TOPTR]], // CHECK: [[PTRS_GEP5_0:%.+]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[PTRS5]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 - // CHECK: store i8* [[A_CAST_PTR2]], i8** [[PTRS_GEP5_0]], + // CHECK: [[BCAST_TOPTR:%.+]] = bitcast i8** [[PTRS_GEP5_0]] to i{{[0-9]+}}* + // CHECK: store i{{[0-9]+}} [[A_CAST]], i{{[0-9]+}}* [[BCAST_TOPTR]], // firstprivate(aaa): by value - // CHECK: [[A3_CAST_PTR:%.+]] = inttoptr i{{[0-9]+}} [[A3_CAST:%.+]] to i8* // CHECK: [[BASE_PTRS_GEP5_1:%.+]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[BASE_PTRS5]], i{{[0-9]+}} 0, i{{[0-9]+}} 1 - // CHECK: store i8* [[A3_CAST_PTR]], i8** [[BASE_PTRS_GEP5_1]], - // CHECK: [[A3_CAST_PTR2:%.+]] = inttoptr i{{[0-9]+}} [[A3_CAST:%.+]] to i8* + // CHECK: [[BCAST_TOPTR:%.+]] = bitcast i8** [[BASE_PTRS_GEP5_1]] to i{{[0-9]+}}* + // CHECK: store i{{[0-9]+}} [[A3_CAST:%.+]], i{{[0-9]+}}* [[BCAST_TOPTR]], // CHECK: [[PTRS_GEP5_1:%.+]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[PTRS5]], i{{[0-9]+}} 0, i{{[0-9]+}} 1 - // CHECK: store i8* [[A3_CAST_PTR2]], i8** [[PTRS_GEP5_1]], + // CHECK: [[BCAST_TOPTR:%.+]] = bitcast i8** [[PTRS_GEP5_1]] to i{{[0-9]+}}* + // CHECK: store i{{[0-9]+}} [[A3_CAST]], i{{[0-9]+}}* [[BCAST_TOPTR]], // firstprivate(b): base_ptr = &b[0], ptr= &b[0] - // CHECK: [[B_BCAST:%.+]] = bitcast [10 x i{{[0-9]+}}]* [[B:%.+]] to i8* // CHECK: [[BASE_PTRS_GEP5_2:%.+]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[BASE_PTRS5]], i{{[0-9]+}} 0, i{{[0-9]+}} 2 - // CHECK: store i8* [[B_BCAST]], i8** [[BASE_PTRS_GEP5_2]], - // CHECK: [[B_BCAST2:%.+]] = bitcast [10 x i{{[0-9]+}}]* [[B:%.+]] to i8* + // CHECK: [[BCAST_TOPTR:%.+]] = bitcast i8** [[BASE_PTRS_GEP5_2]] to [10 x i{{[0-9]+}}]** + // CHECK: store [10 x i{{[0-9]+}}]* [[B:%.+]], [10 x i{{[0-9]+}}]** [[BCAST_TOPTR]], // CHECK: [[PTRS_GEP5_2:%.+]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[PTRS5]], i{{[0-9]+}} 0, i{{[0-9]+}} 2 - // CHECK: store i8* [[B_BCAST2]], i8** [[PTRS_GEP5_2]], + // CHECK: [[BCAST_TOPTR:%.+]] = bitcast i8** [[PTRS_GEP5_2]] to [10 x i{{[0-9]+}}]** + // CHECK: store [10 x i{{[0-9]+}}]* [[B]], [10 x i{{[0-9]+}}]** [[BCAST_TOPTR]], // only check that the right sizes and map types are used // CHECK: call i32 @__tgt_target(i32 -1, {{.+}}, i32 3, i8** {{.+}}, i8** {{.+}}, i[[SZ]]* getelementptr inbounds ([3 x i[[SZ]]], [3 x i[[SZ]]]* [[SIZET5]], i32 0, i32 0), i32* getelementptr inbounds ([3 x i32], [3 x i32]* [[MAPT5]], i32 0, i32 0)) @@ -539,20 +543,20 @@ int bar(int n, double *ptr){ // CHECK: [[PTRS6:%.+]] = alloca [2 x i8*], // firstprivate(a): by value -// CHECK: [[AT_CAST_PTR:%.+]] = inttoptr i{{[0-9]+}} [[AT_CAST:%.+]] to i8* // CHECK: [[BASE_PTRS_GEP6_0:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[BASE_PTRS6]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 -// CHECK: store i8* [[AT_CAST_PTR]], i8** [[BASE_PTRS_GEP6_0]], -// CHECK: [[AT_CAST_PTR2:%.+]] = inttoptr i{{[0-9]+}} [[AT_CAST:%.+]] to i8* +// CHECK: [[BCAST_TOPTR:%.+]] = bitcast i8** [[BASE_PTRS_GEP6_0]] to i{{[0-9]+}}* +// CHECK: store i{{[0-9]+}} [[AT_CAST:%.+]], i{{[0-9]+}}* [[BCAST_TOPTR]], // CHECK: [[PTRS_GEP6_0:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[PTRS6]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 -// CHECK: store i8* [[AT_CAST_PTR2]], i8** [[PTRS_GEP6_0]], +// CHECK: [[BCAST_TOPTR:%.+]] = bitcast i8** [[PTRS_GEP6_0]] to i{{[0-9]+}}* +// CHECK: store i{{[0-9]+}} [[AT_CAST]], i{{[0-9]+}}* [[BCAST_TOPTR]], // firstprivate(b): pointer -// CHECK: [[B_BCAST:%.+]] = bitcast [10 x i{{[0-9]+}}]* [[B:%.+]] to i8* // CHECK: [[BASE_PTRS_GEP6_1:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[BASE_PTRS6]], i{{[0-9]+}} 0, i{{[0-9]+}} 1 -// CHECK: store i8* [[B_BCAST]], i8** [[BASE_PTRS_GEP6_1]], -// CHECK: [[B_BCAST2:%.+]] = bitcast [10 x i{{[0-9]+}}]* [[B:%.+]] to i8* +// CHECK: [[BCAST_TOPTR:%.+]] = bitcast i8** [[BASE_PTRS_GEP6_1]] to [10 x i{{[0-9]+}}]** +// CHECK: store [10 x i{{[0-9]+}}]* [[B:%.+]], [10 x i{{[0-9]+}}]** [[BCAST_TOPTR]], // CHECK: [[PTRS_GEP6_1:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[PTRS6]], i{{[0-9]+}} 0, i{{[0-9]+}} 1 -// CHECK: store i8* [[B_BCAST2]], i8** [[PTRS_GEP6_1]], +// CHECK: [[BCAST_TOPTR:%.+]] = bitcast i8** [[PTRS_GEP6_1]] to [10 x i{{[0-9]+}}]** +// CHECK: store [10 x i{{[0-9]+}}]* [[B]], [10 x i{{[0-9]+}}]** [[BCAST_TOPTR]], // CHECK: call i32 @__tgt_target(i32 -1, {{.+}}, i32 2, i8** {{.+}}, i8** {{.+}}, i[[SZ]]* getelementptr inbounds ([2 x i[[SZ]]], [2 x i[[SZ]]]* [[SIZET6]], i32 0, i32 0), i32* getelementptr inbounds ([2 x i32], [2 x i32]* [[MAPT6]], i32 0, i32 0)) diff --git a/test/OpenMP/target_is_device_ptr_codegen.cpp b/test/OpenMP/target_is_device_ptr_codegen.cpp index 6c80729483..1a54aa18c0 100644 --- a/test/OpenMP/target_is_device_ptr_codegen.cpp +++ b/test/OpenMP/target_is_device_ptr_codegen.cpp @@ -46,10 +46,10 @@ void foo(float *&lr, T *&tr) { // CK1-DAG: [[PGEP]] = getelementptr inbounds {{.+}}[[PS:%[^,]+]], i32 0, i32 0 // CK1-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BPS]], i32 0, i32 0 // CK1-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[PS]], i32 0, i32 0 - // CK1-DAG: store i8* [[VALBP:%.+]], i8** [[BP1]], - // CK1-DAG: store i8* [[VALP:%.+]], i8** [[P1]], - // CK1-DAG: [[VALBP]] = bitcast double* [[VAL:%.+]] to i8* - // CK1-DAG: [[VALP]] = bitcast double* [[VAL]] to i8* + // CK1-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to double** + // CK1-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to double** + // CK1-DAG: store double* [[VAL:%.+]], double** [[CBP1]] + // CK1-DAG: store double* [[VAL]], double** [[CP1]] // CK1-DAG: [[VAL]] = load double*, double** [[ADDR:@g]], // CK1: call void [[KERNEL:@.+]](double* [[VAL]]) @@ -63,10 +63,10 @@ void foo(float *&lr, T *&tr) { // CK1-DAG: [[PGEP]] = getelementptr inbounds {{.+}}[[PS:%[^,]+]], i32 0, i32 0 // CK1-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BPS]], i32 0, i32 0 // CK1-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[PS]], i32 0, i32 0 - // CK1-DAG: store i8* [[VALBP:%.+]], i8** [[BP1]], - // CK1-DAG: store i8* [[VALP:%.+]], i8** [[P1]], - // CK1-DAG: [[VALBP]] = bitcast float* [[VAL:%.+]] to i8* - // CK1-DAG: [[VALP]] = bitcast float* [[VAL]] to i8* + // CK1-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to float** + // CK1-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to float** + // CK1-DAG: store float* [[VAL:%.+]], float** [[CBP1]] + // CK1-DAG: store float* [[VAL]], float** [[CP1]] // CK1-DAG: [[VAL]] = load float*, float** [[ADDR:%.+]], // CK1: call void [[KERNEL:@.+]](float* [[VAL]]) @@ -80,10 +80,10 @@ void foo(float *&lr, T *&tr) { // CK1-DAG: [[PGEP]] = getelementptr inbounds {{.+}}[[PS:%[^,]+]], i32 0, i32 0 // CK1-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BPS]], i32 0, i32 0 // CK1-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[PS]], i32 0, i32 0 - // CK1-DAG: store i8* [[VALBP:%.+]], i8** [[BP1]], - // CK1-DAG: store i8* [[VALP:%.+]], i8** [[P1]], - // CK1-DAG: [[VALBP]] = bitcast i32* [[VAL:%.+]] to i8* - // CK1-DAG: [[VALP]] = bitcast i32* [[VAL]] to i8* + // CK1-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to i32** + // CK1-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to i32** + // CK1-DAG: store i32* [[VAL:%.+]], i32** [[CBP1]] + // CK1-DAG: store i32* [[VAL]], i32** [[CP1]] // CK1-DAG: [[VAL]] = load i32*, i32** [[ADDR:%.+]], // CK1: call void [[KERNEL:@.+]](i32* [[VAL]]) @@ -97,10 +97,10 @@ void foo(float *&lr, T *&tr) { // CK1-DAG: [[PGEP]] = getelementptr inbounds {{.+}}[[PS:%[^,]+]], i32 0, i32 0 // CK1-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BPS]], i32 0, i32 0 // CK1-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[PS]], i32 0, i32 0 - // CK1-DAG: store i8* [[VALBP:%.+]], i8** [[BP1]], - // CK1-DAG: store i8* [[VALP:%.+]], i8** [[P1]], - // CK1-DAG: [[VALBP]] = bitcast float* [[VAL:%.+]] to i8* - // CK1-DAG: [[VALP]] = bitcast float* [[VAL]] to i8* + // CK1-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to float** + // CK1-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to float** + // CK1-DAG: store float* [[VAL:%.+]], float** [[CBP1]] + // CK1-DAG: store float* [[VAL]], float** [[CP1]] // CK1-DAG: [[VAL]] = load float*, float** [[ADDR:%.+]], // CK1-DAG: [[ADDR]] = load float**, float*** [[ADDR2:%.+]], @@ -115,10 +115,10 @@ void foo(float *&lr, T *&tr) { // CK1-DAG: [[PGEP]] = getelementptr inbounds {{.+}}[[PS:%[^,]+]], i32 0, i32 0 // CK1-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BPS]], i32 0, i32 0 // CK1-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[PS]], i32 0, i32 0 - // CK1-DAG: store i8* [[VALBP:%.+]], i8** [[BP1]], - // CK1-DAG: store i8* [[VALP:%.+]], i8** [[P1]], - // CK1-DAG: [[VALBP]] = bitcast i32* [[VAL:%.+]] to i8* - // CK1-DAG: [[VALP]] = bitcast i32* [[VAL]] to i8* + // CK1-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to i32** + // CK1-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to i32** + // CK1-DAG: store i32* [[VAL:%.+]], i32** [[CBP1]] + // CK1-DAG: store i32* [[VAL]], i32** [[CP1]] // CK1-DAG: [[VAL]] = load i32*, i32** [[ADDR:%.+]], // CK1-DAG: [[ADDR]] = load i32**, i32*** [[ADDR2:%.+]], @@ -133,10 +133,10 @@ void foo(float *&lr, T *&tr) { // CK1-DAG: [[PGEP]] = getelementptr inbounds {{.+}}[[PS:%[^,]+]], i32 0, i32 0 // CK1-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BPS]], i32 0, i32 0 // CK1-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[PS]], i32 0, i32 0 - // CK1-DAG: store i8* [[VALBP:%.+]], i8** [[BP1]], - // CK1-DAG: store i8* [[VALP:%.+]], i8** [[P1]], - // CK1-DAG: [[VALBP]] = bitcast i32* [[VAL:%.+]] to i8* - // CK1-DAG: [[VALP]] = bitcast i32* [[VAL]] to i8* + // CK1-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to i32** + // CK1-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to i32** + // CK1-DAG: store i32* [[VAL:%.+]], i32** [[CBP1]] + // CK1-DAG: store i32* [[VAL]], i32** [[CP1]] // CK1-DAG: [[VAL]] = load i32*, i32** [[ADDR:%.+]], // CK1-DAG: [[ADDR]] = load i32**, i32*** [[ADDR2:%.+]], @@ -151,19 +151,19 @@ void foo(float *&lr, T *&tr) { // CK1-DAG: [[PGEP]] = getelementptr inbounds {{.+}}[[PS:%[^,]+]], i32 0, i32 0 // CK1-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BPS]], i32 0, i32 0 // CK1-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[PS]], i32 0, i32 0 - // CK1-DAG: store i8* [[VALBP:%.+]], i8** [[BP1]], - // CK1-DAG: store i8* [[VALP:%.+]], i8** [[P1]], - // CK1-DAG: [[VALBP]] = bitcast i32* [[VAL:%.+]] to i8* - // CK1-DAG: [[VALP]] = bitcast i32* [[VAL]] to i8* + // CK1-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to i32** + // CK1-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to i32** + // CK1-DAG: store i32* [[VAL:%.+]], i32** [[CBP1]] + // CK1-DAG: store i32* [[VAL]], i32** [[CP1]] // CK1-DAG: [[VAL]] = load i32*, i32** [[ADDR:%.+]], // CK1-DAG: [[ADDR]] = load i32**, i32*** [[ADDR2:%.+]], // CK1-DAG: [[_BP1:%.+]] = getelementptr inbounds {{.+}}[[BPS]], i32 0, i32 1 // CK1-DAG: [[_P1:%.+]] = getelementptr inbounds {{.+}}[[PS]], i32 0, i32 1 - // CK1-DAG: store i8* [[_VALBP:%.+]], i8** [[_BP1]], - // CK1-DAG: store i8* [[_VALP:%.+]], i8** [[_P1]], - // CK1-DAG: [[_VALBP]] = bitcast float* [[_VAL:%.+]] to i8* - // CK1-DAG: [[_VALP]] = bitcast float* [[_VAL]] to i8* + // CK1-DAG: [[_CBP1:%.+]] = bitcast i8** [[_BP1]] to float** + // CK1-DAG: [[_CP1:%.+]] = bitcast i8** [[_P1]] to float** + // CK1-DAG: store float* [[_VAL:%.+]], float** [[_CBP1]] + // CK1-DAG: store float* [[_VAL]], float** [[_CP1]] // CK1-DAG: [[_VAL]] = load float*, float** [[_ADDR:%.+]], // CK1-DAG: [[_ADDR]] = load float**, float*** [[_ADDR2:%.+]], @@ -215,10 +215,10 @@ struct ST { // CK2-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK2-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK2-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK2-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK2-DAG: [[CBPVAL0]] = bitcast [[ST]]* [[VAR0:%.+]] to i8* - // CK2-DAG: [[CPVAL0]] = bitcast double** [[SEC0:%.+]] to i8* + // CK2-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[ST]]** + // CK2-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to double*** + // CK2-DAG: store [[ST]]* [[VAR0:%.+]], [[ST]]** [[CBP0]] + // CK2-DAG: store double** [[SEC0:%.+]], double*** [[CP0]] // CK2-DAG: [[SEC0]] = getelementptr {{.*}}[[ST]]* [[VAR0]], i{{.+}} 0, i{{.+}} 0 #pragma omp target is_device_ptr(a) { @@ -231,18 +231,18 @@ struct ST { // CK2-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK2-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK2-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK2-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK2-DAG: [[CBPVAL0]] = bitcast [[ST]]* [[VAR0:%.+]] to i8* - // CK2-DAG: [[CPVAL0]] = bitcast double*** [[SEC0:%.+]] to i8* + // CK2-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[ST]]** + // CK2-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to double**** + // CK2-DAG: store [[ST]]* [[VAR0:%.+]], [[ST]]** [[CBP0]] + // CK2-DAG: store double*** [[SEC0:%.+]], double**** [[CP0]] // CK2-DAG: [[SEC0]] = getelementptr {{.*}}[[ST]]* [[VAR0]], i{{.+}} 0, i{{.+}} 1 // CK2-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1 // CK2-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1 - // CK2-DAG: store i8* [[CBPVAL1:%[^,]+]], i8** [[BP1]] - // CK2-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]] - // CK2-DAG: [[CBPVAL1]] = bitcast double*** [[SEC0]] to i8* - // CK2-DAG: [[CPVAL1]] = bitcast double** [[SEC1:%.+]] to i8* + // CK2-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to double**** + // CK2-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to double*** + // CK2-DAG: store double*** [[SEC0]], double**** [[CBP1]] + // CK2-DAG: store double** [[SEC1:%.+]], double*** [[CP1]] // CK2-DAG: [[SEC1]] = load double**, double*** [[SEC0]] #pragma omp target is_device_ptr(b) { @@ -255,26 +255,26 @@ struct ST { // CK2-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1 // CK2-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1 - // CK2-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK2-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK2-DAG: [[CBPVAL0]] = bitcast [[ST]]* [[VAR0:%.+]] to i8* - // CK2-DAG: [[CPVAL0]] = bitcast double*** [[SEC0:%.+]] to i8* + // CK2-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[ST]]** + // CK2-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to double**** + // CK2-DAG: store [[ST]]* [[VAR0:%.+]], [[ST]]** [[CBP0]] + // CK2-DAG: store double*** [[SEC0:%.+]], double**** [[CP0]] // CK2-DAG: [[SEC0]] = getelementptr {{.*}}[[ST]]* [[VAR0]], i{{.+}} 0, i{{.+}} 1 // CK2-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 2 // CK2-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 2 - // CK2-DAG: store i8* [[CBPVAL1:%[^,]+]], i8** [[BP1]] - // CK2-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]] - // CK2-DAG: [[CBPVAL1]] = bitcast double*** [[SEC0]] to i8* - // CK2-DAG: [[CPVAL1]] = bitcast double** [[SEC1:%.+]] to i8* + // CK2-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to double**** + // CK2-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to double*** + // CK2-DAG: store double*** [[SEC0]], double**** [[CBP1]] + // CK2-DAG: store double** [[SEC1:%.+]], double*** [[CP1]] // CK2-DAG: [[SEC1]] = load double**, double*** [[SEC0]] // CK2-DAG: [[BP2:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK2-DAG: [[P2:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK2-DAG: store i8* [[CBPVAL2:%[^,]+]], i8** [[BP2]] - // CK2-DAG: store i8* [[CPVAL2:%[^,]+]], i8** [[P2]] - // CK2-DAG: [[CBPVAL2]] = bitcast [[ST]]* [[VAR2:%.+]] to i8* - // CK2-DAG: [[CPVAL2]] = bitcast double** [[SEC2:%.+]] to i8* + // CK2-DAG: [[CBP2:%.+]] = bitcast i8** [[BP2]] to [[ST]]** + // CK2-DAG: [[CP2:%.+]] = bitcast i8** [[P2]] to double*** + // CK2-DAG: store [[ST]]* [[VAR2:%.+]], [[ST]]** [[CBP2]] + // CK2-DAG: store double** [[SEC2:%.+]], double*** [[CP2]] // CK2-DAG: [[SEC2]] = getelementptr {{.*}}[[ST]]* [[VAR2]], i{{.+}} 0, i{{.+}} 0 #pragma omp target is_device_ptr(a, b) { diff --git a/test/OpenMP/target_map_codegen.cpp b/test/OpenMP/target_map_codegen.cpp index 72c7257a0e..4933bf31c2 100644 --- a/test/OpenMP/target_map_codegen.cpp +++ b/test/OpenMP/target_map_codegen.cpp @@ -28,10 +28,10 @@ void implicit_maps_integer (int a){ // CK1-DAG: [[PGEP]] = getelementptr inbounds {{.+}}[[PS:%[^,]+]], i32 0, i32 0 // CK1-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BPS]], i32 0, i32 0 // CK1-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[PS]], i32 0, i32 0 - // CK1-DAG: store i8* [[VALBP:%.+]], i8** [[BP1]], - // CK1-DAG: store i8* [[VALP:%.+]], i8** [[P1]], - // CK1-DAG: [[VALBP]] = inttoptr i[[sz]] [[VAL:%.+]] to i8* - // CK1-DAG: [[VALP]] = inttoptr i[[sz]] [[VAL:%.+]] to i8* + // CK1-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to i[[sz]]* + // CK1-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to i[[sz]]* + // CK1-DAG: store i[[sz]] [[VAL:%[^,]+]], i[[sz]]* [[CBP1]] + // CK1-DAG: store i[[sz]] [[VAL]], i[[sz]]* [[CP1]] // CK1-DAG: [[VAL]] = load i[[sz]], i[[sz]]* [[ADDR:%.+]], // CK1-64-DAG: [[CADDR:%.+]] = bitcast i[[sz]]* [[ADDR]] to i32* // CK1-64-DAG: store i32 {{.+}}, i32* [[CADDR]], @@ -75,10 +75,10 @@ void implicit_maps_reference (int a, int *b){ // CK2-DAG: [[PGEP]] = getelementptr inbounds {{.+}}[[PS:%[^,]+]], i32 0, i32 0 // CK2-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BPS]], i32 0, i32 0 // CK2-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[PS]], i32 0, i32 0 - // CK2-DAG: store i8* [[VALBP:%.+]], i8** [[BP1]], - // CK2-DAG: store i8* [[VALP:%.+]], i8** [[P1]], - // CK2-DAG: [[VALBP]] = inttoptr i[[sz]] [[VAL:%.+]] to i8* - // CK2-DAG: [[VALP]] = inttoptr i[[sz]] [[VAL:%.+]] to i8* + // CK2-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to i[[sz]]* + // CK2-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to i[[sz]]* + // CK2-DAG: store i[[sz]] [[VAL:%[^,]+]], i[[sz]]* [[CBP1]] + // CK2-DAG: store i[[sz]] [[VAL]], i[[sz]]* [[CP1]] // CK2-DAG: [[VAL]] = load i[[sz]], i[[sz]]* [[ADDR:%.+]], // CK2-64-DAG: [[CADDR:%.+]] = bitcast i[[sz]]* [[ADDR]] to i32* // CK2-64-DAG: store i32 {{.+}}, i32* [[CADDR]], @@ -95,10 +95,10 @@ void implicit_maps_reference (int a, int *b){ // CK2-DAG: [[PGEP]] = getelementptr inbounds {{.+}}[[PS:%[^,]+]], i32 0, i32 0 // CK2-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BPS]], i32 0, i32 0 // CK2-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[PS]], i32 0, i32 0 - // CK2-DAG: store i8* [[VALBP:%.+]], i8** [[BP1]], - // CK2-DAG: store i8* [[VALP:%.+]], i8** [[P1]], - // CK2-DAG: [[VALBP]] = bitcast i32* [[VAL:%.+]] to i8* - // CK2-DAG: [[VALP]] = bitcast i32* [[VAL]] to i8* + // CK2-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to i32** + // CK2-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to i32** + // CK2-DAG: store i32* [[VAL:%[^,]+]], i32** [[CBP1]] + // CK2-DAG: store i32* [[VAL]], i32** [[CP1]] // CK2-DAG: [[VAL]] = load i32*, i32** [[ADDR:%.+]], // CK2-DAG: [[ADDR]] = load i32**, i32*** [[ADDR2:%.+]], @@ -151,10 +151,10 @@ void implicit_maps_parameter (int a){ // CK3-DAG: [[PGEP]] = getelementptr inbounds {{.+}}[[PS:%[^,]+]], i32 0, i32 0 // CK3-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BPS]], i32 0, i32 0 // CK3-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[PS]], i32 0, i32 0 - // CK3-DAG: store i8* [[VALBP:%.+]], i8** [[BP1]], - // CK3-DAG: store i8* [[VALP:%.+]], i8** [[P1]], - // CK3-DAG: [[VALBP]] = inttoptr i[[sz]] [[VAL:%.+]] to i8* - // CK3-DAG: [[VALP]] = inttoptr i[[sz]] [[VAL:%.+]] to i8* + // CK3-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to i[[sz]]* + // CK3-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to i[[sz]]* + // CK3-DAG: store i[[sz]] [[VAL:%[^,]+]], i[[sz]]* [[CBP1]] + // CK3-DAG: store i[[sz]] [[VAL]], i[[sz]]* [[CP1]] // CK3-DAG: [[VAL]] = load i[[sz]], i[[sz]]* [[ADDR:%.+]], // CK3-64-DAG: [[CADDR:%.+]] = bitcast i[[sz]]* [[ADDR]] to i32* // CK3-64-DAG: store i32 {{.+}}, i32* [[CADDR]], @@ -203,10 +203,10 @@ void implicit_maps_nested_integer (int a){ // CK4-DAG: [[PGEP]] = getelementptr inbounds {{.+}}[[PS:%[^,]+]], i32 0, i32 0 // CK4-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BPS]], i32 0, i32 0 // CK4-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[PS]], i32 0, i32 0 - // CK4-DAG: store i8* [[VALBP:%.+]], i8** [[BP1]], - // CK4-DAG: store i8* [[VALP:%.+]], i8** [[P1]], - // CK4-DAG: [[VALBP]] = inttoptr i[[sz]] [[VAL:%.+]] to i8* - // CK4-DAG: [[VALP]] = inttoptr i[[sz]] [[VAL:%.+]] to i8* + // CK4-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to i[[sz]]* + // CK4-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to i[[sz]]* + // CK4-DAG: store i[[sz]] [[VAL:%[^,]+]], i[[sz]]* [[CBP1]] + // CK4-DAG: store i[[sz]] [[VAL]], i[[sz]]* [[CP1]] // CK4-DAG: [[VAL]] = load i[[sz]], i[[sz]]* [[ADDR:%.+]], // CK4-64-DAG: [[CADDR:%.+]] = bitcast i[[sz]]* [[ADDR]] to i32* // CK4-64-DAG: store i32 {{.+}}, i32* [[CADDR]], @@ -257,10 +257,10 @@ void implicit_maps_nested_integer_and_enum (int a){ // CK5-DAG: [[PGEP]] = getelementptr inbounds {{.+}}[[PS:%[^,]+]], i32 0, i32 0 // CK5-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BPS]], i32 0, i32 0 // CK5-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[PS]], i32 0, i32 0 - // CK5-DAG: store i8* [[VALBP:%.+]], i8** [[BP1]], - // CK5-DAG: store i8* [[VALP:%.+]], i8** [[P1]], - // CK5-DAG: [[VALBP]] = inttoptr i[[sz]] [[VAL:%.+]] to i8* - // CK5-DAG: [[VALP]] = inttoptr i[[sz]] [[VAL:%.+]] to i8* + // CK5-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to i[[sz]]* + // CK5-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to i[[sz]]* + // CK5-DAG: store i[[sz]] [[VAL:%[^,]+]], i[[sz]]* [[CBP1]] + // CK5-DAG: store i[[sz]] [[VAL]], i[[sz]]* [[CP1]] // CK5-DAG: [[VAL]] = load i[[sz]], i[[sz]]* [[ADDR:%.+]], // CK5-64-DAG: [[CADDR:%.+]] = bitcast i[[sz]]* [[ADDR]] to i32* // CK5-64-DAG: store i32 {{.+}}, i32* [[CADDR]], @@ -302,10 +302,10 @@ void implicit_maps_host_global (int a){ // CK6-DAG: [[PGEP]] = getelementptr inbounds {{.+}}[[PS:%[^,]+]], i32 0, i32 0 // CK6-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BPS]], i32 0, i32 0 // CK6-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[PS]], i32 0, i32 0 - // CK6-DAG: store i8* [[VALBP:%.+]], i8** [[BP1]], - // CK6-DAG: store i8* [[VALP:%.+]], i8** [[P1]], - // CK6-DAG: [[VALBP]] = inttoptr i[[sz]] [[VAL:%.+]] to i8* - // CK6-DAG: [[VALP]] = inttoptr i[[sz]] [[VAL:%.+]] to i8* + // CK6-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to i[[sz]]* + // CK6-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to i[[sz]]* + // CK6-DAG: store i[[sz]] [[VAL:%[^,]+]], i[[sz]]* [[CBP1]] + // CK6-DAG: store i[[sz]] [[VAL]], i[[sz]]* [[CP1]] // CK6-64-DAG: [[VAL]] = load i[[sz]], i[[sz]]* [[ADDR:%.+]], // CK6-64-DAG: [[CADDR:%.+]] = bitcast i[[sz]]* [[ADDR]] to i32* // CK6-64-DAG: store i32 [[GBLVAL:%.+]], i32* [[CADDR]], @@ -355,18 +355,18 @@ void implicit_maps_double (int a){ // CK7-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BPS]], i32 0, i32 0 // CK7-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[PS]], i32 0, i32 0 - // CK7-64-DAG: store i8* [[VALBP:%.+]], i8** [[BP1]], - // CK7-64-DAG: store i8* [[VALP:%.+]], i8** [[P1]], - // CK7-64-DAG: [[VALBP]] = inttoptr i[[sz]] [[VAL:%.+]] to i8* - // CK7-64-DAG: [[VALP]] = inttoptr i[[sz]] [[VAL:%.+]] to i8* + // CK7-64-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to i[[sz]]* + // CK7-64-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to i[[sz]]* + // CK7-64-DAG: store i[[sz]] [[VAL:%[^,]+]], i[[sz]]* [[CBP1]] + // CK7-64-DAG: store i[[sz]] [[VAL]], i[[sz]]* [[CP1]] // CK7-64-DAG: [[VAL]] = load i[[sz]], i[[sz]]* [[ADDR:%.+]], // CK7-64-64-DAG: [[CADDR:%.+]] = bitcast i[[sz]]* [[ADDR]] to double* // CK7-64-64-DAG: store double {{.+}}, double* [[CADDR]], - // CK7-32-DAG: store i8* [[VALBP:%.+]], i8** [[BP1]], - // CK7-32-DAG: store i8* [[VALP:%.+]], i8** [[P1]], - // CK7-32-DAG: [[VALBP]] = bitcast double* [[DECL:%.+]] to i8* - // CK7-32-DAG: [[VALP]] = bitcast double* [[DECL]] to i8* + // CK7-32-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to double** + // CK7-32-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to double** + // CK7-32-DAG: store double* [[DECL:%[^,]+]], double** [[CBP1]] + // CK7-32-DAG: store double* [[DECL]], double** [[CP1]] // CK7-64: call void [[KERNEL:@.+]](i[[sz]] [[VAL]]) // CK7-32: call void [[KERNEL:@.+]](double* [[DECL]]) @@ -411,10 +411,10 @@ void implicit_maps_float (int a){ // CK8-DAG: [[PGEP]] = getelementptr inbounds {{.+}}[[PS:%[^,]+]], i32 0, i32 0 // CK8-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BPS]], i32 0, i32 0 // CK8-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[PS]], i32 0, i32 0 - // CK8-DAG: store i8* [[VALBP:%.+]], i8** [[BP1]], - // CK8-DAG: store i8* [[VALP:%.+]], i8** [[P1]], - // CK8-DAG: [[VALBP]] = inttoptr i[[sz]] [[VAL:%.+]] to i8* - // CK8-DAG: [[VALP]] = inttoptr i[[sz]] [[VAL:%.+]] to i8* + // CK8-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to i[[sz]]* + // CK8-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to i[[sz]]* + // CK8-DAG: store i[[sz]] [[VAL:%[^,]+]], i[[sz]]* [[CBP1]] + // CK8-DAG: store i[[sz]] [[VAL]], i[[sz]]* [[CP1]] // CK8-DAG: [[VAL]] = load i[[sz]], i[[sz]]* [[ADDR:%.+]], // CK8-DAG: [[CADDR:%.+]] = bitcast i[[sz]]* [[ADDR]] to float* // CK8-DAG: store float {{.+}}, float* [[CADDR]], @@ -455,10 +455,10 @@ void implicit_maps_array (int a){ // CK9-DAG: [[PGEP]] = getelementptr inbounds {{.+}}[[PS:%[^,]+]], i32 0, i32 0 // CK9-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BPS]], i32 0, i32 0 // CK9-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[PS]], i32 0, i32 0 - // CK9-DAG: store i8* [[VALBP:%.+]], i8** [[BP1]], - // CK9-DAG: store i8* [[VALP:%.+]], i8** [[P1]], - // CK9-DAG: [[VALBP]] = bitcast [2 x double]* [[DECL:%.+]] to i8* - // CK9-DAG: [[VALP]] = bitcast [2 x double]* [[DECL]] to i8* + // CK9-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to [2 x double]** + // CK9-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to [2 x double]** + // CK9-DAG: store [2 x double]* [[DECL:%[^,]+]], [2 x double]** [[CBP1]] + // CK9-DAG: store [2 x double]* [[DECL]], [2 x double]** [[CP1]] // CK9: call void [[KERNEL:@.+]]([2 x double]* [[DECL]]) #pragma omp target @@ -496,10 +496,10 @@ void implicit_maps_pointer (){ // CK10-DAG: [[PGEP]] = getelementptr inbounds {{.+}}[[PS:%[^,]+]], i32 0, i32 0 // CK10-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BPS]], i32 0, i32 0 // CK10-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[PS]], i32 0, i32 0 - // CK10-DAG: store i8* [[VALBP:%.+]], i8** [[BP1]], - // CK10-DAG: store i8* [[VALP:%.+]], i8** [[P1]], - // CK10-DAG: [[VALBP]] = bitcast double* [[PTR:%.+]] to i8* - // CK10-DAG: [[VALP]] = bitcast double* [[PTR]] to i8* + // CK10-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to double** + // CK10-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to double** + // CK10-DAG: store double* [[PTR:%[^,]+]], double** [[CBP1]] + // CK10-DAG: store double* [[PTR]], double** [[CP1]] // CK10: call void [[KERNEL:@.+]](double* [[PTR]]) #pragma omp target @@ -538,10 +538,10 @@ void implicit_maps_double_complex (int a){ // CK11-DAG: [[PGEP]] = getelementptr inbounds {{.+}}[[PS:%[^,]+]], i32 0, i32 0 // CK11-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BPS]], i32 0, i32 0 // CK11-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[PS]], i32 0, i32 0 - // CK11-DAG: store i8* [[VALBP:%.+]], i8** [[BP1]], - // CK11-DAG: store i8* [[VALP:%.+]], i8** [[P1]], - // CK11-DAG: [[VALBP]] = bitcast { double, double }* [[PTR:%.+]] to i8* - // CK11-DAG: [[VALP]] = bitcast { double, double }* [[PTR]] to i8* + // CK11-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to { double, double }** + // CK11-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to { double, double }** + // CK11-DAG: store { double, double }* [[PTR:%[^,]+]], { double, double }** [[CBP1]] + // CK11-DAG: store { double, double }* [[PTR]], { double, double }** [[CP1]] // CK11: call void [[KERNEL:@.+]]({ double, double }* [[PTR]]) #pragma omp target @@ -584,18 +584,18 @@ void implicit_maps_float_complex (int a){ // CK12-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BPS]], i32 0, i32 0 // CK12-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[PS]], i32 0, i32 0 - // CK12-64-DAG: store i8* [[VALBP:%.+]], i8** [[BP1]], - // CK12-64-DAG: store i8* [[VALP:%.+]], i8** [[P1]], - // CK12-64-DAG: [[VALBP]] = inttoptr i[[sz]] [[VAL:%.+]] to i8* - // CK12-64-DAG: [[VALP]] = inttoptr i[[sz]] [[VAL:%.+]] to i8* + // CK12-64-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to i[[sz]]* + // CK12-64-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to i[[sz]]* + // CK12-64-DAG: store i[[sz]] [[VAL:%[^,]+]], i[[sz]]* [[CBP1]] + // CK12-64-DAG: store i[[sz]] [[VAL]], i[[sz]]* [[CP1]] // CK12-64-DAG: [[VAL]] = load i[[sz]], i[[sz]]* [[ADDR:%.+]], // CK12-64-DAG: [[CADDR:%.+]] = bitcast i[[sz]]* [[ADDR]] to { float, float }* // CK12-64-DAG: store { float, float } {{.+}}, { float, float }* [[CADDR]], - // CK12-32-DAG: store i8* [[VALBP:%.+]], i8** [[BP1]], - // CK12-32-DAG: store i8* [[VALP:%.+]], i8** [[P1]], - // CK12-32-DAG: [[VALBP]] = bitcast { float, float }* [[DECL:%.+]] to i8* - // CK12-32-DAG: [[VALP]] = bitcast { float, float }* [[DECL]] to i8* + // CK12-32-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to { float, float }** + // CK12-32-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to { float, float }** + // CK12-32-DAG: store { float, float }* [[DECL:%[^,]+]], { float, float }** [[CBP1]] + // CK12-32-DAG: store { float, float }* [[DECL]], { float, float }** [[CP1]] // CK12-64: call void [[KERNEL:@.+]](i[[sz]] [[VAL]]) // CK12-32: call void [[KERNEL:@.+]]({ float, float }* [[DECL]]) @@ -645,27 +645,29 @@ void implicit_maps_variable_length_array (int a){ // CK13-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BPS]], i32 0, i32 0 // CK13-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[PS]], i32 0, i32 0 // CK13-DAG: [[S0:%.+]] = getelementptr inbounds {{.+}}[[SS]], i32 0, i32 0 - // CK13-DAG: store i8* inttoptr (i[[sz]] 2 to i8*), i8** [[BP0]], - // CK13-DAG: store i8* inttoptr (i[[sz]] 2 to i8*), i8** [[P0]], + // CK13-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to i[[sz]]* + // CK13-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i[[sz]]* + // CK13-DAG: store i[[sz]] 2, i[[sz]]* [[CBP0]] + // CK13-DAG: store i[[sz]] 2, i[[sz]]* [[CP0]] // CK13-DAG: store i[[sz]] {{8|4}}, i[[sz]]* [[S0]], // CK13-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BPS]], i32 0, i32 1 // CK13-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[PS]], i32 0, i32 1 // CK13-DAG: [[S1:%.+]] = getelementptr inbounds {{.+}}[[SS]], i32 0, i32 1 - // CK13-DAG: store i8* [[VALBP1:%.+]], i8** [[BP1]], - // CK13-DAG: store i8* [[VALP1:%.+]], i8** [[P1]], - // CK13-DAG: [[VALBP1]] = inttoptr i[[sz]] [[VAL:%.+]] to i8* - // CK13-DAG: [[VALP1]] = inttoptr i[[sz]] [[VAL:%.+]] to i8* + // CK13-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to i[[sz]]* + // CK13-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to i[[sz]]* + // CK13-DAG: store i[[sz]] [[VAL:%.+]], i[[sz]]* [[CBP1]] + // CK13-DAG: store i[[sz]] [[VAL]], i[[sz]]* [[CP1]] // CK13-DAG: store i[[sz]] {{8|4}}, i[[sz]]* [[S1]], // CK13-DAG: [[BP2:%.+]] = getelementptr inbounds {{.+}}[[BPS]], i32 0, i32 2 // CK13-DAG: [[P2:%.+]] = getelementptr inbounds {{.+}}[[PS]], i32 0, i32 2 // CK13-DAG: [[S2:%.+]] = getelementptr inbounds {{.+}}[[SS]], i32 0, i32 2 - // CK13-DAG: store i8* [[VALBP2:%.+]], i8** [[BP2]], - // CK13-DAG: store i8* [[VALP2:%.+]], i8** [[P2]], + // CK13-DAG: [[CBP2:%.+]] = bitcast i8** [[BP2]] to double** + // CK13-DAG: [[CP2:%.+]] = bitcast i8** [[P2]] to double** + // CK13-DAG: store double* [[DECL:%.+]], double** [[CBP2]] + // CK13-DAG: store double* [[DECL]], double** [[CP2]] // CK13-DAG: store i[[sz]] [[VALS2:%.+]], i[[sz]]* [[S2]], - // CK13-DAG: [[VALBP2]] = bitcast double* [[DECL:%.+]] to i8* - // CK13-DAG: [[VALP2]] = bitcast double* [[DECL]] to i8* // CK13-DAG: [[VALS2]] = mul nuw i[[sz]] %{{.+}}, 8 // CK13: call void [[KERNEL:@.+]](i[[sz]] {{.+}}, i[[sz]] {{.+}}, double* [[DECL]]) @@ -730,17 +732,17 @@ void implicit_maps_class (int a){ // CK14-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BPS]], i32 0, i32 0 // CK14-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[PS]], i32 0, i32 0 - // CK14-DAG: store i8* [[VALBP0:%.+]], i8** [[BP0]], - // CK14-DAG: store i8* [[VALP0:%.+]], i8** [[P0]], - // CK14-DAG: [[VALBP0]] = bitcast [[ST]]* [[DECL:%.+]] to i8* - // CK14-DAG: [[VALP0]] = bitcast [[ST]]* [[DECL]] to i8* + // CK14-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[ST]]** + // CK14-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [[ST]]** + // CK14-DAG: store [[ST]]* [[DECL:%.+]], [[ST]]** [[CBP0]] + // CK14-DAG: store [[ST]]* [[DECL]], [[ST]]** [[CP0]] // CK14-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BPS]], i32 0, i32 1 // CK14-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[PS]], i32 0, i32 1 - // CK14-DAG: store i8* [[VALBP:%.+]], i8** [[BP1]], - // CK14-DAG: store i8* [[VALP:%.+]], i8** [[P1]], - // CK14-DAG: [[VALBP]] = inttoptr i[[sz]] [[VAL:%.+]] to i8* - // CK14-DAG: [[VALP]] = inttoptr i[[sz]] [[VAL:%.+]] to i8* + // CK14-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to i[[sz]]* + // CK14-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to i[[sz]]* + // CK14-DAG: store i[[sz]] [[VAL:%.+]], i[[sz]]* [[CBP1]] + // CK14-DAG: store i[[sz]] [[VAL]], i[[sz]]* [[CP1]] // CK14-DAG: [[VAL]] = load i[[sz]], i[[sz]]* [[ADDR:%.+]], // CK14-64-DAG: [[CADDR:%.+]] = bitcast i[[sz]]* [[ADDR]] to i32* // CK14-64-DAG: store i32 {{.+}}, i32* [[CADDR]], @@ -822,17 +824,17 @@ void implicit_maps_templated_class (int a){ // CK15-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BPS]], i32 0, i32 0 // CK15-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[PS]], i32 0, i32 0 - // CK15-DAG: store i8* [[VALBP0:%.+]], i8** [[BP0]], - // CK15-DAG: store i8* [[VALP0:%.+]], i8** [[P0]], - // CK15-DAG: [[VALBP0]] = bitcast [[ST]]* [[DECL:%.+]] to i8* - // CK15-DAG: [[VALP0]] = bitcast [[ST]]* [[DECL]] to i8* + // CK15-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[ST]]** + // CK15-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [[ST]]** + // CK15-DAG: store [[ST]]* [[DECL:%.+]], [[ST]]** [[CBP0]] + // CK15-DAG: store [[ST]]* [[DECL]], [[ST]]** [[CP0]] // CK15-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BPS]], i32 0, i32 1 // CK15-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[PS]], i32 0, i32 1 - // CK15-DAG: store i8* [[VALBP:%.+]], i8** [[BP1]], - // CK15-DAG: store i8* [[VALP:%.+]], i8** [[P1]], - // CK15-DAG: [[VALBP]] = inttoptr i[[sz]] [[VAL:%.+]] to i8* - // CK15-DAG: [[VALP]] = inttoptr i[[sz]] [[VAL:%.+]] to i8* + // CK15-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to i[[sz]]* + // CK15-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to i[[sz]]* + // CK15-DAG: store i[[sz]] [[VAL:%.+]], i[[sz]]* [[CBP1]] + // CK15-DAG: store i[[sz]] [[VAL]], i[[sz]]* [[CP1]] // CK15-DAG: [[VAL]] = load i[[sz]], i[[sz]]* [[ADDR:%.+]], // CK15-64-DAG: [[CADDR:%.+]] = bitcast i[[sz]]* [[ADDR]] to i32* // CK15-64-DAG: store i32 {{.+}}, i32* [[CADDR]], @@ -847,17 +849,17 @@ void implicit_maps_templated_class (int a){ // CK15-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BPS]], i32 0, i32 0 // CK15-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[PS]], i32 0, i32 0 - // CK15-DAG: store i8* [[VALBP0:%.+]], i8** [[BP0]], - // CK15-DAG: store i8* [[VALP0:%.+]], i8** [[P0]], - // CK15-DAG: [[VALBP0]] = bitcast [[ST]]* [[DECL:%.+]] to i8* - // CK15-DAG: [[VALP0]] = bitcast [[ST]]* [[DECL]] to i8* + // CK15-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[ST]]** + // CK15-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [[ST]]** + // CK15-DAG: store [[ST]]* [[DECL:%.+]], [[ST]]** [[CBP0]] + // CK15-DAG: store [[ST]]* [[DECL]], [[ST]]** [[CP0]] // CK15-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BPS]], i32 0, i32 1 // CK15-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[PS]], i32 0, i32 1 - // CK15-DAG: store i8* [[VALBP:%.+]], i8** [[BP1]], - // CK15-DAG: store i8* [[VALP:%.+]], i8** [[P1]], - // CK15-DAG: [[VALBP]] = inttoptr i[[sz]] [[VAL:%.+]] to i8* - // CK15-DAG: [[VALP]] = inttoptr i[[sz]] [[VAL:%.+]] to i8* + // CK15-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to i[[sz]]* + // CK15-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to i[[sz]]* + // CK15-DAG: store i[[sz]] [[VAL:%.+]], i[[sz]]* [[CBP1]] + // CK15-DAG: store i[[sz]] [[VAL]], i[[sz]]* [[CP1]] // CK15-DAG: [[VAL]] = load i[[sz]], i[[sz]]* [[ADDR:%.+]], // CK15-64-DAG: [[CADDR:%.+]] = bitcast i[[sz]]* [[ADDR]] to i32* // CK15-64-DAG: store i32 {{.+}}, i32* [[CADDR]], @@ -923,10 +925,10 @@ void implicit_maps_templated_function (int a){ // CK16-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BPS]], i32 0, i32 0 // CK16-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[PS]], i32 0, i32 0 - // CK16-DAG: store i8* [[VALBP:%.+]], i8** [[BP1]], - // CK16-DAG: store i8* [[VALP:%.+]], i8** [[P1]], - // CK16-DAG: [[VALBP]] = inttoptr i[[sz]] [[VAL:%.+]] to i8* - // CK16-DAG: [[VALP]] = inttoptr i[[sz]] [[VAL:%.+]] to i8* + // CK16-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to i[[sz]]* + // CK16-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to i[[sz]]* + // CK16-DAG: store i[[sz]] [[VAL:%.+]], i[[sz]]* [[CBP1]] + // CK16-DAG: store i[[sz]] [[VAL]], i[[sz]]* [[CP1]] // CK16-DAG: [[VAL]] = load i[[sz]], i[[sz]]* [[ADDR:%.+]], // CK16-64-DAG: [[CADDR:%.+]] = bitcast i[[sz]]* [[ADDR]] to i32* // CK16-64-DAG: store i32 {{.+}}, i32* [[CADDR]], @@ -971,10 +973,10 @@ void implicit_maps_struct (int a){ // CK17-DAG: [[PGEP]] = getelementptr inbounds {{.+}}[[PS:%[^,]+]], i32 0, i32 0 // CK17-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BPS]], i32 0, i32 0 // CK17-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[PS]], i32 0, i32 0 - // CK17-DAG: store i8* [[VALBP:%.+]], i8** [[BP1]], - // CK17-DAG: store i8* [[VALP:%.+]], i8** [[P1]], - // CK17-DAG: [[VALBP]] = bitcast [[ST]]* [[DECL:%.+]] to i8* - // CK17-DAG: [[VALP]] = bitcast [[ST]]* [[DECL]] to i8* + // CK17-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to [[ST]]** + // CK17-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to [[ST]]** + // CK17-DAG: store [[ST]]* [[DECL:%.+]], [[ST]]** [[CBP1]] + // CK17-DAG: store [[ST]]* [[DECL]], [[ST]]** [[CP1]] // CK17: call void [[KERNEL:@.+]]([[ST]]* [[DECL]]) #pragma omp target @@ -1023,10 +1025,10 @@ void implicit_maps_template_type_capture (int a){ // CK18-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BPS]], i32 0, i32 0 // CK18-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[PS]], i32 0, i32 0 - // CK18-DAG: store i8* [[VALBP:%.+]], i8** [[BP1]], - // CK18-DAG: store i8* [[VALP:%.+]], i8** [[P1]], - // CK18-DAG: [[VALBP]] = inttoptr i[[sz]] [[VAL:%.+]] to i8* - // CK18-DAG: [[VALP]] = inttoptr i[[sz]] [[VAL:%.+]] to i8* + // CK18-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to i[[sz]]* + // CK18-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to i[[sz]]* + // CK18-DAG: store i[[sz]] [[VAL:%.+]], i[[sz]]* [[CBP1]] + // CK18-DAG: store i[[sz]] [[VAL]], i[[sz]]* [[CP1]] // CK18-DAG: [[VAL]] = load i[[sz]], i[[sz]]* [[ADDR:%.+]], // CK18-64-DAG: [[CADDR:%.+]] = bitcast i[[sz]]* [[ADDR]] to i32* // CK18-64-DAG: store i32 {{.+}}, i32* [[CADDR]], @@ -1181,10 +1183,10 @@ void explicit_maps_single (int ii){ // CK19-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK19-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK19-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK19-DAG: [[CBPVAL0]] = bitcast i32* [[VAR0:%.+]] to i8* - // CK19-DAG: [[CPVAL0]] = bitcast i32* [[VAR0]] to i8* + // CK19-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to i32** + // CK19-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** + // CK19-DAG: store i32* [[VAR0:%.+]], i32** [[CBP0]] + // CK19-DAG: store i32* [[VAR0]], i32** [[CP0]] // CK19: call void [[CALL00:@.+]](i32* {{[^,]+}}) #pragma omp target map(alloc:a) @@ -1202,10 +1204,10 @@ void explicit_maps_single (int ii){ // CK19-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK19-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK19-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK19-DAG: [[CBPVAL0]] = bitcast [100 x i32]* [[VAR0:%.+]] to i8* - // CK19-DAG: [[CPVAL0]] = bitcast [100 x i32]* [[VAR0]] to i8* + // CK19-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [100 x i32]** + // CK19-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [100 x i32]** + // CK19-DAG: store [100 x i32]* [[VAR0:%.+]], [100 x i32]** [[CBP0]] + // CK19-DAG: store [100 x i32]* [[VAR0]], [100 x i32]** [[CP0]] // CK19: call void [[CALL01:@.+]]([100 x i32]* {{[^,]+}}) #pragma omp target map(to:arra) @@ -1220,10 +1222,10 @@ void explicit_maps_single (int ii){ // CK19-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK19-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK19-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK19-DAG: [[CBPVAL0]] = bitcast [100 x i32]* [[VAR0:%.+]] to i8* - // CK19-DAG: [[CPVAL0]] = bitcast i32* [[SEC0:%.+]] to i8* + // CK19-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [100 x i32]** + // CK19-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** + // CK19-DAG: store [100 x i32]* [[VAR0:%.+]], [100 x i32]** [[CBP0]] + // CK19-DAG: store i32* [[SEC0:%[^,]+]], i32** [[CP0]] // CK19-DAG: [[SEC0]] = getelementptr {{.*}}[100 x i32]* [[VAR0]], i{{.+}} 0, i{{.+}} 20 // CK19: call void [[CALL02:@.+]]([100 x i32]* {{[^,]+}}) @@ -1239,10 +1241,10 @@ void explicit_maps_single (int ii){ // CK19-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK19-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK19-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK19-DAG: [[CBPVAL0]] = bitcast [100 x i32]* [[VAR0:%.+]] to i8* - // CK19-DAG: [[CPVAL0]] = bitcast i32* [[SEC0:%.+]] to i8* + // CK19-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [100 x i32]** + // CK19-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** + // CK19-DAG: store [100 x i32]* [[VAR0:%.+]], [100 x i32]** [[CBP0]] + // CK19-DAG: store i32* [[SEC0:%[^,]+]], i32** [[CP0]] // CK19-DAG: [[SEC0]] = getelementptr {{.*}}[100 x i32]* [[VAR0]], i{{.+}} 0, i{{.+}} 0 // CK19: call void [[CALL03:@.+]]([100 x i32]* {{[^,]+}}) @@ -1258,10 +1260,10 @@ void explicit_maps_single (int ii){ // CK19-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK19-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK19-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK19-DAG: [[CBPVAL0]] = bitcast [100 x i32]* [[VAR0:%.+]] to i8* - // CK19-DAG: [[CPVAL0]] = bitcast i32* [[SEC0:%.+]] to i8* + // CK19-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [100 x i32]** + // CK19-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** + // CK19-DAG: store [100 x i32]* [[VAR0:%.+]], [100 x i32]** [[CBP0]] + // CK19-DAG: store i32* [[SEC0:%[^,]+]], i32** [[CP0]] // CK19-DAG: [[SEC0]] = getelementptr {{.*}}[100 x i32]* [[VAR0]], i{{.+}} 0, i{{.+}} 0 // CK19: call void [[CALL04:@.+]]([100 x i32]* {{[^,]+}}) @@ -1277,10 +1279,10 @@ void explicit_maps_single (int ii){ // CK19-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK19-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK19-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK19-DAG: [[CBPVAL0]] = bitcast [100 x i32]* [[VAR0:%.+]] to i8* - // CK19-DAG: [[CPVAL0]] = bitcast i32* [[SEC0:%.+]] to i8* + // CK19-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [100 x i32]** + // CK19-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** + // CK19-DAG: store [100 x i32]* [[VAR0:%.+]], [100 x i32]** [[CBP0]] + // CK19-DAG: store i32* [[SEC0:%[^,]+]], i32** [[CP0]] // CK19-DAG: [[SEC0]] = getelementptr {{.*}}[100 x i32]* [[VAR0]], i{{.+}} 0, i{{.+}} 15 // CK19: call void [[CALL05:@.+]]([100 x i32]* {{[^,]+}}) @@ -1298,11 +1300,11 @@ void explicit_maps_single (int ii){ // CK19-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[S0:%.+]] = getelementptr inbounds {{.+}}[[S]], i{{.+}} 0, i{{.+}} 0 - // CK19-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK19-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] + // CK19-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [100 x i32]** + // CK19-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** + // CK19-DAG: store [100 x i32]* [[VAR0:%.+]], [100 x i32]** [[CBP0]] + // CK19-DAG: store i32* [[SEC0:%[^,]+]], i32** [[CP0]] // CK19-DAG: store i{{.+}} [[CSVAL0:%[^,]+]], i{{.+}}* [[S0]] - // CK19-DAG: [[CBPVAL0]] = bitcast [100 x i32]* [[VAR0:%.+]] to i8* - // CK19-DAG: [[CPVAL0]] = bitcast i32* [[SEC0:%.+]] to i8* // CK19-DAG: [[CSVAL0]] = mul nuw i{{.+}} %{{.*}}, 4 // CK19-DAG: [[SEC0]] = getelementptr {{.*}}[100 x i32]* [[VAR0]], i{{.+}} 0, i{{.+}} %{{.*}} @@ -1321,11 +1323,11 @@ void explicit_maps_single (int ii){ // CK19-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[S0:%.+]] = getelementptr inbounds {{.+}}[[S]], i{{.+}} 0, i{{.+}} 0 - // CK19-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK19-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] + // CK19-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [100 x i32]** + // CK19-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** + // CK19-DAG: store [100 x i32]* [[VAR0:%.+]], [100 x i32]** [[CBP0]] + // CK19-DAG: store i32* [[SEC0:%[^,]+]], i32** [[CP0]] // CK19-DAG: store i{{.+}} [[CSVAL0:%[^,]+]], i{{.+}}* [[S0]] - // CK19-DAG: [[CBPVAL0]] = bitcast [100 x i32]* [[VAR0:%.+]] to i8* - // CK19-DAG: [[CPVAL0]] = bitcast i32* [[SEC0:%.+]] to i8* // CK19-DAG: [[CSVAL0]] = mul nuw i{{.+}} %{{.*}}, 4 // CK19-DAG: [[SEC0]] = getelementptr {{.*}}[100 x i32]* [[VAR0]], i{{.+}} 0, i{{.+}} 0 @@ -1342,10 +1344,10 @@ void explicit_maps_single (int ii){ // CK19-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK19-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK19-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK19-DAG: [[CBPVAL0]] = bitcast [100 x i32]* [[VAR0:%.+]] to i8* - // CK19-DAG: [[CPVAL0]] = bitcast i32* [[SEC0:%.+]] to i8* + // CK19-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [100 x i32]** + // CK19-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** + // CK19-DAG: store [100 x i32]* [[VAR0:%.+]], [100 x i32]** [[CBP0]] + // CK19-DAG: store i32* [[SEC0:%[^,]+]], i32** [[CP0]] // CK19-DAG: [[SEC0]] = getelementptr {{.*}}[100 x i32]* [[VAR0]], i{{.+}} 0, i{{.+}} %{{.*}} // CK19: call void [[CALL08:@.+]]([100 x i32]* {{[^,]+}}) @@ -1364,10 +1366,10 @@ void explicit_maps_single (int ii){ // CK19-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK19-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK19-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK19-DAG: [[CBPVAL0]] = bitcast i32** [[VAR0:%.+]] to i8* - // CK19-DAG: [[CPVAL0]] = bitcast i32** [[VAR0]] to i8* + // CK19-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to i32*** + // CK19-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32*** + // CK19-DAG: store i32** [[VAR0:%.+]], i32*** [[CBP0]] + // CK19-DAG: store i32** [[VAR0]], i32*** [[CP0]] // CK19: call void [[CALL09:@.+]](i32** {{[^,]+}}) #pragma omp target map(from:pa) @@ -1382,10 +1384,10 @@ void explicit_maps_single (int ii){ // CK19-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK19-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK19-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK19-DAG: [[CBPVAL0]] = bitcast i32* [[RVAR0:%.+]] to i8* - // CK19-DAG: [[CPVAL0]] = bitcast i32* [[SEC0:%.+]] to i8* + // CK19-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to i32** + // CK19-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** + // CK19-DAG: store i32* [[RVAR0:%.+]], i32** [[CBP0]] + // CK19-DAG: store i32* [[SEC0:%.+]], i32** [[CP0]] // CK19-DAG: [[RVAR0]] = load i32*, i32** [[VAR0:%[^,]+]] // CK19-DAG: [[SEC0]] = getelementptr {{.*}}i32* [[RVAR00:%.+]], i{{.+}} 20 // CK19-DAG: [[RVAR00]] = load i32*, i32** [[VAR0]] @@ -1403,10 +1405,10 @@ void explicit_maps_single (int ii){ // CK19-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK19-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK19-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK19-DAG: [[CBPVAL0]] = bitcast i32* [[RVAR0:%.+]] to i8* - // CK19-DAG: [[CPVAL0]] = bitcast i32* [[SEC0:%.+]] to i8* + // CK19-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to i32** + // CK19-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** + // CK19-DAG: store i32* [[RVAR0:%.+]], i32** [[CBP0]] + // CK19-DAG: store i32* [[SEC0:%.+]], i32** [[CP0]] // CK19-DAG: [[RVAR0]] = load i32*, i32** [[VAR0:%[^,]+]] // CK19-DAG: [[SEC0]] = getelementptr {{.*}}i32* [[RVAR00:%.+]], i{{.+}} 0 // CK19-DAG: [[RVAR00]] = load i32*, i32** [[VAR0]] @@ -1424,10 +1426,10 @@ void explicit_maps_single (int ii){ // CK19-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK19-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK19-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK19-DAG: [[CBPVAL0]] = bitcast i32* [[RVAR0:%.+]] to i8* - // CK19-DAG: [[CPVAL0]] = bitcast i32* [[SEC0:%.+]] to i8* + // CK19-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to i32** + // CK19-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** + // CK19-DAG: store i32* [[RVAR0:%.+]], i32** [[CBP0]] + // CK19-DAG: store i32* [[SEC0:%.+]], i32** [[CP0]] // CK19-DAG: [[RVAR0]] = load i32*, i32** [[VAR0:%[^,]+]] // CK19-DAG: [[SEC0]] = getelementptr {{.*}}i32* [[RVAR00:%.+]], i{{.+}} 15 // CK19-DAG: [[RVAR00]] = load i32*, i32** [[VAR0]] @@ -1447,11 +1449,11 @@ void explicit_maps_single (int ii){ // CK19-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[S0:%.+]] = getelementptr inbounds {{.+}}[[S]], i{{.+}} 0, i{{.+}} 0 - // CK19-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK19-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] + // CK19-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to i32** + // CK19-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** + // CK19-DAG: store i32* [[RVAR0:%.+]], i32** [[CBP0]] + // CK19-DAG: store i32* [[SEC0:%.+]], i32** [[CP0]] // CK19-DAG: store i{{.+}} [[CSVAL0:%[^,]+]], i{{.+}}* [[S0]] - // CK19-DAG: [[CBPVAL0]] = bitcast i32* [[RVAR0:%.+]] to i8* - // CK19-DAG: [[CPVAL0]] = bitcast i32* [[SEC0:%.+]] to i8* // CK19-DAG: [[CSVAL0]] = mul nuw i{{.+}} %{{.*}}, 4 // CK19-DAG: [[RVAR0]] = load i32*, i32** [[VAR0:%[^,]+]] // CK19-DAG: [[SEC0]] = getelementptr {{.*}}i32* [[RVAR00:%.+]], i{{.+}} %{{.*}} @@ -1472,11 +1474,11 @@ void explicit_maps_single (int ii){ // CK19-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[S0:%.+]] = getelementptr inbounds {{.+}}[[S]], i{{.+}} 0, i{{.+}} 0 - // CK19-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK19-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] + // CK19-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to i32** + // CK19-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** + // CK19-DAG: store i32* [[RVAR0:%.+]], i32** [[CBP0]] + // CK19-DAG: store i32* [[SEC0:%.+]], i32** [[CP0]] // CK19-DAG: store i{{.+}} [[CSVAL0:%[^,]+]], i{{.+}}* [[S0]] - // CK19-DAG: [[CBPVAL0]] = bitcast i32* [[RVAR0:%.+]] to i8* - // CK19-DAG: [[CPVAL0]] = bitcast i32* [[SEC0:%.+]] to i8* // CK19-DAG: [[CSVAL0]] = mul nuw i{{.+}} %{{.*}}, 4 // CK19-DAG: [[RVAR0]] = load i32*, i32** [[VAR0:%[^,]+]] // CK19-DAG: [[SEC0]] = getelementptr {{.*}}i32* [[RVAR00:%.+]], i{{.+}} 0 @@ -1495,10 +1497,10 @@ void explicit_maps_single (int ii){ // CK19-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK19-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK19-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK19-DAG: [[CBPVAL0]] = bitcast i32* [[RVAR0:%.+]] to i8* - // CK19-DAG: [[CPVAL0]] = bitcast i32* [[SEC0:%.+]] to i8* + // CK19-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to i32** + // CK19-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** + // CK19-DAG: store i32* [[RVAR0:%.+]], i32** [[CBP0]] + // CK19-DAG: store i32* [[SEC0:%.+]], i32** [[CP0]] // CK19-DAG: [[RVAR0]] = load i32*, i32** [[VAR0:%[^,]+]] // CK19-DAG: [[SEC0]] = getelementptr {{.*}}i32* [[RVAR00:%.+]], i{{.+}} %{{.*}} // CK19-DAG: [[RVAR00]] = load i32*, i32** [[VAR0]] @@ -1521,20 +1523,20 @@ void explicit_maps_single (int ii){ // CK19-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[S0:%.+]] = getelementptr inbounds {{.+}}[[S]], i{{.+}} 0, i{{.+}} 0 - // CK19-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK19-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] + // CK19-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to i[[Z]]* + // CK19-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i[[Z]]* + // CK19-DAG: store i[[Z]] {{%.+}}, i[[Z]]* [[CBP0]] + // CK19-DAG: store i[[Z]] {{%.+}}, i[[Z]]* [[CP0]] // CK19-DAG: store i{{.+}} {{8|4}}, i{{.+}}* [[S0]] - // CK19-DAG: [[CBPVAL0]] = inttoptr i[[Z]] %{{.+}} to i8* - // CK19-DAG: [[CPVAL0]] = inttoptr i[[Z]] %{{.+}}to i8* // CK19-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1 // CK19-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1 // CK19-DAG: [[S1:%.+]] = getelementptr inbounds {{.+}}[[S]], i{{.+}} 0, i{{.+}} 1 - // CK19-DAG: store i8* [[CBPVAL1:%[^,]+]], i8** [[BP1]] - // CK19-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]] + // CK19-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to i32** + // CK19-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to i32** + // CK19-DAG: store i32* [[VAR1:%.+]], i32** [[CBP1]] + // CK19-DAG: store i32* [[VAR1]], i32** [[CP1]] // CK19-DAG: store i{{.+}} [[CSVAL1:%[^,]+]], i{{.+}}* [[S1]] - // CK19-DAG: [[CBPVAL1]] = bitcast i32* [[VAR1:%.+]] to i8* - // CK19-DAG: [[CPVAL1]] = bitcast i32* [[VAR1]] to i8* // CK19-DAG: [[CSVAL1]] = mul nuw i{{.+}} %{{.*}}, 4 // CK19: call void [[CALL16:@.+]](i{{.+}} {{[^,]+}}, i32* {{[^,]+}}) @@ -1550,17 +1552,17 @@ void explicit_maps_single (int ii){ // CK19-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK19-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK19-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK19-DAG: [[CBPVAL0]] = inttoptr i[[Z]] %{{.+}} to i8* - // CK19-DAG: [[CPVAL0]] = inttoptr i[[Z]] %{{.+}}to i8* + // CK19-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to i[[Z]]* + // CK19-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i[[Z]]* + // CK19-DAG: store i[[Z]] {{%.+}}, i[[Z]]* [[CBP0]] + // CK19-DAG: store i[[Z]] {{%.+}}, i[[Z]]* [[CP0]] // CK19-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1 // CK19-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1 - // CK19-DAG: store i8* [[CBPVAL1:%[^,]+]], i8** [[BP1]] - // CK19-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]] - // CK19-DAG: [[CBPVAL1]] = bitcast i32* [[VAR1:%.+]] to i8* - // CK19-DAG: [[CPVAL1]] = bitcast i32* [[SEC1:%.+]] to i8* + // CK19-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to i32** + // CK19-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to i32** + // CK19-DAG: store i32* [[VAR1:%.+]], i32** [[CBP1]] + // CK19-DAG: store i32* [[SEC1:%.+]], i32** [[CP1]] // CK19-DAG: [[SEC1]] = getelementptr {{.*}}i32* [[VAR1]], i{{.+}} 20 // CK19: call void [[CALL17:@.+]](i{{.+}} {{[^,]+}}, i32* {{[^,]+}}) @@ -1576,17 +1578,17 @@ void explicit_maps_single (int ii){ // CK19-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK19-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK19-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK19-DAG: [[CBPVAL0]] = inttoptr i[[Z]] %{{.+}} to i8* - // CK19-DAG: [[CPVAL0]] = inttoptr i[[Z]] %{{.+}}to i8* + // CK19-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to i[[Z]]* + // CK19-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i[[Z]]* + // CK19-DAG: store i[[Z]] {{%.+}}, i[[Z]]* [[CBP0]] + // CK19-DAG: store i[[Z]] {{%.+}}, i[[Z]]* [[CP0]] // CK19-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1 // CK19-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1 - // CK19-DAG: store i8* [[CBPVAL1:%[^,]+]], i8** [[BP1]] - // CK19-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]] - // CK19-DAG: [[CBPVAL1]] = bitcast i32* [[VAR1:%.+]] to i8* - // CK19-DAG: [[CPVAL1]] = bitcast i32* [[SEC1:%.+]] to i8* + // CK19-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to i32** + // CK19-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to i32** + // CK19-DAG: store i32* [[VAR1:%.+]], i32** [[CBP1]] + // CK19-DAG: store i32* [[SEC1:%.+]], i32** [[CP1]] // CK19-DAG: [[SEC1]] = getelementptr {{.*}}i32* [[VAR1]], i{{.+}} 0 // CK19: call void [[CALL18:@.+]](i{{.+}} {{[^,]+}}, i32* {{[^,]+}}) @@ -1604,20 +1606,20 @@ void explicit_maps_single (int ii){ // CK19-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[S0:%.+]] = getelementptr inbounds {{.+}}[[S]], i{{.+}} 0, i{{.+}} 0 - // CK19-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK19-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] + // CK19-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to i[[Z]]* + // CK19-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i[[Z]]* + // CK19-DAG: store i[[Z]] {{%.+}}, i[[Z]]* [[CBP0]] + // CK19-DAG: store i[[Z]] {{%.+}}, i[[Z]]* [[CP0]] // CK19-DAG: store i{{.+}} {{8|4}}, i{{.+}}* [[S0]] - // CK19-DAG: [[CBPVAL0]] = inttoptr i[[Z]] %{{.+}} to i8* - // CK19-DAG: [[CPVAL0]] = inttoptr i[[Z]] %{{.+}}to i8* // CK19-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1 // CK19-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1 // CK19-DAG: [[S1:%.+]] = getelementptr inbounds {{.+}}[[S]], i{{.+}} 0, i{{.+}} 1 - // CK19-DAG: store i8* [[CBPVAL1:%[^,]+]], i8** [[BP1]] - // CK19-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]] + // CK19-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to i32** + // CK19-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to i32** + // CK19-DAG: store i32* [[VAR1:%.+]], i32** [[CBP1]] + // CK19-DAG: store i32* [[SEC1:%.+]], i32** [[CP1]] // CK19-DAG: store i{{.+}} [[CSVAL1:%[^,]+]], i{{.+}}* [[S1]] - // CK19-DAG: [[CBPVAL1]] = bitcast i32* [[VAR1:%.+]] to i8* - // CK19-DAG: [[CPVAL1]] = bitcast i32* [[SEC1:%.+]] to i8* // CK19-DAG: [[CSVAL1]] = mul nuw i{{.+}} %{{.*}}, 4 // CK19-DAG: [[SEC1]] = getelementptr {{.*}}i32* [[VAR1]], i{{.+}} 0 @@ -1634,17 +1636,17 @@ void explicit_maps_single (int ii){ // CK19-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK19-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK19-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK19-DAG: [[CBPVAL0]] = inttoptr i[[Z]] %{{.+}} to i8* - // CK19-DAG: [[CPVAL0]] = inttoptr i[[Z]] %{{.+}}to i8* + // CK19-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to i[[Z]]* + // CK19-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i[[Z]]* + // CK19-DAG: store i[[Z]] {{%.+}}, i[[Z]]* [[CBP0]] + // CK19-DAG: store i[[Z]] {{%.+}}, i[[Z]]* [[CP0]] // CK19-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1 // CK19-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1 - // CK19-DAG: store i8* [[CBPVAL1:%[^,]+]], i8** [[BP1]] - // CK19-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]] - // CK19-DAG: [[CBPVAL1]] = bitcast i32* [[VAR1:%.+]] to i8* - // CK19-DAG: [[CPVAL1]] = bitcast i32* [[SEC1:%.+]] to i8* + // CK19-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to i32** + // CK19-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to i32** + // CK19-DAG: store i32* [[VAR1:%.+]], i32** [[CBP1]] + // CK19-DAG: store i32* [[SEC1:%.+]], i32** [[CP1]] // CK19-DAG: [[SEC1]] = getelementptr {{.*}}i32* [[VAR1]], i{{.+}} 15 // CK19: call void [[CALL20:@.+]](i{{.+}} {{[^,]+}}, i32* {{[^,]+}}) @@ -1662,20 +1664,20 @@ void explicit_maps_single (int ii){ // CK19-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[S0:%.+]] = getelementptr inbounds {{.+}}[[S]], i{{.+}} 0, i{{.+}} 0 - // CK19-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK19-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] + // CK19-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to i[[Z]]* + // CK19-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i[[Z]]* + // CK19-DAG: store i[[Z]] {{%.+}}, i[[Z]]* [[CBP0]] + // CK19-DAG: store i[[Z]] {{%.+}}, i[[Z]]* [[CP0]] // CK19-DAG: store i{{.+}} {{8|4}}, i{{.+}}* [[S0]] - // CK19-DAG: [[CBPVAL0]] = inttoptr i[[Z]] %{{.+}} to i8* - // CK19-DAG: [[CPVAL0]] = inttoptr i[[Z]] %{{.+}}to i8* // CK19-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1 // CK19-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1 // CK19-DAG: [[S1:%.+]] = getelementptr inbounds {{.+}}[[S]], i{{.+}} 0, i{{.+}} 1 - // CK19-DAG: store i8* [[CBPVAL1:%[^,]+]], i8** [[BP1]] - // CK19-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]] + // CK19-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to i32** + // CK19-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to i32** + // CK19-DAG: store i32* [[VAR1:%.+]], i32** [[CBP1]] + // CK19-DAG: store i32* [[SEC1:%.+]], i32** [[CP1]] // CK19-DAG: store i{{.+}} [[CSVAL1:%[^,]+]], i{{.+}}* [[S1]] - // CK19-DAG: [[CBPVAL1]] = bitcast i32* [[VAR1:%.+]] to i8* - // CK19-DAG: [[CPVAL1]] = bitcast i32* [[SEC1:%.+]] to i8* // CK19-DAG: [[CSVAL1]] = mul nuw i{{.+}} %{{.*}}, 4 // CK19-DAG: [[SEC1]] = getelementptr {{.*}}i32* [[VAR1]], i{{.+}} %{{.+}} @@ -1692,17 +1694,17 @@ void explicit_maps_single (int ii){ // CK19-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK19-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK19-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK19-DAG: [[CBPVAL0]] = inttoptr i[[Z]] %{{.+}} to i8* - // CK19-DAG: [[CPVAL0]] = inttoptr i[[Z]] %{{.+}}to i8* + // CK19-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to i[[Z]]* + // CK19-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i[[Z]]* + // CK19-DAG: store i[[Z]] {{%.+}}, i[[Z]]* [[CBP0]] + // CK19-DAG: store i[[Z]] {{%.+}}, i[[Z]]* [[CP0]] // CK19-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1 // CK19-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1 - // CK19-DAG: store i8* [[CBPVAL1:%[^,]+]], i8** [[BP1]] - // CK19-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]] - // CK19-DAG: [[CBPVAL1]] = bitcast i32* [[VAR1:%.+]] to i8* - // CK19-DAG: [[CPVAL1]] = bitcast i32* [[SEC1:%.+]] to i8* + // CK19-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to i32** + // CK19-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to i32** + // CK19-DAG: store i32* [[VAR1:%.+]], i32** [[CBP1]] + // CK19-DAG: store i32* [[SEC1:%.+]], i32** [[CP1]] // CK19-DAG: [[SEC1]] = getelementptr {{.*}}i32* [[VAR1]], i{{.+}} %{{.+}} // CK19: call void [[CALL22:@.+]](i{{.+}} {{[^,]+}}, i32* {{[^,]+}}) @@ -1719,10 +1721,10 @@ void explicit_maps_single (int ii){ // CK19-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK19-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK19-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK19-DAG: [[CBPVAL0]] = bitcast i32* [[VAR0:%.+]] to i8* - // CK19-DAG: [[CPVAL0]] = bitcast i32* [[VAR0]] to i8* + // CK19-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to i32** + // CK19-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** + // CK19-DAG: store i32* [[VAR0:%.+]], i32** [[CBP0]] + // CK19-DAG: store i32* [[VAR0]], i32** [[CP0]] // CK19: call void [[CALL23:@.+]](i32* {{[^,]+}}) #pragma omp target map(always, tofrom: a) @@ -1741,10 +1743,10 @@ void explicit_maps_single (int ii){ // CK19-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK19-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK19-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK19-DAG: [[CBPVAL0]] = bitcast [4 x [5 x [6 x i32]]]* [[VAR0:%.+]] to i8* - // CK19-DAG: [[CPVAL0]] = bitcast [4 x [5 x [6 x i32]]]* [[VAR0]] to i8* + // CK19-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [4 x [5 x [6 x i32]]]** + // CK19-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [4 x [5 x [6 x i32]]]** + // CK19-DAG: store [4 x [5 x [6 x i32]]]* [[VAR0:%.+]], [4 x [5 x [6 x i32]]]** [[CBP0]] + // CK19-DAG: store [4 x [5 x [6 x i32]]]* [[VAR0]], [4 x [5 x [6 x i32]]]** [[CP0]] // CK19: call void [[CALL24:@.+]]([4 x [5 x [6 x i32]]]* {{[^,]+}}) #pragma omp target map(tofrom: marr) @@ -1759,10 +1761,10 @@ void explicit_maps_single (int ii){ // CK19-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK19-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK19-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK19-DAG: [[CBPVAL0]] = bitcast [4 x [5 x [6 x i32]]]* [[VAR0:%.+]] to i8* - // CK19-DAG: [[CPVAL0]] = bitcast i32* [[SEC0:%.+]] to i8* + // CK19-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [4 x [5 x [6 x i32]]]** + // CK19-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** + // CK19-DAG: store [4 x [5 x [6 x i32]]]* [[VAR0:%.+]], [4 x [5 x [6 x i32]]]** [[CBP0]] + // CK19-DAG: store i32* [[SEC0:%.+]], i32** [[CP0]] // CK19-DAG: [[SEC0]] = getelementptr {{.*}}[6 x i32]* [[SEC00:[^,]+]], i{{.+}} 0, i{{.+}} 2 // CK19-DAG: [[SEC00]] = getelementptr {{.*}}[5 x [6 x i32]]* [[SEC000:[^,]+]], i{{.+}} 0, i{{.+}} 2 // CK19-DAG: [[SEC000]] = getelementptr {{.*}}[4 x [5 x [6 x i32]]]* [[VAR0]], i{{.+}} 0, i{{.+}} 1 @@ -1780,10 +1782,10 @@ void explicit_maps_single (int ii){ // CK19-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK19-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK19-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK19-DAG: [[CBPVAL0]] = bitcast [4 x [5 x [6 x i32]]]* [[VAR0:%.+]] to i8* - // CK19-DAG: [[CPVAL0]] = bitcast i32* [[SEC0:%.+]] to i8* + // CK19-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [4 x [5 x [6 x i32]]]** + // CK19-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** + // CK19-DAG: store [4 x [5 x [6 x i32]]]* [[VAR0:%.+]], [4 x [5 x [6 x i32]]]** [[CBP0]] + // CK19-DAG: store i32* [[SEC0:%.+]], i32** [[CP0]] // CK19-DAG: [[SEC0]] = getelementptr {{.*}}[6 x i32]* [[SEC00:[^,]+]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[SEC00]] = getelementptr {{.*}}[5 x [6 x i32]]* [[SEC000:[^,]+]], i{{.+}} 0, i{{.+}} 2 // CK19-DAG: [[SEC000]] = getelementptr {{.*}}[4 x [5 x [6 x i32]]]* [[VAR0]], i{{.+}} 0, i{{.+}} 1 @@ -1801,10 +1803,10 @@ void explicit_maps_single (int ii){ // CK19-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK19-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK19-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK19-DAG: [[CBPVAL0]] = bitcast [4 x [5 x [6 x i32]]]* [[VAR0:%.+]] to i8* - // CK19-DAG: [[CPVAL0]] = bitcast i32* [[SEC0:%.+]] to i8* + // CK19-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [4 x [5 x [6 x i32]]]** + // CK19-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** + // CK19-DAG: store [4 x [5 x [6 x i32]]]* [[VAR0:%.+]], [4 x [5 x [6 x i32]]]** [[CBP0]] + // CK19-DAG: store i32* [[SEC0:%.+]], i32** [[CP0]] // CK19-DAG: [[SEC0]] = getelementptr {{.*}}[6 x i32]* [[SEC00:[^,]+]], i{{.+}} 0, i{{.+}} 3 // CK19-DAG: [[SEC00]] = getelementptr {{.*}}[5 x [6 x i32]]* [[SEC000:[^,]+]], i{{.+}} 0, i{{.+}} 2 // CK19-DAG: [[SEC000]] = getelementptr {{.*}}[4 x [5 x [6 x i32]]]* [[VAR0]], i{{.+}} 0, i{{.+}} 1 @@ -1822,20 +1824,20 @@ void explicit_maps_single (int ii){ // CK19-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK19-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK19-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK19-DAG: [[CBPVAL0]] = bitcast i32*** [[VAR0:%.+]] to i8* - // CK19-DAG: [[CPVAL0]] = bitcast i32*** [[SEC0:%.+]] to i8* + // CK19-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to i32**** + // CK19-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32**** + // CK19-DAG: store i32*** [[VAR0:%.+]], i32**** [[CBP0]] + // CK19-DAG: store i32*** [[SEC0:%.+]], i32**** [[CP0]] // CK19-DAG: [[VAR0]] = load i32***, i32**** [[PTR:%[^,]+]], // CK19-DAG: [[SEC0]] = getelementptr {{.*}}i32*** [[SEC00:[^,]+]], i{{.+}} 1 // CK19-DAG: [[SEC00]] = load i32***, i32**** [[PTR]], // CK19-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1 // CK19-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1 - // CK19-DAG: store i8* [[CBPVAL1:%[^,]+]], i8** [[BP1]] - // CK19-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]] - // CK19-DAG: [[CBPVAL1]] = bitcast i32*** [[SEC0]] to i8* - // CK19-DAG: [[CPVAL1]] = bitcast i32** [[SEC1:%.+]] to i8* + // CK19-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to i32**** + // CK19-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to i32*** + // CK19-DAG: store i32*** [[SEC0]], i32**** [[CBP1]] + // CK19-DAG: store i32** [[SEC1:%.+]], i32*** [[CP1]] // CK19-DAG: [[SEC1]] = getelementptr {{.*}}i32** [[SEC11:[^,]+]], i{{.+}} 2 // CK19-DAG: [[SEC11]] = load i32**, i32*** [[SEC111:%[^,]+]], // CK19-DAG: [[SEC111]] = getelementptr {{.*}}i32*** [[SEC1111:[^,]+]], i{{.+}} 1 @@ -1843,10 +1845,10 @@ void explicit_maps_single (int ii){ // CK19-DAG: [[BP2:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 2 // CK19-DAG: [[P2:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 2 - // CK19-DAG: store i8* [[CBPVAL2:%[^,]+]], i8** [[BP2]] - // CK19-DAG: store i8* [[CPVAL2:%[^,]+]], i8** [[P2]] - // CK19-DAG: [[CBPVAL2]] = bitcast i32** [[SEC1]] to i8* - // CK19-DAG: [[CPVAL2]] = bitcast i32* [[SEC2:%.+]] to i8* + // CK19-DAG: [[CBP2:%.+]] = bitcast i8** [[BP2]] to i32*** + // CK19-DAG: [[CP2:%.+]] = bitcast i8** [[P2]] to i32** + // CK19-DAG: store i32** [[SEC1]], i32*** [[CBP2]] + // CK19-DAG: store i32* [[SEC2:%.+]], i32** [[CP2]] // CK19-DAG: [[SEC2]] = getelementptr {{.*}}i32* [[SEC22:[^,]+]], i{{.+}} 2 // CK19-DAG: [[SEC22]] = load i32*, i32** [[SEC222:%[^,]+]], // CK19-DAG: [[SEC222]] = getelementptr {{.*}}i32** [[SEC2222:[^,]+]], i{{.+}} 2 @@ -1867,20 +1869,20 @@ void explicit_maps_single (int ii){ // CK19-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK19-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK19-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK19-DAG: [[CBPVAL0]] = bitcast i32*** [[VAR0:%.+]] to i8* - // CK19-DAG: [[CPVAL0]] = bitcast i32*** [[SEC0:%.+]] to i8* + // CK19-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to i32**** + // CK19-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32**** + // CK19-DAG: store i32*** [[VAR0:%.+]], i32**** [[CBP0]] + // CK19-DAG: store i32*** [[SEC0:%.+]], i32**** [[CP0]] // CK19-DAG: [[VAR0]] = load i32***, i32**** [[PTR:%[^,]+]], // CK19-DAG: [[SEC0]] = getelementptr {{.*}}i32*** [[SEC00:[^,]+]], i{{.+}} 1 // CK19-DAG: [[SEC00]] = load i32***, i32**** [[PTR]], // CK19-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1 // CK19-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1 - // CK19-DAG: store i8* [[CBPVAL1:%[^,]+]], i8** [[BP1]] - // CK19-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]] - // CK19-DAG: [[CBPVAL1]] = bitcast i32*** [[SEC0]] to i8* - // CK19-DAG: [[CPVAL1]] = bitcast i32** [[SEC1:%.+]] to i8* + // CK19-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to i32**** + // CK19-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to i32*** + // CK19-DAG: store i32*** [[SEC0]], i32**** [[CBP1]] + // CK19-DAG: store i32** [[SEC1:%.+]], i32*** [[CP1]] // CK19-DAG: [[SEC1]] = getelementptr {{.*}}i32** [[SEC11:[^,]+]], i{{.+}} 2 // CK19-DAG: [[SEC11]] = load i32**, i32*** [[SEC111:%[^,]+]], // CK19-DAG: [[SEC111]] = getelementptr {{.*}}i32*** [[SEC1111:[^,]+]], i{{.+}} 1 @@ -1888,10 +1890,10 @@ void explicit_maps_single (int ii){ // CK19-DAG: [[BP2:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 2 // CK19-DAG: [[P2:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 2 - // CK19-DAG: store i8* [[CBPVAL2:%[^,]+]], i8** [[BP2]] - // CK19-DAG: store i8* [[CPVAL2:%[^,]+]], i8** [[P2]] - // CK19-DAG: [[CBPVAL2]] = bitcast i32** [[SEC1]] to i8* - // CK19-DAG: [[CPVAL2]] = bitcast i32* [[SEC2:%.+]] to i8* + // CK19-DAG: [[CBP2:%.+]] = bitcast i8** [[BP2]] to i32*** + // CK19-DAG: [[CP2:%.+]] = bitcast i8** [[P2]] to i32** + // CK19-DAG: store i32** [[SEC1]], i32*** [[CBP2]] + // CK19-DAG: store i32* [[SEC2:%.+]], i32** [[CP2]] // CK19-DAG: [[SEC2]] = getelementptr {{.*}}i32* [[SEC22:[^,]+]], i{{.+}} 3 // CK19-DAG: [[SEC22]] = load i32*, i32** [[SEC222:%[^,]+]], // CK19-DAG: [[SEC222]] = getelementptr {{.*}}i32** [[SEC2222:[^,]+]], i{{.+}} 2 @@ -1917,40 +1919,42 @@ void explicit_maps_single (int ii){ // CK19-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[S0:%.+]] = getelementptr inbounds {{.+}}[[S]], i{{.+}} 0, i{{.+}} 0 - // CK19-DAG: store i8* inttoptr (i[[Z]] 23 to i8*), i8** [[BP0]] - // CK19-DAG: store i8* inttoptr (i[[Z]] 23 to i8*), i8** [[P0]] + // CK19-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to i[[Z]]* + // CK19-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i[[Z]]* + // CK19-DAG: store i[[Z]] 23, i[[Z]]* [[CBP0]] + // CK19-DAG: store i[[Z]] 23, i[[Z]]* [[CP0]] // CK19-DAG: store i[[Z]] {{8|4}}, i[[Z]]* [[S0]] // // CK19-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1 // CK19-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1 // CK19-DAG: [[S1:%.+]] = getelementptr inbounds {{.+}}[[S]], i{{.+}} 0, i{{.+}} 1 - // CK19-DAG: store i8* [[CBPVAL1:%[^,]+]], i8** [[BP1]] - // CK19-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]] + // CK19-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to i[[Z]]* + // CK19-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to i[[Z]]* + // CK19-DAG: store i[[Z]] [[VAR1:%.+]], i[[Z]]* [[CBP1]] + // CK19-DAG: store i[[Z]] [[VAR11:%.+]], i[[Z]]* [[CP1]] // CK19-DAG: store i[[Z]] {{8|4}}, i[[Z]]* [[S1]] - // CK19-DAG: [[CBPVAL1]] = inttoptr i[[Z]] [[VAR1:%.+]] to i8* - // CK19-DAG: [[CPVAL1]] = inttoptr i[[Z]] [[VAR11:%.+]] to i8* // CK19-64-DAG: [[VAR1]] = zext i32 %{{[^,]+}} to i64 // CK19-64-DAG: [[VAR11]] = zext i32 %{{[^,]+}} to i64 // // CK19-DAG: [[BP2:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 2 // CK19-DAG: [[P2:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 2 // CK19-DAG: [[S2:%.+]] = getelementptr inbounds {{.+}}[[S]], i{{.+}} 0, i{{.+}} 2 - // CK19-DAG: store i8* [[CBPVAL2:%[^,]+]], i8** [[BP2]] - // CK19-DAG: store i8* [[CPVAL2:%[^,]+]], i8** [[P2]] + // CK19-DAG: [[CBP2:%.+]] = bitcast i8** [[BP2]] to i[[Z]]* + // CK19-DAG: [[CP2:%.+]] = bitcast i8** [[P2]] to i[[Z]]* + // CK19-DAG: store i[[Z]] [[VAR2:%.+]], i[[Z]]* [[CBP2]] + // CK19-DAG: store i[[Z]] [[VAR22:%.+]], i[[Z]]* [[CP2]] // CK19-DAG: store i[[Z]] {{8|4}}, i[[Z]]* [[S2]] - // CK19-DAG: [[CBPVAL2]] = inttoptr i[[Z]] [[VAR2:%.+]] to i8* - // CK19-DAG: [[CPVAL2]] = inttoptr i[[Z]] [[VAR22:%.+]] to i8* // CK19-64-DAG: [[VAR2]] = zext i32 %{{[^,]+}} to i64 // CK19-64-DAG: [[VAR22]] = zext i32 %{{[^,]+}} to i64 // // CK19-DAG: [[BP3:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 3 // CK19-DAG: [[P3:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 3 // CK19-DAG: [[S3:%.+]] = getelementptr inbounds {{.+}}[[S]], i{{.+}} 0, i{{.+}} 3 - // CK19-DAG: store i8* [[CBPVAL3:%[^,]+]], i8** [[BP3]] - // CK19-DAG: store i8* [[CPVAL3:%[^,]+]], i8** [[P3]] + // CK19-DAG: [[CBP3:%.+]] = bitcast i8** [[BP3]] to double** + // CK19-DAG: [[CP3:%.+]] = bitcast i8** [[P3]] to double** + // CK19-DAG: store double* [[VAR3:%.+]], double** [[CBP3]] + // CK19-DAG: store double* [[VAR3]], double** [[CP3]] // CK19-DAG: store i[[Z]] [[CSVAL3:%[^,]+]], i[[Z]]* [[S3]] - // CK19-DAG: [[CBPVAL3]] = bitcast double* [[VAR3:%.+]] to i8* - // CK19-DAG: [[CPVAL3]] = bitcast double* [[VAR3]] to i8* // CK19-DAG: [[CSVAL3]] = mul nuw i[[Z]] %{{[^,]+}}, {{8|4}} // CK19: call void [[CALL30:@.+]](i[[Z]] 23, i[[Z]] %{{[^,]+}}, i[[Z]] %{{[^,]+}}, double* %{{[^,]+}}) @@ -1966,29 +1970,31 @@ void explicit_maps_single (int ii){ // // CK19-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK19-DAG: store i8* inttoptr (i[[Z]] 23 to i8*), i8** [[BP0]] - // CK19-DAG: store i8* inttoptr (i[[Z]] 23 to i8*), i8** [[P0]] + // CK19-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to i[[Z]]* + // CK19-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i[[Z]]* + // CK19-DAG: store i[[Z]] 23, i[[Z]]* [[CBP0]] + // CK19-DAG: store i[[Z]] 23, i[[Z]]* [[CP0]] // // CK19-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1 // CK19-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1 - // CK19-DAG: store i8* [[CBPVAL1:%[^,]+]], i8** [[BP1]] - // CK19-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]] - // CK19-DAG: [[CBPVAL1]] = inttoptr i[[Z]] [[VAR1:%.+]] to i8* - // CK19-DAG: [[CPVAL1]] = inttoptr i[[Z]] [[VAR11:%.+]] to i8* + // CK19-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to i[[Z]]* + // CK19-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to i[[Z]]* + // CK19-DAG: store i[[Z]] [[VAR1:%.+]], i[[Z]]* [[CBP1]] + // CK19-DAG: store i[[Z]] [[VAR11:%.+]], i[[Z]]* [[CP1]] // // CK19-DAG: [[BP2:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 2 // CK19-DAG: [[P2:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 2 - // CK19-DAG: store i8* [[CBPVAL2:%[^,]+]], i8** [[BP2]] - // CK19-DAG: store i8* [[CPVAL2:%[^,]+]], i8** [[P2]] - // CK19-DAG: [[CBPVAL2]] = inttoptr i[[Z]] [[VAR2:%.+]] to i8* - // CK19-DAG: [[CPVAL2]] = inttoptr i[[Z]] [[VAR22:%.+]] to i8* + // CK19-DAG: [[CBP2:%.+]] = bitcast i8** [[BP2]] to i[[Z]]* + // CK19-DAG: [[CP2:%.+]] = bitcast i8** [[P2]] to i[[Z]]* + // CK19-DAG: store i[[Z]] [[VAR2:%.+]], i[[Z]]* [[CBP2]] + // CK19-DAG: store i[[Z]] [[VAR22:%.+]], i[[Z]]* [[CP2]] // // CK19-DAG: [[BP3:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 3 // CK19-DAG: [[P3:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 3 - // CK19-DAG: store i8* [[CBPVAL3:%[^,]+]], i8** [[BP3]] - // CK19-DAG: store i8* [[CPVAL3:%[^,]+]], i8** [[P3]] - // CK19-DAG: [[CBPVAL3]] = bitcast double* [[VAR3:%.+]] to i8* - // CK19-DAG: [[CPVAL3]] = bitcast double* [[SEC3:%.+]] to i8* + // CK19-DAG: [[CBP3:%.+]] = bitcast i8** [[BP3]] to double** + // CK19-DAG: [[CP3:%.+]] = bitcast i8** [[P3]] to double** + // CK19-DAG: store double* [[VAR3:%.+]], double** [[CBP3]] + // CK19-DAG: store double* [[SEC3:%.+]], double** [[CP3]] // CK19-DAG: [[SEC3]] = getelementptr {{.*}}double* [[SEC33:%.+]], i[[Z]] 0 // CK19-DAG: [[SEC33]] = getelementptr {{.*}}double* [[SEC333:%.+]], i[[Z]] [[IDX3:%.+]] // CK19-DAG: [[IDX3]] = mul nsw i[[Z]] %{{[^,]+}}, %{{[^,]+}} @@ -2013,10 +2019,10 @@ void explicit_maps_single (int ii){ // CK19-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK19-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK19-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK19-DAG: [[CBPVAL0]] = bitcast [11 x [12 x [13 x double]]]* [[VAR0:%.+]] to i8* - // CK19-DAG: [[CPVAL0]] = bitcast [11 x [12 x [13 x double]]]* [[VAR0]] to i8* + // CK19-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [11 x [12 x [13 x double]]]** + // CK19-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [11 x [12 x [13 x double]]]** + // CK19-DAG: store [11 x [12 x [13 x double]]]* [[VAR0:%.+]], [11 x [12 x [13 x double]]]** [[CBP0]] + // CK19-DAG: store [11 x [12 x [13 x double]]]* [[VAR0]], [11 x [12 x [13 x double]]]** [[CP0]] // CK19: call void [[CALL32:@.+]]([11 x [12 x [13 x double]]]* {{[^,]+}}) #pragma omp target map(marras) @@ -2031,10 +2037,10 @@ void explicit_maps_single (int ii){ // CK19-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK19-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK19-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK19-DAG: [[CBPVAL0]] = bitcast [11 x [12 x [13 x double]]]* [[VAR0:%.+]] to i8* - // CK19-DAG: [[CPVAL0]] = bitcast [12 x [13 x double]]* [[SEC0:%.+]] to i8* + // CK19-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [11 x [12 x [13 x double]]]** + // CK19-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [12 x [13 x double]]** + // CK19-DAG: store [11 x [12 x [13 x double]]]* [[VAR0:%.+]], [11 x [12 x [13 x double]]]** [[CBP0]] + // CK19-DAG: store [12 x [13 x double]]* [[SEC0:%.+]], [12 x [13 x double]]** [[CP0]] // CK19-DAG: [[SEC0]] = getelementptr {{.+}}[11 x [12 x [13 x double]]]* [[VAR0]], i[[Z]] 0, i[[Z]] 0 // CK19: call void [[CALL33:@.+]]([11 x [12 x [13 x double]]]* {{[^,]+}}) @@ -2050,10 +2056,10 @@ void explicit_maps_single (int ii){ // CK19-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK19-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK19-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK19-DAG: [[CBPVAL0]] = bitcast [11 x [12 x [13 x double]]]* [[VAR0:%.+]] to i8* - // CK19-DAG: [[CPVAL0]] = bitcast [12 x [13 x double]]* [[SEC0:%.+]] to i8* + // CK19-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [11 x [12 x [13 x double]]]** + // CK19-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [12 x [13 x double]]** + // CK19-DAG: store [11 x [12 x [13 x double]]]* [[VAR0:%.+]], [11 x [12 x [13 x double]]]** [[CBP0]] + // CK19-DAG: store [12 x [13 x double]]* [[SEC0:%.+]], [12 x [13 x double]]** [[CP0]] // CK19-DAG: [[SEC0]] = getelementptr {{.+}}[11 x [12 x [13 x double]]]* [[VAR0]], i[[Z]] 0, i[[Z]] 0 // CK19: call void [[CALL34:@.+]]([11 x [12 x [13 x double]]]* {{[^,]+}}) @@ -2072,11 +2078,11 @@ void explicit_maps_single (int ii){ // CK19-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[S0:%.+]] = getelementptr inbounds {{.+}}[[S]], i{{.+}} 0, i{{.+}} 0 - // CK19-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK19-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] + // CK19-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [11 x [12 x [13 x double]]]** + // CK19-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [13 x double]** + // CK19-DAG: store [11 x [12 x [13 x double]]]* [[VAR0:%.+]], [11 x [12 x [13 x double]]]** [[CBP0]] + // CK19-DAG: store [13 x double]* [[SEC0:%.+]], [13 x double]** [[CP0]] // CK19-DAG: store i[[Z]] [[CSVAL0:%[^,]+]], i[[Z]]* [[S0]] - // CK19-DAG: [[CBPVAL0]] = bitcast [11 x [12 x [13 x double]]]* [[VAR0:%.+]] to i8* - // CK19-DAG: [[CPVAL0]] = bitcast [13 x double]* [[SEC0:%.+]] to i8* // CK19-DAG: [[SEC0]] = getelementptr {{.+}}[12 x [13 x double]]* [[SEC00:%[^,]+]], i[[Z]] 0, i[[Z]] 0 // CK19-DAG: [[SEC00]] = getelementptr {{.+}}[11 x [12 x [13 x double]]]* [[VAR0]], i[[Z]] 0, i[[Z]] 1 // CK19-DAG: [[CSVAL0]] = mul nuw i[[Z]] %{{[^,]+}}, 104 @@ -2094,10 +2100,10 @@ void explicit_maps_single (int ii){ // CK19-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK19-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK19-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK19-DAG: [[CBPVAL0]] = bitcast [11 x [12 x [13 x double]]]* [[VAR0:%.+]] to i8* - // CK19-DAG: [[CPVAL0]] = bitcast [13 x double]* [[SEC0:%.+]] to i8* + // CK19-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [11 x [12 x [13 x double]]]** + // CK19-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [13 x double]** + // CK19-DAG: store [11 x [12 x [13 x double]]]* [[VAR0:%.+]], [11 x [12 x [13 x double]]]** [[CBP0]] + // CK19-DAG: store [13 x double]* [[SEC0:%.+]], [13 x double]** [[CP0]] // CK19-DAG: [[SEC0]] = getelementptr {{.+}}[13 x double]* [[SEC00:%[^,]+]], i{{.+}} 0 // CK19-DAG: [[SEC00]] = getelementptr {{.+}}[12 x [13 x double]]* [[SEC000:%[^,]+]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[SEC000]] = getelementptr {{.+}}[11 x [12 x [13 x double]]]* [[VAR0]], i{{.+}} 0, i{{.+}} 0 @@ -2117,27 +2123,29 @@ void explicit_maps_single (int ii){ // CK19-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[S0:%.+]] = getelementptr inbounds {{.+}}[[S]], i{{.+}} 0, i{{.+}} 0 - // CK19-DAG: store i8* inttoptr (i[[Z]] 11 to i8*), i8** [[BP0]] - // CK19-DAG: store i8* inttoptr (i[[Z]] 11 to i8*), i8** [[P0]] + // CK19-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to i[[Z]]* + // CK19-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i[[Z]]* + // CK19-DAG: store i[[Z]] 11, i[[Z]]* [[CBP0]] + // CK19-DAG: store i[[Z]] 11, i[[Z]]* [[CP0]] // CK19-DAG: store i[[Z]] {{8|4}}, i[[Z]]* [[S0]] // // CK19-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1 // CK19-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1 // CK19-DAG: [[S1:%.+]] = getelementptr inbounds {{.+}}[[S]], i{{.+}} 0, i{{.+}} 1 - // CK19-DAG: store i8* [[CBPVAL1:%[^,]+]], i8** [[BP1]] - // CK19-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]] + // CK19-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to i[[Z]]* + // CK19-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to i[[Z]]* + // CK19-DAG: store i[[Z]] [[VAR1:%.+]], i[[Z]]* [[CBP1]] + // CK19-DAG: store i[[Z]] [[VAR11:%.+]], i[[Z]]* [[CP1]] // CK19-DAG: store i[[Z]] {{8|4}}, i[[Z]]* [[S1]] - // CK19-DAG: [[CBPVAL1]] = inttoptr i[[Z]] [[VAR1:%.+]] to i8* - // CK19-DAG: [[CPVAL1]] = inttoptr i[[Z]] [[VAR11:%.+]] to i8* // // CK19-DAG: [[BP2:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 2 // CK19-DAG: [[P2:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 2 // CK19-DAG: [[S2:%.+]] = getelementptr inbounds {{.+}}[[S]], i{{.+}} 0, i{{.+}} 2 - // CK19-DAG: store i8* [[CBPVAL2:%[^,]+]], i8** [[BP2]] - // CK19-DAG: store i8* [[CPVAL2:%[^,]+]], i8** [[P2]] + // CK19-DAG: [[CBP2:%.+]] = bitcast i8** [[BP2]] to [13 x double]** + // CK19-DAG: [[CP2:%.+]] = bitcast i8** [[P2]] to [13 x double]** + // CK19-DAG: store [13 x double]* [[VAR2:%.+]], [13 x double]** [[CBP2]] + // CK19-DAG: store [13 x double]* [[VAR2]], [13 x double]** [[CP2]] // CK19-DAG: store i[[Z]] [[CSVAL2:%[^,]+]], i[[Z]]* [[S2]] - // CK19-DAG: [[CBPVAL2]] = bitcast [13 x double]* [[VAR2:%.+]] to i8* - // CK19-DAG: [[CPVAL2]] = bitcast [13 x double]* [[VAR2]] to i8* // CK19-DAG: [[CSVAL2]] = mul nuw i[[Z]] %{{[^,]+}}, 104 // CK19: call void [[CALL37:@.+]](i[[Z]] 11, i[[Z]] %{{[^,]+}}, [13 x double]* %{{[^,]+}}) @@ -2155,27 +2163,29 @@ void explicit_maps_single (int ii){ // CK19-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[S0:%.+]] = getelementptr inbounds {{.+}}[[S]], i{{.+}} 0, i{{.+}} 0 - // CK19-DAG: store i8* inttoptr (i[[Z]] 11 to i8*), i8** [[BP0]] - // CK19-DAG: store i8* inttoptr (i[[Z]] 11 to i8*), i8** [[P0]] + // CK19-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to i[[Z]]* + // CK19-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i[[Z]]* + // CK19-DAG: store i[[Z]] 11, i[[Z]]* [[CBP0]] + // CK19-DAG: store i[[Z]] 11, i[[Z]]* [[CP0]] // CK19-DAG: store i[[Z]] {{8|4}}, i[[Z]]* [[S0]] // // CK19-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1 // CK19-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1 // CK19-DAG: [[S1:%.+]] = getelementptr inbounds {{.+}}[[S]], i{{.+}} 0, i{{.+}} 1 - // CK19-DAG: store i8* [[CBPVAL1:%[^,]+]], i8** [[BP1]] - // CK19-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]] + // CK19-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to i[[Z]]* + // CK19-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to i[[Z]]* + // CK19-DAG: store i[[Z]] [[VAR1:%.+]], i[[Z]]* [[CBP1]] + // CK19-DAG: store i[[Z]] [[VAR11:%.+]], i[[Z]]* [[CP1]] // CK19-DAG: store i[[Z]] {{8|4}}, i[[Z]]* [[S1]] - // CK19-DAG: [[CBPVAL1]] = inttoptr i[[Z]] [[VAR1:%.+]] to i8* - // CK19-DAG: [[CPVAL1]] = inttoptr i[[Z]] [[VAR11:%.+]] to i8* // // CK19-DAG: [[BP2:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 2 // CK19-DAG: [[P2:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 2 // CK19-DAG: [[S2:%.+]] = getelementptr inbounds {{.+}}[[S]], i{{.+}} 0, i{{.+}} 2 - // CK19-DAG: store i8* [[CBPVAL2:%[^,]+]], i8** [[BP2]] - // CK19-DAG: store i8* [[CPVAL2:%[^,]+]], i8** [[P2]] + // CK19-DAG: [[CBP2:%.+]] = bitcast i8** [[BP2]] to [13 x double]** + // CK19-DAG: [[CP2:%.+]] = bitcast i8** [[P2]] to [13 x double]** + // CK19-DAG: store [13 x double]* [[VAR2:%.+]], [13 x double]** [[CBP2]] + // CK19-DAG: store [13 x double]* [[SEC2:%.+]], [13 x double]** [[CP2]] // CK19-DAG: store i[[Z]] [[CSVAL2:%[^,]+]], i[[Z]]* [[S2]] - // CK19-DAG: [[CBPVAL2]] = bitcast [13 x double]* [[VAR2:%.+]] to i8* - // CK19-DAG: [[CPVAL2]] = bitcast [13 x double]* [[SEC2:%.+]] to i8* // CK19-DAG: [[SEC2]] = getelementptr {{.+}}[13 x double]* [[VAR2]], i[[Z]] [[SEC22:%[^,]+]] // CK19-DAG: [[SEC22]] = mul nsw i[[Z]] 0, %{{[^,]+}} // CK19-DAG: [[CSVAL2]] = mul nuw i[[Z]] %{{[^,]+}}, 104 @@ -2195,27 +2205,29 @@ void explicit_maps_single (int ii){ // CK19-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[S0:%.+]] = getelementptr inbounds {{.+}}[[S]], i{{.+}} 0, i{{.+}} 0 - // CK19-DAG: store i8* inttoptr (i[[Z]] 11 to i8*), i8** [[BP0]] - // CK19-DAG: store i8* inttoptr (i[[Z]] 11 to i8*), i8** [[P0]] + // CK19-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to i[[Z]]* + // CK19-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i[[Z]]* + // CK19-DAG: store i[[Z]] 11, i[[Z]]* [[CBP0]] + // CK19-DAG: store i[[Z]] 11, i[[Z]]* [[CP0]] // CK19-DAG: store i[[Z]] {{8|4}}, i[[Z]]* [[S0]] // // CK19-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1 // CK19-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1 // CK19-DAG: [[S1:%.+]] = getelementptr inbounds {{.+}}[[S]], i{{.+}} 0, i{{.+}} 1 - // CK19-DAG: store i8* [[CBPVAL1:%[^,]+]], i8** [[BP1]] - // CK19-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]] + // CK19-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to i[[Z]]* + // CK19-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to i[[Z]]* + // CK19-DAG: store i[[Z]] [[VAR1:%.+]], i[[Z]]* [[CBP1]] + // CK19-DAG: store i[[Z]] [[VAR11:%.+]], i[[Z]]* [[CP1]] // CK19-DAG: store i[[Z]] {{8|4}}, i[[Z]]* [[S1]] - // CK19-DAG: [[CBPVAL1]] = inttoptr i[[Z]] [[VAR1:%.+]] to i8* - // CK19-DAG: [[CPVAL1]] = inttoptr i[[Z]] [[VAR11:%.+]] to i8* // // CK19-DAG: [[BP2:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 2 // CK19-DAG: [[P2:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 2 // CK19-DAG: [[S2:%.+]] = getelementptr inbounds {{.+}}[[S]], i{{.+}} 0, i{{.+}} 2 - // CK19-DAG: store i8* [[CBPVAL2:%[^,]+]], i8** [[BP2]] - // CK19-DAG: store i8* [[CPVAL2:%[^,]+]], i8** [[P2]] + // CK19-DAG: [[CBP2:%.+]] = bitcast i8** [[BP2]] to [13 x double]** + // CK19-DAG: [[CP2:%.+]] = bitcast i8** [[P2]] to [13 x double]** + // CK19-DAG: store [13 x double]* [[VAR2:%.+]], [13 x double]** [[CBP2]] + // CK19-DAG: store [13 x double]* [[SEC2:%.+]], [13 x double]** [[CP2]] // CK19-DAG: store i[[Z]] [[CSVAL2:%[^,]+]], i[[Z]]* [[S2]] - // CK19-DAG: [[CBPVAL2]] = bitcast [13 x double]* [[VAR2:%.+]] to i8* - // CK19-DAG: [[CPVAL2]] = bitcast [13 x double]* [[SEC2:%.+]] to i8* // CK19-DAG: [[SEC2]] = getelementptr {{.+}}[13 x double]* [[VAR2]], i[[Z]] [[SEC22:%[^,]+]] // CK19-DAG: [[SEC22]] = mul nsw i[[Z]] 0, %{{[^,]+}} // CK19-DAG: [[CSVAL2]] = mul nuw i[[Z]] %{{[^,]+}}, 104 @@ -2235,27 +2247,29 @@ void explicit_maps_single (int ii){ // CK19-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[S0:%.+]] = getelementptr inbounds {{.+}}[[S]], i{{.+}} 0, i{{.+}} 0 - // CK19-DAG: store i8* inttoptr (i[[Z]] 11 to i8*), i8** [[BP0]] - // CK19-DAG: store i8* inttoptr (i[[Z]] 11 to i8*), i8** [[P0]] + // CK19-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to i[[Z]]* + // CK19-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i[[Z]]* + // CK19-DAG: store i[[Z]] 11, i[[Z]]* [[CBP0]] + // CK19-DAG: store i[[Z]] 11, i[[Z]]* [[CP0]] // CK19-DAG: store i[[Z]] {{8|4}}, i[[Z]]* [[S0]] // // CK19-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1 // CK19-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1 // CK19-DAG: [[S1:%.+]] = getelementptr inbounds {{.+}}[[S]], i{{.+}} 0, i{{.+}} 1 - // CK19-DAG: store i8* [[CBPVAL1:%[^,]+]], i8** [[BP1]] - // CK19-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]] + // CK19-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to i[[Z]]* + // CK19-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to i[[Z]]* + // CK19-DAG: store i[[Z]] [[VAR1:%.+]], i[[Z]]* [[CBP1]] + // CK19-DAG: store i[[Z]] [[VAR11:%.+]], i[[Z]]* [[CP1]] // CK19-DAG: store i[[Z]] {{8|4}}, i[[Z]]* [[S1]] - // CK19-DAG: [[CBPVAL1]] = inttoptr i[[Z]] [[VAR1:%.+]] to i8* - // CK19-DAG: [[CPVAL1]] = inttoptr i[[Z]] [[VAR11:%.+]] to i8* // // CK19-DAG: [[BP2:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 2 // CK19-DAG: [[P2:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 2 // CK19-DAG: [[S2:%.+]] = getelementptr inbounds {{.+}}[[S]], i{{.+}} 0, i{{.+}} 2 - // CK19-DAG: store i8* [[CBPVAL2:%[^,]+]], i8** [[BP2]] - // CK19-DAG: store i8* [[CPVAL2:%[^,]+]], i8** [[P2]] + // CK19-DAG: [[CBP2:%.+]] = bitcast i8** [[BP2]] to [13 x double]** + // CK19-DAG: [[CP2:%.+]] = bitcast i8** [[P2]] to [13 x double]** + // CK19-DAG: store [13 x double]* [[VAR2:%.+]], [13 x double]** [[CBP2]] + // CK19-DAG: store [13 x double]* [[SEC2:%.+]], [13 x double]** [[CP2]] // CK19-DAG: store i[[Z]] [[CSVAL2:%[^,]+]], i[[Z]]* [[S2]] - // CK19-DAG: [[CBPVAL2]] = bitcast [13 x double]* [[VAR2:%.+]] to i8* - // CK19-DAG: [[CPVAL2]] = bitcast [13 x double]* [[SEC2:%.+]] to i8* // CK19-DAG: [[SEC2]] = getelementptr {{.+}}[13 x double]* [[SEC22:%[^,]+]], i[[Z]] 0 // CK19-DAG: [[SEC22]] = getelementptr {{.+}}[13 x double]* [[VAR2]], i[[Z]] [[SEC222:%[^,]+]] // CK19-DAG: [[SEC222]] = mul nsw i[[Z]] 1, %{{[^,]+}} @@ -2273,22 +2287,24 @@ void explicit_maps_single (int ii){ // // CK19-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK19-DAG: store i8* inttoptr (i[[Z]] 11 to i8*), i8** [[BP0]] - // CK19-DAG: store i8* inttoptr (i[[Z]] 11 to i8*), i8** [[P0]] + // CK19-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to i[[Z]]* + // CK19-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i[[Z]]* + // CK19-DAG: store i[[Z]] 11, i[[Z]]* [[CBP0]] + // CK19-DAG: store i[[Z]] 11, i[[Z]]* [[CP0]] // // CK19-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1 // CK19-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1 - // CK19-DAG: store i8* [[CBPVAL1:%[^,]+]], i8** [[BP1]] - // CK19-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]] - // CK19-DAG: [[CBPVAL1]] = inttoptr i[[Z]] [[VAR1:%.+]] to i8* - // CK19-DAG: [[CPVAL1]] = inttoptr i[[Z]] [[VAR11:%.+]] to i8* + // CK19-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to i[[Z]]* + // CK19-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to i[[Z]]* + // CK19-DAG: store i[[Z]] [[VAR1:%.+]], i[[Z]]* [[CBP1]] + // CK19-DAG: store i[[Z]] [[VAR11:%.+]], i[[Z]]* [[CP1]] // // CK19-DAG: [[BP2:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 2 // CK19-DAG: [[P2:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 2 - // CK19-DAG: store i8* [[CBPVAL2:%[^,]+]], i8** [[BP2]] - // CK19-DAG: store i8* [[CPVAL2:%[^,]+]], i8** [[P2]] - // CK19-DAG: [[CBPVAL2]] = bitcast [13 x double]* [[VAR2:%.+]] to i8* - // CK19-DAG: [[CPVAL2]] = bitcast [13 x double]* [[SEC2:%.+]] to i8* + // CK19-DAG: [[CBP2:%.+]] = bitcast i8** [[BP2]] to [13 x double]** + // CK19-DAG: [[CP2:%.+]] = bitcast i8** [[P2]] to [13 x double]** + // CK19-DAG: store [13 x double]* [[VAR2:%.+]], [13 x double]** [[CBP2]] + // CK19-DAG: store [13 x double]* [[SEC2:%.+]], [13 x double]** [[CP2]] // CK19-DAG: [[SEC2]] = getelementptr {{.+}}[13 x double]* [[SEC22:%[^,]+]], i[[Z]] 0 // CK19-DAG: [[SEC22]] = getelementptr {{.+}}[13 x double]* [[VAR2]], i[[Z]] [[SEC222:%[^,]+]] // CK19-DAG: [[SEC222]] = mul nsw i[[Z]] 0, %{{[^,]+}} @@ -2306,20 +2322,20 @@ void explicit_maps_single (int ii){ // CK19-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK19-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK19-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK19-DAG: [[CBPVAL0]] = bitcast double*** [[VAR0:%.+]] to i8* - // CK19-DAG: [[CPVAL0]] = bitcast double*** [[SEC0:%.+]] to i8* + // CK19-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to double**** + // CK19-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to double**** + // CK19-DAG: store double*** [[VAR0:%.+]], double**** [[CBP0]] + // CK19-DAG: store double*** [[SEC0:%.+]], double**** [[CP0]] // CK19-DAG: [[VAR0]] = load double***, double**** [[PTR:%[^,]+]], // CK19-DAG: [[SEC0]] = getelementptr {{.*}}double*** [[SEC00:[^,]+]], i{{.+}} 0 // CK19-DAG: [[SEC00]] = load double***, double**** [[PTR]], // CK19-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1 // CK19-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1 - // CK19-DAG: store i8* [[CBPVAL1:%[^,]+]], i8** [[BP1]] - // CK19-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]] - // CK19-DAG: [[CBPVAL1]] = bitcast double*** [[SEC0]] to i8* - // CK19-DAG: [[CPVAL1]] = bitcast double** [[SEC1:%.+]] to i8* + // CK19-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to double**** + // CK19-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to double*** + // CK19-DAG: store double*** [[SEC0]], double**** [[CBP1]] + // CK19-DAG: store double** [[SEC1:%.+]], double*** [[CP1]] // CK19-DAG: [[SEC1]] = getelementptr {{.*}}double** [[SEC11:[^,]+]], i{{.+}} 2 // CK19-DAG: [[SEC11]] = load double**, double*** [[SEC111:%[^,]+]], // CK19-DAG: [[SEC111]] = getelementptr {{.*}}double*** [[SEC1111:[^,]+]], i{{.+}} 0 @@ -2327,10 +2343,10 @@ void explicit_maps_single (int ii){ // CK19-DAG: [[BP2:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 2 // CK19-DAG: [[P2:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 2 - // CK19-DAG: store i8* [[CBPVAL2:%[^,]+]], i8** [[BP2]] - // CK19-DAG: store i8* [[CPVAL2:%[^,]+]], i8** [[P2]] - // CK19-DAG: [[CBPVAL2]] = bitcast double** [[SEC1]] to i8* - // CK19-DAG: [[CPVAL2]] = bitcast double* [[SEC2:%.+]] to i8* + // CK19-DAG: [[CBP2:%.+]] = bitcast i8** [[BP2]] to double*** + // CK19-DAG: [[CP2:%.+]] = bitcast i8** [[P2]] to double** + // CK19-DAG: store double** [[SEC1]], double*** [[CBP2]] + // CK19-DAG: store double* [[SEC2:%.+]], double** [[CP2]] // CK19-DAG: [[SEC2]] = getelementptr {{.*}}double* [[SEC22:[^,]+]], i{{.+}} 0 // CK19-DAG: [[SEC22]] = load double*, double** [[SEC222:%[^,]+]], // CK19-DAG: [[SEC222]] = getelementptr {{.*}}double** [[SEC2222:[^,]+]], i{{.+}} 2 @@ -2354,11 +2370,11 @@ void explicit_maps_single (int ii){ // CK19-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 // CK19-DAG: [[S0:%.+]] = getelementptr inbounds {{.+}}[[S]], i{{.+}} 0, i{{.+}} 0 - // CK19-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK19-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] + // CK19-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [11 x [12 x [13 x double]]]** + // CK19-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [13 x double]** + // CK19-DAG: store [11 x [12 x [13 x double]]]* [[VAR0:%.+]], [11 x [12 x [13 x double]]]** [[CBP0]] + // CK19-DAG: store [13 x double]* [[SEC0:%.+]], [13 x double]** [[CP0]] // CK19-DAG: store i[[Z]] [[CSVAL0:%[^,]+]], i[[Z]]* [[S0]] - // CK19-DAG: [[CBPVAL0]] = bitcast [11 x [12 x [13 x double]]]* [[VAR0:%.+]] to i8* - // CK19-DAG: [[CPVAL0]] = bitcast [13 x double]* [[SEC0:%.+]] to i8* // CK19-DAG: [[SEC0]] = getelementptr {{.+}}[12 x [13 x double]]* [[SEC00:%[^,]+]], i[[Z]] 0, i[[Z]] 0 // CK19-DAG: [[SEC00]] = getelementptr {{.+}}[11 x [12 x [13 x double]]]* [[VAR0]], i[[Z]] 0, i[[Z]] 1 // CK19-DAG: [[CSVAL0]] = mul nuw i[[Z]] %{{[^,]+}}, 104 @@ -2453,10 +2469,10 @@ void explicit_maps_references_and_function_args (int a, float b, int (&c)[10], f // CK20-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK20-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK20-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK20-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK20-DAG: [[CBPVAL0]] = bitcast i32* [[RVAR0:%.+]] to i8* - // CK20-DAG: [[CPVAL0]] = bitcast i32* [[RVAR00:%.+]] to i8* + // CK20-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to i32** + // CK20-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** + // CK20-DAG: store i32* [[RVAR0:%.+]], i32** [[CBP0]] + // CK20-DAG: store i32* [[RVAR00:%.+]], i32** [[CP0]] // CK20-DAG: [[RVAR0]] = load i32*, i32** [[VAR0:%[^,]+]] // CK20-DAG: [[RVAR00]] = load i32*, i32** [[VAR0]] @@ -2473,10 +2489,10 @@ void explicit_maps_references_and_function_args (int a, float b, int (&c)[10], f // CK20-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK20-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK20-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK20-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK20-DAG: [[CBPVAL0]] = bitcast [10 x i32]* [[RVAR0:%.+]] to i8* - // CK20-DAG: [[CPVAL0]] = bitcast i32* [[SEC0:%.+]] to i8* + // CK20-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [10 x i32]** + // CK20-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** + // CK20-DAG: store [10 x i32]* [[RVAR0:%.+]], [10 x i32]** [[CBP0]] + // CK20-DAG: store i32* [[SEC0:%.+]], i32** [[CP0]] // CK20-DAG: [[SEC0]] = getelementptr {{.*}}[10 x i32]* [[RVAR00:%.+]], i{{.+}} 0, i{{.+}} 0 // CK20-DAG: [[RVAR0]] = load [10 x i32]*, [10 x i32]** [[VAR0:%[^,]+]] // CK20-DAG: [[RVAR00]] = load [10 x i32]*, [10 x i32]** [[VAR0]] @@ -2494,10 +2510,10 @@ void explicit_maps_references_and_function_args (int a, float b, int (&c)[10], f // CK20-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK20-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK20-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK20-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK20-DAG: [[CBPVAL0]] = bitcast float* [[VAR0:%.+]] to i8* - // CK20-DAG: [[CPVAL0]] = bitcast float* [[VAR0]] to i8* + // CK20-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to float** + // CK20-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to float** + // CK20-DAG: store float* [[VAR0:%.+]], float** [[CBP0]] + // CK20-DAG: store float* [[VAR0]], float** [[CP0]] // CK20: call void [[CALL02:@.+]](float* {{[^,]+}}) #pragma omp target map(from:b) @@ -2512,10 +2528,10 @@ void explicit_maps_references_and_function_args (int a, float b, int (&c)[10], f // CK20-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK20-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK20-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK20-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK20-DAG: [[CBPVAL0]] = bitcast float* [[RVAR0:%.+]] to i8* - // CK20-DAG: [[CPVAL0]] = bitcast float* [[SEC0:%.+]] to i8* + // CK20-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to float** + // CK20-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to float** + // CK20-DAG: store float* [[RVAR0:%.+]], float** [[CBP0]] + // CK20-DAG: store float* [[SEC0:%.+]], float** [[CP0]] // CK20-DAG: [[RVAR0]] = load float*, float** [[VAR0:%[^,]+]] // CK20-DAG: [[SEC0]] = getelementptr {{.*}}float* [[RVAR00:%.+]], i{{.+}} 2 // CK20-DAG: [[RVAR00]] = load float*, float** [[VAR0]] @@ -2580,10 +2596,10 @@ struct CC { // CK21-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK21-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK21-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK21-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK21-DAG: [[CBPVAL0]] = bitcast [[ST]]* [[VAR0:%.+]] to i8* - // CK21-DAG: [[CPVAL0]] = bitcast i32* [[SEC0:%.+]] to i8* + // CK21-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[ST]]** + // CK21-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** + // CK21-DAG: store [[ST]]* [[VAR0:%.+]], [[ST]]** [[CBP0]] + // CK21-DAG: store i32* [[SEC0:%.+]], i32** [[CP0]] // CK21-DAG: [[SEC0]] = getelementptr {{.*}}[[ST]]* [[VAR0:%.+]], i{{.+}} 0, i{{.+}} 0 // CK21: call void [[CALL00:@.+]]([[ST]]* {{[^,]+}}) @@ -2599,10 +2615,10 @@ struct CC { // CK21-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK21-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK21-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK21-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK21-DAG: [[CBPVAL0]] = bitcast i32* [[RVAR0:%.+]] to i8* - // CK21-DAG: [[CPVAL0]] = bitcast i32* [[SEC0:%.+]] to i8* + // CK21-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to i32** + // CK21-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** + // CK21-DAG: store i32* [[RVAR0:%.+]], i32** [[CBP0]] + // CK21-DAG: store i32* [[SEC0:%.+]], i32** [[CP0]] // CK21-DAG: [[RVAR0]] = load i32*, i32** [[VAR0:%[^,]+]] // CK21-DAG: [[SEC0]] = getelementptr {{.*}}i32* [[RVAR00:%.+]], i{{.+}} 0 // CK21-DAG: [[RVAR00]] = load i32*, i32** [[VAR0]] @@ -2620,18 +2636,18 @@ struct CC { // CK21-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK21-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK21-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK21-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK21-DAG: [[CBPVAL0]] = bitcast [[ST]]* [[VAR0:%.+]] to i8* - // CK21-DAG: [[CPVAL0]] = bitcast float** [[SEC0:%.+]] to i8* + // CK21-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[ST]]** + // CK21-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to float*** + // CK21-DAG: store [[ST]]* [[VAR0:%.+]], [[ST]]** [[CBP0]] + // CK21-DAG: store float** [[SEC0:%.+]], float*** [[CP0]] // CK21-DAG: [[SEC0]] = getelementptr {{.*}}[[ST]]* [[VAR0]], i{{.+}} 0, i{{.+}} 2 // CK21-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1 // CK21-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1 - // CK21-DAG: store i8* [[CBPVAL1:%[^,]+]], i8** [[BP1]] - // CK21-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]] - // CK21-DAG: [[CBPVAL1]] = bitcast float** [[SEC0]] to i8* - // CK21-DAG: [[CPVAL1]] = bitcast float* [[SEC1:%.+]] to i8* + // CK21-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to float*** + // CK21-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to float** + // CK21-DAG: store float** [[SEC0]], float*** [[CBP1]] + // CK21-DAG: store float* [[SEC1:%.+]], float** [[CP1]] // CK21-DAG: [[SEC1]] = getelementptr {{.*}}float* [[RVAR1:%[^,]+]], i{{.+}} 123 // CK21-DAG: [[RVAR1]] = load float*, float** [[SEC1_:%[^,]+]] // CK21-DAG: [[SEC1_]] = getelementptr {{.*}}[[ST]]* [[VAR0]], i{{.+}} 0, i{{.+}} 2 @@ -2649,10 +2665,10 @@ struct CC { // CK21-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK21-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK21-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK21-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK21-DAG: [[CBPVAL0]] = bitcast [123 x float]* [[VAR0:%.+]] to i8* - // CK21-DAG: [[CPVAL0]] = bitcast [123 x float]* [[VAR0]] to i8* + // CK21-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [123 x float]** + // CK21-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [123 x float]** + // CK21-DAG: store [123 x float]* [[VAR0:%.+]], [123 x float]** [[CBP0]] + // CK21-DAG: store [123 x float]* [[VAR0]], [123 x float]** [[CP0]] // CK21: call void [[CALL03:@.+]]([123 x float]* {{[^,]+}}) #pragma omp target map(from:la) @@ -2667,10 +2683,10 @@ struct CC { // CK21-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK21-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK21-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK21-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK21-DAG: [[CBPVAL0]] = bitcast i32* [[VAR0:%.+]] to i8* - // CK21-DAG: [[CPVAL0]] = bitcast i32* [[VAR0]] to i8* + // CK21-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to i32** + // CK21-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** + // CK21-DAG: store i32* [[VAR0:%.+]], i32** [[CBP0]] + // CK21-DAG: store i32* [[VAR0]], i32** [[CP0]] // CK21: call void [[CALL04:@.+]](i32* {{[^,]+}}) #pragma omp target map(from:arg) @@ -2686,18 +2702,18 @@ struct CC { // CK21-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK21-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK21-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK21-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK21-DAG: [[CBPVAL0]] = bitcast [[ST]]* [[VAR0:%.+]] to i8* - // CK21-DAG: [[CPVAL0]] = bitcast i32* [[SEC0:%.+]] to i8* + // CK21-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[ST]]** + // CK21-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** + // CK21-DAG: store [[ST]]* [[VAR0:%.+]], [[ST]]** [[CBP0]] + // CK21-DAG: store i32* [[SEC0:%.+]], i32** [[CP0]] // CK21-DAG: [[SEC0]] = getelementptr {{.*}}[[ST]]* [[VAR0]], i{{.+}} 0, i{{.+}} 0 // CK21-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1 // CK21-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1 - // CK21-DAG: store i8* [[CBPVAL1:%[^,]+]], i8** [[BP1]] - // CK21-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]] - // CK21-DAG: [[CBPVAL1]] = bitcast [[ST]]* [[VAR1:%.+]] to i8* - // CK21-DAG: [[CPVAL1]] = bitcast i32* [[SEC1:%.+]] to i8* + // CK21-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to [[ST]]** + // CK21-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to i32** + // CK21-DAG: store [[ST]]* [[VAR1:%.+]], [[ST]]** [[CBP1]] + // CK21-DAG: store i32* [[SEC1:%.+]], i32** [[CP1]] // CK21-DAG: [[SEC1]] = getelementptr {{.*}}[[ST]]* [[VAR0]], i{{.+}} 0, i{{.+}} 1 // CK21: call void [[CALL05:@.+]]([[ST]]* {{[^,]+}}) @@ -2809,8 +2825,10 @@ int explicit_maps_globals(void){ // CK22-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK22-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK22-DAG: store i8* bitcast (i32* @a to i8*), i8** [[BP0]] - // CK22-DAG: store i8* bitcast (i32* @a to i8*), i8** [[P0]] + // CK22-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to i32** + // CK22-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** + // CK22-DAG: store i32* @a, i32** [[CBP0]] + // CK22-DAG: store i32* @a, i32** [[CP0]] // CK22: call void [[CALL00:@.+]](i32* {{[^,]+}}) #pragma omp target map(a) @@ -2823,8 +2841,10 @@ int explicit_maps_globals(void){ // CK22-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK22-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK22-DAG: store i8* bitcast ([100 x i32]* @c to i8*), i8** [[BP0]] - // CK22-DAG: store i8* bitcast ([100 x i32]* @c to i8*), i8** [[P0]] + // CK22-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [100 x i32]** + // CK22-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [100 x i32]** + // CK22-DAG: store [100 x i32]* @c, [100 x i32]** [[CBP0]] + // CK22-DAG: store [100 x i32]* @c, [100 x i32]** [[CP0]] // CK22: call void [[CALL01:@.+]]([100 x i32]* {{[^,]+}}) #pragma omp target map(c) @@ -2837,8 +2857,10 @@ int explicit_maps_globals(void){ // CK22-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK22-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK22-DAG: store i8* bitcast (i32** @d to i8*), i8** [[BP0]] - // CK22-DAG: store i8* bitcast (i32** @d to i8*), i8** [[P0]] + // CK22-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to i32*** + // CK22-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32*** + // CK22-DAG: store i32** @d, i32*** [[CBP0]] + // CK22-DAG: store i32** @d, i32*** [[CP0]] // CK22: call void [[CALL02:@.+]](i32** {{[^,]+}}) #pragma omp target map(d) @@ -2851,8 +2873,10 @@ int explicit_maps_globals(void){ // CK22-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK22-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK22-DAG: store i8* bitcast ([100 x i32]* @c to i8*), i8** [[BP0]] - // CK22-DAG: store i8* bitcast (i32* getelementptr inbounds ([100 x i32], [100 x i32]* @c, i{{.+}} 0, i{{.+}} 1) to i8*), i8** [[P0]] + // CK22-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [100 x i32]** + // CK22-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** + // CK22-DAG: store [100 x i32]* @c, [100 x i32]** [[CBP0]] + // CK22-DAG: store i32* getelementptr inbounds ([100 x i32], [100 x i32]* @c, i{{.+}} 0, i{{.+}} 1), i32** [[CP0]] // CK22: call void [[CALL03:@.+]]([100 x i32]* {{[^,]+}}) #pragma omp target map(c[1:4]) @@ -2865,10 +2889,10 @@ int explicit_maps_globals(void){ // CK22-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK22-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK22-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK22-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK22-DAG: [[CBPVAL0]] = bitcast i32* [[RVAR0:%.+]] to i8* - // CK22-DAG: [[CPVAL0]] = bitcast i32* [[SEC0:%.+]] to i8* + // CK22-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to i32** + // CK22-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** + // CK22-DAG: store i32* [[RVAR0:%.+]], i32** [[CBP0]] + // CK22-DAG: store i32* [[SEC0:%.+]], i32** [[CP0]] // CK22-DAG: [[RVAR0]] = load i32*, i32** @d // CK22-DAG: [[SEC0]] = getelementptr {{.*}}i32* [[RVAR00:%.+]], i{{.+}} 2 // CK22-DAG: [[RVAR00]] = load i32*, i32** @d @@ -2884,8 +2908,10 @@ int explicit_maps_globals(void){ // CK22-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK22-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK22-DAG: store i8* bitcast ([[ST]]* @sa to i8*), i8** [[BP0]] - // CK22-DAG: store i8* bitcast ([[ST]]* @sa to i8*), i8** [[P0]] + // CK22-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[ST]]** + // CK22-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [[ST]]** + // CK22-DAG: store [[ST]]* @sa, [[ST]]** [[CBP0]] + // CK22-DAG: store [[ST]]* @sa, [[ST]]** [[CP0]] // CK22: call void [[CALL05:@.+]]([[ST]]* {{[^,]+}}) #pragma omp target map(sa) @@ -2898,8 +2924,10 @@ int explicit_maps_globals(void){ // CK22-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK22-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK22-DAG: store i8* bitcast ([100 x [[ST]]]* @sc to i8*), i8** [[BP0]] - // CK22-DAG: store i8* bitcast ([100 x [[ST]]]* @sc to i8*), i8** [[P0]] + // CK22-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [100 x [[ST]]]** + // CK22-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [100 x [[ST]]]** + // CK22-DAG: store [100 x [[ST]]]* @sc, [100 x [[ST]]]** [[CBP0]] + // CK22-DAG: store [100 x [[ST]]]* @sc, [100 x [[ST]]]** [[CP0]] // CK22: call void [[CALL06:@.+]]([100 x [[ST]]]* {{[^,]+}}) #pragma omp target map(sc) @@ -2912,8 +2940,10 @@ int explicit_maps_globals(void){ // CK22-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK22-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK22-DAG: store i8* bitcast ([[ST]]** @sd to i8*), i8** [[BP0]] - // CK22-DAG: store i8* bitcast ([[ST]]** @sd to i8*), i8** [[P0]] + // CK22-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[ST]]*** + // CK22-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [[ST]]*** + // CK22-DAG: store [[ST]]** @sd, [[ST]]*** [[CBP0]] + // CK22-DAG: store [[ST]]** @sd, [[ST]]*** [[CP0]] // CK22: call void [[CALL07:@.+]]([[ST]]** {{[^,]+}}) #pragma omp target map(sd) @@ -2926,8 +2956,10 @@ int explicit_maps_globals(void){ // CK22-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK22-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK22-DAG: store i8* bitcast ([100 x [[ST]]]* @sc to i8*), i8** [[BP0]] - // CK22-DAG: store i8* bitcast ([[ST]]* getelementptr inbounds ([100 x [[ST]]], [100 x [[ST]]]* @sc, i{{.+}} 0, i{{.+}} 1) to i8*), i8** [[P0]] + // CK22-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [100 x [[ST]]]** + // CK22-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [[ST]]** + // CK22-DAG: store [100 x [[ST]]]* @sc, [100 x [[ST]]]** [[CBP0]] + // CK22-DAG: store [[ST]]* getelementptr inbounds ([100 x [[ST]]], [100 x [[ST]]]* @sc, i{{.+}} 0, i{{.+}} 1), [[ST]]** [[CP0]] // CK22: call void [[CALL08:@.+]]([100 x [[ST]]]* {{[^,]+}}) #pragma omp target map(sc[1:4]) @@ -2940,10 +2972,10 @@ int explicit_maps_globals(void){ // CK22-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK22-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK22-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK22-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK22-DAG: [[CBPVAL0]] = bitcast [[ST]]* [[RVAR0:%.+]] to i8* - // CK22-DAG: [[CPVAL0]] = bitcast [[ST]]* [[SEC0:%.+]] to i8* + // CK22-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[ST]]** + // CK22-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [[ST]]** + // CK22-DAG: store [[ST]]* [[RVAR0:%.+]], [[ST]]** [[CBP0]] + // CK22-DAG: store [[ST]]* [[SEC0:%.+]], [[ST]]** [[CP0]] // CK22-DAG: [[RVAR0]] = load [[ST]]*, [[ST]]** @sd // CK22-DAG: [[SEC0]] = getelementptr {{.*}}[[ST]]* [[RVAR00:%.+]], i{{.+}} 2 // CK22-DAG: [[RVAR00]] = load [[ST]]*, [[ST]]** @sd @@ -2959,8 +2991,10 @@ int explicit_maps_globals(void){ // CK22-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK22-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK22-DAG: store i8* bitcast ([[STT]]* @sta to i8*), i8** [[BP0]] - // CK22-DAG: store i8* bitcast ([[STT]]* @sta to i8*), i8** [[P0]] + // CK22-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[STT]]** + // CK22-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [[STT]]** + // CK22-DAG: store [[STT]]* @sta, [[STT]]** [[CBP0]] + // CK22-DAG: store [[STT]]* @sta, [[STT]]** [[CP0]] // CK22: call void [[CALL10:@.+]]([[STT]]* {{[^,]+}}) #pragma omp target map(sta) @@ -2973,8 +3007,10 @@ int explicit_maps_globals(void){ // CK22-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK22-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK22-DAG: store i8* bitcast ([100 x [[STT]]]* @stc to i8*), i8** [[BP0]] - // CK22-DAG: store i8* bitcast ([100 x [[STT]]]* @stc to i8*), i8** [[P0]] + // CK22-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [100 x [[STT]]]** + // CK22-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [100 x [[STT]]]** + // CK22-DAG: store [100 x [[STT]]]* @stc, [100 x [[STT]]]** [[CBP0]] + // CK22-DAG: store [100 x [[STT]]]* @stc, [100 x [[STT]]]** [[CP0]] // CK22: call void [[CALL11:@.+]]([100 x [[STT]]]* {{[^,]+}}) #pragma omp target map(stc) @@ -2987,8 +3023,10 @@ int explicit_maps_globals(void){ // CK22-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK22-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK22-DAG: store i8* bitcast ([[STT]]** @std to i8*), i8** [[BP0]] - // CK22-DAG: store i8* bitcast ([[STT]]** @std to i8*), i8** [[P0]] + // CK22-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[STT]]*** + // CK22-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [[STT]]*** + // CK22-DAG: store [[STT]]** @std, [[STT]]*** [[CBP0]] + // CK22-DAG: store [[STT]]** @std, [[STT]]*** [[CP0]] // CK22: call void [[CALL12:@.+]]([[STT]]** {{[^,]+}}) #pragma omp target map(std) @@ -3001,8 +3039,10 @@ int explicit_maps_globals(void){ // CK22-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK22-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK22-DAG: store i8* bitcast ([100 x [[STT]]]* @stc to i8*), i8** [[BP0]] - // CK22-DAG: store i8* bitcast ([[STT]]* getelementptr inbounds ([100 x [[STT]]], [100 x [[STT]]]* @stc, i{{.+}} 0, i{{.+}} 1) to i8*), i8** [[P0]] + // CK22-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [100 x [[STT]]]** + // CK22-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [[STT]]** + // CK22-DAG: store [100 x [[STT]]]* @stc, [100 x [[STT]]]** [[CBP0]] + // CK22-DAG: store [[STT]]* getelementptr inbounds ([100 x [[STT]]], [100 x [[STT]]]* @stc, i{{.+}} 0, i{{.+}} 1), [[STT]]** [[CP0]] // CK22: call void [[CALL13:@.+]]([100 x [[STT]]]* {{[^,]+}}) #pragma omp target map(stc[1:4]) @@ -3015,10 +3055,10 @@ int explicit_maps_globals(void){ // CK22-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK22-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK22-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK22-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK22-DAG: [[CBPVAL0]] = bitcast [[STT]]* [[RVAR0:%.+]] to i8* - // CK22-DAG: [[CPVAL0]] = bitcast [[STT]]* [[SEC0:%.+]] to i8* + // CK22-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[STT]]** + // CK22-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [[STT]]** + // CK22-DAG: store [[STT]]* [[RVAR0:%.+]], [[STT]]** [[CBP0]] + // CK22-DAG: store [[STT]]* [[SEC0:%.+]], [[STT]]** [[CP0]] // CK22-DAG: [[RVAR0]] = load [[STT]]*, [[STT]]** @std // CK22-DAG: [[SEC0]] = getelementptr {{.*}}[[STT]]* [[RVAR00:%.+]], i{{.+}} 2 // CK22-DAG: [[RVAR00]] = load [[STT]]*, [[STT]]** @std @@ -3088,10 +3128,10 @@ int explicit_maps_inside_captured(int a){ // CK23-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK23-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK23-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK23-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK23-DAG: [[CBPVAL0]] = bitcast i32* [[VAR0:%.+]] to i8* - // CK23-DAG: [[CPVAL0]] = bitcast i32* [[VAR00:%.+]] to i8* + // CK23-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to i32** + // CK23-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** + // CK23-DAG: store i32* [[VAR0:%.+]], i32** [[CBP0]] + // CK23-DAG: store i32* [[VAR00:%.+]], i32** [[CP0]] // CK23-DAG: [[VAR0]] = load i32*, i32** [[CAP0:%[^,]+]] // CK23-DAG: [[CAP0]] = getelementptr inbounds [[SA]], [[SA]] // CK23-DAG: [[VAR00]] = load i32*, i32** [[CAP00:%[^,]+]] @@ -3107,10 +3147,10 @@ int explicit_maps_inside_captured(int a){ // CK23-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK23-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK23-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK23-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK23-DAG: [[CBPVAL0]] = bitcast float* [[VAR0:%.+]] to i8* - // CK23-DAG: [[CPVAL0]] = bitcast float* [[VAR00:%.+]] to i8* + // CK23-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to float** + // CK23-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to float** + // CK23-DAG: store float* [[VAR0:%.+]], float** [[CBP0]] + // CK23-DAG: store float* [[VAR00:%.+]], float** [[CP0]] // CK23-DAG: [[VAR0]] = load float*, float** [[CAP0:%[^,]+]] // CK23-DAG: [[CAP0]] = getelementptr inbounds [[SA]], [[SA]] // CK23-DAG: [[VAR00]] = load float*, float** [[CAP00:%[^,]+]] @@ -3126,10 +3166,10 @@ int explicit_maps_inside_captured(int a){ // CK23-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK23-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK23-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK23-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK23-DAG: [[CBPVAL0]] = bitcast [100 x float]* [[VAR0:%.+]] to i8* - // CK23-DAG: [[CPVAL0]] = bitcast [100 x float]* [[VAR00:%.+]] to i8* + // CK23-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [100 x float]** + // CK23-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [100 x float]** + // CK23-DAG: store [100 x float]* [[VAR0:%.+]], [100 x float]** [[CBP0]] + // CK23-DAG: store [100 x float]* [[VAR00:%.+]], [100 x float]** [[CP0]] // CK23-DAG: [[VAR0]] = load [100 x float]*, [100 x float]** [[CAP0:%[^,]+]] // CK23-DAG: [[CAP0]] = getelementptr inbounds [[SA]], [[SA]] // CK23-DAG: [[VAR00]] = load [100 x float]*, [100 x float]** [[CAP00:%[^,]+]] @@ -3146,10 +3186,10 @@ int explicit_maps_inside_captured(int a){ // CK23-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK23-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK23-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK23-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK23-DAG: [[CBPVAL0]] = bitcast float** [[VAR0:%.+]] to i8* - // CK23-DAG: [[CPVAL0]] = bitcast float** [[VAR00:%.+]] to i8* + // CK23-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to float*** + // CK23-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to float*** + // CK23-DAG: store float** [[VAR0:%.+]], float*** [[CBP0]] + // CK23-DAG: store float** [[VAR00:%.+]], float*** [[CP0]] // CK23-DAG: [[VAR0]] = load float**, float*** [[CAP0:%[^,]+]] // CK23-DAG: [[CAP0]] = getelementptr inbounds [[SA]], [[SA]] // CK23-DAG: [[VAR00]] = load float**, float*** [[CAP00:%[^,]+]] @@ -3165,10 +3205,10 @@ int explicit_maps_inside_captured(int a){ // CK23-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK23-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK23-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK23-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK23-DAG: [[CBPVAL0]] = bitcast [100 x float]* [[VAR0:%.+]] to i8* - // CK23-DAG: [[CPVAL0]] = bitcast float* [[SEC0:%.+]] to i8* + // CK23-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [100 x float]** + // CK23-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to float** + // CK23-DAG: store [100 x float]* [[VAR0:%.+]], [100 x float]** [[CBP0]] + // CK23-DAG: store float* [[SEC0:%.+]], float** [[CP0]] // CK23-DAG: [[SEC0]] = getelementptr {{.*}}[100 x float]* [[VAR00:%.+]], i{{.+}} 0, i{{.+}} 2 // CK23-DAG: [[VAR0]] = load [100 x float]*, [100 x float]** [[CAP0:%[^,]+]] // CK23-DAG: [[CAP0]] = getelementptr inbounds [[SA]], [[SA]] @@ -3186,10 +3226,10 @@ int explicit_maps_inside_captured(int a){ // CK23-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK23-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK23-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK23-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK23-DAG: [[CBPVAL0]] = bitcast float* [[RVAR0:%.+]] to i8* - // CK23-DAG: [[CPVAL0]] = bitcast float* [[SEC0:%.+]] to i8* + // CK23-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to float** + // CK23-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to float** + // CK23-DAG: store float* [[RVAR0:%.+]], float** [[CBP0]] + // CK23-DAG: store float* [[SEC0:%.+]], float** [[CP0]] // CK23-DAG: [[RVAR0]] = load float*, float** [[VAR0:%[^,]+]] // CK23-DAG: [[SEC0]] = getelementptr {{.*}}float* [[RVAR00:%.+]], i{{.+}} 2 // CK23-DAG: [[RVAR00]] = load float*, float** [[VAR00:%[^,]+]] @@ -3328,10 +3368,10 @@ int explicit_maps_struct_fields(int a){ // CK24-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK24-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 -// CK24-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] -// CK24-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] -// CK24-DAG: [[CBPVAL0]] = bitcast [[SC]]* [[VAR0:%.+]] to i8* -// CK24-DAG: [[CPVAL0]] = bitcast i32* [[SEC0:%.+]] to i8* +// CK24-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[SC]]** +// CK24-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** +// CK24-DAG: store [[SC]]* [[VAR0:%.+]], [[SC]]** [[CBP0]] +// CK24-DAG: store i32* [[SEC0:%.+]], i32** [[CP0]] // CK24-DAG: [[SEC0]] = getelementptr {{.*}}[[SC]]* [[VAR0]], i{{.+}} 0, i{{.+}} 0 // CK24: call void [[CALL01:@.+]]([[SC]]* {{[^,]+}}) @@ -3345,10 +3385,10 @@ int explicit_maps_struct_fields(int a){ // CK24-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK24-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 -// CK24-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] -// CK24-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] -// CK24-DAG: [[CBPVAL0]] = bitcast [[SC]]* [[VAR0:%.+]] to i8* -// CK24-DAG: [[CPVAL0]] = bitcast [[SA]]* [[SEC0:%.+]] to i8* +// CK24-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[SC]]** +// CK24-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [[SA]]** +// CK24-DAG: store [[SC]]* [[VAR0:%.+]], [[SC]]** [[CBP0]] +// CK24-DAG: store [[SA]]* [[SEC0:%.+]], [[SA]]** [[CP0]] // CK24-DAG: [[SEC0]] = getelementptr {{.*}}[[SB]]* [[SEC00:%[^,]+]], i{{.+}} 0, i{{.+}} 1 // CK24-DAG: [[SEC00]] = getelementptr {{.*}}[[SC]]* [[VAR0]], i{{.+}} 0, i{{.+}} 1 @@ -3363,10 +3403,10 @@ int explicit_maps_struct_fields(int a){ // CK24-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK24-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 -// CK24-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] -// CK24-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] -// CK24-DAG: [[CBPVAL0]] = bitcast [[SC]]* [[VAR0:%.+]] to i8* -// CK24-DAG: [[CPVAL0]] = bitcast i32* [[SEC0:%.+]] to i8* +// CK24-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[SC]]** +// CK24-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** +// CK24-DAG: store [[SC]]* [[VAR0:%.+]], [[SC]]** [[CBP0]] +// CK24-DAG: store i32* [[SEC0:%.+]], i32** [[CP0]] // CK24-DAG: [[SEC0]] = getelementptr {{.*}}[[SA]]* [[SEC00:%[^,]+]], i{{.+}} 0, i{{.+}} 0 // CK24-DAG: [[SEC00]] = getelementptr {{.*}}[[SB]]* [[SEC000:%[^,]+]], i{{.+}} 0, i{{.+}} 1 // CK24-DAG: [[SEC000]] = getelementptr {{.*}}[[SC]]* [[VAR0]], i{{.+}} 0, i{{.+}} 1 @@ -3382,10 +3422,10 @@ int explicit_maps_struct_fields(int a){ // CK24-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK24-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 -// CK24-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] -// CK24-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] -// CK24-DAG: [[CBPVAL0]] = bitcast [[SC]]* [[VAR0:%.+]] to i8* -// CK24-DAG: [[CPVAL0]] = bitcast i32* [[SEC0:%.+]] to i8* +// CK24-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[SC]]** +// CK24-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** +// CK24-DAG: store [[SC]]* [[VAR0:%.+]], [[SC]]** [[CBP0]] +// CK24-DAG: store i32* [[SEC0:%.+]], i32** [[CP0]] // CK24-DAG: [[SEC0]] = getelementptr {{.*}}[10 x i32]* [[SEC00:%[^,]+]], i{{.+}} 0, i{{.+}} 0 // CK24-DAG: [[SEC00]] = getelementptr {{.*}}[[SC]]* [[VAR0]], i{{.+}} 0, i{{.+}} 3 @@ -3400,18 +3440,18 @@ int explicit_maps_struct_fields(int a){ // CK24-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK24-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 -// CK24-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] -// CK24-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] -// CK24-DAG: [[CBPVAL0]] = bitcast [[SC]]* [[VAR0:%.+]] to i8* -// CK24-DAG: [[CPVAL0]] = bitcast [[SB]]** [[SEC0:%.+]] to i8* +// CK24-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[SC]]** +// CK24-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [[SB]]*** +// CK24-DAG: store [[SC]]* [[VAR0:%.+]], [[SC]]** [[CBP0]] +// CK24-DAG: store [[SB]]** [[SEC0:%.+]], [[SB]]*** [[CP0]] // CK24-DAG: [[SEC0]] = getelementptr {{.*}}[[SC]]* [[VAR0]], i{{.+}} 0, i{{.+}} 2 // CK24-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1 // CK24-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1 -// CK24-DAG: store i8* [[CBPVAL1:%[^,]+]], i8** [[BP1]] -// CK24-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]] -// CK24-DAG: [[CBPVAL1]] = bitcast [[SB]]** [[SEC0]] to i8* -// CK24-DAG: [[CPVAL1]] = bitcast [[SB]]* [[SEC1:%.+]] to i8* +// CK24-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to [[SB]]*** +// CK24-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to [[SB]]** +// CK24-DAG: store [[SB]]** [[SEC0]], [[SB]]*** [[CBP1]] +// CK24-DAG: store [[SB]]* [[SEC1:%.+]], [[SB]]** [[CP1]] // CK24-DAG: [[SEC1]] = getelementptr {{.*}}[[SB]]* [[SEC11:%[^,]+]], i{{.+}} 0 // CK24-DAG: [[SEC11]] = load [[SB]]*, [[SB]]** [[SEC111:%[^,]+]], // CK24-DAG: [[SEC111]] = getelementptr {{.*}}[[SC]]* [[VAR0]], i{{.+}} 0, i{{.+}} 2 @@ -3427,10 +3467,10 @@ int explicit_maps_struct_fields(int a){ // CK24-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK24-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 -// CK24-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] -// CK24-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] -// CK24-DAG: [[CBPVAL0]] = bitcast [[SC]]* [[VAR0:%.+]] to i8* -// CK24-DAG: [[CPVAL0]] = bitcast i32* [[SEC0:%.+]] to i8* +// CK24-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[SC]]** +// CK24-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** +// CK24-DAG: store [[SC]]* [[VAR0:%.+]], [[SC]]** [[CBP0]] +// CK24-DAG: store i32* [[SEC0:%.+]], i32** [[CP0]] // CK24-DAG: [[SEC0]] = getelementptr {{.*}}[[SA]]* [[SEC00:%[^,]+]], i{{.+}} 0, i{{.+}} 0 // CK24-DAG: [[SEC00]] = getelementptr {{.*}}[10 x [[SA]]]* [[SEC000:%[^,]+]], i{{.+}} 0, i{{.+}} 3 // CK24-DAG: [[SEC000]] = getelementptr {{.*}}[[SB]]* [[SEC0000:%[^,]+]], i{{.+}} 0, i{{.+}} 2 @@ -3447,20 +3487,20 @@ int explicit_maps_struct_fields(int a){ // CK24-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK24-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 -// CK24-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] -// CK24-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] -// CK24-DAG: [[CBPVAL0]] = bitcast [[SC]]* [[VAR0:%.+]] to i8* -// CK24-DAG: [[CPVAL0]] = bitcast [[SA]]** [[SEC0:%.+]] to i8* +// CK24-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[SC]]** +// CK24-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [[SA]]*** +// CK24-DAG: store [[SC]]* [[VAR0:%.+]], [[SC]]** [[CBP0]] +// CK24-DAG: store [[SA]]** [[SEC0:%.+]], [[SA]]*** [[CP0]] // CK24-DAG: [[SEC0]] = getelementptr {{.*}}[10 x [[SA]]*]* [[SEC00:%[^,]+]], i{{.+}} 0, i{{.+}} 3 // CK24-DAG: [[SEC00]] = getelementptr {{.*}}[[SB]]* [[SEC000:%[^,]+]], i{{.+}} 0, i{{.+}} 3 // CK24-DAG: [[SEC000]] = getelementptr {{.*}}[[SC]]* [[VAR0]], i{{.+}} 0, i{{.+}} 1 // CK24-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1 // CK24-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1 -// CK24-DAG: store i8* [[CBPVAL1:%[^,]+]], i8** [[BP1]] -// CK24-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]] -// CK24-DAG: [[CBPVAL1]] = bitcast [[SA]]** [[SEC0]] to i8* -// CK24-DAG: [[CPVAL1]] = bitcast i32* [[SEC1:%.+]] to i8* +// CK24-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to [[SA]]*** +// CK24-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to i32** +// CK24-DAG: store [[SA]]** [[SEC0]], [[SA]]*** [[CBP1]] +// CK24-DAG: store i32* [[SEC1:%.+]], i32** [[CP1]] // CK24-DAG: [[SEC1]] = getelementptr {{.*}}[[SA]]* [[SEC11:%[^,]+]], i{{.+}} 0, i{{.+}} 0 // CK24-DAG: [[SEC11]] = load [[SA]]*, [[SA]]** [[SEC111:%[^,]+]], // CK24-DAG: [[SEC111]] = getelementptr {{.*}}[10 x [[SA]]*]* [[SEC1111:%[^,]+]], i{{.+}} 0, i{{.+}} 3 @@ -3478,18 +3518,18 @@ int explicit_maps_struct_fields(int a){ // CK24-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK24-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 -// CK24-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] -// CK24-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] -// CK24-DAG: [[CBPVAL0]] = bitcast [[SC]]* [[VAR0:%.+]] to i8* -// CK24-DAG: [[CPVAL0]] = bitcast [[SB]]** [[SEC0:%.+]] to i8* +// CK24-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[SC]]** +// CK24-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [[SB]]*** +// CK24-DAG: store [[SC]]* [[VAR0:%.+]], [[SC]]** [[CBP0]] +// CK24-DAG: store [[SB]]** [[SEC0:%.+]], [[SB]]*** [[CP0]] // CK24-DAG: [[SEC0]] = getelementptr {{.*}}[[SC]]* [[VAR0]], i{{.+}} 0, i{{.+}} 2 // CK24-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1 // CK24-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1 -// CK24-DAG: store i8* [[CBPVAL1:%[^,]+]], i8** [[BP1]] -// CK24-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]] -// CK24-DAG: [[CBPVAL1]] = bitcast [[SB]]** [[SEC0]] to i8* -// CK24-DAG: [[CPVAL1]] = bitcast i32* [[SEC1:%.+]] to i8* +// CK24-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to [[SB]]*** +// CK24-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to i32** +// CK24-DAG: store [[SB]]** [[SEC0]], [[SB]]*** [[CBP1]] +// CK24-DAG: store i32* [[SEC1:%.+]], i32** [[CP1]] // CK24-DAG: [[SEC1]] = getelementptr {{.*}}[[SB]]* [[SEC11:%[^,]+]], i{{.+}} 0 // CK24-DAG: [[SEC11]] = load [[SB]]*, [[SB]]** [[SEC111:%[^,]+]], // CK24-DAG: [[SEC111]] = getelementptr {{.*}}[[SC]]* [[VAR0]], i{{.+}} 0, i{{.+}} 2 @@ -3505,19 +3545,19 @@ int explicit_maps_struct_fields(int a){ // CK24-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK24-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 -// CK24-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] -// CK24-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] -// CK24-DAG: [[CBPVAL0]] = bitcast [[SC]]* [[VAR0:%.+]] to i8* -// CK24-DAG: [[CPVAL0]] = bitcast [[SA]]** [[SEC0:%.+]] to i8* +// CK24-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[SC]]** +// CK24-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [[SA]]*** +// CK24-DAG: store [[SC]]* [[VAR0:%.+]], [[SC]]** [[CBP0]] +// CK24-DAG: store [[SA]]** [[SEC0:%.+]], [[SA]]*** [[CP0]] // CK24-DAG: [[SEC0]] = getelementptr {{.*}}[[SB]]* [[SEC00:[^,]+]], i{{.+}} 0, i{{.+}} 4 // CK24-DAG: [[SEC00]] = getelementptr {{.*}}[[SC]]* [[VAR0]], i{{.+}} 0, i{{.+}} 1 // CK24-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1 // CK24-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1 -// CK24-DAG: store i8* [[CBPVAL1:%[^,]+]], i8** [[BP1]] -// CK24-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]] -// CK24-DAG: [[CBPVAL1]] = bitcast [[SA]]** [[SEC0]] to i8* -// CK24-DAG: [[CPVAL1]] = bitcast i32* [[SEC1:%.+]] to i8* +// CK24-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to [[SA]]*** +// CK24-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to i32** +// CK24-DAG: store [[SA]]** [[SEC0]], [[SA]]*** [[CBP1]] +// CK24-DAG: store i32* [[SEC1:%.+]], i32** [[CP1]] // CK24-DAG: [[SEC1]] = getelementptr {{.*}}[[SA]]* [[SEC11:%[^,]+]], i{{.+}} 0 // CK24-DAG: [[SEC11]] = load [[SA]]*, [[SA]]** [[SEC111:%[^,]+]], // CK24-DAG: [[SEC111]] = getelementptr {{.*}}[[SB]]* [[SEC1111:[^,]+]], i{{.+}} 0, i{{.+}} 4 @@ -3534,10 +3574,10 @@ int explicit_maps_struct_fields(int a){ // CK24-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK24-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 -// CK24-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] -// CK24-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] -// CK24-DAG: [[CBPVAL0]] = bitcast [[SC]]* [[VAR0:%.+]] to i8* -// CK24-DAG: [[CPVAL0]] = bitcast i32* [[SEC0:%.+]] to i8* +// CK24-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[SC]]** +// CK24-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** +// CK24-DAG: store [[SC]]* [[VAR0:%.+]], [[SC]]** [[CBP0]] +// CK24-DAG: store i32* [[SEC0:%.+]], i32** [[CP0]] // CK24-DAG: [[SEC0]] = getelementptr {{.*}}[10 x i32]* [[SEC00:%[^,]+]], i{{.+}} 0, i{{.+}} 0 // CK24-DAG: [[SEC00]] = getelementptr {{.*}}[[SA]]* [[SEC000:%[^,]+]], i{{.+}} 0, i{{.+}} 2 // CK24-DAG: [[SEC000]] = getelementptr {{.*}}[[SB]]* [[SEC0000:%[^,]+]], i{{.+}} 0, i{{.+}} 1 @@ -3554,19 +3594,19 @@ int explicit_maps_struct_fields(int a){ // CK24-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK24-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 -// CK24-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] -// CK24-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] -// CK24-DAG: [[CBPVAL0]] = bitcast [[SC]]* [[VAR0:%.+]] to i8* -// CK24-DAG: [[CPVAL0]] = bitcast [[SA]]** [[SEC0:%.+]] to i8* +// CK24-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[SC]]** +// CK24-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [[SA]]*** +// CK24-DAG: store [[SC]]* [[VAR0:%.+]], [[SC]]** [[CBP0]] +// CK24-DAG: store [[SA]]** [[SEC0:%.+]], [[SA]]*** [[CP0]] // CK24-DAG: [[SEC0]] = getelementptr {{.*}}[[SB]]* [[SEC00:%[^,]+]], i{{.+}} 0, i{{.+}} 4 // CK24-DAG: [[SEC00]] = getelementptr {{.*}}[[SC]]* [[VAR0]], i{{.+}} 0, i{{.+}} 1 // CK24-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1 // CK24-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1 -// CK24-DAG: store i8* [[CBPVAL1:%[^,]+]], i8** [[BP1]] -// CK24-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]] -// CK24-DAG: [[CBPVAL1]] = bitcast [[SA]]** [[SEC0]] to i8* -// CK24-DAG: [[CPVAL1]] = bitcast i32* [[SEC1:%.+]] to i8* +// CK24-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to [[SA]]*** +// CK24-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to i32** +// CK24-DAG: store [[SA]]** [[SEC0]], [[SA]]*** [[CBP1]] +// CK24-DAG: store i32* [[SEC1:%.+]], i32** [[CP1]] // CK24-DAG: [[SEC1]] = getelementptr {{.*}}[10 x i32]* [[SEC11:%[^,]+]], i{{.+}} 0, i{{.+}} 0 // CK24-DAG: [[SEC11]] = getelementptr {{.*}}[[SA]]* [[SEC111:%[^,]+]], i{{.+}} 0, i{{.+}} 2 // CK24-DAG: [[SEC111]] = load [[SA]]*, [[SA]]** [[SEC1111:%[^,]+]], @@ -3584,28 +3624,28 @@ int explicit_maps_struct_fields(int a){ // CK24-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK24-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 -// CK24-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] -// CK24-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] -// CK24-DAG: [[CBPVAL0]] = bitcast [[SC]]* [[VAR0:%.+]] to i8* -// CK24-DAG: [[CPVAL0]] = bitcast [[SB]]** [[SEC0:%.+]] to i8* +// CK24-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[SC]]** +// CK24-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [[SB]]*** +// CK24-DAG: store [[SC]]* [[VAR0:%.+]], [[SC]]** [[CBP0]] +// CK24-DAG: store [[SB]]** [[SEC0:%.+]], [[SB]]*** [[CP0]] // CK24-DAG: [[SEC0]] = getelementptr {{.*}}[[SC]]* [[VAR0]], i{{.+}} 0, i{{.+}} 2 // CK24-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1 // CK24-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1 -// CK24-DAG: store i8* [[CBPVAL1:%[^,]+]], i8** [[BP1]] -// CK24-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]] -// CK24-DAG: [[CBPVAL1]] = bitcast [[SB]]** [[SEC0]] to i8* -// CK24-DAG: [[CPVAL1]] = bitcast [[SA]]** [[SEC1:%.+]] to i8* +// CK24-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to [[SB]]*** +// CK24-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to [[SA]]*** +// CK24-DAG: store [[SB]]** [[SEC0:%.+]], [[SB]]*** [[CBP1]] +// CK24-DAG: store [[SA]]** [[SEC1:%.+]], [[SA]]*** [[CP1]] // CK24-DAG: [[SEC1]] = getelementptr {{.*}}[[SB]]* [[SEC11:%[^,]+]], i{{.+}} 0, i{{.+}} 4 // CK24-DAG: [[SEC11]] = load [[SB]]*, [[SB]]** [[SEC111:%[^,]+]], // CK24-DAG: [[SEC111]] = getelementptr {{.*}}[[SC]]* [[VAR0]], i{{.+}} 0, i{{.+}} 2 // CK24-DAG: [[BP2:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 2 // CK24-DAG: [[P2:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 2 -// CK24-DAG: store i8* [[CBPVAL2:%[^,]+]], i8** [[BP2]] -// CK24-DAG: store i8* [[CPVAL2:%[^,]+]], i8** [[P2]] -// CK24-DAG: [[CBPVAL2]] = bitcast [[SA]]** [[SEC1]] to i8* -// CK24-DAG: [[CPVAL2]] = bitcast [[SA]]** [[SEC2:%.+]] to i8* +// CK24-DAG: [[CBP2:%.+]] = bitcast i8** [[BP2]] to [[SA]]*** +// CK24-DAG: [[CP2:%.+]] = bitcast i8** [[P2]] to [[SA]]*** +// CK24-DAG: store [[SA]]** [[SEC1:%.+]], [[SA]]*** [[CBP2]] +// CK24-DAG: store [[SA]]** [[SEC2:%.+]], [[SA]]*** [[CP2]] // CK24-DAG: [[SEC2]] = getelementptr {{.*}}[[SA]]* [[SEC22:%[^,]+]], i{{.+}} 0, i{{.+}} 1 // CK24-DAG: [[SEC22]] = load [[SA]]*, [[SA]]** [[SEC222:%[^,]+]], // CK24-DAG: [[SEC222]] = getelementptr {{.*}}[[SB]]* [[SEC2222:%[^,]+]], i{{.+}} 0, i{{.+}} 4 @@ -3614,10 +3654,10 @@ int explicit_maps_struct_fields(int a){ // CK24-DAG: [[BP3:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 3 // CK24-DAG: [[P3:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 3 -// CK24-DAG: store i8* [[CBPVAL3:%[^,]+]], i8** [[BP3]] -// CK24-DAG: store i8* [[CPVAL3:%[^,]+]], i8** [[P3]] -// CK24-DAG: [[CBPVAL3]] = bitcast [[SA]]** [[SEC2]] to i8* -// CK24-DAG: [[CPVAL3]] = bitcast i32* [[SEC3:%.+]] to i8* +// CK24-DAG: [[CBP3:%.+]] = bitcast i8** [[BP3]] to [[SA]]*** +// CK24-DAG: [[CP3:%.+]] = bitcast i8** [[P3]] to i32** +// CK24-DAG: store [[SA]]** [[SEC2]], [[SA]]*** [[CBP3]] +// CK24-DAG: store i32* [[SEC3:%.+]], i32** [[CP3]] // CK24-DAG: [[SEC3]] = getelementptr {{.*}}[[SA]]* [[SEC33:%[^,]+]], i{{.+}} 0, i{{.+}} 0 // CK24-DAG: [[SEC33]] = load [[SA]]*, [[SA]]** [[SEC333:%[^,]+]], // CK24-DAG: [[SEC333]] = getelementptr {{.*}}[[SA]]* [[SEC3333:%[^,]+]], i{{.+}} 0, i{{.+}} 1 @@ -3640,10 +3680,10 @@ int explicit_maps_struct_fields(int a){ // CK24-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK24-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 -// CK24-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] -// CK24-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] -// CK24-DAG: [[CBPVAL0]] = bitcast [[SC]]* [[VAR0:%.+]] to i8* -// CK24-DAG: [[CPVAL0]] = bitcast i32* [[SEC0:%.+]] to i8* +// CK24-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[SC]]** +// CK24-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** +// CK24-DAG: store [[SC]]* [[VAR0:%.+]], [[SC]]** [[CBP0]] +// CK24-DAG: store i32* [[SEC0:%.+]], i32** [[CP0]] // CK24-DAG: [[SEC0]] = getelementptr {{.*}}[[SC]]* [[VAR00:%.+]], i{{.+}} 0, i{{.+}} 0 // CK24-DAG: [[VAR0]] = load [[SC]]*, [[SC]]** %{{.+}} @@ -3660,10 +3700,10 @@ int explicit_maps_struct_fields(int a){ // CK24-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK24-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 -// CK24-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] -// CK24-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] -// CK24-DAG: [[CBPVAL0]] = bitcast [[SC]]* [[VAR0:%.+]] to i8* -// CK24-DAG: [[CPVAL0]] = bitcast [[SA]]* [[SEC0:%.+]] to i8* +// CK24-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[SC]]** +// CK24-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [[SA]]** +// CK24-DAG: store [[SC]]* [[VAR0:%.+]], [[SC]]** [[CBP0]] +// CK24-DAG: store [[SA]]* [[SEC0:%.+]], [[SA]]** [[CP0]] // CK24-DAG: [[SEC0]] = getelementptr {{.*}}[[SB]]* [[SEC00:%[^,]+]], i{{.+}} 0, i{{.+}} 1 // CK24-DAG: [[SEC00]] = getelementptr {{.*}}[[SC]]* [[VAR00:%.+]], i{{.+}} 0, i{{.+}} 1 @@ -3681,10 +3721,10 @@ int explicit_maps_struct_fields(int a){ // CK24-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK24-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 -// CK24-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] -// CK24-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] -// CK24-DAG: [[CBPVAL0]] = bitcast [[SC]]* [[VAR0:%.+]] to i8* -// CK24-DAG: [[CPVAL0]] = bitcast i32* [[SEC0:%.+]] to i8* +// CK24-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[SC]]** +// CK24-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** +// CK24-DAG: store [[SC]]* [[VAR0:%.+]], [[SC]]** [[CBP0]] +// CK24-DAG: store i32* [[SEC0:%.+]], i32** [[CP0]] // CK24-DAG: [[SEC0]] = getelementptr {{.*}}[[SA]]* [[SEC00:%[^,]+]], i{{.+}} 0, i{{.+}} 0 // CK24-DAG: [[SEC00]] = getelementptr {{.*}}[[SB]]* [[SEC000:%[^,]+]], i{{.+}} 0, i{{.+}} 1 // CK24-DAG: [[SEC000]] = getelementptr {{.*}}[[SC]]* [[VAR00:%.+]], i{{.+}} 0, i{{.+}} 1 @@ -3703,10 +3743,10 @@ int explicit_maps_struct_fields(int a){ // CK24-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK24-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 -// CK24-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] -// CK24-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] -// CK24-DAG: [[CBPVAL0]] = bitcast [[SC]]* [[VAR0:%.+]] to i8* -// CK24-DAG: [[CPVAL0]] = bitcast i32* [[SEC0:%.+]] to i8* +// CK24-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[SC]]** +// CK24-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** +// CK24-DAG: store [[SC]]* [[VAR0:%.+]], [[SC]]** [[CBP0]] +// CK24-DAG: store i32* [[SEC0:%.+]], i32** [[CP0]] // CK24-DAG: [[SEC0]] = getelementptr {{.*}}[10 x i32]* [[SEC00:%[^,]+]], i{{.+}} 0, i{{.+}} 0 // CK24-DAG: [[SEC00]] = getelementptr {{.*}}[[SC]]* [[VAR00:%.+]], i{{.+}} 0, i{{.+}} 3 @@ -3724,18 +3764,18 @@ int explicit_maps_struct_fields(int a){ // CK24-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK24-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 -// CK24-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] -// CK24-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] -// CK24-DAG: [[CBPVAL0]] = bitcast [[SC]]* [[VAR0:%.+]] to i8* -// CK24-DAG: [[CPVAL0]] = bitcast [[SB]]** [[SEC0:%.+]] to i8* +// CK24-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[SC]]** +// CK24-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [[SB]]*** +// CK24-DAG: store [[SC]]* [[VAR0:%.+]], [[SC]]** [[CBP0]] +// CK24-DAG: store [[SB]]** [[SEC0:%.+]], [[SB]]*** [[CP0]] // CK24-DAG: [[SEC0]] = getelementptr {{.*}}[[SC]]* [[VAR00:%.+]], i{{.+}} 0, i{{.+}} 2 // CK24-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1 // CK24-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1 -// CK24-DAG: store i8* [[CBPVAL1:%[^,]+]], i8** [[BP1]] -// CK24-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]] -// CK24-DAG: [[CBPVAL1]] = bitcast [[SB]]** [[SEC0]] to i8* -// CK24-DAG: [[CPVAL1]] = bitcast [[SB]]* [[SEC1:%.+]] to i8* +// CK24-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to [[SB]]*** +// CK24-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to [[SB]]** +// CK24-DAG: store [[SB]]** [[SEC0]], [[SB]]*** [[CBP1]] +// CK24-DAG: store [[SB]]* [[SEC1:%.+]], [[SB]]** [[CP1]] // CK24-DAG: [[SEC1]] = getelementptr {{.*}}[[SB]]* [[SEC11:%[^,]+]], i{{.+}} 0 // CK24-DAG: [[SEC11]] = load [[SB]]*, [[SB]]** [[SEC111:%[^,]+]], // CK24-DAG: [[SEC111]] = getelementptr {{.*}}[[SC]]* [[VAR000:%.+]], i{{.+}} 0, i{{.+}} 2 @@ -3755,10 +3795,10 @@ int explicit_maps_struct_fields(int a){ // CK24-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK24-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 -// CK24-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] -// CK24-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] -// CK24-DAG: [[CBPVAL0]] = bitcast [[SC]]* [[VAR0:%.+]] to i8* -// CK24-DAG: [[CPVAL0]] = bitcast i32* [[SEC0:%.+]] to i8* +// CK24-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[SC]]** +// CK24-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** +// CK24-DAG: store [[SC]]* [[VAR0:%.+]], [[SC]]** [[CBP0]] +// CK24-DAG: store i32* [[SEC0:%.+]], i32** [[CP0]] // CK24-DAG: [[SEC0]] = getelementptr {{.*}}[[SA]]* [[SEC00:%[^,]+]], i{{.+}} 0, i{{.+}} 0 // CK24-DAG: [[SEC00]] = getelementptr {{.*}}[10 x [[SA]]]* [[SEC000:%[^,]+]], i{{.+}} 0, i{{.+}} 3 // CK24-DAG: [[SEC000]] = getelementptr {{.*}}[[SB]]* [[SEC0000:%[^,]+]], i{{.+}} 0, i{{.+}} 2 @@ -3778,20 +3818,20 @@ int explicit_maps_struct_fields(int a){ // CK24-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK24-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 -// CK24-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] -// CK24-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] -// CK24-DAG: [[CBPVAL0]] = bitcast [[SC]]* [[VAR0:%.+]] to i8* -// CK24-DAG: [[CPVAL0]] = bitcast [[SA]]** [[SEC0:%.+]] to i8* +// CK24-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[SC]]** +// CK24-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [[SA]]*** +// CK24-DAG: store [[SC]]* [[VAR0:%.+]], [[SC]]** [[CBP0]] +// CK24-DAG: store [[SA]]** [[SEC0:%.+]], [[SA]]*** [[CP0]] // CK24-DAG: [[SEC0]] = getelementptr {{.*}}[10 x [[SA]]*]* [[SEC00:%[^,]+]], i{{.+}} 0, i{{.+}} 3 // CK24-DAG: [[SEC00]] = getelementptr {{.*}}[[SB]]* [[SEC000:%[^,]+]], i{{.+}} 0, i{{.+}} 3 // CK24-DAG: [[SEC000]] = getelementptr {{.*}}[[SC]]* [[VAR00:%.+]], i{{.+}} 0, i{{.+}} 1 // CK24-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1 // CK24-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1 -// CK24-DAG: store i8* [[CBPVAL1:%[^,]+]], i8** [[BP1]] -// CK24-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]] -// CK24-DAG: [[CBPVAL1]] = bitcast [[SA]]** [[SEC0]] to i8* -// CK24-DAG: [[CPVAL1]] = bitcast i32* [[SEC1:%.+]] to i8* +// CK24-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to [[SA]]*** +// CK24-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to i32** +// CK24-DAG: store [[SA]]** [[SEC0]], [[SA]]*** [[CBP1]] +// CK24-DAG: store i32* [[SEC1:%.+]], i32** [[CP1]] // CK24-DAG: [[SEC1]] = getelementptr {{.*}}[[SA]]* [[SEC11:%[^,]+]], i{{.+}} 0, i{{.+}} 0 // CK24-DAG: [[SEC11]] = load [[SA]]*, [[SA]]** [[SEC111:%[^,]+]], // CK24-DAG: [[SEC111]] = getelementptr {{.*}}[10 x [[SA]]*]* [[SEC1111:%[^,]+]], i{{.+}} 0, i{{.+}} 3 @@ -3813,18 +3853,18 @@ int explicit_maps_struct_fields(int a){ // CK24-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK24-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 -// CK24-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] -// CK24-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] -// CK24-DAG: [[CBPVAL0]] = bitcast [[SC]]* [[VAR0:%.+]] to i8* -// CK24-DAG: [[CPVAL0]] = bitcast [[SB]]** [[SEC0:%.+]] to i8* +// CK24-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[SC]]** +// CK24-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [[SB]]*** +// CK24-DAG: store [[SC]]* [[VAR0:%.+]], [[SC]]** [[CBP0]] +// CK24-DAG: store [[SB]]** [[SEC0:%.+]], [[SB]]*** [[CP0]] // CK24-DAG: [[SEC0]] = getelementptr {{.*}}[[SC]]* [[VAR00:%.+]], i{{.+}} 0, i{{.+}} 2 // CK24-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1 // CK24-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1 -// CK24-DAG: store i8* [[CBPVAL1:%[^,]+]], i8** [[BP1]] -// CK24-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]] -// CK24-DAG: [[CBPVAL1]] = bitcast [[SB]]** [[SEC0]] to i8* -// CK24-DAG: [[CPVAL1]] = bitcast i32* [[SEC1:%.+]] to i8* +// CK24-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to [[SB]]*** +// CK24-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to i32** +// CK24-DAG: store [[SB]]** [[SEC0]], [[SB]]*** [[CBP1]] +// CK24-DAG: store i32* [[SEC1:%.+]], i32** [[CP1]] // CK24-DAG: [[SEC1]] = getelementptr {{.*}}[[SB]]* [[SEC11:%[^,]+]], i{{.+}} 0 // CK24-DAG: [[SEC11]] = load [[SB]]*, [[SB]]** [[SEC111:%[^,]+]], // CK24-DAG: [[SEC111]] = getelementptr {{.*}}[[SC]]* [[VAR000:%.+]], i{{.+}} 0, i{{.+}} 2 @@ -3844,19 +3884,19 @@ int explicit_maps_struct_fields(int a){ // CK24-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK24-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 -// CK24-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] -// CK24-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] -// CK24-DAG: [[CBPVAL0]] = bitcast [[SC]]* [[VAR0:%.+]] to i8* -// CK24-DAG: [[CPVAL0]] = bitcast [[SA]]** [[SEC0:%.+]] to i8* +// CK24-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[SC]]** +// CK24-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [[SA]]*** +// CK24-DAG: store [[SC]]* [[VAR0:%.+]], [[SC]]** [[CBP0]] +// CK24-DAG: store [[SA]]** [[SEC0:%.+]], [[SA]]*** [[CP0]] // CK24-DAG: [[SEC0]] = getelementptr {{.*}}[[SB]]* [[SEC00:[^,]+]], i{{.+}} 0, i{{.+}} 4 // CK24-DAG: [[SEC00]] = getelementptr {{.*}}[[SC]]* [[VAR00:%.+]], i{{.+}} 0, i{{.+}} 1 // CK24-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1 // CK24-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1 -// CK24-DAG: store i8* [[CBPVAL1:%[^,]+]], i8** [[BP1]] -// CK24-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]] -// CK24-DAG: [[CBPVAL1]] = bitcast [[SA]]** [[SEC0]] to i8* -// CK24-DAG: [[CPVAL1]] = bitcast i32* [[SEC1:%.+]] to i8* +// CK24-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to [[SA]]*** +// CK24-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to i32** +// CK24-DAG: store [[SA]]** [[SEC0]], [[SA]]*** [[CBP1]] +// CK24-DAG: store i32* [[SEC1:%.+]], i32** [[CP1]] // CK24-DAG: [[SEC1]] = getelementptr {{.*}}[[SA]]* [[SEC11:%[^,]+]], i{{.+}} 0 // CK24-DAG: [[SEC11]] = load [[SA]]*, [[SA]]** [[SEC111:%[^,]+]], // CK24-DAG: [[SEC111]] = getelementptr {{.*}}[[SB]]* [[SEC1111:[^,]+]], i{{.+}} 0, i{{.+}} 4 @@ -3877,10 +3917,10 @@ int explicit_maps_struct_fields(int a){ // CK24-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK24-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 -// CK24-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] -// CK24-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] -// CK24-DAG: [[CBPVAL0]] = bitcast [[SC]]* [[VAR0:%.+]] to i8* -// CK24-DAG: [[CPVAL0]] = bitcast i32* [[SEC0:%.+]] to i8* +// CK24-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[SC]]** +// CK24-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** +// CK24-DAG: store [[SC]]* [[VAR0:%.+]], [[SC]]** [[CBP0]] +// CK24-DAG: store i32* [[SEC0:%.+]], i32** [[CP0]] // CK24-DAG: [[SEC0]] = getelementptr {{.*}}[10 x i32]* [[SEC00:%[^,]+]], i{{.+}} 0, i{{.+}} 0 // CK24-DAG: [[SEC00]] = getelementptr {{.*}}[[SA]]* [[SEC000:%[^,]+]], i{{.+}} 0, i{{.+}} 2 // CK24-DAG: [[SEC000]] = getelementptr {{.*}}[[SB]]* [[SEC0000:%[^,]+]], i{{.+}} 0, i{{.+}} 1 @@ -3900,19 +3940,19 @@ int explicit_maps_struct_fields(int a){ // CK24-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK24-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 -// CK24-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] -// CK24-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] -// CK24-DAG: [[CBPVAL0]] = bitcast [[SC]]* [[VAR0:%.+]] to i8* -// CK24-DAG: [[CPVAL0]] = bitcast [[SA]]** [[SEC0:%.+]] to i8* +// CK24-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[SC]]** +// CK24-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [[SA]]*** +// CK24-DAG: store [[SC]]* [[VAR0:%.+]], [[SC]]** [[CBP0]] +// CK24-DAG: store [[SA]]** [[SEC0:%.+]], [[SA]]*** [[CP0]] // CK24-DAG: [[SEC0]] = getelementptr {{.*}}[[SB]]* [[SEC00:%[^,]+]], i{{.+}} 0, i{{.+}} 4 // CK24-DAG: [[SEC00]] = getelementptr {{.*}}[[SC]]* [[VAR00:%.+]], i{{.+}} 0, i{{.+}} 1 // CK24-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1 // CK24-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1 -// CK24-DAG: store i8* [[CBPVAL1:%[^,]+]], i8** [[BP1]] -// CK24-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]] -// CK24-DAG: [[CBPVAL1]] = bitcast [[SA]]** [[SEC0]] to i8* -// CK24-DAG: [[CPVAL1]] = bitcast i32* [[SEC1:%.+]] to i8* +// CK24-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to [[SA]]*** +// CK24-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to i32** +// CK24-DAG: store [[SA]]** [[SEC0]], [[SA]]*** [[CBP1]] +// CK24-DAG: store i32* [[SEC1:%.+]], i32** [[CP1]] // CK24-DAG: [[SEC1]] = getelementptr {{.*}}[10 x i32]* [[SEC11:%[^,]+]], i{{.+}} 0, i{{.+}} 0 // CK24-DAG: [[SEC11]] = getelementptr {{.*}}[[SA]]* [[SEC111:%[^,]+]], i{{.+}} 0, i{{.+}} 2 // CK24-DAG: [[SEC111]] = load [[SA]]*, [[SA]]** [[SEC1111:%[^,]+]], @@ -3934,28 +3974,28 @@ int explicit_maps_struct_fields(int a){ // CK24-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK24-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 -// CK24-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] -// CK24-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] -// CK24-DAG: [[CBPVAL0]] = bitcast [[SC]]* [[VAR0:%.+]] to i8* -// CK24-DAG: [[CPVAL0]] = bitcast [[SB]]** [[SEC0:%.+]] to i8* +// CK24-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[SC]]** +// CK24-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [[SB]]*** +// CK24-DAG: store [[SC]]* [[VAR0:%.+]], [[SC]]** [[CBP0]] +// CK24-DAG: store [[SB]]** [[SEC0:%.+]], [[SB]]*** [[CP0]] // CK24-DAG: [[SEC0]] = getelementptr {{.*}}[[SC]]* [[VAR00:%.+]], i{{.+}} 0, i{{.+}} 2 // CK24-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1 // CK24-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1 -// CK24-DAG: store i8* [[CBPVAL1:%[^,]+]], i8** [[BP1]] -// CK24-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]] -// CK24-DAG: [[CBPVAL1]] = bitcast [[SB]]** [[SEC0]] to i8* -// CK24-DAG: [[CPVAL1]] = bitcast [[SA]]** [[SEC1:%.+]] to i8* +// CK24-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to [[SB]]*** +// CK24-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to [[SA]]*** +// CK24-DAG: store [[SB]]** [[SEC0]], [[SB]]*** [[CBP1]] +// CK24-DAG: store [[SA]]** [[SEC1:%.+]], [[SA]]*** [[CP1]] // CK24-DAG: [[SEC1]] = getelementptr {{.*}}[[SB]]* [[SEC11:%[^,]+]], i{{.+}} 0, i{{.+}} 4 // CK24-DAG: [[SEC11]] = load [[SB]]*, [[SB]]** [[SEC111:%[^,]+]], // CK24-DAG: [[SEC111]] = getelementptr {{.*}}[[SC]]* [[VAR000:%.+]], i{{.+}} 0, i{{.+}} 2 // CK24-DAG: [[BP2:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 2 // CK24-DAG: [[P2:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 2 -// CK24-DAG: store i8* [[CBPVAL2:%[^,]+]], i8** [[BP2]] -// CK24-DAG: store i8* [[CPVAL2:%[^,]+]], i8** [[P2]] -// CK24-DAG: [[CBPVAL2]] = bitcast [[SA]]** [[SEC1]] to i8* -// CK24-DAG: [[CPVAL2]] = bitcast [[SA]]** [[SEC2:%.+]] to i8* +// CK24-DAG: [[CBP2:%.+]] = bitcast i8** [[BP2]] to [[SA]]*** +// CK24-DAG: [[CP2:%.+]] = bitcast i8** [[P2]] to [[SA]]*** +// CK24-DAG: store [[SA]]** [[SEC1]], [[SA]]*** [[CBP2]] +// CK24-DAG: store [[SA]]** [[SEC2:%.+]], [[SA]]*** [[CP2]] // CK24-DAG: [[SEC2]] = getelementptr {{.*}}[[SA]]* [[SEC22:%[^,]+]], i{{.+}} 0, i{{.+}} 1 // CK24-DAG: [[SEC22]] = load [[SA]]*, [[SA]]** [[SEC222:%[^,]+]], // CK24-DAG: [[SEC222]] = getelementptr {{.*}}[[SB]]* [[SEC2222:%[^,]+]], i{{.+}} 0, i{{.+}} 4 @@ -3964,10 +4004,10 @@ int explicit_maps_struct_fields(int a){ // CK24-DAG: [[BP3:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 3 // CK24-DAG: [[P3:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 3 -// CK24-DAG: store i8* [[CBPVAL3:%[^,]+]], i8** [[BP3]] -// CK24-DAG: store i8* [[CPVAL3:%[^,]+]], i8** [[P3]] -// CK24-DAG: [[CBPVAL3]] = bitcast [[SA]]** [[SEC2]] to i8* -// CK24-DAG: [[CPVAL3]] = bitcast i32* [[SEC3:%.+]] to i8* +// CK24-DAG: [[CBP3:%.+]] = bitcast i8** [[BP3]] to [[SA]]*** +// CK24-DAG: [[CP3:%.+]] = bitcast i8** [[P3]] to i32** +// CK24-DAG: store [[SA]]** [[SEC2]], [[SA]]*** [[CBP3]] +// CK24-DAG: store i32* [[SEC3:%.+]], i32** [[CP3]] // CK24-DAG: [[SEC3]] = getelementptr {{.*}}[[SA]]* [[SEC33:%[^,]+]], i{{.+}} 0, i{{.+}} 0 // CK24-DAG: [[SEC33]] = load [[SA]]*, [[SA]]** [[SEC333:%[^,]+]], // CK24-DAG: [[SEC333]] = getelementptr {{.*}}[[SA]]* [[SEC3333:%[^,]+]], i{{.+}} 0, i{{.+}} 1 @@ -4047,10 +4087,10 @@ struct CC { // CK25-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK25-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK25-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK25-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK25-DAG: [[CBPVAL0]] = bitcast [[ST]]* [[VAR0:%.+]] to i8* - // CK25-DAG: [[CPVAL0]] = bitcast i32* [[SEC0:%.+]] to i8* + // CK25-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[ST]]** + // CK25-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** + // CK25-DAG: store [[ST]]* [[VAR0:%.+]], [[ST]]** [[CBP0]] + // CK25-DAG: store i32* [[SEC0:%.+]], i32** [[CP0]] // CK25-DAG: [[SEC0]] = getelementptr {{.*}}[[ST]]* [[VAR0:%.+]], i{{.+}} 0, i{{.+}} 0 // CK25: call void [[CALL00:@.+]]([[ST]]* {{[^,]+}}) @@ -4068,10 +4108,10 @@ struct CC { // CK25-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK25-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK25-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK25-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK25-DAG: [[CBPVAL0]] = bitcast i32* [[VAR0:%.+]] to i8* - // CK25-DAG: [[CPVAL0]] = bitcast i32* [[VAR0]] to i8* + // CK25-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to i32** + // CK25-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** + // CK25-DAG: store i32* [[VAR0:%.+]], i32** [[CBP0]] + // CK25-DAG: store i32* [[VAR0]], i32** [[CP0]] // CK25: call void [[CALL01:@.+]](i32* {{[^,]+}}) #pragma omp target map(to:arg) @@ -4151,17 +4191,17 @@ struct CC { // CK26-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK26-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK26-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK26-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK26-DAG: [[CBPVAL0]] = bitcast [[ST]]* [[VAR0:%.+]] to i8* - // CK26-DAG: [[CPVAL0]] = bitcast [[ST]]* [[VAR0]] to i8* + // CK26-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[ST]]** + // CK26-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [[ST]]** + // CK26-DAG: store [[ST]]* [[VAR0:%.+]], [[ST]]** [[CBP0]] + // CK26-DAG: store [[ST]]* [[VAR0]], [[ST]]** [[CP0]] // CK26-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1 // CK26-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1 - // CK26-DAG: store i8* [[CBPVAL1:%[^,]+]], i8** [[BP1]] - // CK26-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]] - // CK26-DAG: [[CBPVAL1]] = bitcast i32* [[VAR1:%.+]] to i8* - // CK26-DAG: [[CPVAL1]] = bitcast i32* [[SEC1:%.+]] to i8* + // CK26-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to i32** + // CK26-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to i32** + // CK26-DAG: store i32* [[VAR1:%.+]], i32** [[CBP1]] + // CK26-DAG: store i32* [[SEC1:%.+]], i32** [[CP1]] // CK26-DAG: [[VAR1]] = load i32*, i32** [[PVT:%.+]], // CK26-DAG: [[SEC1]] = load i32*, i32** [[PVT]], @@ -4178,17 +4218,17 @@ struct CC { // CK26-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK26-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK26-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK26-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK26-DAG: [[CBPVAL0]] = bitcast [[ST]]* [[VAR0:%.+]] to i8* - // CK26-DAG: [[CPVAL0]] = bitcast [[ST]]* [[VAR0]] to i8* + // CK26-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[ST]]** + // CK26-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [[ST]]** + // CK26-DAG: store [[ST]]* [[VAR0:%.+]], [[ST]]** [[CBP0]] + // CK26-DAG: store [[ST]]* [[VAR0]], [[ST]]** [[CP0]] // CK26-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1 // CK26-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1 - // CK26-DAG: store i8* [[CBPVAL1:%[^,]+]], i8** [[BP1]] - // CK26-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]] - // CK26-DAG: [[CBPVAL1]] = bitcast float* [[VAR1:%.+]] to i8* - // CK26-DAG: [[CPVAL1]] = bitcast float* [[SEC1:%.+]] to i8* + // CK26-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to float** + // CK26-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to float** + // CK26-DAG: store float* [[VAR1:%.+]], float** [[CBP1]] + // CK26-DAG: store float* [[SEC1:%.+]], float** [[CP1]] // CK26-DAG: [[VAR1]] = load float*, float** [[PVT:%.+]], // CK26-DAG: [[SEC1]] = load float*, float** [[PVT]], @@ -4205,17 +4245,17 @@ struct CC { // CK26-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK26-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK26-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK26-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK26-DAG: [[CBPVAL0]] = bitcast [[ST]]* [[VAR0:%.+]] to i8* - // CK26-DAG: [[CPVAL0]] = bitcast [[ST]]* [[VAR0]] to i8* + // CK26-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[ST]]** + // CK26-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [[ST]]** + // CK26-DAG: store [[ST]]* [[VAR0:%.+]], [[ST]]** [[CBP0]] + // CK26-DAG: store [[ST]]* [[VAR0]], [[ST]]** [[CP0]] // CK26-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1 // CK26-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1 - // CK26-DAG: store i8* [[CBPVAL1:%[^,]+]], i8** [[BP1]] - // CK26-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]] - // CK26-DAG: [[CBPVAL1]] = bitcast i32* [[VAR1:%.+]] to i8* - // CK26-DAG: [[CPVAL1]] = bitcast i32* [[SEC1:%.+]] to i8* + // CK26-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to i32** + // CK26-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to i32** + // CK26-DAG: store i32* [[VAR1:%.+]], i32** [[CBP1]] + // CK26-DAG: store i32* [[SEC1:%.+]], i32** [[CP1]] // CK26-DAG: [[VAR1]] = load i32*, i32** [[PVT:%.+]], // CK26-DAG: [[SEC1]] = load i32*, i32** [[PVT]], @@ -4232,17 +4272,17 @@ struct CC { // CK26-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK26-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK26-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK26-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK26-DAG: [[CBPVAL0]] = bitcast [[ST]]* [[VAR0:%.+]] to i8* - // CK26-DAG: [[CPVAL0]] = bitcast [[ST]]* [[VAR0]] to i8* + // CK26-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[ST]]** + // CK26-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [[ST]]** + // CK26-DAG: store [[ST]]* [[VAR0:%.+]], [[ST]]** [[CBP0]] + // CK26-DAG: store [[ST]]* [[VAR0]], [[ST]]** [[CP0]] // CK26-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1 // CK26-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1 - // CK26-DAG: store i8* [[CBPVAL1:%[^,]+]], i8** [[BP1]] - // CK26-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]] - // CK26-DAG: [[CBPVAL1]] = bitcast float* [[VAR1:%.+]] to i8* - // CK26-DAG: [[CPVAL1]] = bitcast float* [[SEC1:%.+]] to i8* + // CK26-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to float** + // CK26-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to float** + // CK26-DAG: store float* [[VAR1:%.+]], float** [[CBP1]] + // CK26-DAG: store float* [[SEC1:%.+]], float** [[CP1]] // CK26-DAG: [[VAR1]] = load float*, float** [[PVT:%.+]], // CK26-DAG: [[SEC1]] = load float*, float** [[PVT]], @@ -4335,10 +4375,10 @@ void zero_size_section_and_private_maps (int ii){ // CK27-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK27-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK27-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK27-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK27-DAG: [[CBPVAL0]] = bitcast i32* [[VAR0:%.+]] to i8* - // CK27-DAG: [[CPVAL0]] = bitcast i32* [[VAR0]] to i8* + // CK27-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to i32** + // CK27-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** + // CK27-DAG: store i32* [[VAR0:%.+]], i32** [[CBP0]] + // CK27-DAG: store i32* [[VAR0]], i32** [[CP0]] // CK27: call void [[CALL00:@.+]](i32* {{[^,]+}}) #pragma omp target @@ -4353,10 +4393,10 @@ void zero_size_section_and_private_maps (int ii){ // CK27-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK27-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK27-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK27-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK27-DAG: [[CBPVAL0]] = bitcast i32* [[RVAR0:%.+]] to i8* - // CK27-DAG: [[CPVAL0]] = bitcast i32* [[SEC0:%.+]] to i8* + // CK27-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to i32** + // CK27-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** + // CK27-DAG: store i32* [[RVAR0:%.+]], i32** [[CBP0]] + // CK27-DAG: store i32* [[SEC0:%.+]], i32** [[CP0]] // CK27-DAG: [[RVAR0]] = load i32*, i32** [[VAR0:%[^,]+]] // CK27-DAG: [[SEC0]] = getelementptr {{.*}}i32* [[RVAR00:%.+]], i{{.+}} 0 // CK27-DAG: [[RVAR00]] = load i32*, i32** [[VAR0]] @@ -4374,10 +4414,10 @@ void zero_size_section_and_private_maps (int ii){ // CK27-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK27-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK27-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK27-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK27-DAG: [[CBPVAL0]] = bitcast i32* [[RVAR0:%.+]] to i8* - // CK27-DAG: [[CPVAL0]] = bitcast i32* [[SEC0:%.+]] to i8* + // CK27-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to i32** + // CK27-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** + // CK27-DAG: store i32* [[RVAR0:%.+]], i32** [[CBP0]] + // CK27-DAG: store i32* [[SEC0:%.+]], i32** [[CP0]] // CK27-DAG: [[RVAR0]] = load i32*, i32** [[VAR0:%[^,]+]] // CK27-DAG: [[SEC0]] = getelementptr {{.*}}i32* [[RVAR00:%.+]], i{{.+}} 0 // CK27-DAG: [[RVAR00]] = load i32*, i32** [[VAR0]] @@ -4395,10 +4435,10 @@ void zero_size_section_and_private_maps (int ii){ // CK27-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK27-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK27-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK27-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK27-DAG: [[CBPVAL0]] = bitcast i32* [[RVAR0:%.+]] to i8* - // CK27-DAG: [[CPVAL0]] = bitcast i32* [[SEC0:%.+]] to i8* + // CK27-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to i32** + // CK27-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** + // CK27-DAG: store i32* [[RVAR0:%.+]], i32** [[CBP0]] + // CK27-DAG: store i32* [[SEC0:%.+]], i32** [[CP0]] // CK27-DAG: [[RVAR0]] = load i32*, i32** [[VAR0:%[^,]+]] // CK27-DAG: [[SEC0]] = getelementptr {{.*}}i32* [[RVAR00:%.+]], i{{.+}} %{{.+}} // CK27-DAG: [[RVAR00]] = load i32*, i32** [[VAR0]] @@ -4428,10 +4468,10 @@ void zero_size_section_and_private_maps (int ii){ // CK27-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK27-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK27-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK27-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK27-DAG: [[CBPVAL0]] = bitcast i32* [[VAR0:%.+]] to i8* - // CK27-DAG: [[CPVAL0]] = bitcast i32* [[VAR0]] to i8* + // CK27-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to i32** + // CK27-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** + // CK27-DAG: store i32* [[VAR0:%.+]], i32** [[CBP0]] + // CK27-DAG: store i32* [[VAR0]], i32** [[CP0]] // CK27: call void [[CALL05:@.+]](i32* {{[^,]+}}) #pragma omp target firstprivate(pvtPtr) @@ -4453,10 +4493,10 @@ void zero_size_section_and_private_maps (int ii){ // CK27-DAG: [[PGEP]] = getelementptr inbounds {{.+}}[[PS:%[^,]+]], i32 0, i32 0 // CK27-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BPS]], i32 0, i32 0 // CK27-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[PS]], i32 0, i32 0 - // CK27-DAG: store i8* [[VALBP:%.+]], i8** [[BP1]], - // CK27-DAG: store i8* [[VALP:%.+]], i8** [[P1]], - // CK27-DAG: [[VALBP]] = inttoptr i[[Z]] [[VAL:%.+]] to i8* - // CK27-DAG: [[VALP]] = inttoptr i[[Z]] [[VAL:%.+]] to i8* + // CK27-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to i[[Z]]* + // CK27-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to i[[Z]]* + // CK27-DAG: store i[[Z]] [[VAL:%.+]], i[[Z]]* [[CBP1]] + // CK27-DAG: store i[[Z]] [[VAL]], i[[Z]]* [[CP1]] // CK27-DAG: [[VAL]] = load i[[Z]], i[[Z]]* [[ADDR:%.+]], // CK27-64-DAG: [[CADDR:%.+]] = bitcast i[[Z]]* [[ADDR]] to i32* // CK27-64-DAG: store i32 {{.+}}, i32* [[CADDR]], @@ -4482,10 +4522,10 @@ void zero_size_section_and_private_maps (int ii){ // CK27-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK27-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK27-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK27-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK27-DAG: [[CBPVAL0]] = bitcast [10 x i32]* [[VAR0:%.+]] to i8* - // CK27-DAG: [[CPVAL0]] = bitcast [10 x i32]* [[VAR0]] to i8* + // CK27-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [10 x i32]** + // CK27-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [10 x i32]** + // CK27-DAG: store [10 x i32]* [[VAR0:%.+]], [10 x i32]** [[CBP0]] + // CK27-DAG: store [10 x i32]* [[VAR0]], [10 x i32]** [[CP0]] // CK27: call void [[CALL09:@.+]]([10 x i32]* {{[^,]+}}) #pragma omp target firstprivate(pvtArr) @@ -4529,10 +4569,10 @@ void explicit_maps_pointer_references (int *p){ // CK28-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK28-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK28-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK28-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK28-DAG: [[CBPVAL0]] = bitcast i32** [[VAR0:%.+]] to i8* - // CK28-DAG: [[CPVAL0]] = bitcast i32** [[VAR1:%.+]] to i8* + // CK28-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to i32*** + // CK28-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32*** + // CK28-DAG: store i32** [[VAR0:%.+]], i32*** [[CBP0]] + // CK28-DAG: store i32** [[VAR1:%.+]], i32*** [[CP0]] // CK28-DAG: [[VAR0]] = load i32**, i32*** [[VAR00:%.+]], // CK28-DAG: [[VAR1]] = load i32**, i32*** [[VAR11:%.+]], @@ -4549,10 +4589,10 @@ void explicit_maps_pointer_references (int *p){ // CK28-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK28-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK28-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK28-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK28-DAG: [[CBPVAL0]] = bitcast i32* [[VAR0:%.+]] to i8* - // CK28-DAG: [[CPVAL0]] = bitcast i32* [[VAR1:%.+]] to i8* + // CK28-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to i32** + // CK28-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** + // CK28-DAG: store i32* [[VAR0:%.+]], i32** [[CBP0]] + // CK28-DAG: store i32* [[VAR1:%.+]], i32** [[CP0]] // CK28-DAG: [[VAR0]] = load i32*, i32** [[VAR00:%.+]], // CK28-DAG: [[VAR00]] = load i32**, i32*** [[VAR000:%.+]], // CK28-DAG: [[VAR1]] = getelementptr inbounds i32, i32* [[VAR11:%.+]], i{{64|32}} 2 @@ -4609,36 +4649,36 @@ struct SSB{ // CK29-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK29-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK29-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK29-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK29-DAG: [[CBPVAL0]] = bitcast [[SSB]]* [[VAR0:%.+]] to i8* - // CK29-DAG: [[CPVAL0]] = bitcast [[SSA]]** [[VAR00:%.+]] to i8* + // CK29-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[SSB]]** + // CK29-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [[SSA]]** + // CK29-DAG: store [[SSB]]* [[VAR0:%.+]], [[SSB]]** [[CBP0]] + // CK29-DAG: store [[SSA]]** [[VAR00:%.+]], [[SSA]]*** [[CP0]] // CK29-DAG: [[VAR0]] = load [[SSB]]*, [[SSB]]** % // CK29-DAG: [[VAR00]] = getelementptr inbounds [[SSB]], [[SSB]]* [[VAR0]], i32 0, i32 0 // CK29-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1 // CK29-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1 - // CK29-DAG: store i8* [[CBPVAL1:%[^,]+]], i8** [[BP1]] - // CK29-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]] - // CK29-DAG: [[CBPVAL1]] = bitcast [[SSA]]** [[VAR00]] to i8* - // CK29-DAG: [[CPVAL1]] = bitcast double*** [[VAR1:%.+]] to i8* + // CK29-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to [[SSA]]*** + // CK29-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to double**** + // CK29-DAG: store [[SSA]]** [[VAR00]], [[SSA]]*** [[CBP1]] + // CK29-DAG: store double*** [[VAR1:%.+]], double**** [[CP1]] // CK29-DAG: [[VAR1]] = getelementptr inbounds [[SSA]], [[SSA]]* %{{.+}}, i32 0, i32 1 // CK29-DAG: [[BP2:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 2 // CK29-DAG: [[P2:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 2 - // CK29-DAG: store i8* [[CBPVAL2:%[^,]+]], i8** [[BP2]] - // CK29-DAG: store i8* [[CPVAL2:%[^,]+]], i8** [[P2]] - // CK29-DAG: [[CBPVAL2]] = bitcast double*** [[VAR1]] to i8* - // CK29-DAG: [[CPVAL2]] = bitcast double** [[VAR2:%.+]] to i8* + // CK29-DAG: [[CBP2:%.+]] = bitcast i8** [[BP2]] to double**** + // CK29-DAG: [[CP2:%.+]] = bitcast i8** [[P2]] to double*** + // CK29-DAG: store double*** [[VAR1]], double**** [[CBP2]] + // CK29-DAG: store double** [[VAR2:%.+]], double*** [[CP2]] // CK29-DAG: [[VAR2]] = load double**, double*** [[VAR22:%.+]], // CK29-DAG: [[VAR22]] = getelementptr inbounds [[SSA]], [[SSA]]* %{{.+}}, i32 0, i32 1 // CK29-DAG: [[BP3:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 3 // CK29-DAG: [[P3:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 3 - // CK29-DAG: store i8* [[CBPVAL3:%[^,]+]], i8** [[BP3]] - // CK29-DAG: store i8* [[CPVAL3:%[^,]+]], i8** [[P3]] - // CK29-DAG: [[CBPVAL3]] = bitcast double** [[VAR2]] to i8* - // CK29-DAG: [[CPVAL3]] = bitcast double* [[VAR3:%.+]] to i8* + // CK29-DAG: [[CBP3:%.+]] = bitcast i8** [[BP3]] to double*** + // CK29-DAG: [[CP3:%.+]] = bitcast i8** [[P3]] to double** + // CK29-DAG: store double** [[VAR2]], double*** [[CBP3]] + // CK29-DAG: store double* [[VAR3:%.+]], double** [[CP3]] // CK29-DAG: [[VAR3]] = getelementptr inbounds double, double* [[VAR33:%.+]], i{{.+}} 0 // CK29-DAG: [[VAR33]] = load double*, double** %{{.+}}, @@ -4656,34 +4696,34 @@ struct SSB{ // CK29-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK29-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK29-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK29-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK29-DAG: [[CBPVAL0]] = bitcast [[SSB]]* [[VAR0:%.+]] to i8* - // CK29-DAG: [[CPVAL0]] = bitcast [[SSA]]*** [[VAR00:%.+]] to i8* + // CK29-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[SSB]]** + // CK29-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [[SSA]]**** + // CK29-DAG: store [[SSB]]* [[VAR0:%.+]], [[SSB]]** [[CBP0]] + // CK29-DAG: store [[SSA]]*** [[VAR00:%.+]], [[SSA]]**** [[CP0]] // CK29-DAG: [[VAR00]] = getelementptr inbounds [[SSB]], [[SSB]]* [[VAR0]], i32 0, i32 1 // CK29-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1 // CK29-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1 - // CK29-DAG: store i8* [[CBPVAL1:%[^,]+]], i8** [[BP1]] - // CK29-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]] - // CK29-DAG: [[CBPVAL1]] = bitcast [[SSA]]*** [[VAR00]] to i8* - // CK29-DAG: [[CPVAL1]] = bitcast [[SSA]]** [[VAR1:%.+]] to i8* + // CK29-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to [[SSA]]**** + // CK29-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to [[SSA]]*** + // CK29-DAG: store [[SSA]]*** [[VAR00]], [[SSA]]**** [[CBP1]] + // CK29-DAG: store [[SSA]]** [[VAR1:%.+]], [[SSA]]*** [[CP1]] // CK29-DAG: [[VAR1]] = load [[SSA]]**, [[SSA]]*** [[VAR00]], // CK29-DAG: [[BP2:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 2 // CK29-DAG: [[P2:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 2 - // CK29-DAG: store i8* [[CBPVAL2:%[^,]+]], i8** [[BP2]] - // CK29-DAG: store i8* [[CPVAL2:%[^,]+]], i8** [[P2]] - // CK29-DAG: [[CBPVAL2]] = bitcast [[SSA]]** [[VAR1]] to i8* - // CK29-DAG: [[CPVAL2]] = bitcast double** [[VAR2:%.+]] to i8* + // CK29-DAG: [[CBP2:%.+]] = bitcast i8** [[BP2]] to [[SSA]]*** + // CK29-DAG: [[CP2:%.+]] = bitcast i8** [[P2]] to double*** + // CK29-DAG: store [[SSA]]** [[VAR1]], [[SSA]]*** [[CBP2]] + // CK29-DAG: store double** [[VAR2:%.+]], double*** [[CP2]] // CK29-DAG: [[VAR2]] = getelementptr inbounds [[SSA]], [[SSA]]* %{{.+}}, i32 0, i32 0 // CK29-DAG: [[BP3:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 3 // CK29-DAG: [[P3:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 3 - // CK29-DAG: store i8* [[CBPVAL3:%[^,]+]], i8** [[BP3]] - // CK29-DAG: store i8* [[CPVAL3:%[^,]+]], i8** [[P3]] - // CK29-DAG: [[CBPVAL3]] = bitcast double** [[VAR2]] to i8* - // CK29-DAG: [[CPVAL3]] = bitcast double* [[VAR3:%.+]] to i8* + // CK29-DAG: [[CBP3:%.+]] = bitcast i8** [[BP3]] to double*** + // CK29-DAG: [[CP3:%.+]] = bitcast i8** [[P3]] to double** + // CK29-DAG: store double** [[VAR2]], double*** [[CBP3]] + // CK29-DAG: store double* [[VAR3:%.+]], double** [[CP3]] // CK29-DAG: [[VAR3]] = getelementptr inbounds double, double* [[VAR33:%.+]], i{{.+}} 0 // CK29-DAG: [[VAR33]] = load double*, double** %{{.+}}, @@ -4701,42 +4741,42 @@ struct SSB{ // CK29-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK29-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK29-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK29-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK29-DAG: [[CBPVAL0]] = bitcast [[SSB]]* [[VAR0:%.+]] to i8* - // CK29-DAG: [[CPVAL0]] = bitcast [[SSA]]*** [[VAR00:%.+]] to i8* + // CK29-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[SSB]]** + // CK29-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to [[SSA]]**** + // CK29-DAG: store [[SSB]]* [[VAR0:%.+]], [[SSB]]** [[CBP0]] + // CK29-DAG: store [[SSA]]*** [[VAR00:%.+]], [[SSA]]**** [[CP0]] // CK29-DAG: [[VAR00]] = getelementptr inbounds [[SSB]], [[SSB]]* [[VAR0]], i32 0, i32 1 // CK29-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1 // CK29-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1 - // CK29-DAG: store i8* [[CBPVAL1:%[^,]+]], i8** [[BP1]] - // CK29-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]] - // CK29-DAG: [[CBPVAL1]] = bitcast [[SSA]]*** [[VAR00]] to i8* - // CK29-DAG: [[CPVAL1]] = bitcast [[SSA]]** [[VAR1:%.+]] to i8* + // CK29-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to [[SSA]]**** + // CK29-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to [[SSA]]*** + // CK29-DAG: store [[SSA]]*** [[VAR00]], [[SSA]]**** [[CBP1]] + // CK29-DAG: store [[SSA]]** [[VAR1:%.+]], [[SSA]]*** [[CP1]] // CK29-DAG: [[VAR1]] = load [[SSA]]**, [[SSA]]*** [[VAR00]], // CK29-DAG: [[BP2:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 2 // CK29-DAG: [[P2:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 2 - // CK29-DAG: store i8* [[CBPVAL2:%[^,]+]], i8** [[BP2]] - // CK29-DAG: store i8* [[CPVAL2:%[^,]+]], i8** [[P2]] - // CK29-DAG: [[CBPVAL2]] = bitcast [[SSA]]** [[VAR1]] to i8* - // CK29-DAG: [[CPVAL2]] = bitcast double*** [[VAR2:%.+]] to i8* + // CK29-DAG: [[CBP2:%.+]] = bitcast i8** [[BP2]] to [[SSA]]*** + // CK29-DAG: [[CP2:%.+]] = bitcast i8** [[P2]] to double**** + // CK29-DAG: store [[SSA]]** [[VAR1]], [[SSA]]*** [[CBP2]] + // CK29-DAG: store double*** [[VAR2:%.+]], double**** [[CP2]] // CK29-DAG: [[VAR2]] = getelementptr inbounds [[SSA]], [[SSA]]* %{{.+}}, i32 0, i32 1 // CK29-DAG: [[BP3:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 3 // CK29-DAG: [[P3:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 3 - // CK29-DAG: store i8* [[CBPVAL3:%[^,]+]], i8** [[BP3]] - // CK29-DAG: store i8* [[CPVAL3:%[^,]+]], i8** [[P3]] - // CK29-DAG: [[CBPVAL3]] = bitcast double*** [[VAR2]] to i8* - // CK29-DAG: [[CPVAL3]] = bitcast double** [[VAR3:%.+]] to i8* + // CK29-DAG: [[CBP3:%.+]] = bitcast i8** [[BP3]] to double**** + // CK29-DAG: [[CP3:%.+]] = bitcast i8** [[P3]] to double*** + // CK29-DAG: store double*** [[VAR2]], double**** [[CBP3]] + // CK29-DAG: store double** [[VAR3:%.+]], double*** [[CP3]] // CK29-DAG: [[VAR3]] = load double**, double*** [[VAR2]], // CK29-DAG: [[BP4:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 4 // CK29-DAG: [[P4:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 4 - // CK29-DAG: store i8* [[CBPVAL4:%[^,]+]], i8** [[BP4]] - // CK29-DAG: store i8* [[CPVAL4:%[^,]+]], i8** [[P4]] - // CK29-DAG: [[CBPVAL4]] = bitcast double** [[VAR3]] to i8* - // CK29-DAG: [[CPVAL4]] = bitcast double* [[VAR4:%.+]] to i8* + // CK29-DAG: [[CBP4:%.+]] = bitcast i8** [[BP4]] to double*** + // CK29-DAG: [[CP4:%.+]] = bitcast i8** [[P4]] to double** + // CK29-DAG: store double** [[VAR3]], double*** [[CBP4]] + // CK29-DAG: store double* [[VAR4:%.+]], double** [[CP4]] // CK29-DAG: [[VAR4]] = getelementptr inbounds double, double* [[VAR44:%.+]], i{{.+}} 0 // CK29-DAG: [[VAR44]] = load double*, double** diff --git a/test/OpenMP/target_parallel_codegen.cpp b/test/OpenMP/target_parallel_codegen.cpp index 0801f631ee..3063ab16ab 100644 --- a/test/OpenMP/target_parallel_codegen.cpp +++ b/test/OpenMP/target_parallel_codegen.cpp @@ -121,10 +121,10 @@ int foo(int n) { // CHECK-DAG: [[P]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[PR:%[^,]+]], i32 0, i32 0 // CHECK-DAG: [[BPADDR0:%.+]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[BPR]], i32 0, i32 [[IDX0:[0-9]+]] // CHECK-DAG: [[PADDR0:%.+]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[PR]], i32 0, i32 [[IDX0]] - // CHECK-DAG: store i8* [[BP0:%[^,]+]], i8** [[BPADDR0]] - // CHECK-DAG: store i8* [[P0:%[^,]+]], i8** [[PADDR0]] - // CHECK-DAG: [[BP0]] = inttoptr i[[SZ]] %{{.+}} to i8* - // CHECK-DAG: [[P0]] = inttoptr i[[SZ]] %{{.+}} to i8* + // CHECK-DAG: [[CBPADDR0:%.+]] = bitcast i8** [[BPADDR0]] to i[[SZ]]* + // CHECK-DAG: [[CPADDR0:%.+]] = bitcast i8** [[PADDR0]] to i[[SZ]]* + // CHECK-DAG: store i[[SZ]] [[VAL0:%.+]], i[[SZ]]* [[CBPADDR0]], + // CHECK-DAG: store i[[SZ]] [[VAL0]], i[[SZ]]* [[CPADDR0]], // CHECK: store i32 [[RET]], i32* [[RHV:%.+]], align 4 // CHECK: [[RET2:%.+]] = load i32, i32* [[RHV]], align 4 @@ -148,17 +148,17 @@ int foo(int n) { // CHECK-DAG: [[BPADDR0:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[BP]], i32 0, i32 0 // CHECK-DAG: [[PADDR0:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[P]], i32 0, i32 0 - // CHECK-DAG: store i8* [[BP0:%[^,]+]], i8** [[BPADDR0]] - // CHECK-DAG: store i8* [[P0:%[^,]+]], i8** [[PADDR0]] - // CHECK-DAG: [[BP0]] = inttoptr i[[SZ]] %{{.+}} to i8* - // CHECK-DAG: [[P0]] = inttoptr i[[SZ]] %{{.+}} to i8* + // CHECK-DAG: [[CBPADDR0:%.+]] = bitcast i8** [[BPADDR0]] to i[[SZ]]* + // CHECK-DAG: [[CPADDR0:%.+]] = bitcast i8** [[PADDR0]] to i[[SZ]]* + // CHECK-DAG: store i[[SZ]] [[VAL0:%.+]], i[[SZ]]* [[CBPADDR0]], + // CHECK-DAG: store i[[SZ]] [[VAL0]], i[[SZ]]* [[CPADDR0]], // CHECK-DAG: [[BPADDR1:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[BP]], i32 0, i32 1 // CHECK-DAG: [[PADDR1:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[P]], i32 0, i32 1 - // CHECK-DAG: store i8* [[BP1:%[^,]+]], i8** [[BPADDR1]] - // CHECK-DAG: store i8* [[P1:%[^,]+]], i8** [[PADDR1]] - // CHECK-DAG: [[BP1]] = inttoptr i[[SZ]] %{{.+}} to i8* - // CHECK-DAG: [[P1]] = inttoptr i[[SZ]] %{{.+}} to i8* + // CHECK-DAG: [[CBPADDR1:%.+]] = bitcast i8** [[BPADDR1]] to i[[SZ]]* + // CHECK-DAG: [[CPADDR1:%.+]] = bitcast i8** [[PADDR1]] to i[[SZ]]* + // CHECK-DAG: store i[[SZ]] [[VAL1:%.+]], i[[SZ]]* [[CBPADDR1]], + // CHECK-DAG: store i[[SZ]] [[VAL1]], i[[SZ]]* [[CPADDR1]], // CHECK: store i32 [[RET]], i32* [[RHV:%.+]], align 4 // CHECK-NEXT: br label %[[IFEND:.+]] @@ -232,56 +232,58 @@ int foo(int n) { // The names below are not necessarily consistent with the names used for the // addresses above as some are repeated. - // CHECK-DAG: [[BP0:%[^,]+]] = inttoptr i[[SZ]] [[VLA0]] to i8* - // CHECK-DAG: [[P0:%[^,]+]] = inttoptr i[[SZ]] [[VLA0]] to i8* - // CHECK-DAG: store i8* [[BP0]], i8** {{%[^,]+}} - // CHECK-DAG: store i8* [[P0]], i8** {{%[^,]+}} + // CHECK-DAG: store i[[SZ]] [[VLA0]], i[[SZ]]* [[CBPADDR0:%.+]], + // CHECK-DAG: store i[[SZ]] [[VLA0]], i[[SZ]]* [[CPADDR0:%.+]], + // CHECK-DAG: [[CBPADDR0]] = bitcast i8** {{%[^,]+}} to i[[SZ]]* + // CHECK-DAG: [[CPADDR0]] = bitcast i8** {{%[^,]+}} to i[[SZ]]* // CHECK-DAG: store i[[SZ]] {{4|8}}, i[[SZ]]* {{%[^,]+}} - // CHECK-DAG: [[BP1:%[^,]+]] = inttoptr i[[SZ]] [[VLA1]] to i8* - // CHECK-DAG: [[P1:%[^,]+]] = inttoptr i[[SZ]] [[VLA1]] to i8* - // CHECK-DAG: store i8* [[BP1]], i8** {{%[^,]+}} - // CHECK-DAG: store i8* [[P1]], i8** {{%[^,]+}} + // CHECK-DAG: store i[[SZ]] [[VLA1]], i[[SZ]]* [[CBPADDR1:%.+]], + // CHECK-DAG: store i[[SZ]] [[VLA1]], i[[SZ]]* [[CPADDR1:%.+]], + // CHECK-DAG: [[CBPADDR1]] = bitcast i8** {{%[^,]+}} to i[[SZ]]* + // CHECK-DAG: [[CPADDR1]] = bitcast i8** {{%[^,]+}} to i[[SZ]]* // CHECK-DAG: store i[[SZ]] {{4|8}}, i[[SZ]]* {{%[^,]+}} - // CHECK-DAG: store i8* inttoptr (i[[SZ]] 5 to i8*), i8** {{%[^,]+}} - // CHECK-DAG: store i8* inttoptr (i[[SZ]] 5 to i8*), i8** {{%[^,]+}} + // CHECK-DAG: store i[[SZ]] 5, i[[SZ]]* [[CBPADDR2:%.+]], + // CHECK-DAG: store i[[SZ]] 5, i[[SZ]]* [[CPADDR2:%.+]], + // CHECK-DAG: [[CBPADDR2]] = bitcast i8** {{%[^,]+}} to i[[SZ]]* + // CHECK-DAG: [[CPADDR2]] = bitcast i8** {{%[^,]+}} to i[[SZ]]* // CHECK-DAG: store i[[SZ]] {{4|8}}, i[[SZ]]* {{%[^,]+}} - // CHECK-DAG: [[BP3:%[^,]+]] = inttoptr i[[SZ]] [[A_CVAL]] to i8* - // CHECK-DAG: [[P3:%[^,]+]] = inttoptr i[[SZ]] [[A_CVAL]] to i8* - // CHECK-DAG: store i8* [[BP3]], i8** {{%[^,]+}} - // CHECK-DAG: store i8* [[P3]], i8** {{%[^,]+}} + // CHECK-DAG: store i[[SZ]] [[A_CVAL]], i[[SZ]]* [[CBPADDR3:%.+]], + // CHECK-DAG: store i[[SZ]] [[A_CVAL]], i[[SZ]]* [[CPADDR3:%.+]], + // CHECK-DAG: [[CBPADDR3]] = bitcast i8** {{%[^,]+}} to i[[SZ]]* + // CHECK-DAG: [[CPADDR3]] = bitcast i8** {{%[^,]+}} to i[[SZ]]* // CHECK-DAG: store i[[SZ]] 4, i[[SZ]]* {{%[^,]+}} - // CHECK-DAG: [[BP4:%[^,]+]] = bitcast [10 x float]* %{{.+}} to i8* - // CHECK-DAG: [[P4:%[^,]+]] = bitcast [10 x float]* %{{.+}} to i8* - // CHECK-DAG: store i8* [[BP4]], i8** {{%[^,]+}} - // CHECK-DAG: store i8* [[P4]], i8** {{%[^,]+}} + // CHECK-DAG: store [10 x float]* %{{.+}}, [10 x float]** [[CBPADDR4:%.+]], + // CHECK-DAG: store [10 x float]* %{{.+}}, [10 x float]** [[CPADDR4:%.+]], + // CHECK-DAG: [[CBPADDR4]] = bitcast i8** {{%[^,]+}} to [10 x float]** + // CHECK-DAG: [[CPADDR4]] = bitcast i8** {{%[^,]+}} to [10 x float]** // CHECK-DAG: store i[[SZ]] 40, i[[SZ]]* {{%[^,]+}} - // CHECK-DAG: [[BP5:%[^,]+]] = bitcast float* %{{.+}} to i8* - // CHECK-DAG: [[P5:%[^,]+]] = bitcast float* %{{.+}} to i8* - // CHECK-DAG: store i8* [[BP5]], i8** {{%[^,]+}} - // CHECK-DAG: store i8* [[P5]], i8** {{%[^,]+}} + // CHECK-DAG: store float* %{{.+}}, float** [[CBPADDR5:%.+]], + // CHECK-DAG: store float* %{{.+}}, float** [[CPADDR5:%.+]], + // CHECK-DAG: [[CBPADDR5]] = bitcast i8** {{%[^,]+}} to float** + // CHECK-DAG: [[CPADDR5]] = bitcast i8** {{%[^,]+}} to float** // CHECK-DAG: store i[[SZ]] [[BNSIZE]], i[[SZ]]* {{%[^,]+}} - // CHECK-DAG: [[BP6:%[^,]+]] = bitcast [5 x [10 x double]]* %{{.+}} to i8* - // CHECK-DAG: [[P6:%[^,]+]] = bitcast [5 x [10 x double]]* %{{.+}} to i8* - // CHECK-DAG: store i8* [[BP6]], i8** {{%[^,]+}} - // CHECK-DAG: store i8* [[P6]], i8** {{%[^,]+}} + // CHECK-DAG: store [5 x [10 x double]]* %{{.+}}, [5 x [10 x double]]** [[CBPADDR6:%.+]], + // CHECK-DAG: store [5 x [10 x double]]* %{{.+}}, [5 x [10 x double]]** [[CPADDR6:%.+]], + // CHECK-DAG: [[CBPADDR6]] = bitcast i8** {{%[^,]+}} to [5 x [10 x double]]** + // CHECK-DAG: [[CPADDR6]] = bitcast i8** {{%[^,]+}} to [5 x [10 x double]]** // CHECK-DAG: store i[[SZ]] 400, i[[SZ]]* {{%[^,]+}} - // CHECK-DAG: [[BP7:%[^,]+]] = bitcast double* %{{.+}} to i8* - // CHECK-DAG: [[P7:%[^,]+]] = bitcast double* %{{.+}} to i8* - // CHECK-DAG: store i8* [[BP7]], i8** {{%[^,]+}} - // CHECK-DAG: store i8* [[P7]], i8** {{%[^,]+}} + // CHECK-DAG: store double* %{{.+}}, double** [[CBPADDR7:%.+]], + // CHECK-DAG: store double* %{{.+}}, double** [[CPADDR7:%.+]], + // CHECK-DAG: [[CBPADDR7]] = bitcast i8** {{%[^,]+}} to double** + // CHECK-DAG: [[CPADDR7]] = bitcast i8** {{%[^,]+}} to double** // CHECK-DAG: store i[[SZ]] [[CNSIZE]], i[[SZ]]* {{%[^,]+}} - // CHECK-DAG: [[BP8:%[^,]+]] = bitcast [[TT]]* %{{.+}} to i8* - // CHECK-DAG: [[P8:%[^,]+]] = bitcast [[TT]]* %{{.+}} to i8* - // CHECK-DAG: store i8* [[BP8]], i8** {{%[^,]+}} - // CHECK-DAG: store i8* [[P8]], i8** {{%[^,]+}} + // CHECK-DAG: store [[TT]]* %{{.+}}, [[TT]]** [[CBPADDR8:%.+]], + // CHECK-DAG: store [[TT]]* %{{.+}}, [[TT]]** [[CPADDR8:%.+]], + // CHECK-DAG: [[CBPADDR8]] = bitcast i8** {{%[^,]+}} to [[TT]]** + // CHECK-DAG: [[CPADDR8]] = bitcast i8** {{%[^,]+}} to [[TT]]** // CHECK-DAG: store i[[SZ]] {{12|16}}, i[[SZ]]* {{%[^,]+}} // CHECK: store i32 [[RET]], i32* [[RHV:%.+]], align 4 @@ -550,32 +552,34 @@ int bar(int n){ // The names below are not necessarily consistent with the names used for the // addresses above as some are repeated. -// CHECK-DAG: [[BP0:%[^,]+]] = inttoptr i[[SZ]] [[VLA0]] to i8* -// CHECK-DAG: [[P0:%[^,]+]] = inttoptr i[[SZ]] [[VLA0]] to i8* -// CHECK-DAG: store i8* [[BP0]], i8** {{%[^,]+}} -// CHECK-DAG: store i8* [[P0]], i8** {{%[^,]+}} +// CHECK-DAG: store i[[SZ]] [[VLA0]], i[[SZ]]* [[CBPADDR0:%.+]], +// CHECK-DAG: store i[[SZ]] [[VLA0]], i[[SZ]]* [[CPADDR0:%.+]], +// CHECK-DAG: [[CBPADDR0]] = bitcast i8** {{%[^,]+}} to i[[SZ]]* +// CHECK-DAG: [[CPADDR0]] = bitcast i8** {{%[^,]+}} to i[[SZ]]* // CHECK-DAG: store i[[SZ]] {{4|8}}, i[[SZ]]* {{%[^,]+}} -// CHECK-DAG: store i8* inttoptr (i[[SZ]] 2 to i8*), i8** {{%[^,]+}} -// CHECK-DAG: store i8* inttoptr (i[[SZ]] 2 to i8*), i8** {{%[^,]+}} +// CHECK-DAG: store i[[SZ]] 2, i[[SZ]]* [[CBPADDR1:%.+]], +// CHECK-DAG: store i[[SZ]] 2, i[[SZ]]* [[CPADDR1:%.+]], +// CHECK-DAG: [[CBPADDR1]] = bitcast i8** {{%[^,]+}} to i[[SZ]]* +// CHECK-DAG: [[CPADDR1]] = bitcast i8** {{%[^,]+}} to i[[SZ]]* // CHECK-DAG: store i[[SZ]] {{4|8}}, i[[SZ]]* {{%[^,]+}} -// CHECK-DAG: [[BP2:%[^,]+]] = inttoptr i[[SZ]] [[B_CVAL]] to i8* -// CHECK-DAG: [[P2:%[^,]+]] = inttoptr i[[SZ]] [[B_CVAL]] to i8* -// CHECK-DAG: store i8* [[BP2]], i8** {{%[^,]+}} -// CHECK-DAG: store i8* [[P2]], i8** {{%[^,]+}} +// CHECK-DAG: store i[[SZ]] [[B_CVAL]], i[[SZ]]* [[CBPADDR2:%.+]], +// CHECK-DAG: store i[[SZ]] [[B_CVAL]], i[[SZ]]* [[CPADDR2:%.+]], +// CHECK-DAG: [[CBPADDR2]] = bitcast i8** {{%[^,]+}} to i[[SZ]]* +// CHECK-DAG: [[CPADDR2]] = bitcast i8** {{%[^,]+}} to i[[SZ]]* // CHECK-DAG: store i[[SZ]] 4, i[[SZ]]* {{%[^,]+}} -// CHECK-DAG: [[BP3:%[^,]+]] = bitcast [[S1]]* %{{.+}} to i8* -// CHECK-DAG: [[P3:%[^,]+]] = bitcast [[S1]]* %{{.+}} to i8* -// CHECK-DAG: store i8* [[BP3]], i8** {{%[^,]+}} -// CHECK-DAG: store i8* [[P3]], i8** {{%[^,]+}} +// CHECK-DAG: store [[S1]]* %{{.+}}, [[S1]]** [[CBPADDR3:%.+]], +// CHECK-DAG: store [[S1]]* %{{.+}}, [[S1]]** [[CPADDR3:%.+]], +// CHECK-DAG: [[CBPADDR3]] = bitcast i8** {{%[^,]+}} to [[S1]]** +// CHECK-DAG: [[CPADDR3]] = bitcast i8** {{%[^,]+}} to [[S1]]** // CHECK-DAG: store i[[SZ]] 8, i[[SZ]]* {{%[^,]+}} -// CHECK-DAG: [[BP4:%[^,]+]] = bitcast i16* %{{.+}} to i8* -// CHECK-DAG: [[P4:%[^,]+]] = bitcast i16* %{{.+}} to i8* -// CHECK-DAG: store i8* [[BP4]], i8** {{%[^,]+}} -// CHECK-DAG: store i8* [[P4]], i8** {{%[^,]+}} +// CHECK-DAG: store i16* %{{.+}}, i16** [[CBPADDR4:%.+]], +// CHECK-DAG: store i16* %{{.+}}, i16** [[CPADDR4:%.+]], +// CHECK-DAG: [[CBPADDR4]] = bitcast i8** {{%[^,]+}} to i16** +// CHECK-DAG: [[CPADDR4]] = bitcast i8** {{%[^,]+}} to i16** // CHECK-DAG: store i[[SZ]] [[CSIZE]], i[[SZ]]* {{%[^,]+}} // CHECK: store i32 [[RET]], i32* [[RHV:%.+]], align 4 @@ -600,29 +604,31 @@ int bar(int n){ // CHECK-DAG: [[BPADDR0:%.+]] = getelementptr inbounds [4 x i8*], [4 x i8*]* [[BP]], i32 0, i32 0 // CHECK-DAG: [[PADDR0:%.+]] = getelementptr inbounds [4 x i8*], [4 x i8*]* [[P]], i32 0, i32 0 -// CHECK-DAG: store i8* [[BP0:%[^,]+]], i8** [[BPADDR0]] -// CHECK-DAG: store i8* [[P0:%[^,]+]], i8** [[PADDR0]] -// CHECK-DAG: [[BP0]] = inttoptr i[[SZ]] [[VAL0:%.+]] to i8* -// CHECK-DAG: [[P0]] = inttoptr i[[SZ]] [[VAL0]] to i8* +// CHECK-DAG: [[CBPADDR0:%.+]] = bitcast i8** [[BPADDR0]] to i[[SZ]]* +// CHECK-DAG: [[CPADDR0:%.+]] = bitcast i8** [[PADDR0]] to i[[SZ]]* +// CHECK-DAG: store i[[SZ]] [[VAL0:%.+]], i[[SZ]]* [[CBPADDR0]], +// CHECK-DAG: store i[[SZ]] [[VAL0]], i[[SZ]]* [[CPADDR0]], // CHECK-DAG: [[BPADDR1:%.+]] = getelementptr inbounds [4 x i8*], [4 x i8*]* [[BP]], i32 0, i32 1 // CHECK-DAG: [[PADDR1:%.+]] = getelementptr inbounds [4 x i8*], [4 x i8*]* [[P]], i32 0, i32 1 -// CHECK-DAG: store i8* [[BP1:%[^,]+]], i8** [[BPADDR1]] -// CHECK-DAG: store i8* [[P1:%[^,]+]], i8** [[PADDR1]] -// CHECK-DAG: [[BP1]] = inttoptr i[[SZ]] [[VAL1:%.+]] to i8* -// CHECK-DAG: [[P1]] = inttoptr i[[SZ]] [[VAL1]] to i8* +// CHECK-DAG: [[CBPADDR1:%.+]] = bitcast i8** [[BPADDR1]] to i[[SZ]]* +// CHECK-DAG: [[CPADDR1:%.+]] = bitcast i8** [[PADDR1]] to i[[SZ]]* +// CHECK-DAG: store i[[SZ]] [[VAL1:%.+]], i[[SZ]]* [[CBPADDR1]], +// CHECK-DAG: store i[[SZ]] [[VAL1]], i[[SZ]]* [[CPADDR1]], // CHECK-DAG: [[BPADDR2:%.+]] = getelementptr inbounds [4 x i8*], [4 x i8*]* [[BP]], i32 0, i32 2 // CHECK-DAG: [[PADDR2:%.+]] = getelementptr inbounds [4 x i8*], [4 x i8*]* [[P]], i32 0, i32 2 -// CHECK-DAG: store i8* [[BP2:%[^,]+]], i8** [[BPADDR2]] -// CHECK-DAG: store i8* [[P2:%[^,]+]], i8** [[PADDR2]] +// CHECK-DAG: [[CBPADDR2:%.+]] = bitcast i8** [[BPADDR2]] to i[[SZ]]* +// CHECK-DAG: [[CPADDR2:%.+]] = bitcast i8** [[PADDR2]] to i[[SZ]]* +// CHECK-DAG: store i[[SZ]] [[VAL2:%.+]], i[[SZ]]* [[CBPADDR2]], +// CHECK-DAG: store i[[SZ]] [[VAL2]], i[[SZ]]* [[CPADDR2]], // CHECK-DAG: [[BPADDR3:%.+]] = getelementptr inbounds [4 x i8*], [4 x i8*]* [[BP]], i32 0, i32 3 // CHECK-DAG: [[PADDR3:%.+]] = getelementptr inbounds [4 x i8*], [4 x i8*]* [[P]], i32 0, i32 3 -// CHECK-DAG: store i8* [[BP3:%[^,]+]], i8** [[BPADDR3]] -// CHECK-DAG: store i8* [[P3:%[^,]+]], i8** [[PADDR3]] -// CHECK-DAG: [[BP3]] = bitcast [10 x i32]* %{{.+}} to i8* -// CHECK-DAG: [[P3]] = bitcast [10 x i32]* %{{.+}} to i8* +// CHECK-DAG: [[CBPADDR3:%.+]] = bitcast i8** [[BPADDR3]] to [10 x i32]** +// CHECK-DAG: [[CPADDR3:%.+]] = bitcast i8** [[PADDR3]] to [10 x i32]** +// CHECK-DAG: store [10 x i32]* [[VAL3:%.+]], [10 x i32]** [[CBPADDR3]], +// CHECK-DAG: store [10 x i32]* [[VAL3]], [10 x i32]** [[CPADDR3]], // CHECK: store i32 [[RET]], i32* [[RHV:%.+]], align 4 // CHECK-NEXT: br label %[[IFEND:.+]] @@ -652,24 +658,24 @@ int bar(int n){ // CHECK-DAG: [[BPADDR0:%.+]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[BP]], i32 0, i32 0 // CHECK-DAG: [[PADDR0:%.+]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[P]], i32 0, i32 0 -// CHECK-DAG: store i8* [[BP0:%[^,]+]], i8** [[BPADDR0]] -// CHECK-DAG: store i8* [[P0:%[^,]+]], i8** [[PADDR0]] -// CHECK-DAG: [[BP0]] = inttoptr i[[SZ]] [[VAL0:%.+]] to i8* -// CHECK-DAG: [[P0]] = inttoptr i[[SZ]] [[VAL0]] to i8* +// CHECK-DAG: [[CBPADDR0:%.+]] = bitcast i8** [[BPADDR0]] to i[[SZ]]* +// CHECK-DAG: [[CPADDR0:%.+]] = bitcast i8** [[PADDR0]] to i[[SZ]]* +// CHECK-DAG: store i[[SZ]] [[VAL0:%.+]], i[[SZ]]* [[CBPADDR0]], +// CHECK-DAG: store i[[SZ]] [[VAL0]], i[[SZ]]* [[CPADDR0]], // CHECK-DAG: [[BPADDR1:%.+]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[BP]], i32 0, i32 1 // CHECK-DAG: [[PADDR1:%.+]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[P]], i32 0, i32 1 -// CHECK-DAG: store i8* [[BP1:%[^,]+]], i8** [[BPADDR1]] -// CHECK-DAG: store i8* [[P1:%[^,]+]], i8** [[PADDR1]] -// CHECK-DAG: [[BP1]] = inttoptr i[[SZ]] [[VAL1:%.+]] to i8* -// CHECK-DAG: [[P1]] = inttoptr i[[SZ]] [[VAL1]] to i8* +// CHECK-DAG: [[CBPADDR1:%.+]] = bitcast i8** [[BPADDR1]] to i[[SZ]]* +// CHECK-DAG: [[CPADDR1:%.+]] = bitcast i8** [[PADDR1]] to i[[SZ]]* +// CHECK-DAG: store i[[SZ]] [[VAL1:%.+]], i[[SZ]]* [[CBPADDR1]], +// CHECK-DAG: store i[[SZ]] [[VAL1]], i[[SZ]]* [[CPADDR1]], // CHECK-DAG: [[BPADDR2:%.+]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[BP]], i32 0, i32 2 // CHECK-DAG: [[PADDR2:%.+]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[P]], i32 0, i32 2 -// CHECK-DAG: store i8* [[BP2:%[^,]+]], i8** [[BPADDR2]] -// CHECK-DAG: store i8* [[P2:%[^,]+]], i8** [[PADDR2]] -// CHECK-DAG: [[BP2]] = bitcast [10 x i32]* %{{.+}} to i8* -// CHECK-DAG: [[P2]] = bitcast [10 x i32]* %{{.+}} to i8* +// CHECK-DAG: [[CBPADDR2:%.+]] = bitcast i8** [[BPADDR2]] to [10 x i32]** +// CHECK-DAG: [[CPADDR2:%.+]] = bitcast i8** [[PADDR2]] to [10 x i32]** +// CHECK-DAG: store [10 x i32]* [[VAL2:%.+]], [10 x i32]** [[CBPADDR2]], +// CHECK-DAG: store [10 x i32]* [[VAL2]], [10 x i32]** [[CPADDR2]], // CHECK: store i32 [[RET]], i32* [[RHV:%.+]], align 4 // CHECK-NEXT: br label %[[IFEND:.+]] diff --git a/test/OpenMP/target_teams_codegen.cpp b/test/OpenMP/target_teams_codegen.cpp index 4b08a6015a..208cda6bb3 100644 --- a/test/OpenMP/target_teams_codegen.cpp +++ b/test/OpenMP/target_teams_codegen.cpp @@ -121,10 +121,10 @@ int foo(int n) { // CHECK-DAG: [[P]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[PR:%[^,]+]], i32 0, i32 0 // CHECK-DAG: [[BPADDR0:%.+]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[BPR]], i32 0, i32 [[IDX0:[0-9]+]] // CHECK-DAG: [[PADDR0:%.+]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[PR]], i32 0, i32 [[IDX0]] - // CHECK-DAG: store i8* [[BP0:%[^,]+]], i8** [[BPADDR0]] - // CHECK-DAG: store i8* [[P0:%[^,]+]], i8** [[PADDR0]] - // CHECK-DAG: [[BP0]] = inttoptr i[[SZ]] %{{.+}} to i8* - // CHECK-DAG: [[P0]] = inttoptr i[[SZ]] %{{.+}} to i8* + // CHECK-DAG: [[CBPADDR0:%.+]] = bitcast i8** [[BPADDR0]] to i[[SZ]]* + // CHECK-DAG: [[CPADDR0:%.+]] = bitcast i8** [[PADDR0]] to i[[SZ]]* + // CHECK-DAG: store i[[SZ]] %{{.+}}, i[[SZ]]* [[CBPADDR0]] + // CHECK-DAG: store i[[SZ]] %{{.+}}, i[[SZ]]* [[CPADDR0]] // CHECK: store i32 [[RET]], i32* [[RHV:%.+]], align 4 // CHECK: [[RET2:%.+]] = load i32, i32* [[RHV]], align 4 @@ -148,17 +148,17 @@ int foo(int n) { // CHECK-DAG: [[BPADDR0:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[BP]], i32 0, i32 0 // CHECK-DAG: [[PADDR0:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[P]], i32 0, i32 0 - // CHECK-DAG: store i8* [[BP0:%[^,]+]], i8** [[BPADDR0]] - // CHECK-DAG: store i8* [[P0:%[^,]+]], i8** [[PADDR0]] - // CHECK-DAG: [[BP0]] = inttoptr i[[SZ]] %{{.+}} to i8* - // CHECK-DAG: [[P0]] = inttoptr i[[SZ]] %{{.+}} to i8* + // CHECK-DAG: [[CBPADDR0:%.+]] = bitcast i8** [[BPADDR0]] to i[[SZ]]* + // CHECK-DAG: [[CPADDR0:%.+]] = bitcast i8** [[PADDR0]] to i[[SZ]]* + // CHECK-DAG: store i[[SZ]] %{{.+}}, i[[SZ]]* [[CBPADDR0]] + // CHECK-DAG: store i[[SZ]] %{{.+}}, i[[SZ]]* [[CPADDR0]] // CHECK-DAG: [[BPADDR1:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[BP]], i32 0, i32 1 // CHECK-DAG: [[PADDR1:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[P]], i32 0, i32 1 - // CHECK-DAG: store i8* [[BP1:%[^,]+]], i8** [[BPADDR1]] - // CHECK-DAG: store i8* [[P1:%[^,]+]], i8** [[PADDR1]] - // CHECK-DAG: [[BP1]] = inttoptr i[[SZ]] %{{.+}} to i8* - // CHECK-DAG: [[P1]] = inttoptr i[[SZ]] %{{.+}} to i8* + // CHECK-DAG: [[CBPADDR1:%.+]] = bitcast i8** [[BPADDR1]] to i[[SZ]]* + // CHECK-DAG: [[CPADDR1:%.+]] = bitcast i8** [[PADDR1]] to i[[SZ]]* + // CHECK-DAG: store i[[SZ]] %{{.+}}, i[[SZ]]* [[CBPADDR1]] + // CHECK-DAG: store i[[SZ]] %{{.+}}, i[[SZ]]* [[CPADDR1]] // CHECK: store i32 [[RET]], i32* [[RHV:%.+]], align 4 // CHECK-NEXT: br label %[[IFEND:.+]] @@ -232,56 +232,58 @@ int foo(int n) { // The names below are not necessarily consistent with the names used for the // addresses above as some are repeated. - // CHECK-DAG: [[BP0:%[^,]+]] = inttoptr i[[SZ]] [[VLA0]] to i8* - // CHECK-DAG: [[P0:%[^,]+]] = inttoptr i[[SZ]] [[VLA0]] to i8* - // CHECK-DAG: store i8* [[BP0]], i8** {{%[^,]+}} - // CHECK-DAG: store i8* [[P0]], i8** {{%[^,]+}} + // CHECK-DAG: store i[[SZ]] [[VLA0]], i[[SZ]]* [[CBPADDR0:%.+]], + // CHECK-DAG: store i[[SZ]] [[VLA0]], i[[SZ]]* [[CPADDR0:%.+]], + // CHECK-DAG: [[CBPADDR0]] = bitcast i8** {{%[^,]+}} to i[[SZ]]* + // CHECK-DAG: [[CPADDR0]] = bitcast i8** {{%[^,]+}} to i[[SZ]]* // CHECK-DAG: store i[[SZ]] {{4|8}}, i[[SZ]]* {{%[^,]+}} - // CHECK-DAG: [[BP1:%[^,]+]] = inttoptr i[[SZ]] [[VLA1]] to i8* - // CHECK-DAG: [[P1:%[^,]+]] = inttoptr i[[SZ]] [[VLA1]] to i8* - // CHECK-DAG: store i8* [[BP1]], i8** {{%[^,]+}} - // CHECK-DAG: store i8* [[P1]], i8** {{%[^,]+}} + // CHECK-DAG: store i[[SZ]] [[VLA1]], i[[SZ]]* [[CBPADDR1:%.+]], + // CHECK-DAG: store i[[SZ]] [[VLA1]], i[[SZ]]* [[CPADDR1:%.+]], + // CHECK-DAG: [[CBPADDR1]] = bitcast i8** {{%[^,]+}} to i[[SZ]]* + // CHECK-DAG: [[CPADDR1]] = bitcast i8** {{%[^,]+}} to i[[SZ]]* // CHECK-DAG: store i[[SZ]] {{4|8}}, i[[SZ]]* {{%[^,]+}} - // CHECK-DAG: store i8* inttoptr (i[[SZ]] 5 to i8*), i8** {{%[^,]+}} - // CHECK-DAG: store i8* inttoptr (i[[SZ]] 5 to i8*), i8** {{%[^,]+}} + // CHECK-DAG: store i[[SZ]] 5, i[[SZ]]* [[CBPADDR2:%.+]], + // CHECK-DAG: store i[[SZ]] 5, i[[SZ]]* [[CPADDR2:%.+]], + // CHECK-DAG: [[CBPADDR2]] = bitcast i8** {{%[^,]+}} to i[[SZ]]* + // CHECK-DAG: [[CPADDR2]] = bitcast i8** {{%[^,]+}} to i[[SZ]]* // CHECK-DAG: store i[[SZ]] {{4|8}}, i[[SZ]]* {{%[^,]+}} - // CHECK-DAG: [[BP3:%[^,]+]] = inttoptr i[[SZ]] [[A_CVAL]] to i8* - // CHECK-DAG: [[P3:%[^,]+]] = inttoptr i[[SZ]] [[A_CVAL]] to i8* - // CHECK-DAG: store i8* [[BP3]], i8** {{%[^,]+}} - // CHECK-DAG: store i8* [[P3]], i8** {{%[^,]+}} + // CHECK-DAG: store i[[SZ]] [[A_CVAL]], i[[SZ]]* [[CBPADDR3:%.+]], + // CHECK-DAG: store i[[SZ]] [[A_CVAL]], i[[SZ]]* [[CPADDR3:%.+]], + // CHECK-DAG: [[CBPADDR3]] = bitcast i8** {{%[^,]+}} to i[[SZ]]* + // CHECK-DAG: [[CPADDR3]] = bitcast i8** {{%[^,]+}} to i[[SZ]]* // CHECK-DAG: store i[[SZ]] 4, i[[SZ]]* {{%[^,]+}} - // CHECK-DAG: [[BP4:%[^,]+]] = bitcast [10 x float]* %{{.+}} to i8* - // CHECK-DAG: [[P4:%[^,]+]] = bitcast [10 x float]* %{{.+}} to i8* - // CHECK-DAG: store i8* [[BP4]], i8** {{%[^,]+}} - // CHECK-DAG: store i8* [[P4]], i8** {{%[^,]+}} + // CHECK-DAG: store [10 x float]* %{{.+}}, [10 x float]** [[CBPADDR4:%.+]], + // CHECK-DAG: store [10 x float]* %{{.+}}, [10 x float]** [[CPADDR4:%.+]], + // CHECK-DAG: [[CBPADDR4]] = bitcast i8** {{%[^,]+}} to [10 x float]** + // CHECK-DAG: [[CPADDR4]] = bitcast i8** {{%[^,]+}} to [10 x float]** // CHECK-DAG: store i[[SZ]] 40, i[[SZ]]* {{%[^,]+}} - // CHECK-DAG: [[BP5:%[^,]+]] = bitcast float* %{{.+}} to i8* - // CHECK-DAG: [[P5:%[^,]+]] = bitcast float* %{{.+}} to i8* - // CHECK-DAG: store i8* [[BP5]], i8** {{%[^,]+}} - // CHECK-DAG: store i8* [[P5]], i8** {{%[^,]+}} + // CHECK-DAG: store float* %{{.+}}, float** [[CBPADDR5:%.+]], + // CHECK-DAG: store float* %{{.+}}, float** [[CPADDR5:%.+]], + // CHECK-DAG: [[CBPADDR5]] = bitcast i8** {{%[^,]+}} to float** + // CHECK-DAG: [[CPADDR5]] = bitcast i8** {{%[^,]+}} to float** // CHECK-DAG: store i[[SZ]] [[BNSIZE]], i[[SZ]]* {{%[^,]+}} - // CHECK-DAG: [[BP6:%[^,]+]] = bitcast [5 x [10 x double]]* %{{.+}} to i8* - // CHECK-DAG: [[P6:%[^,]+]] = bitcast [5 x [10 x double]]* %{{.+}} to i8* - // CHECK-DAG: store i8* [[BP6]], i8** {{%[^,]+}} - // CHECK-DAG: store i8* [[P6]], i8** {{%[^,]+}} + // CHECK-DAG: store [5 x [10 x double]]* %{{.+}}, [5 x [10 x double]]** [[CBPADDR6:%.+]], + // CHECK-DAG: store [5 x [10 x double]]* %{{.+}}, [5 x [10 x double]]** [[CPADDR6:%.+]], + // CHECK-DAG: [[CBPADDR6]] = bitcast i8** {{%[^,]+}} to [5 x [10 x double]]** + // CHECK-DAG: [[CPADDR6]] = bitcast i8** {{%[^,]+}} to [5 x [10 x double]]** // CHECK-DAG: store i[[SZ]] 400, i[[SZ]]* {{%[^,]+}} - // CHECK-DAG: [[BP7:%[^,]+]] = bitcast double* %{{.+}} to i8* - // CHECK-DAG: [[P7:%[^,]+]] = bitcast double* %{{.+}} to i8* - // CHECK-DAG: store i8* [[BP7]], i8** {{%[^,]+}} - // CHECK-DAG: store i8* [[P7]], i8** {{%[^,]+}} + // CHECK-DAG: store double* %{{.+}}, double** [[CBPADDR7:%.+]], + // CHECK-DAG: store double* %{{.+}}, double** [[CPADDR7:%.+]], + // CHECK-DAG: [[CBPADDR7]] = bitcast i8** {{%[^,]+}} to double** + // CHECK-DAG: [[CPADDR7]] = bitcast i8** {{%[^,]+}} to double** // CHECK-DAG: store i[[SZ]] [[CNSIZE]], i[[SZ]]* {{%[^,]+}} - // CHECK-DAG: [[BP8:%[^,]+]] = bitcast [[TT]]* %{{.+}} to i8* - // CHECK-DAG: [[P8:%[^,]+]] = bitcast [[TT]]* %{{.+}} to i8* - // CHECK-DAG: store i8* [[BP8]], i8** {{%[^,]+}} - // CHECK-DAG: store i8* [[P8]], i8** {{%[^,]+}} + // CHECK-DAG: store [[TT]]* %{{.+}}, [[TT]]** [[CBPADDR8:%.+]], + // CHECK-DAG: store [[TT]]* %{{.+}}, [[TT]]** [[CPADDR8:%.+]], + // CHECK-DAG: [[CBPADDR8]] = bitcast i8** {{%[^,]+}} to [[TT]]** + // CHECK-DAG: [[CPADDR8]] = bitcast i8** {{%[^,]+}} to [[TT]]** // CHECK-DAG: store i[[SZ]] {{12|16}}, i[[SZ]]* {{%[^,]+}} // CHECK: store i32 [[RET]], i32* [[RHV:%.+]], align 4 @@ -550,32 +552,34 @@ int bar(int n){ // The names below are not necessarily consistent with the names used for the // addresses above as some are repeated. -// CHECK-DAG: [[BP0:%[^,]+]] = inttoptr i[[SZ]] [[VLA0]] to i8* -// CHECK-DAG: [[P0:%[^,]+]] = inttoptr i[[SZ]] [[VLA0]] to i8* -// CHECK-DAG: store i8* [[BP0]], i8** {{%[^,]+}} -// CHECK-DAG: store i8* [[P0]], i8** {{%[^,]+}} +// CHECK-DAG: store i[[SZ]] [[VLA0]], i[[SZ]]* [[CBPADDR0:%.+]], +// CHECK-DAG: store i[[SZ]] [[VLA0]], i[[SZ]]* [[CPADDR0:%.+]], +// CHECK-DAG: [[CBPADDR0]] = bitcast i8** {{%[^,]+}} to i[[SZ]]* +// CHECK-DAG: [[CPADDR0]] = bitcast i8** {{%[^,]+}} to i[[SZ]]* // CHECK-DAG: store i[[SZ]] {{4|8}}, i[[SZ]]* {{%[^,]+}} -// CHECK-DAG: store i8* inttoptr (i[[SZ]] 2 to i8*), i8** {{%[^,]+}} -// CHECK-DAG: store i8* inttoptr (i[[SZ]] 2 to i8*), i8** {{%[^,]+}} +// CHECK-DAG: store i[[SZ]] 2, i[[SZ]]* [[CBPADDR1:%.+]], +// CHECK-DAG: store i[[SZ]] 2, i[[SZ]]* [[CPADDR1:%.+]], +// CHECK-DAG: [[CBPADDR1]] = bitcast i8** {{%[^,]+}} to i[[SZ]]* +// CHECK-DAG: [[CPADDR1]] = bitcast i8** {{%[^,]+}} to i[[SZ]]* // CHECK-DAG: store i[[SZ]] {{4|8}}, i[[SZ]]* {{%[^,]+}} -// CHECK-DAG: [[BP2:%[^,]+]] = inttoptr i[[SZ]] [[B_CVAL]] to i8* -// CHECK-DAG: [[P2:%[^,]+]] = inttoptr i[[SZ]] [[B_CVAL]] to i8* -// CHECK-DAG: store i8* [[BP2]], i8** {{%[^,]+}} -// CHECK-DAG: store i8* [[P2]], i8** {{%[^,]+}} +// CHECK-DAG: store i[[SZ]] [[B_CVAL]], i[[SZ]]* [[CBPADDR2:%.+]], +// CHECK-DAG: store i[[SZ]] [[B_CVAL]], i[[SZ]]* [[CPADDR2:%.+]], +// CHECK-DAG: [[CBPADDR2]] = bitcast i8** {{%[^,]+}} to i[[SZ]]* +// CHECK-DAG: [[CPADDR2]] = bitcast i8** {{%[^,]+}} to i[[SZ]]* // CHECK-DAG: store i[[SZ]] 4, i[[SZ]]* {{%[^,]+}} -// CHECK-DAG: [[BP3:%[^,]+]] = bitcast [[S1]]* %{{.+}} to i8* -// CHECK-DAG: [[P3:%[^,]+]] = bitcast [[S1]]* %{{.+}} to i8* -// CHECK-DAG: store i8* [[BP3]], i8** {{%[^,]+}} -// CHECK-DAG: store i8* [[P3]], i8** {{%[^,]+}} +// CHECK-DAG: store [[S1]]* %{{.+}}, [[S1]]** [[CBPADDR3:%.+]], +// CHECK-DAG: store [[S1]]* %{{.+}}, [[S1]]** [[CPADDR3:%.+]], +// CHECK-DAG: [[CBPADDR3]] = bitcast i8** {{%[^,]+}} to [[S1]]** +// CHECK-DAG: [[CPADDR3]] = bitcast i8** {{%[^,]+}} to [[S1]]** // CHECK-DAG: store i[[SZ]] 8, i[[SZ]]* {{%[^,]+}} -// CHECK-DAG: [[BP4:%[^,]+]] = bitcast i16* %{{.+}} to i8* -// CHECK-DAG: [[P4:%[^,]+]] = bitcast i16* %{{.+}} to i8* -// CHECK-DAG: store i8* [[BP4]], i8** {{%[^,]+}} -// CHECK-DAG: store i8* [[P4]], i8** {{%[^,]+}} +// CHECK-DAG: store i16* %{{.+}}, i16** [[CBPADDR4:%.+]], +// CHECK-DAG: store i16* %{{.+}}, i16** [[CPADDR4:%.+]], +// CHECK-DAG: [[CBPADDR4]] = bitcast i8** {{%[^,]+}} to i16** +// CHECK-DAG: [[CPADDR4]] = bitcast i8** {{%[^,]+}} to i16** // CHECK-DAG: store i[[SZ]] [[CSIZE]], i[[SZ]]* {{%[^,]+}} // CHECK: store i32 [[RET]], i32* [[RHV:%.+]], align 4 @@ -600,29 +604,31 @@ int bar(int n){ // CHECK-DAG: [[BPADDR0:%.+]] = getelementptr inbounds [4 x i8*], [4 x i8*]* [[BP]], i32 0, i32 0 // CHECK-DAG: [[PADDR0:%.+]] = getelementptr inbounds [4 x i8*], [4 x i8*]* [[P]], i32 0, i32 0 -// CHECK-DAG: store i8* [[BP0:%[^,]+]], i8** [[BPADDR0]] -// CHECK-DAG: store i8* [[P0:%[^,]+]], i8** [[PADDR0]] -// CHECK-DAG: [[BP0]] = inttoptr i[[SZ]] [[VAL0:%.+]] to i8* -// CHECK-DAG: [[P0]] = inttoptr i[[SZ]] [[VAL0]] to i8* +// CHECK-DAG: store i[[SZ]] [[VAL0:%.+]], i[[SZ]]* [[CBPADDR0:%.+]], +// CHECK-DAG: store i[[SZ]] [[VAL0]], i[[SZ]]* [[CPADDR0:%.+]], +// CHECK-DAG: [[CBPADDR0]] = bitcast i8** {{%[^,]+}} to i[[SZ]]* +// CHECK-DAG: [[CPADDR0]] = bitcast i8** {{%[^,]+}} to i[[SZ]]* // CHECK-DAG: [[BPADDR1:%.+]] = getelementptr inbounds [4 x i8*], [4 x i8*]* [[BP]], i32 0, i32 1 // CHECK-DAG: [[PADDR1:%.+]] = getelementptr inbounds [4 x i8*], [4 x i8*]* [[P]], i32 0, i32 1 -// CHECK-DAG: store i8* [[BP1:%[^,]+]], i8** [[BPADDR1]] -// CHECK-DAG: store i8* [[P1:%[^,]+]], i8** [[PADDR1]] -// CHECK-DAG: [[BP1]] = inttoptr i[[SZ]] [[VAL1:%.+]] to i8* -// CHECK-DAG: [[P1]] = inttoptr i[[SZ]] [[VAL1]] to i8* +// CHECK-DAG: store i[[SZ]] [[VAL1:%.+]], i[[SZ]]* [[CBPADDR1:%.+]], +// CHECK-DAG: store i[[SZ]] [[VAL1]], i[[SZ]]* [[CPADDR1:%.+]], +// CHECK-DAG: [[CBPADDR1]] = bitcast i8** {{%[^,]+}} to i[[SZ]]* +// CHECK-DAG: [[CPADDR1]] = bitcast i8** {{%[^,]+}} to i[[SZ]]* // CHECK-DAG: [[BPADDR2:%.+]] = getelementptr inbounds [4 x i8*], [4 x i8*]* [[BP]], i32 0, i32 2 // CHECK-DAG: [[PADDR2:%.+]] = getelementptr inbounds [4 x i8*], [4 x i8*]* [[P]], i32 0, i32 2 -// CHECK-DAG: store i8* [[BP2:%[^,]+]], i8** [[BPADDR2]] -// CHECK-DAG: store i8* [[P2:%[^,]+]], i8** [[PADDR2]] +// CHECK-DAG: store i[[SZ]] [[VAL2:%.+]], i[[SZ]]* [[CBPADDR2:%.+]], +// CHECK-DAG: store i[[SZ]] [[VAL2]], i[[SZ]]* [[CPADDR2:%.+]], +// CHECK-DAG: [[CBPADDR2]] = bitcast i8** {{%[^,]+}} to i[[SZ]]* +// CHECK-DAG: [[CPADDR2]] = bitcast i8** {{%[^,]+}} to i[[SZ]]* // CHECK-DAG: [[BPADDR3:%.+]] = getelementptr inbounds [4 x i8*], [4 x i8*]* [[BP]], i32 0, i32 3 // CHECK-DAG: [[PADDR3:%.+]] = getelementptr inbounds [4 x i8*], [4 x i8*]* [[P]], i32 0, i32 3 -// CHECK-DAG: store i8* [[BP3:%[^,]+]], i8** [[BPADDR3]] -// CHECK-DAG: store i8* [[P3:%[^,]+]], i8** [[PADDR3]] -// CHECK-DAG: [[BP3]] = bitcast [10 x i32]* %{{.+}} to i8* -// CHECK-DAG: [[P3]] = bitcast [10 x i32]* %{{.+}} to i8* +// CHECK-DAG: store [10 x i32]* %{{.+}}, [10 x i32]** [[CBPADDR3:%.+]], +// CHECK-DAG: store [10 x i32]* %{{.+}}, [10 x i32]** [[CPADDR3:%.+]], +// CHECK-DAG: [[CBPADDR3]] = bitcast i8** {{%[^,]+}} to [10 x i32]** +// CHECK-DAG: [[CPADDR3]] = bitcast i8** {{%[^,]+}} to [10 x i32]** // CHECK: store i32 [[RET]], i32* [[RHV:%.+]], align 4 // CHECK-NEXT: br label %[[IFEND:.+]] @@ -652,24 +658,24 @@ int bar(int n){ // CHECK-DAG: [[BPADDR0:%.+]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[BP]], i32 0, i32 0 // CHECK-DAG: [[PADDR0:%.+]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[P]], i32 0, i32 0 -// CHECK-DAG: store i8* [[BP0:%[^,]+]], i8** [[BPADDR0]] -// CHECK-DAG: store i8* [[P0:%[^,]+]], i8** [[PADDR0]] -// CHECK-DAG: [[BP0]] = inttoptr i[[SZ]] [[VAL0:%.+]] to i8* -// CHECK-DAG: [[P0]] = inttoptr i[[SZ]] [[VAL0]] to i8* +// CHECK-DAG: store i[[SZ]] [[VAL0:%.+]], i[[SZ]]* [[CBPADDR0:%.+]], +// CHECK-DAG: store i[[SZ]] [[VAL0]], i[[SZ]]* [[CPADDR0:%.+]], +// CHECK-DAG: [[CBPADDR0]] = bitcast i8** {{%[^,]+}} to i[[SZ]]* +// CHECK-DAG: [[CPADDR0]] = bitcast i8** {{%[^,]+}} to i[[SZ]]* // CHECK-DAG: [[BPADDR1:%.+]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[BP]], i32 0, i32 1 // CHECK-DAG: [[PADDR1:%.+]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[P]], i32 0, i32 1 -// CHECK-DAG: store i8* [[BP1:%[^,]+]], i8** [[BPADDR1]] -// CHECK-DAG: store i8* [[P1:%[^,]+]], i8** [[PADDR1]] -// CHECK-DAG: [[BP1]] = inttoptr i[[SZ]] [[VAL1:%.+]] to i8* -// CHECK-DAG: [[P1]] = inttoptr i[[SZ]] [[VAL1]] to i8* +// CHECK-DAG: store i[[SZ]] [[VAL1:%.+]], i[[SZ]]* [[CBPADDR1:%.+]], +// CHECK-DAG: store i[[SZ]] [[VAL1]], i[[SZ]]* [[CPADDR1:%.+]], +// CHECK-DAG: [[CBPADDR1]] = bitcast i8** {{%[^,]+}} to i[[SZ]]* +// CHECK-DAG: [[CPADDR1]] = bitcast i8** {{%[^,]+}} to i[[SZ]]* // CHECK-DAG: [[BPADDR2:%.+]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[BP]], i32 0, i32 2 // CHECK-DAG: [[PADDR2:%.+]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[P]], i32 0, i32 2 -// CHECK-DAG: store i8* [[BP2:%[^,]+]], i8** [[BPADDR2]] -// CHECK-DAG: store i8* [[P2:%[^,]+]], i8** [[PADDR2]] -// CHECK-DAG: [[BP2]] = bitcast [10 x i32]* %{{.+}} to i8* -// CHECK-DAG: [[P2]] = bitcast [10 x i32]* %{{.+}} to i8* +// CHECK-DAG: store [10 x i32]* [[VAL2:%.+]], [10 x i32]** [[CBPADDR2:%.+]], +// CHECK-DAG: store [10 x i32]* [[VAL2]], [10 x i32]** [[CPADDR2:%.+]], +// CHECK-DAG: [[CBPADDR2]] = bitcast i8** {{%[^,]+}} to [10 x i32]** +// CHECK-DAG: [[CPADDR2]] = bitcast i8** {{%[^,]+}} to [10 x i32]** // CHECK: store i32 [[RET]], i32* [[RHV:%.+]], align 4 // CHECK-NEXT: br label %[[IFEND:.+]] diff --git a/test/OpenMP/target_update_codegen.cpp b/test/OpenMP/target_update_codegen.cpp index f74ed49975..f1e61a54c6 100644 --- a/test/OpenMP/target_update_codegen.cpp +++ b/test/OpenMP/target_update_codegen.cpp @@ -45,8 +45,10 @@ void foo(int arg) { // CK1-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK1-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK1-DAG: store i8* bitcast ([100 x double]* @gc to i8*), i8** [[BP0]] - // CK1-DAG: store i8* bitcast ([100 x double]* @gc to i8*), i8** [[P0]] + // CK1-DAG: [[BPC0:%.+]] = bitcast i8** [[BP0]] to [100 x double]** + // CK1-DAG: [[PC0:%.+]] = bitcast i8** [[P0]] to [100 x double]** + // CK1-DAG: store [100 x double]* @gc, [100 x double]** [[BPC0]] + // CK1-DAG: store [100 x double]* @gc, [100 x double]** [[PC0]] // CK1: %{{.+}} = add nsw i32 %{{[^,]+}}, 1 #pragma omp target update if(1+3-5) device(arg) from(gc) @@ -66,10 +68,10 @@ void foo(int arg) { // CK1-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK1-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK1-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK1-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] - // CK1-DAG: [[CBPVAL0]] = bitcast i32* [[VAR0:%.+]] to i8* - // CK1-DAG: [[CPVAL0]] = bitcast i32* [[VAR0]] to i8* + // CK1-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to i32** + // CK1-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to i32** + // CK1-DAG: store i32* [[VAL0:%[^,]+]], i32** [[CBP0]] + // CK1-DAG: store i32* [[VAL0]], i32** [[CP0]] // CK1: br label %[[IFEND:[^,]+]] // CK1: [[IFELSE]] @@ -91,11 +93,11 @@ void foo(int arg) { // CK1-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK1-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 // CK1-DAG: [[S0:%.+]] = getelementptr inbounds {{.+}}[[S]], i{{.+}} 0, i{{.+}} 0 - // CK1-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] - // CK1-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] + // CK1-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to float** + // CK1-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to float** + // CK1-DAG: store float* [[VAL0:%[^,]+]], float** [[CBP0]] + // CK1-DAG: store float* [[VAL0]], float** [[CP0]] // CK1-DAG: store i[[sz]] [[CSVAL0:%[^,]+]], i[[sz]]* [[S0]] - // CK1-DAG: [[CBPVAL0]] = bitcast float* [[VAR0:%.+]] to i8* - // CK1-DAG: [[CPVAL0]] = bitcast float* [[VAR0]] to i8* // CK1-DAG: [[CSVAL0]] = mul nuw i[[sz]] %{{[^,]+}}, 4 // CK1: %{{.+}} = add nsw i32 %{{[^,]+}}, 1 // CK1-NOT: __tgt_target_data_end @@ -112,16 +114,19 @@ void foo(int arg) { // CK1-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK1-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 - // CK1-DAG: store i8* bitcast ([[ST]]* @gb to i8*), i8** [[BP0]] - // CK1-DAG: store i8* bitcast (double** getelementptr inbounds ([[ST]], [[ST]]* @gb, i32 0, i32 1) to i8*), i8** [[P0]] + // CK1-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[ST]]** + // CK1-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to double*** + // CK1-DAG: store [[ST]]* @gb, [[ST]]** [[CBP0]] + // CK1-DAG: store double** getelementptr inbounds ([[ST]], [[ST]]* @gb, i32 0, i32 1), double*** [[CP0]] // CK1-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1 // CK1-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1 - // CK1-DAG: store i8* bitcast (double** getelementptr inbounds ([[ST]], [[ST]]* @gb, i32 0, i32 1) to i8*), i8** [[BP1]] - // CK1-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]] - // CK1-DAG: [[CPVAL1]] = bitcast double* [[SEC1:%.+]] to i8* - // CK1-DAG: [[SEC1]] = getelementptr inbounds {{.+}}double* [[SEC11:%[^,]+]], i{{.+}} 0 + // CK1-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to double*** + // CK1-DAG: store double** getelementptr inbounds ([[ST]], [[ST]]* @gb, i32 0, i32 1), double*** [[CBP1]] + // CK1-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to double** + // CK1-DAG: store double* [[VAL1:%[^,]+]], double** [[CP1]] + // CK1-DAG: [[VAL1]] = getelementptr inbounds {{.+}}double* [[SEC11:%.+]], i{{.+}} 0 // CK1-DAG: [[SEC11]] = load double*, double** getelementptr inbounds ([[ST]], [[ST]]* @gb, i32 0, i32 1), // CK1: %{{.+}} = add nsw i32 %{{[^,]+}}, 1 @@ -172,19 +177,19 @@ int bar(int arg){ // CK2-DAG: [[BP0:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 0 // CK2-DAG: [[P0:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 0 -// CK2-DAG: store i8* [[CBPVAL0:%[^,]+]], i8** [[BP0]] -// CK2-DAG: store i8* [[CPVAL0:%[^,]+]], i8** [[P0]] -// CK2-DAG: [[CBPVAL0]] = bitcast [[ST]]* [[VAR0:%.+]] to i8* -// CK2-DAG: [[CPVAL0]] = bitcast double** [[SEC0:%[^,]+]] to i8* +// CK2-DAG: [[CBP0:%.+]] = bitcast i8** [[BP0]] to [[ST]]** +// CK2-DAG: [[CP0:%.+]] = bitcast i8** [[P0]] to double*** +// CK2-DAG: store [[ST]]* [[VAR0:%[^,]+]], [[ST]]** [[CBP0]] +// CK2-DAG: store double** [[SEC0:%[^,]+]], double*** [[CP0]] // CK2-DAG: [[SEC0]] = getelementptr inbounds {{.*}}[[ST]]* [[VAR0]], i32 0, i32 1 // CK2-DAG: [[BP1:%.+]] = getelementptr inbounds {{.+}}[[BP]], i{{.+}} 0, i{{.+}} 1 // CK2-DAG: [[P1:%.+]] = getelementptr inbounds {{.+}}[[P]], i{{.+}} 0, i{{.+}} 1 -// CK2-DAG: store i8* [[CBPVAL1:%[^,]+]], i8** [[BP1]] -// CK2-DAG: store i8* [[CPVAL1:%[^,]+]], i8** [[P1]] -// CK2-DAG: [[CBPVAL1]] = bitcast double** [[SEC0]] to i8* -// CK2-DAG: [[CPVAL1]] = bitcast double* [[SEC1:%[^,]+]] to i8* +// CK2-DAG: [[CBP1:%.+]] = bitcast i8** [[BP1]] to double*** +// CK2-DAG: [[CP1:%.+]] = bitcast i8** [[P1]] to double** +// CK2-DAG: store double** [[CBPVAL1:%[^,]+]], double*** [[CBP1]] +// CK2-DAG: store double* [[SEC1:%[^,]+]], double** [[CP1]] // CK2-DAG: [[SEC1]] = getelementptr inbounds {{.*}}double* [[SEC11:%[^,]+]], i{{.+}} 1 // CK2-DAG: [[SEC11]] = load double*, double** [[SEC111:%[^,]+]], // CK2-DAG: [[SEC111]] = getelementptr inbounds {{.*}}[[ST]]* [[VAR0]], i32 0, i32 1