forked from OSchip/llvm-project
Revert "[OpenMP] Codegen aggregate for outlined function captures"
This reverts commit 1d66649adf
.
Revert to fix AMG GPU issue.
This commit is contained in:
parent
c9af0e61fa
commit
ac90dfc43a
|
@ -1284,7 +1284,7 @@ static llvm::Function *emitParallelOrTeamsOutlinedFunction(
|
|||
CGOpenMPOutlinedRegionInfo CGInfo(*CS, ThreadIDVar, CodeGen, InnermostKind,
|
||||
HasCancel, OutlinedHelperName);
|
||||
CodeGenFunction::CGCapturedStmtRAII CapInfoRAII(CGF, &CGInfo);
|
||||
return CGF.GenerateOpenMPCapturedStmtFunctionAggregate(*CS, D.getBeginLoc());
|
||||
return CGF.GenerateOpenMPCapturedStmtFunction(*CS, D.getBeginLoc());
|
||||
}
|
||||
|
||||
llvm::Function *CGOpenMPRuntime::emitParallelOutlinedFunction(
|
||||
|
|
|
@ -1523,14 +1523,12 @@ void CGOpenMPRuntimeGPU::emitParallelCall(CodeGenFunction &CGF,
|
|||
// TODO: Is that needed?
|
||||
CodeGenFunction::OMPPrivateScope PrivateArgScope(CGF);
|
||||
|
||||
// Store addresses of global arguments to pass to the parallel call.
|
||||
Address CapturedVarsAddrs = CGF.CreateDefaultAlignTempAlloca(
|
||||
llvm::ArrayType::get(CGM.VoidPtrTy, CapturedVars.size()),
|
||||
"captured_vars_addrs");
|
||||
|
||||
// Store globalized values to push, pop through the global stack.
|
||||
llvm::SmallDenseMap<llvm::Value *, unsigned> GlobalValuesToSizeMap;
|
||||
// There's something to share.
|
||||
if (!CapturedVars.empty()) {
|
||||
// Prepare for parallel region. Indicate the outlined function.
|
||||
ASTContext &Ctx = CGF.getContext();
|
||||
unsigned Idx = 0;
|
||||
for (llvm::Value *V : CapturedVars) {
|
||||
|
@ -1538,34 +1536,8 @@ void CGOpenMPRuntimeGPU::emitParallelCall(CodeGenFunction &CGF,
|
|||
llvm::Value *PtrV;
|
||||
if (V->getType()->isIntegerTy())
|
||||
PtrV = Bld.CreateIntToPtr(V, CGF.VoidPtrTy);
|
||||
else {
|
||||
assert(V->getType()->isPointerTy() &&
|
||||
"Expected Pointer Type to globalize.");
|
||||
// Globalize and store pointer.
|
||||
llvm::Type *PtrElemTy = V->getType()->getPointerElementType();
|
||||
auto &DL = CGM.getDataLayout();
|
||||
unsigned GlobalSize = DL.getTypeAllocSize(PtrElemTy);
|
||||
|
||||
// Use shared memory to store globalized pointer values, for now this
|
||||
// should be the outlined args aggregate struct.
|
||||
llvm::Value *GlobalSizeArg[] = {
|
||||
llvm::ConstantInt::get(CGM.SizeTy, GlobalSize)};
|
||||
llvm::Value *GlobalValue = CGF.EmitRuntimeCall(
|
||||
OMPBuilder.getOrCreateRuntimeFunction(CGM.getModule(),
|
||||
OMPRTL___kmpc_alloc_shared),
|
||||
GlobalSizeArg);
|
||||
GlobalValuesToSizeMap[GlobalValue] = GlobalSize;
|
||||
|
||||
llvm::Value *CapturedVarVal = Bld.CreateAlignedLoad(
|
||||
PtrElemTy, V, DL.getABITypeAlign(PtrElemTy));
|
||||
llvm::Value *GlobalValueCast =
|
||||
Bld.CreatePointerBitCastOrAddrSpaceCast(
|
||||
GlobalValue, PtrElemTy->getPointerTo());
|
||||
Bld.CreateDefaultAlignedStore(CapturedVarVal, GlobalValueCast);
|
||||
|
||||
PtrV = Bld.CreatePointerBitCastOrAddrSpaceCast(GlobalValue,
|
||||
CGF.VoidPtrTy);
|
||||
}
|
||||
else
|
||||
PtrV = Bld.CreatePointerBitCastOrAddrSpaceCast(V, CGF.VoidPtrTy);
|
||||
CGF.EmitStoreOfScalar(PtrV, Dst, /*Volatile=*/false,
|
||||
Ctx.getPointerType(Ctx.VoidPtrTy));
|
||||
++Idx;
|
||||
|
@ -1578,9 +1550,8 @@ void CGOpenMPRuntimeGPU::emitParallelCall(CodeGenFunction &CGF,
|
|||
/* isSigned */ false);
|
||||
else
|
||||
IfCondVal = llvm::ConstantInt::get(CGF.Int32Ty, 1);
|
||||
assert(IfCondVal && "Expected a value");
|
||||
|
||||
// Create the parallel call.
|
||||
assert(IfCondVal && "Expected a value");
|
||||
llvm::Value *RTLoc = emitUpdateLocation(CGF, Loc);
|
||||
llvm::Value *Args[] = {
|
||||
RTLoc,
|
||||
|
@ -1596,14 +1567,6 @@ void CGOpenMPRuntimeGPU::emitParallelCall(CodeGenFunction &CGF,
|
|||
CGF.EmitRuntimeCall(OMPBuilder.getOrCreateRuntimeFunction(
|
||||
CGM.getModule(), OMPRTL___kmpc_parallel_51),
|
||||
Args);
|
||||
|
||||
// Pop any globalized values from the global stack.
|
||||
for (const auto &GV : GlobalValuesToSizeMap) {
|
||||
CGF.EmitRuntimeCall(
|
||||
OMPBuilder.getOrCreateRuntimeFunction(CGM.getModule(),
|
||||
OMPRTL___kmpc_free_shared),
|
||||
{GV.first, llvm::ConstantInt::get(CGM.SizeTy, GV.second)});
|
||||
}
|
||||
};
|
||||
|
||||
RegionCodeGenTy RCG(ParallelGen);
|
||||
|
@ -3514,6 +3477,7 @@ llvm::Function *CGOpenMPRuntimeGPU::createParallelDataSharingWrapper(
|
|||
D.getBeginLoc(), D.getBeginLoc());
|
||||
|
||||
const auto *RD = CS.getCapturedRecordDecl();
|
||||
auto CurField = RD->field_begin();
|
||||
|
||||
Address ZeroAddr = CGF.CreateDefaultAlignTempAlloca(CGF.Int32Ty,
|
||||
/*Name=*/".zero.addr");
|
||||
|
@ -3525,6 +3489,7 @@ llvm::Function *CGOpenMPRuntimeGPU::createParallelDataSharingWrapper(
|
|||
Args.emplace_back(ZeroAddr.getPointer());
|
||||
|
||||
CGBuilderTy &Bld = CGF.Builder;
|
||||
auto CI = CS.capture_begin();
|
||||
|
||||
// Use global memory for data sharing.
|
||||
// Handle passing of global args to workers.
|
||||
|
@ -3539,33 +3504,55 @@ llvm::Function *CGOpenMPRuntimeGPU::createParallelDataSharingWrapper(
|
|||
// Retrieve the shared variables from the list of references returned
|
||||
// by the runtime. Pass the variables to the outlined function.
|
||||
Address SharedArgListAddress = Address::invalid();
|
||||
if (CS.capture_size() > 0) {
|
||||
if (CS.capture_size() > 0 ||
|
||||
isOpenMPLoopBoundSharingDirective(D.getDirectiveKind())) {
|
||||
SharedArgListAddress = CGF.EmitLoadOfPointer(
|
||||
GlobalArgs, CGF.getContext()
|
||||
.getPointerType(CGF.getContext().getPointerType(
|
||||
CGF.getContext().VoidPtrTy))
|
||||
.castAs<PointerType>());
|
||||
const auto *CI = CS.capture_begin();
|
||||
// Load the outlined arg aggregate struct.
|
||||
ASTContext &CGFContext = CGF.getContext();
|
||||
QualType RecordPointerTy =
|
||||
CGFContext.getPointerType(CGFContext.getRecordType(RD));
|
||||
Address Src = Bld.CreateConstInBoundsGEP(SharedArgListAddress, /*Index=*/0);
|
||||
}
|
||||
unsigned Idx = 0;
|
||||
if (isOpenMPLoopBoundSharingDirective(D.getDirectiveKind())) {
|
||||
Address Src = Bld.CreateConstInBoundsGEP(SharedArgListAddress, Idx);
|
||||
Address TypedAddress = Bld.CreatePointerBitCastOrAddrSpaceCast(
|
||||
Src, CGF.ConvertTypeForMem(CGFContext.getPointerType(RecordPointerTy)));
|
||||
llvm::Value *Arg = CGF.EmitLoadOfScalar(
|
||||
Src, CGF.SizeTy->getPointerTo());
|
||||
llvm::Value *LB = CGF.EmitLoadOfScalar(
|
||||
TypedAddress,
|
||||
/*Volatile=*/false, CGFContext.getPointerType(RecordPointerTy),
|
||||
CI->getLocation());
|
||||
Args.emplace_back(Arg);
|
||||
} else {
|
||||
// If there are no captured arguments, use nullptr.
|
||||
/*Volatile=*/false,
|
||||
CGF.getContext().getPointerType(CGF.getContext().getSizeType()),
|
||||
cast<OMPLoopDirective>(D).getLowerBoundVariable()->getExprLoc());
|
||||
Args.emplace_back(LB);
|
||||
++Idx;
|
||||
Src = Bld.CreateConstInBoundsGEP(SharedArgListAddress, Idx);
|
||||
TypedAddress = Bld.CreatePointerBitCastOrAddrSpaceCast(
|
||||
Src, CGF.SizeTy->getPointerTo());
|
||||
llvm::Value *UB = CGF.EmitLoadOfScalar(
|
||||
TypedAddress,
|
||||
/*Volatile=*/false,
|
||||
CGF.getContext().getPointerType(CGF.getContext().getSizeType()),
|
||||
cast<OMPLoopDirective>(D).getUpperBoundVariable()->getExprLoc());
|
||||
Args.emplace_back(UB);
|
||||
++Idx;
|
||||
}
|
||||
if (CS.capture_size() > 0) {
|
||||
ASTContext &CGFContext = CGF.getContext();
|
||||
QualType RecordPointerTy =
|
||||
CGFContext.getPointerType(CGFContext.getRecordType(RD));
|
||||
llvm::Value *Arg =
|
||||
llvm::Constant::getNullValue(CGF.ConvertTypeForMem(RecordPointerTy));
|
||||
Args.emplace_back(Arg);
|
||||
for (unsigned I = 0, E = CS.capture_size(); I < E; ++I, ++CI, ++CurField) {
|
||||
QualType ElemTy = CurField->getType();
|
||||
Address Src = Bld.CreateConstInBoundsGEP(SharedArgListAddress, I + Idx);
|
||||
Address TypedAddress = Bld.CreatePointerBitCastOrAddrSpaceCast(
|
||||
Src, CGF.ConvertTypeForMem(CGFContext.getPointerType(ElemTy)));
|
||||
llvm::Value *Arg = CGF.EmitLoadOfScalar(TypedAddress,
|
||||
/*Volatile=*/false,
|
||||
CGFContext.getPointerType(ElemTy),
|
||||
CI->getLocation());
|
||||
if (CI->capturesVariableByCopy() &&
|
||||
!CI->getCapturedVar()->getType()->isAnyPointerType()) {
|
||||
Arg = castValueToType(CGF, Arg, ElemTy, CGFContext.getUIntPtrType(),
|
||||
CI->getLocation());
|
||||
}
|
||||
Args.emplace_back(Arg);
|
||||
}
|
||||
}
|
||||
|
||||
emitOutlinedFunctionCall(CGF, D.getBeginLoc(), OutlinedParallelFn, Args);
|
||||
|
|
|
@ -85,19 +85,6 @@ public:
|
|||
auto *VD = C.getCapturedVar();
|
||||
assert(VD == VD->getCanonicalDecl() &&
|
||||
"Canonical decl must be captured.");
|
||||
// Skip implicit captures for combined distribute loop bounds,
|
||||
// those will be handled by later codegen.
|
||||
if (isOpenMPLoopBoundSharingDirective(S.getDirectiveKind())) {
|
||||
const auto *LoopDirective = cast<OMPLoopDirective>(&S);
|
||||
VarDecl *PrevLB = cast<VarDecl>(
|
||||
cast<DeclRefExpr>(LoopDirective->getPrevLowerBoundVariable())
|
||||
->getDecl());
|
||||
VarDecl *PrevUB = cast<VarDecl>(
|
||||
cast<DeclRefExpr>(LoopDirective->getPrevUpperBoundVariable())
|
||||
->getDecl());
|
||||
if (VD == PrevLB || VD == PrevUB)
|
||||
continue;
|
||||
}
|
||||
DeclRefExpr DRE(
|
||||
CGF.getContext(), const_cast<VarDecl *>(VD),
|
||||
isCapturedVar(CGF, VD) || (CGF.CapturedStmtInfo &&
|
||||
|
@ -274,19 +261,6 @@ public:
|
|||
continue;
|
||||
assert(VD == VD->getCanonicalDecl() &&
|
||||
"Canonical decl must be captured.");
|
||||
// Skip implicit captures for combined distribute loop bounds,
|
||||
// those will be handled by later codegen.
|
||||
if (isOpenMPLoopBoundSharingDirective(S.getDirectiveKind())) {
|
||||
const auto *LoopDirective = cast<OMPLoopDirective>(&S);
|
||||
VarDecl *PrevLB = cast<VarDecl>(
|
||||
cast<DeclRefExpr>(LoopDirective->getPrevLowerBoundVariable())
|
||||
->getDecl());
|
||||
VarDecl *PrevUB = cast<VarDecl>(
|
||||
cast<DeclRefExpr>(LoopDirective->getPrevUpperBoundVariable())
|
||||
->getDecl());
|
||||
if (VD == PrevLB || VD == PrevUB)
|
||||
continue;
|
||||
}
|
||||
DeclRefExpr DRE(CGF.getContext(), const_cast<VarDecl *>(VD),
|
||||
isCapturedVar(CGF, VD) ||
|
||||
(CGF.CapturedStmtInfo &&
|
||||
|
@ -346,32 +320,6 @@ llvm::Value *CodeGenFunction::getTypeSize(QualType Ty) {
|
|||
return CGM.getSize(SizeInChars);
|
||||
}
|
||||
|
||||
void CodeGenFunction::GenerateOpenMPCapturedVarsAggregate(
|
||||
const CapturedStmt &S, SmallVectorImpl<llvm::Value *> &CapturedVars) {
|
||||
const RecordDecl *RD = S.getCapturedRecordDecl();
|
||||
QualType RecordTy = getContext().getRecordType(RD);
|
||||
// Create the aggregate argument struct for the outlined function.
|
||||
LValue AggLV = MakeAddrLValue(
|
||||
CreateMemTemp(RecordTy, "omp.outlined.arg.agg."), RecordTy);
|
||||
|
||||
// Initialize the aggregate with captured values.
|
||||
auto CurField = RD->field_begin();
|
||||
for (CapturedStmt::const_capture_init_iterator I = S.capture_init_begin(),
|
||||
E = S.capture_init_end();
|
||||
I != E; ++I, ++CurField) {
|
||||
LValue LV = EmitLValueForFieldInitialization(AggLV, *CurField);
|
||||
// Initialize for VLA.
|
||||
if (CurField->hasCapturedVLAType()) {
|
||||
EmitLambdaVLACapture(CurField->getCapturedVLAType(), LV);
|
||||
} else
|
||||
// Initialize for capturesThis, capturesVariableByCopy,
|
||||
// capturesVariable
|
||||
EmitInitializerForField(*CurField, LV, *I);
|
||||
}
|
||||
|
||||
CapturedVars.push_back(AggLV.getPointer(*this));
|
||||
}
|
||||
|
||||
void CodeGenFunction::GenerateOpenMPCapturedVars(
|
||||
const CapturedStmt &S, SmallVectorImpl<llvm::Value *> &CapturedVars) {
|
||||
const RecordDecl *RD = S.getCapturedRecordDecl();
|
||||
|
@ -472,101 +420,6 @@ struct FunctionOptions {
|
|||
};
|
||||
} // namespace
|
||||
|
||||
static llvm::Function *emitOutlinedFunctionPrologueAggregate(
|
||||
CodeGenFunction &CGF, FunctionArgList &Args,
|
||||
llvm::MapVector<const Decl *, std::pair<const VarDecl *, Address>>
|
||||
&LocalAddrs,
|
||||
llvm::DenseMap<const Decl *, std::pair<const Expr *, llvm::Value *>>
|
||||
&VLASizes,
|
||||
llvm::Value *&CXXThisValue, const CapturedStmt &CS, SourceLocation Loc,
|
||||
StringRef FunctionName) {
|
||||
const CapturedDecl *CD = CS.getCapturedDecl();
|
||||
const RecordDecl *RD = CS.getCapturedRecordDecl();
|
||||
assert(CD->hasBody() && "missing CapturedDecl body");
|
||||
|
||||
CXXThisValue = nullptr;
|
||||
// Build the argument list.
|
||||
CodeGenModule &CGM = CGF.CGM;
|
||||
ASTContext &Ctx = CGM.getContext();
|
||||
Args.append(CD->param_begin(), CD->param_end());
|
||||
|
||||
// Create the function declaration.
|
||||
const CGFunctionInfo &FuncInfo =
|
||||
CGM.getTypes().arrangeBuiltinFunctionDeclaration(Ctx.VoidTy, Args);
|
||||
llvm::FunctionType *FuncLLVMTy = CGM.getTypes().GetFunctionType(FuncInfo);
|
||||
|
||||
auto *F =
|
||||
llvm::Function::Create(FuncLLVMTy, llvm::GlobalValue::InternalLinkage,
|
||||
FunctionName, &CGM.getModule());
|
||||
CGM.SetInternalFunctionAttributes(CD, F, FuncInfo);
|
||||
if (CD->isNothrow())
|
||||
F->setDoesNotThrow();
|
||||
F->setDoesNotRecurse();
|
||||
|
||||
// Generate the function.
|
||||
CGF.StartFunction(CD, Ctx.VoidTy, F, FuncInfo, Args, Loc, Loc);
|
||||
Address ContextAddr = CGF.GetAddrOfLocalVar(CD->getContextParam());
|
||||
llvm::Value *ContextV = CGF.Builder.CreateLoad(ContextAddr);
|
||||
LValue ContextLV = CGF.MakeNaturalAlignAddrLValue(
|
||||
ContextV, CGM.getContext().getTagDeclType(RD));
|
||||
const auto *I = CS.captures().begin();
|
||||
for (const FieldDecl *FD : RD->fields()) {
|
||||
LValue FieldLV = CGF.EmitLValueForFieldInitialization(ContextLV, FD);
|
||||
// Do not map arguments if we emit function with non-original types.
|
||||
Address LocalAddr = FieldLV.getAddress(CGF);
|
||||
// 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();
|
||||
LocalAddrs.insert({FD, {CurVD, LocalAddr}});
|
||||
++I;
|
||||
continue;
|
||||
}
|
||||
|
||||
LValue ArgLVal =
|
||||
CGF.MakeAddrLValue(LocalAddr, FD->getType(), AlignmentSource::Decl);
|
||||
if (FD->hasCapturedVLAType()) {
|
||||
llvm::Value *ExprArg = CGF.EmitLoadOfScalar(ArgLVal, I->getLocation());
|
||||
const VariableArrayType *VAT = FD->getCapturedVLAType();
|
||||
VLASizes.try_emplace(FD, VAT->getSizeExpr(), ExprArg);
|
||||
} else if (I->capturesVariable()) {
|
||||
const VarDecl *Var = I->getCapturedVar();
|
||||
QualType VarTy = Var->getType();
|
||||
Address ArgAddr = ArgLVal.getAddress(CGF);
|
||||
if (ArgLVal.getType()->isLValueReferenceType()) {
|
||||
ArgAddr = CGF.EmitLoadOfReference(ArgLVal);
|
||||
} else if (!VarTy->isVariablyModifiedType() || !VarTy->isPointerType()) {
|
||||
assert(ArgLVal.getType()->isPointerType());
|
||||
ArgAddr = CGF.EmitLoadOfPointer(
|
||||
ArgAddr, ArgLVal.getType()->castAs<PointerType>());
|
||||
}
|
||||
LocalAddrs.insert(
|
||||
{FD, {Var, Address(ArgAddr.getPointer(), Ctx.getDeclAlign(Var))}});
|
||||
} else if (I->capturesVariableByCopy()) {
|
||||
assert(!FD->getType()->isAnyPointerType() &&
|
||||
"Not expecting a captured pointer.");
|
||||
const VarDecl *Var = I->getCapturedVar();
|
||||
Address CopyAddr = CGF.CreateMemTemp(FD->getType(), Ctx.getDeclAlign(FD),
|
||||
Var->getName());
|
||||
LValue CopyLVal =
|
||||
CGF.MakeAddrLValue(CopyAddr, FD->getType(), AlignmentSource::Decl);
|
||||
|
||||
RValue ArgRVal = CGF.EmitLoadOfLValue(ArgLVal, I->getLocation());
|
||||
CGF.EmitStoreThroughLValue(ArgRVal, CopyLVal);
|
||||
|
||||
LocalAddrs.insert({FD, {Var, CopyAddr}});
|
||||
} else {
|
||||
// If 'this' is captured, load it into CXXThisValue.
|
||||
assert(I->capturesThis());
|
||||
CXXThisValue = CGF.EmitLoadOfScalar(ArgLVal, I->getLocation());
|
||||
LocalAddrs.insert({FD, {nullptr, ArgLVal.getAddress(CGF)}});
|
||||
}
|
||||
++I;
|
||||
}
|
||||
|
||||
return F;
|
||||
}
|
||||
|
||||
static llvm::Function *emitOutlinedFunctionPrologue(
|
||||
CodeGenFunction &CGF, FunctionArgList &Args,
|
||||
llvm::MapVector<const Decl *, std::pair<const VarDecl *, Address>>
|
||||
|
@ -746,37 +599,6 @@ static llvm::Function *emitOutlinedFunctionPrologue(
|
|||
return F;
|
||||
}
|
||||
|
||||
llvm::Function *CodeGenFunction::GenerateOpenMPCapturedStmtFunctionAggregate(
|
||||
const CapturedStmt &S, SourceLocation Loc) {
|
||||
assert(
|
||||
CapturedStmtInfo &&
|
||||
"CapturedStmtInfo should be set when generating the captured function");
|
||||
const CapturedDecl *CD = S.getCapturedDecl();
|
||||
// Build the argument list.
|
||||
FunctionArgList Args;
|
||||
llvm::MapVector<const Decl *, std::pair<const VarDecl *, Address>> LocalAddrs;
|
||||
llvm::DenseMap<const Decl *, std::pair<const Expr *, llvm::Value *>> VLASizes;
|
||||
StringRef FunctionName = CapturedStmtInfo->getHelperName();
|
||||
llvm::Function *F = emitOutlinedFunctionPrologueAggregate(
|
||||
*this, Args, LocalAddrs, VLASizes, CXXThisValue, S, Loc, FunctionName);
|
||||
CodeGenFunction::OMPPrivateScope LocalScope(*this);
|
||||
for (const auto &LocalAddrPair : LocalAddrs) {
|
||||
if (LocalAddrPair.second.first) {
|
||||
LocalScope.addPrivate(LocalAddrPair.second.first, [&LocalAddrPair]() {
|
||||
return LocalAddrPair.second.second;
|
||||
});
|
||||
}
|
||||
}
|
||||
(void)LocalScope.Privatize();
|
||||
for (const auto &VLASizePair : VLASizes)
|
||||
VLASizeMap[VLASizePair.second.first] = VLASizePair.second.second;
|
||||
PGO.assignRegionCounters(GlobalDecl(CD), F);
|
||||
CapturedStmtInfo->EmitBody(*this, CD->getBody());
|
||||
(void)LocalScope.ForceCleanup();
|
||||
FinishFunction(CD->getBodyRBrace());
|
||||
return F;
|
||||
}
|
||||
|
||||
llvm::Function *
|
||||
CodeGenFunction::GenerateOpenMPCapturedStmtFunction(const CapturedStmt &S,
|
||||
SourceLocation Loc) {
|
||||
|
@ -1665,8 +1487,9 @@ namespace {
|
|||
/// Codegen lambda for appending distribute lower and upper bounds to outlined
|
||||
/// parallel function. This is necessary for combined constructs such as
|
||||
/// 'distribute parallel for'
|
||||
typedef llvm::function_ref<void(
|
||||
CodeGenFunction &, const OMPExecutableDirective &, const CapturedStmt &)>
|
||||
typedef llvm::function_ref<void(CodeGenFunction &,
|
||||
const OMPExecutableDirective &,
|
||||
llvm::SmallVectorImpl<llvm::Value *> &)>
|
||||
CodeGenBoundParametersTy;
|
||||
} // anonymous namespace
|
||||
|
||||
|
@ -1763,8 +1586,8 @@ static void emitCommonOMPParallelDirective(
|
|||
// lower and upper bounds with the pragma 'for' chunking mechanism.
|
||||
// The following lambda takes care of appending the lower and upper bound
|
||||
// parameters when necessary
|
||||
CodeGenBoundParameters(CGF, S, *CS);
|
||||
CGF.GenerateOpenMPCapturedVarsAggregate(*CS, CapturedVars);
|
||||
CodeGenBoundParameters(CGF, S, CapturedVars);
|
||||
CGF.GenerateOpenMPCapturedVars(*CS, CapturedVars);
|
||||
CGF.CGM.getOpenMPRuntime().emitParallelCall(CGF, S.getBeginLoc(), OutlinedFn,
|
||||
CapturedVars, IfCond);
|
||||
}
|
||||
|
@ -1782,7 +1605,7 @@ static bool isAllocatableDecl(const VarDecl *VD) {
|
|||
|
||||
static void emitEmptyBoundParameters(CodeGenFunction &,
|
||||
const OMPExecutableDirective &,
|
||||
const CapturedStmt &) {}
|
||||
llvm::SmallVectorImpl<llvm::Value *> &) {}
|
||||
|
||||
Address CodeGenFunction::OMPBuilderCBHelpers::getAddressOfLocalVariable(
|
||||
CodeGenFunction &CGF, const VarDecl *VD) {
|
||||
|
@ -3190,30 +3013,21 @@ emitDistributeParallelForDispatchBounds(CodeGenFunction &CGF,
|
|||
|
||||
static void emitDistributeParallelForDistributeInnerBoundParams(
|
||||
CodeGenFunction &CGF, const OMPExecutableDirective &S,
|
||||
const CapturedStmt &CS) {
|
||||
llvm::SmallVectorImpl<llvm::Value *> &CapturedVars) {
|
||||
const auto &Dir = cast<OMPLoopDirective>(S);
|
||||
|
||||
// The first captured variable of the captured statement corresponds
|
||||
// to inner lower bound.
|
||||
VarDecl *PrevLBCapDecl = CS.captures().begin()->getCapturedVar();
|
||||
// The second captured variable corresponds to the inner upper bound.
|
||||
VarDecl *PrevUBCapDecl = std::next(CS.captures().begin())->getCapturedVar();
|
||||
|
||||
LValue LB =
|
||||
CGF.EmitLValue(cast<DeclRefExpr>(Dir.getCombinedLowerBoundVariable()));
|
||||
llvm::Value *LBCast =
|
||||
CGF.Builder.CreateIntCast(CGF.Builder.CreateLoad(LB.getAddress(CGF)),
|
||||
CGF.SizeTy, /*isSigned=*/false);
|
||||
CGF.EmitStoreOfScalar(LBCast, CGF.GetAddrOfLocalVar(PrevLBCapDecl),
|
||||
/*Volatile=*/false, PrevLBCapDecl->getType());
|
||||
|
||||
CapturedVars.push_back(LBCast);
|
||||
LValue UB =
|
||||
CGF.EmitLValue(cast<DeclRefExpr>(Dir.getCombinedUpperBoundVariable()));
|
||||
|
||||
llvm::Value *UBCast =
|
||||
CGF.Builder.CreateIntCast(CGF.Builder.CreateLoad(UB.getAddress(CGF)),
|
||||
CGF.SizeTy, /*isSigned=*/false);
|
||||
CGF.EmitStoreOfScalar(UBCast, CGF.GetAddrOfLocalVar(PrevUBCapDecl),
|
||||
/*Volatile=*/false, PrevUBCapDecl->getType());
|
||||
CapturedVars.push_back(UBCast);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -5366,14 +5180,6 @@ void CodeGenFunction::EmitOMPDistributeLoop(const OMPLoopDirective &S,
|
|||
LValue IL =
|
||||
EmitOMPHelperVar(*this, cast<DeclRefExpr>(S.getIsLastIterVariable()));
|
||||
|
||||
// Emit previous upper, lower bound captured variables, if applicable.
|
||||
if (isOpenMPLoopBoundSharingDirective(S.getDirectiveKind())) {
|
||||
EmitOMPHelperVar(*this,
|
||||
cast<DeclRefExpr>(S.getPrevLowerBoundVariable()));
|
||||
EmitOMPHelperVar(*this,
|
||||
cast<DeclRefExpr>(S.getPrevUpperBoundVariable()));
|
||||
}
|
||||
|
||||
OMPPrivateScope LoopScope(*this);
|
||||
if (EmitOMPFirstprivateClause(S, LoopScope)) {
|
||||
// Emit implicit barrier to synchronize threads and avoid data races
|
||||
|
@ -6383,7 +6189,7 @@ static void emitCommonOMPTeamsDirective(CodeGenFunction &CGF,
|
|||
|
||||
OMPTeamsScope Scope(CGF, S);
|
||||
llvm::SmallVector<llvm::Value *, 16> CapturedVars;
|
||||
CGF.GenerateOpenMPCapturedVarsAggregate(*CS, CapturedVars);
|
||||
CGF.GenerateOpenMPCapturedVars(*CS, CapturedVars);
|
||||
CGF.CGM.getOpenMPRuntime().emitTeamsCall(CGF, S, S.getBeginLoc(), OutlinedFn,
|
||||
CapturedVars);
|
||||
}
|
||||
|
|
|
@ -3309,13 +3309,8 @@ public:
|
|||
llvm::Function *EmitCapturedStmt(const CapturedStmt &S, CapturedRegionKind K);
|
||||
llvm::Function *GenerateCapturedStmtFunction(const CapturedStmt &S);
|
||||
Address GenerateCapturedStmtArgument(const CapturedStmt &S);
|
||||
llvm::Function *
|
||||
GenerateOpenMPCapturedStmtFunctionAggregate(const CapturedStmt &S,
|
||||
SourceLocation Loc);
|
||||
llvm::Function *GenerateOpenMPCapturedStmtFunction(const CapturedStmt &S,
|
||||
SourceLocation Loc);
|
||||
void GenerateOpenMPCapturedVarsAggregate(
|
||||
const CapturedStmt &S, SmallVectorImpl<llvm::Value *> &CapturedVars);
|
||||
void GenerateOpenMPCapturedVars(const CapturedStmt &S,
|
||||
SmallVectorImpl<llvm::Value *> &CapturedVars);
|
||||
void emitOMPSimpleStore(LValue LVal, RValue RVal, QualType RValTy,
|
||||
|
|
|
@ -4169,22 +4169,12 @@ void Sema::ActOnOpenMPRegionStart(OpenMPDirectiveKind DKind, Scope *CurScope) {
|
|||
Sema::CapturedParamNameType Params[] = {
|
||||
std::make_pair(".global_tid.", KmpInt32PtrTy),
|
||||
std::make_pair(".bound_tid.", KmpInt32PtrTy),
|
||||
std::make_pair(".previous.lb.", Context.getSizeType().withConst()),
|
||||
std::make_pair(".previous.ub.", Context.getSizeType().withConst()),
|
||||
std::make_pair(StringRef(), QualType()) // __context with shared vars
|
||||
};
|
||||
|
||||
VarDecl *PrevLBDecl =
|
||||
buildVarDecl(*this, SourceLocation(), Context.getSizeType().withConst(),
|
||||
".captured.omp.previous.lb");
|
||||
VarDecl *PrevUBDecl =
|
||||
buildVarDecl(*this, SourceLocation(), Context.getSizeType().withConst(),
|
||||
".captured.omp.previous.ub");
|
||||
|
||||
ActOnCapturedRegionStart(DSAStack->getConstructLoc(), CurScope, CR_OpenMP,
|
||||
Params);
|
||||
|
||||
MarkVariableReferenced(SourceLocation(), PrevLBDecl);
|
||||
MarkVariableReferenced(SourceLocation(), PrevUBDecl);
|
||||
|
||||
break;
|
||||
}
|
||||
case OMPD_target_teams_distribute_parallel_for:
|
||||
|
@ -4235,24 +4225,14 @@ void Sema::ActOnOpenMPRegionStart(OpenMPDirectiveKind DKind, Scope *CurScope) {
|
|||
Sema::CapturedParamNameType ParamsParallel[] = {
|
||||
std::make_pair(".global_tid.", KmpInt32PtrTy),
|
||||
std::make_pair(".bound_tid.", KmpInt32PtrTy),
|
||||
std::make_pair(".previous.lb.", Context.getSizeType().withConst()),
|
||||
std::make_pair(".previous.ub.", Context.getSizeType().withConst()),
|
||||
std::make_pair(StringRef(), QualType()) // __context with shared vars
|
||||
};
|
||||
|
||||
VarDecl *PrevLBDecl =
|
||||
buildVarDecl(*this, SourceLocation(), Context.getSizeType().withConst(),
|
||||
".captured.omp.previous.lb");
|
||||
VarDecl *PrevUBDecl =
|
||||
buildVarDecl(*this, SourceLocation(), Context.getSizeType().withConst(),
|
||||
".captured.omp.previous.ub");
|
||||
|
||||
// Start a captured region for 'teams' or 'parallel'. Both regions have
|
||||
// the same implicit parameters.
|
||||
ActOnCapturedRegionStart(DSAStack->getConstructLoc(), CurScope, CR_OpenMP,
|
||||
ParamsParallel, /*OpenMPCaptureLevel=*/3);
|
||||
|
||||
MarkVariableReferenced(SourceLocation(), PrevLBDecl);
|
||||
MarkVariableReferenced(SourceLocation(), PrevUBDecl);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -4274,24 +4254,14 @@ void Sema::ActOnOpenMPRegionStart(OpenMPDirectiveKind DKind, Scope *CurScope) {
|
|||
Sema::CapturedParamNameType ParamsParallel[] = {
|
||||
std::make_pair(".global_tid.", KmpInt32PtrTy),
|
||||
std::make_pair(".bound_tid.", KmpInt32PtrTy),
|
||||
std::make_pair(".previous.lb.", Context.getSizeType().withConst()),
|
||||
std::make_pair(".previous.ub.", Context.getSizeType().withConst()),
|
||||
std::make_pair(StringRef(), QualType()) // __context with shared vars
|
||||
};
|
||||
|
||||
VarDecl *PrevLBDecl =
|
||||
buildVarDecl(*this, SourceLocation(), Context.getSizeType().withConst(),
|
||||
".captured.omp.previous.lb");
|
||||
VarDecl *PrevUBDecl =
|
||||
buildVarDecl(*this, SourceLocation(), Context.getSizeType().withConst(),
|
||||
".captured.omp.previous.ub");
|
||||
|
||||
// Start a captured region for 'teams' or 'parallel'. Both regions have
|
||||
// the same implicit parameters.
|
||||
ActOnCapturedRegionStart(DSAStack->getConstructLoc(), CurScope, CR_OpenMP,
|
||||
ParamsParallel, /*OpenMPCaptureLevel=*/1);
|
||||
|
||||
MarkVariableReferenced(SourceLocation(), PrevLBDecl);
|
||||
MarkVariableReferenced(SourceLocation(), PrevUBDecl);
|
||||
|
||||
break;
|
||||
}
|
||||
case OMPD_target_update:
|
||||
|
@ -9319,23 +9289,23 @@ checkOpenMPLoop(OpenMPDirectiveKind DKind, Expr *CollapseLoopCountExpr,
|
|||
CombEUB =
|
||||
SemaRef.ActOnFinishFullExpr(CombEUB.get(), /*DiscardedValue*/ false);
|
||||
|
||||
const CapturedStmt *CS = cast<CapturedStmt>(AStmt);
|
||||
const CapturedDecl *CD = cast<CapturedStmt>(AStmt)->getCapturedDecl();
|
||||
// We expect to have at least 2 more parameters than the 'parallel'
|
||||
// directive does - the lower and upper bounds of the previous schedule.
|
||||
assert(CD->getNumParams() >= 4 &&
|
||||
"Unexpected number of parameters in loop combined directive");
|
||||
|
||||
// Refer to captured variables from the associated captured statement of
|
||||
// the combined directive. First captured variable is the previous lower
|
||||
// bound, second is the previous upper bound.
|
||||
VarDecl *PrevLBCapDecl = CS->captures().begin()->getCapturedVar();
|
||||
assert(PrevLBCapDecl &&
|
||||
"Expected captured var for previous LB in combined directive");
|
||||
VarDecl *PrevUBCapDecl =
|
||||
std::next(CS->captures().begin())->getCapturedVar();
|
||||
assert(PrevLBCapDecl &&
|
||||
"Expected captured var for previous UB in combined directive");
|
||||
// Set the proper type for the bounds given what we learned from the
|
||||
// enclosed loops.
|
||||
ImplicitParamDecl *PrevLBDecl = CD->getParam(/*PrevLB=*/2);
|
||||
ImplicitParamDecl *PrevUBDecl = CD->getParam(/*PrevUB=*/3);
|
||||
|
||||
PrevLB = buildDeclRefExpr(SemaRef, PrevLBCapDecl,
|
||||
PrevLBCapDecl->getType(), InitLoc);
|
||||
PrevUB = buildDeclRefExpr(SemaRef, PrevUBCapDecl,
|
||||
PrevUBCapDecl->getType(), InitLoc);
|
||||
// Previous lower and upper bounds are obtained from the region
|
||||
// parameters.
|
||||
PrevLB =
|
||||
buildDeclRefExpr(SemaRef, PrevLBDecl, PrevLBDecl->getType(), InitLoc);
|
||||
PrevUB =
|
||||
buildDeclRefExpr(SemaRef, PrevUBDecl, PrevUBDecl->getType(), InitLoc);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -35,230 +35,231 @@ void test_five(int x, int y, int z) {
|
|||
;
|
||||
}
|
||||
|
||||
// CHECK: |-FunctionDecl [[ADDR_0:0x[a-z0-9]*]] <{{.*}}ast-dump-openmp-distribute-parallel-for-simd.c:3:1, line:7:1> line:3:6 test_one 'void (int)'
|
||||
// CHECK-NEXT: | |-ParmVarDecl [[ADDR_1:0x[a-z0-9]*]] <col:15, col:19> col:19 used x 'int'
|
||||
// CHECK-NEXT: | `-CompoundStmt [[ADDR_2:0x[a-z0-9]*]] <col:22, line:7:1>
|
||||
// CHECK-NEXT: | `-OMPDistributeParallelForSimdDirective [[ADDR_3:0x[a-z0-9]*]] <line:4:1, col:41>
|
||||
// CHECK-NEXT: | `-CapturedStmt [[ADDR_4:0x[a-z0-9]*]] <line:5:3, line:6:5>
|
||||
// CHECK-NEXT: | |-CapturedDecl [[ADDR_5:0x[a-z0-9]*]] <<invalid sloc>> <invalid sloc> nothrow
|
||||
// CHECK-NEXT: | | |-ForStmt [[ADDR_6:0x[a-z0-9]*]] <line:5:3, line:6:5>
|
||||
// CHECK-NEXT: | | | |-DeclStmt [[ADDR_7:0x[a-z0-9]*]] <line:5:8, col:17>
|
||||
// CHECK-NEXT: | | | | `-VarDecl [[ADDR_8:0x[a-z0-9]*]] <col:8, col:16> col:12 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | | `-IntegerLiteral [[ADDR_9:0x[a-z0-9]*]] <col:16> 'int' 0
|
||||
// CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>> <invalid sloc>
|
||||
// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-distribute-parallel-for-simd.c:3:1, line:7:1> line:3:6 test_one 'void (int)'
|
||||
// CHECK-NEXT: | |-ParmVarDecl {{.*}} <col:15, col:19> col:19 used x 'int'
|
||||
// CHECK-NEXT: | `-CompoundStmt {{.*}} <col:22, line:7:1>
|
||||
// CHECK-NEXT: | `-OMPDistributeParallelForSimdDirective {{.*}} <line:4:1, col:41>
|
||||
// CHECK-NEXT: | `-CapturedStmt {{.*}} <line:5:3, line:6:5>
|
||||
// CHECK-NEXT: | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow
|
||||
// CHECK-NEXT: | | |-ForStmt {{.*}} <line:5:3, line:6:5>
|
||||
// CHECK-NEXT: | | | |-DeclStmt {{.*}} <line:5:8, col:17>
|
||||
// CHECK-NEXT: | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0
|
||||
// CHECK-NEXT: | | | |-<<<NULL>>>
|
||||
// CHECK-NEXT: | | | |-BinaryOperator [[ADDR_10:0x[a-z0-9]*]] <col:19, col:23> 'int' '<'
|
||||
// CHECK-NEXT: | | | | |-ImplicitCastExpr [[ADDR_11:0x[a-z0-9]*]] <col:19> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | | `-DeclRefExpr [[ADDR_12:0x[a-z0-9]*]] <col:19> 'int' {{.*}}Var [[ADDR_8]] 'i' 'int'
|
||||
// CHECK-NEXT: | | | | `-ImplicitCastExpr [[ADDR_13:0x[a-z0-9]*]] <col:23> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr [[ADDR_14:0x[a-z0-9]*]] <col:23> 'int' {{.*}}ParmVar [[ADDR_1]] 'x' 'int'
|
||||
// CHECK-NEXT: | | | |-UnaryOperator [[ADDR_15:0x[a-z0-9]*]] <col:26, col:27> 'int' postfix '++'
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr [[ADDR_16:0x[a-z0-9]*]] <col:26> 'int' {{.*}}Var [[ADDR_8]] 'i' 'int'
|
||||
// CHECK-NEXT: | | | `-NullStmt [[ADDR_17:0x[a-z0-9]*]] <line:6:5>
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl [[ADDR_18:0x[a-z0-9]*]] <line:4:1> col:1 implicit .global_tid. 'const int *const restrict'
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl [[ADDR_19:0x[a-z0-9]*]] <col:1> col:1 implicit .bound_tid. 'const int *const restrict'
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl [[ADDR_20:0x[a-z0-9]*]] <col:1> col:1 implicit __context 'struct (unnamed at {{.*}}ast-dump-openmp-distribute-parallel-for-simd.c:4:1) *const restrict'
|
||||
// CHECK-NEXT: | | `-VarDecl [[ADDR_8]] <line:5:8, col:16> col:12 used i 'int' cinit
|
||||
// CHECK-NEXT: | | `-IntegerLiteral [[ADDR_9]] <col:16> 'int' 0
|
||||
// CHECK-NEXT: | |-DeclRefExpr [[ADDR_21:0x[a-z0-9]*]] <<invalid sloc>> 'const unsigned long' {{.*}}Var [[ADDR_22:0x[a-z0-9]*]] '.captured.omp.previous.lb' 'const unsigned long'
|
||||
// CHECK-NEXT: | |-DeclRefExpr [[ADDR_23:0x[a-z0-9]*]] <<invalid sloc>> 'const unsigned long' {{.*}}Var [[ADDR_24:0x[a-z0-9]*]] '.captured.omp.previous.ub' 'const unsigned long'
|
||||
// CHECK-NEXT: | `-DeclRefExpr [[ADDR_25:0x[a-z0-9]*]] <col:23> 'int' {{.*}}ParmVar [[ADDR_1]] 'x' 'int'
|
||||
// CHECK-NEXT: |-FunctionDecl [[ADDR_26:0x[a-z0-9]*]] <line:9:1, line:14:1> line:9:6 test_two 'void (int, int)'
|
||||
// CHECK-NEXT: | |-ParmVarDecl [[ADDR_27:0x[a-z0-9]*]] <col:15, col:19> col:19 used x 'int'
|
||||
// CHECK-NEXT: | |-ParmVarDecl [[ADDR_28:0x[a-z0-9]*]] <col:22, col:26> col:26 used y 'int'
|
||||
// CHECK-NEXT: | `-CompoundStmt [[ADDR_29:0x[a-z0-9]*]] <col:29, line:14:1>
|
||||
// CHECK-NEXT: | `-OMPDistributeParallelForSimdDirective [[ADDR_30:0x[a-z0-9]*]] <line:10:1, col:41>
|
||||
// CHECK-NEXT: | `-CapturedStmt [[ADDR_31:0x[a-z0-9]*]] <line:11:3, line:13:7>
|
||||
// CHECK-NEXT: | |-CapturedDecl [[ADDR_32:0x[a-z0-9]*]] <<invalid sloc>> <invalid sloc> nothrow
|
||||
// CHECK-NEXT: | | |-ForStmt [[ADDR_33:0x[a-z0-9]*]] <line:11:3, line:13:7>
|
||||
// CHECK-NEXT: | | | |-DeclStmt [[ADDR_34:0x[a-z0-9]*]] <line:11:8, col:17>
|
||||
// CHECK-NEXT: | | | | `-VarDecl [[ADDR_35:0x[a-z0-9]*]] <col:8, col:16> col:12 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | | `-IntegerLiteral [[ADDR_36:0x[a-z0-9]*]] <col:16> 'int' 0
|
||||
// CHECK-NEXT: | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<'
|
||||
// CHECK-NEXT: | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int'
|
||||
// CHECK-NEXT: | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int'
|
||||
// CHECK-NEXT: | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++'
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int'
|
||||
// CHECK-NEXT: | | | `-NullStmt {{.*}} <line:6:5>
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <line:4:1> col:1 implicit .global_tid. 'const int *const restrict'
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict'
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long'
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long'
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (unnamed at {{.*}}ast-dump-openmp-distribute-parallel-for-simd.c:4:1) *const restrict'
|
||||
// CHECK-NEXT: | | `-VarDecl {{.*}} <line:5:8, col:16> col:12 used i 'int' cinit
|
||||
// CHECK-NEXT: | | `-IntegerLiteral {{.*}} <col:16> 'int' 0
|
||||
// CHECK-NEXT: | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int'
|
||||
// CHECK-NEXT: |-FunctionDecl {{.*}} <line:9:1, line:14:1> line:9:6 test_two 'void (int, int)'
|
||||
// CHECK-NEXT: | |-ParmVarDecl {{.*}} <col:15, col:19> col:19 used x 'int'
|
||||
// CHECK-NEXT: | |-ParmVarDecl {{.*}} <col:22, col:26> col:26 used y 'int'
|
||||
// CHECK-NEXT: | `-CompoundStmt {{.*}} <col:29, line:14:1>
|
||||
// CHECK-NEXT: | `-OMPDistributeParallelForSimdDirective {{.*}} <line:10:1, col:41>
|
||||
// CHECK-NEXT: | `-CapturedStmt {{.*}} <line:11:3, line:13:7>
|
||||
// CHECK-NEXT: | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow
|
||||
// CHECK-NEXT: | | |-ForStmt {{.*}} <line:11:3, line:13:7>
|
||||
// CHECK-NEXT: | | | |-DeclStmt {{.*}} <line:11:8, col:17>
|
||||
// CHECK-NEXT: | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0
|
||||
// CHECK-NEXT: | | | |-<<<NULL>>>
|
||||
// CHECK-NEXT: | | | |-BinaryOperator [[ADDR_37:0x[a-z0-9]*]] <col:19, col:23> 'int' '<'
|
||||
// CHECK-NEXT: | | | | |-ImplicitCastExpr [[ADDR_38:0x[a-z0-9]*]] <col:19> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | | `-DeclRefExpr [[ADDR_39:0x[a-z0-9]*]] <col:19> 'int' {{.*}}Var [[ADDR_35]] 'i' 'int'
|
||||
// CHECK-NEXT: | | | | `-ImplicitCastExpr [[ADDR_40:0x[a-z0-9]*]] <col:23> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr [[ADDR_41:0x[a-z0-9]*]] <col:23> 'int' {{.*}}ParmVar [[ADDR_27]] 'x' 'int'
|
||||
// CHECK-NEXT: | | | |-UnaryOperator [[ADDR_42:0x[a-z0-9]*]] <col:26, col:27> 'int' postfix '++'
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr [[ADDR_43:0x[a-z0-9]*]] <col:26> 'int' {{.*}}Var [[ADDR_35]] 'i' 'int'
|
||||
// CHECK-NEXT: | | | `-ForStmt [[ADDR_44:0x[a-z0-9]*]] <line:12:5, line:13:7>
|
||||
// CHECK-NEXT: | | | |-DeclStmt [[ADDR_45:0x[a-z0-9]*]] <line:12:10, col:19>
|
||||
// CHECK-NEXT: | | | | `-VarDecl [[ADDR_46:0x[a-z0-9]*]] <col:10, col:18> col:14 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | | `-IntegerLiteral [[ADDR_47:0x[a-z0-9]*]] <col:18> 'int' 0
|
||||
// CHECK-NEXT: | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<'
|
||||
// CHECK-NEXT: | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int'
|
||||
// CHECK-NEXT: | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int'
|
||||
// CHECK-NEXT: | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++'
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int'
|
||||
// CHECK-NEXT: | | | `-ForStmt {{.*}} <line:12:5, line:13:7>
|
||||
// CHECK-NEXT: | | | |-DeclStmt {{.*}} <line:12:10, col:19>
|
||||
// CHECK-NEXT: | | | | `-VarDecl {{.*}} <col:10, col:18> col:14 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0
|
||||
// CHECK-NEXT: | | | |-<<<NULL>>>
|
||||
// CHECK-NEXT: | | | |-BinaryOperator [[ADDR_48:0x[a-z0-9]*]] <col:21, col:25> 'int' '<'
|
||||
// CHECK-NEXT: | | | | |-ImplicitCastExpr [[ADDR_49:0x[a-z0-9]*]] <col:21> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | | `-DeclRefExpr [[ADDR_50:0x[a-z0-9]*]] <col:21> 'int' {{.*}}Var [[ADDR_46]] 'i' 'int'
|
||||
// CHECK-NEXT: | | | | `-ImplicitCastExpr [[ADDR_51:0x[a-z0-9]*]] <col:25> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr [[ADDR_52:0x[a-z0-9]*]] <col:25> 'int' {{.*}}ParmVar [[ADDR_28]] 'y' 'int'
|
||||
// CHECK-NEXT: | | | |-UnaryOperator [[ADDR_53:0x[a-z0-9]*]] <col:28, col:29> 'int' postfix '++'
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr [[ADDR_54:0x[a-z0-9]*]] <col:28> 'int' {{.*}}Var [[ADDR_46]] 'i' 'int'
|
||||
// CHECK-NEXT: | | | `-NullStmt [[ADDR_55:0x[a-z0-9]*]] <line:13:7>
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl [[ADDR_56:0x[a-z0-9]*]] <line:10:1> col:1 implicit .global_tid. 'const int *const restrict'
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl [[ADDR_57:0x[a-z0-9]*]] <col:1> col:1 implicit .bound_tid. 'const int *const restrict'
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl [[ADDR_58:0x[a-z0-9]*]] <col:1> col:1 implicit __context 'struct (unnamed at {{.*}}ast-dump-openmp-distribute-parallel-for-simd.c:10:1) *const restrict'
|
||||
// CHECK-NEXT: | | |-VarDecl [[ADDR_35]] <line:11:8, col:16> col:12 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | `-IntegerLiteral [[ADDR_36]] <col:16> 'int' 0
|
||||
// CHECK-NEXT: | | `-VarDecl [[ADDR_46]] <line:12:10, col:18> col:14 used i 'int' cinit
|
||||
// CHECK-NEXT: | | `-IntegerLiteral [[ADDR_47]] <col:18> 'int' 0
|
||||
// CHECK-NEXT: | |-DeclRefExpr [[ADDR_59:0x[a-z0-9]*]] <<invalid sloc>> 'const unsigned long' {{.*}}Var [[ADDR_60:0x[a-z0-9]*]] '.captured.omp.previous.lb' 'const unsigned long'
|
||||
// CHECK-NEXT: | |-DeclRefExpr [[ADDR_61:0x[a-z0-9]*]] <<invalid sloc>> 'const unsigned long' {{.*}}Var [[ADDR_62:0x[a-z0-9]*]] '.captured.omp.previous.ub' 'const unsigned long'
|
||||
// CHECK-NEXT: | |-DeclRefExpr [[ADDR_63:0x[a-z0-9]*]] <line:11:23> 'int' {{.*}}ParmVar [[ADDR_27]] 'x' 'int'
|
||||
// CHECK-NEXT: | `-DeclRefExpr [[ADDR_64:0x[a-z0-9]*]] <line:12:25> 'int' {{.*}}ParmVar [[ADDR_28]] 'y' 'int'
|
||||
// CHECK-NEXT: |-FunctionDecl [[ADDR_65:0x[a-z0-9]*]] <line:16:1, line:21:1> line:16:6 test_three 'void (int, int)'
|
||||
// CHECK-NEXT: | |-ParmVarDecl [[ADDR_66:0x[a-z0-9]*]] <col:17, col:21> col:21 used x 'int'
|
||||
// CHECK-NEXT: | |-ParmVarDecl [[ADDR_67:0x[a-z0-9]*]] <col:24, col:28> col:28 used y 'int'
|
||||
// CHECK-NEXT: | `-CompoundStmt [[ADDR_68:0x[a-z0-9]*]] <col:31, line:21:1>
|
||||
// CHECK-NEXT: | `-OMPDistributeParallelForSimdDirective [[ADDR_69:0x[a-z0-9]*]] <line:17:1, col:53>
|
||||
// CHECK-NEXT: | |-OMPCollapseClause [[ADDR_70:0x[a-z0-9]*]] <col:42, col:52>
|
||||
// CHECK-NEXT: | | `-ConstantExpr [[ADDR_71:0x[a-z0-9]*]] <col:51> 'int'
|
||||
// CHECK-NEXT: | | |-value: Int 1
|
||||
// CHECK-NEXT: | | `-IntegerLiteral [[ADDR_72:0x[a-z0-9]*]] <col:51> 'int' 1
|
||||
// CHECK-NEXT: | `-CapturedStmt [[ADDR_73:0x[a-z0-9]*]] <line:18:3, line:20:7>
|
||||
// CHECK-NEXT: | |-CapturedDecl [[ADDR_74:0x[a-z0-9]*]] <<invalid sloc>> <invalid sloc> nothrow
|
||||
// CHECK-NEXT: | | |-ForStmt [[ADDR_75:0x[a-z0-9]*]] <line:18:3, line:20:7>
|
||||
// CHECK-NEXT: | | | |-DeclStmt [[ADDR_76:0x[a-z0-9]*]] <line:18:8, col:17>
|
||||
// CHECK-NEXT: | | | | `-VarDecl [[ADDR_77:0x[a-z0-9]*]] <col:8, col:16> col:12 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | | `-IntegerLiteral [[ADDR_78:0x[a-z0-9]*]] <col:16> 'int' 0
|
||||
// CHECK-NEXT: | | | |-BinaryOperator {{.*}} <col:21, col:25> 'int' '<'
|
||||
// CHECK-NEXT: | | | | |-ImplicitCastExpr {{.*}} <col:21> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:21> 'int' lvalue Var {{.*}} 'i' 'int'
|
||||
// CHECK-NEXT: | | | | `-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue ParmVar {{.*}} 'y' 'int'
|
||||
// CHECK-NEXT: | | | |-UnaryOperator {{.*}} <col:28, col:29> 'int' postfix '++'
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:28> 'int' lvalue Var {{.*}} 'i' 'int'
|
||||
// CHECK-NEXT: | | | `-NullStmt {{.*}} <line:13:7>
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <line:10:1> col:1 implicit .global_tid. 'const int *const restrict'
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict'
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long'
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long'
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (unnamed at {{.*}}ast-dump-openmp-distribute-parallel-for-simd.c:10:1) *const restrict'
|
||||
// CHECK-NEXT: | | |-VarDecl {{.*}} <line:11:8, col:16> col:12 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0
|
||||
// CHECK-NEXT: | | `-VarDecl {{.*}} <line:12:10, col:18> col:14 used i 'int' cinit
|
||||
// CHECK-NEXT: | | `-IntegerLiteral {{.*}} <col:18> 'int' 0
|
||||
// CHECK-NEXT: | |-DeclRefExpr {{.*}} <line:11:23> 'int' lvalue ParmVar {{.*}} 'x' 'int'
|
||||
// CHECK-NEXT: | `-DeclRefExpr {{.*}} <line:12:25> 'int' lvalue ParmVar {{.*}} 'y' 'int'
|
||||
// CHECK-NEXT: |-FunctionDecl {{.*}} <line:16:1, line:21:1> line:16:6 test_three 'void (int, int)'
|
||||
// CHECK-NEXT: | |-ParmVarDecl {{.*}} <col:17, col:21> col:21 used x 'int'
|
||||
// CHECK-NEXT: | |-ParmVarDecl {{.*}} <col:24, col:28> col:28 used y 'int'
|
||||
// CHECK-NEXT: | `-CompoundStmt {{.*}} <col:31, line:21:1>
|
||||
// CHECK-NEXT: | `-OMPDistributeParallelForSimdDirective {{.*}} <line:17:1, col:53>
|
||||
// CHECK-NEXT: | |-OMPCollapseClause {{.*}} <col:42, col:52>
|
||||
// CHECK-NEXT: | | `-ConstantExpr {{.*}} <col:51> 'int'
|
||||
// CHECK-NEXT: | | |-value: Int 1
|
||||
// CHECK-NEXT: | | `-IntegerLiteral {{.*}} <col:51> 'int' 1
|
||||
// CHECK-NEXT: | `-CapturedStmt {{.*}} <line:18:3, line:20:7>
|
||||
// CHECK-NEXT: | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow
|
||||
// CHECK-NEXT: | | |-ForStmt {{.*}} <line:18:3, line:20:7>
|
||||
// CHECK-NEXT: | | | |-DeclStmt {{.*}} <line:18:8, col:17>
|
||||
// CHECK-NEXT: | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0
|
||||
// CHECK-NEXT: | | | |-<<<NULL>>>
|
||||
// CHECK-NEXT: | | | |-BinaryOperator [[ADDR_79:0x[a-z0-9]*]] <col:19, col:23> 'int' '<'
|
||||
// CHECK-NEXT: | | | | |-ImplicitCastExpr [[ADDR_80:0x[a-z0-9]*]] <col:19> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | | `-DeclRefExpr [[ADDR_81:0x[a-z0-9]*]] <col:19> 'int' {{.*}}Var [[ADDR_77]] 'i' 'int'
|
||||
// CHECK-NEXT: | | | | `-ImplicitCastExpr [[ADDR_82:0x[a-z0-9]*]] <col:23> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr [[ADDR_83:0x[a-z0-9]*]] <col:23> 'int' {{.*}}ParmVar [[ADDR_66]] 'x' 'int'
|
||||
// CHECK-NEXT: | | | |-UnaryOperator [[ADDR_84:0x[a-z0-9]*]] <col:26, col:27> 'int' postfix '++'
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr [[ADDR_85:0x[a-z0-9]*]] <col:26> 'int' {{.*}}Var [[ADDR_77]] 'i' 'int'
|
||||
// CHECK-NEXT: | | | `-ForStmt [[ADDR_86:0x[a-z0-9]*]] <line:19:5, line:20:7>
|
||||
// CHECK-NEXT: | | | |-DeclStmt [[ADDR_87:0x[a-z0-9]*]] <line:19:10, col:19>
|
||||
// CHECK-NEXT: | | | | `-VarDecl [[ADDR_88:0x[a-z0-9]*]] <col:10, col:18> col:14 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | | `-IntegerLiteral [[ADDR_89:0x[a-z0-9]*]] <col:18> 'int' 0
|
||||
// CHECK-NEXT: | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<'
|
||||
// CHECK-NEXT: | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int'
|
||||
// CHECK-NEXT: | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int'
|
||||
// CHECK-NEXT: | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++'
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int'
|
||||
// CHECK-NEXT: | | | `-ForStmt {{.*}} <line:19:5, line:20:7>
|
||||
// CHECK-NEXT: | | | |-DeclStmt {{.*}} <line:19:10, col:19>
|
||||
// CHECK-NEXT: | | | | `-VarDecl {{.*}} <col:10, col:18> col:14 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0
|
||||
// CHECK-NEXT: | | | |-<<<NULL>>>
|
||||
// CHECK-NEXT: | | | |-BinaryOperator [[ADDR_90:0x[a-z0-9]*]] <col:21, col:25> 'int' '<'
|
||||
// CHECK-NEXT: | | | | |-ImplicitCastExpr [[ADDR_91:0x[a-z0-9]*]] <col:21> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | | `-DeclRefExpr [[ADDR_92:0x[a-z0-9]*]] <col:21> 'int' {{.*}}Var [[ADDR_88]] 'i' 'int'
|
||||
// CHECK-NEXT: | | | | `-ImplicitCastExpr [[ADDR_93:0x[a-z0-9]*]] <col:25> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr [[ADDR_94:0x[a-z0-9]*]] <col:25> 'int' {{.*}}ParmVar [[ADDR_67]] 'y' 'int'
|
||||
// CHECK-NEXT: | | | |-UnaryOperator [[ADDR_95:0x[a-z0-9]*]] <col:28, col:29> 'int' postfix '++'
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr [[ADDR_96:0x[a-z0-9]*]] <col:28> 'int' {{.*}}Var [[ADDR_88]] 'i' 'int'
|
||||
// CHECK-NEXT: | | | `-NullStmt [[ADDR_97:0x[a-z0-9]*]] <line:20:7>
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl [[ADDR_98:0x[a-z0-9]*]] <line:17:1> col:1 implicit .global_tid. 'const int *const restrict'
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl [[ADDR_99:0x[a-z0-9]*]] <col:1> col:1 implicit .bound_tid. 'const int *const restrict'
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl [[ADDR_100:0x[a-z0-9]*]] <col:1> col:1 implicit __context 'struct (unnamed at {{.*}}ast-dump-openmp-distribute-parallel-for-simd.c:17:1) *const restrict'
|
||||
// CHECK-NEXT: | | |-VarDecl [[ADDR_77]] <line:18:8, col:16> col:12 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | `-IntegerLiteral [[ADDR_78]] <col:16> 'int' 0
|
||||
// CHECK-NEXT: | | `-VarDecl [[ADDR_88]] <line:19:10, col:18> col:14 used i 'int' cinit
|
||||
// CHECK-NEXT: | | `-IntegerLiteral [[ADDR_89]] <col:18> 'int' 0
|
||||
// CHECK-NEXT: | |-DeclRefExpr [[ADDR_101:0x[a-z0-9]*]] <<invalid sloc>> 'const unsigned long' {{.*}}Var [[ADDR_102:0x[a-z0-9]*]] '.captured.omp.previous.lb' 'const unsigned long'
|
||||
// CHECK-NEXT: | |-DeclRefExpr [[ADDR_103:0x[a-z0-9]*]] <<invalid sloc>> 'const unsigned long' {{.*}}Var [[ADDR_104:0x[a-z0-9]*]] '.captured.omp.previous.ub' 'const unsigned long'
|
||||
// CHECK-NEXT: | |-DeclRefExpr [[ADDR_105:0x[a-z0-9]*]] <line:18:23> 'int' {{.*}}ParmVar [[ADDR_66]] 'x' 'int'
|
||||
// CHECK-NEXT: | `-DeclRefExpr [[ADDR_106:0x[a-z0-9]*]] <line:19:25> 'int' {{.*}}ParmVar [[ADDR_67]] 'y' 'int'
|
||||
// CHECK-NEXT: |-FunctionDecl [[ADDR_107:0x[a-z0-9]*]] <line:23:1, line:28:1> line:23:6 test_four 'void (int, int)'
|
||||
// CHECK-NEXT: | |-ParmVarDecl [[ADDR_108:0x[a-z0-9]*]] <col:16, col:20> col:20 used x 'int'
|
||||
// CHECK-NEXT: | |-ParmVarDecl [[ADDR_109:0x[a-z0-9]*]] <col:23, col:27> col:27 used y 'int'
|
||||
// CHECK-NEXT: | `-CompoundStmt [[ADDR_110:0x[a-z0-9]*]] <col:30, line:28:1>
|
||||
// CHECK-NEXT: | `-OMPDistributeParallelForSimdDirective [[ADDR_111:0x[a-z0-9]*]] <line:24:1, col:53>
|
||||
// CHECK-NEXT: | |-OMPCollapseClause [[ADDR_112:0x[a-z0-9]*]] <col:42, col:52>
|
||||
// CHECK-NEXT: | | `-ConstantExpr [[ADDR_113:0x[a-z0-9]*]] <col:51> 'int'
|
||||
// CHECK-NEXT: | | |-value: Int 2
|
||||
// CHECK-NEXT: | | `-IntegerLiteral [[ADDR_114:0x[a-z0-9]*]] <col:51> 'int' 2
|
||||
// CHECK-NEXT: | `-CapturedStmt [[ADDR_115:0x[a-z0-9]*]] <line:25:3, line:27:7>
|
||||
// CHECK-NEXT: | |-CapturedDecl [[ADDR_116:0x[a-z0-9]*]] <<invalid sloc>> <invalid sloc> nothrow
|
||||
// CHECK-NEXT: | | |-ForStmt [[ADDR_117:0x[a-z0-9]*]] <line:25:3, line:27:7>
|
||||
// CHECK-NEXT: | | | |-DeclStmt [[ADDR_118:0x[a-z0-9]*]] <line:25:8, col:17>
|
||||
// CHECK-NEXT: | | | | `-VarDecl [[ADDR_119:0x[a-z0-9]*]] <col:8, col:16> col:12 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | | `-IntegerLiteral [[ADDR_120:0x[a-z0-9]*]] <col:16> 'int' 0
|
||||
// CHECK-NEXT: | | | |-BinaryOperator {{.*}} <col:21, col:25> 'int' '<'
|
||||
// CHECK-NEXT: | | | | |-ImplicitCastExpr {{.*}} <col:21> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:21> 'int' lvalue Var {{.*}} 'i' 'int'
|
||||
// CHECK-NEXT: | | | | `-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue ParmVar {{.*}} 'y' 'int'
|
||||
// CHECK-NEXT: | | | |-UnaryOperator {{.*}} <col:28, col:29> 'int' postfix '++'
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:28> 'int' lvalue Var {{.*}} 'i' 'int'
|
||||
// CHECK-NEXT: | | | `-NullStmt {{.*}} <line:20:7>
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <line:17:1> col:1 implicit .global_tid. 'const int *const restrict'
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict'
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long'
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long'
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (unnamed at {{.*}}ast-dump-openmp-distribute-parallel-for-simd.c:17:1) *const restrict'
|
||||
// CHECK-NEXT: | | |-VarDecl {{.*}} <line:18:8, col:16> col:12 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0
|
||||
// CHECK-NEXT: | | `-VarDecl {{.*}} <line:19:10, col:18> col:14 used i 'int' cinit
|
||||
// CHECK-NEXT: | | `-IntegerLiteral {{.*}} <col:18> 'int' 0
|
||||
// CHECK-NEXT: | |-DeclRefExpr {{.*}} <line:18:23> 'int' lvalue ParmVar {{.*}} 'x' 'int'
|
||||
// CHECK-NEXT: | `-DeclRefExpr {{.*}} <line:19:25> 'int' lvalue ParmVar {{.*}} 'y' 'int'
|
||||
// CHECK-NEXT: |-FunctionDecl {{.*}} <line:23:1, line:28:1> line:23:6 test_four 'void (int, int)'
|
||||
// CHECK-NEXT: | |-ParmVarDecl {{.*}} <col:16, col:20> col:20 used x 'int'
|
||||
// CHECK-NEXT: | |-ParmVarDecl {{.*}} <col:23, col:27> col:27 used y 'int'
|
||||
// CHECK-NEXT: | `-CompoundStmt {{.*}} <col:30, line:28:1>
|
||||
// CHECK-NEXT: | `-OMPDistributeParallelForSimdDirective {{.*}} <line:24:1, col:53>
|
||||
// CHECK-NEXT: | |-OMPCollapseClause {{.*}} <col:42, col:52>
|
||||
// CHECK-NEXT: | | `-ConstantExpr {{.*}} <col:51> 'int'
|
||||
// CHECK-NEXT: | | |-value: Int 2
|
||||
// CHECK-NEXT: | | `-IntegerLiteral {{.*}} <col:51> 'int' 2
|
||||
// CHECK-NEXT: | `-CapturedStmt {{.*}} <line:25:3, line:27:7>
|
||||
// CHECK-NEXT: | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow
|
||||
// CHECK-NEXT: | | |-ForStmt {{.*}} <line:25:3, line:27:7>
|
||||
// CHECK-NEXT: | | | |-DeclStmt {{.*}} <line:25:8, col:17>
|
||||
// CHECK-NEXT: | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0
|
||||
// CHECK-NEXT: | | | |-<<<NULL>>>
|
||||
// CHECK-NEXT: | | | |-BinaryOperator [[ADDR_121:0x[a-z0-9]*]] <col:19, col:23> 'int' '<'
|
||||
// CHECK-NEXT: | | | | |-ImplicitCastExpr [[ADDR_122:0x[a-z0-9]*]] <col:19> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | | `-DeclRefExpr [[ADDR_123:0x[a-z0-9]*]] <col:19> 'int' {{.*}}Var [[ADDR_119]] 'i' 'int'
|
||||
// CHECK-NEXT: | | | | `-ImplicitCastExpr [[ADDR_124:0x[a-z0-9]*]] <col:23> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr [[ADDR_125:0x[a-z0-9]*]] <col:23> 'int' {{.*}}ParmVar [[ADDR_108]] 'x' 'int'
|
||||
// CHECK-NEXT: | | | |-UnaryOperator [[ADDR_126:0x[a-z0-9]*]] <col:26, col:27> 'int' postfix '++'
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr [[ADDR_127:0x[a-z0-9]*]] <col:26> 'int' {{.*}}Var [[ADDR_119]] 'i' 'int'
|
||||
// CHECK-NEXT: | | | `-ForStmt [[ADDR_128:0x[a-z0-9]*]] <line:26:5, line:27:7>
|
||||
// CHECK-NEXT: | | | |-DeclStmt [[ADDR_129:0x[a-z0-9]*]] <line:26:10, col:19>
|
||||
// CHECK-NEXT: | | | | `-VarDecl [[ADDR_130:0x[a-z0-9]*]] <col:10, col:18> col:14 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | | `-IntegerLiteral [[ADDR_131:0x[a-z0-9]*]] <col:18> 'int' 0
|
||||
// CHECK-NEXT: | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<'
|
||||
// CHECK-NEXT: | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int'
|
||||
// CHECK-NEXT: | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int'
|
||||
// CHECK-NEXT: | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++'
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int'
|
||||
// CHECK-NEXT: | | | `-ForStmt {{.*}} <line:26:5, line:27:7>
|
||||
// CHECK-NEXT: | | | |-DeclStmt {{.*}} <line:26:10, col:19>
|
||||
// CHECK-NEXT: | | | | `-VarDecl {{.*}} <col:10, col:18> col:14 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0
|
||||
// CHECK-NEXT: | | | |-<<<NULL>>>
|
||||
// CHECK-NEXT: | | | |-BinaryOperator [[ADDR_132:0x[a-z0-9]*]] <col:21, col:25> 'int' '<'
|
||||
// CHECK-NEXT: | | | | |-ImplicitCastExpr [[ADDR_133:0x[a-z0-9]*]] <col:21> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | | `-DeclRefExpr [[ADDR_134:0x[a-z0-9]*]] <col:21> 'int' {{.*}}Var [[ADDR_130]] 'i' 'int'
|
||||
// CHECK-NEXT: | | | | `-ImplicitCastExpr [[ADDR_135:0x[a-z0-9]*]] <col:25> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr [[ADDR_136:0x[a-z0-9]*]] <col:25> 'int' {{.*}}ParmVar [[ADDR_109]] 'y' 'int'
|
||||
// CHECK-NEXT: | | | |-UnaryOperator [[ADDR_137:0x[a-z0-9]*]] <col:28, col:29> 'int' postfix '++'
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr [[ADDR_138:0x[a-z0-9]*]] <col:28> 'int' {{.*}}Var [[ADDR_130]] 'i' 'int'
|
||||
// CHECK-NEXT: | | | `-NullStmt [[ADDR_139:0x[a-z0-9]*]] <line:27:7>
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl [[ADDR_140:0x[a-z0-9]*]] <line:24:1> col:1 implicit .global_tid. 'const int *const restrict'
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl [[ADDR_141:0x[a-z0-9]*]] <col:1> col:1 implicit .bound_tid. 'const int *const restrict'
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl [[ADDR_142:0x[a-z0-9]*]] <col:1> col:1 implicit __context 'struct (unnamed at {{.*}}ast-dump-openmp-distribute-parallel-for-simd.c:24:1) *const restrict'
|
||||
// CHECK-NEXT: | | |-VarDecl [[ADDR_119]] <line:25:8, col:16> col:12 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | `-IntegerLiteral [[ADDR_120]] <col:16> 'int' 0
|
||||
// CHECK-NEXT: | | `-VarDecl [[ADDR_130]] <line:26:10, col:18> col:14 used i 'int' cinit
|
||||
// CHECK-NEXT: | | `-IntegerLiteral [[ADDR_131]] <col:18> 'int' 0
|
||||
// CHECK-NEXT: | |-DeclRefExpr [[ADDR_143:0x[a-z0-9]*]] <<invalid sloc>> 'const unsigned long' {{.*}}Var [[ADDR_144:0x[a-z0-9]*]] '.captured.omp.previous.lb' 'const unsigned long'
|
||||
// CHECK-NEXT: | |-DeclRefExpr [[ADDR_145:0x[a-z0-9]*]] <<invalid sloc>> 'const unsigned long' {{.*}}Var [[ADDR_146:0x[a-z0-9]*]] '.captured.omp.previous.ub' 'const unsigned long'
|
||||
// CHECK-NEXT: | |-DeclRefExpr [[ADDR_147:0x[a-z0-9]*]] <line:25:23> 'int' {{.*}}ParmVar [[ADDR_108]] 'x' 'int'
|
||||
// CHECK-NEXT: | `-DeclRefExpr [[ADDR_148:0x[a-z0-9]*]] <line:26:25> 'int' {{.*}}ParmVar [[ADDR_109]] 'y' 'int'
|
||||
// CHECK-NEXT: `-FunctionDecl [[ADDR_149:0x[a-z0-9]*]] <line:30:1, line:36:1> line:30:6 test_five 'void (int, int, int)'
|
||||
// CHECK-NEXT: |-ParmVarDecl [[ADDR_150:0x[a-z0-9]*]] <col:16, col:20> col:20 used x 'int'
|
||||
// CHECK-NEXT: |-ParmVarDecl [[ADDR_151:0x[a-z0-9]*]] <col:23, col:27> col:27 used y 'int'
|
||||
// CHECK-NEXT: |-ParmVarDecl [[ADDR_152:0x[a-z0-9]*]] <col:30, col:34> col:34 used z 'int'
|
||||
// CHECK-NEXT: `-CompoundStmt [[ADDR_153:0x[a-z0-9]*]] <col:37, line:36:1>
|
||||
// CHECK-NEXT: `-OMPDistributeParallelForSimdDirective [[ADDR_154:0x[a-z0-9]*]] <line:31:1, col:53>
|
||||
// CHECK-NEXT: |-OMPCollapseClause [[ADDR_155:0x[a-z0-9]*]] <col:42, col:52>
|
||||
// CHECK-NEXT: | `-ConstantExpr [[ADDR_156:0x[a-z0-9]*]] <col:51> 'int'
|
||||
// CHECK-NEXT: | |-value: Int 2
|
||||
// CHECK-NEXT: | `-IntegerLiteral [[ADDR_157:0x[a-z0-9]*]] <col:51> 'int' 2
|
||||
// CHECK-NEXT: `-CapturedStmt [[ADDR_158:0x[a-z0-9]*]] <line:32:3, line:35:9>
|
||||
// CHECK-NEXT: |-CapturedDecl [[ADDR_159:0x[a-z0-9]*]] <<invalid sloc>> <invalid sloc> nothrow
|
||||
// CHECK-NEXT: | |-ForStmt [[ADDR_160:0x[a-z0-9]*]] <line:32:3, line:35:9>
|
||||
// CHECK-NEXT: | | |-DeclStmt [[ADDR_161:0x[a-z0-9]*]] <line:32:8, col:17>
|
||||
// CHECK-NEXT: | | | `-VarDecl [[ADDR_162:0x[a-z0-9]*]] <col:8, col:16> col:12 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | `-IntegerLiteral [[ADDR_163:0x[a-z0-9]*]] <col:16> 'int' 0
|
||||
// CHECK-NEXT: | | | |-BinaryOperator {{.*}} <col:21, col:25> 'int' '<'
|
||||
// CHECK-NEXT: | | | | |-ImplicitCastExpr {{.*}} <col:21> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:21> 'int' lvalue Var {{.*}} 'i' 'int'
|
||||
// CHECK-NEXT: | | | | `-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue ParmVar {{.*}} 'y' 'int'
|
||||
// CHECK-NEXT: | | | |-UnaryOperator {{.*}} <col:28, col:29> 'int' postfix '++'
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:28> 'int' lvalue Var {{.*}} 'i' 'int'
|
||||
// CHECK-NEXT: | | | `-NullStmt {{.*}} <line:27:7>
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <line:24:1> col:1 implicit .global_tid. 'const int *const restrict'
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict'
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long'
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long'
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (unnamed at {{.*}}ast-dump-openmp-distribute-parallel-for-simd.c:24:1) *const restrict'
|
||||
// CHECK-NEXT: | | |-VarDecl {{.*}} <line:25:8, col:16> col:12 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0
|
||||
// CHECK-NEXT: | | `-VarDecl {{.*}} <line:26:10, col:18> col:14 used i 'int' cinit
|
||||
// CHECK-NEXT: | | `-IntegerLiteral {{.*}} <col:18> 'int' 0
|
||||
// CHECK-NEXT: | |-DeclRefExpr {{.*}} <line:25:23> 'int' lvalue ParmVar {{.*}} 'x' 'int'
|
||||
// CHECK-NEXT: | `-DeclRefExpr {{.*}} <line:26:25> 'int' lvalue ParmVar {{.*}} 'y' 'int'
|
||||
// CHECK-NEXT: `-FunctionDecl {{.*}} <line:30:1, line:36:1> line:30:6 test_five 'void (int, int, int)'
|
||||
// CHECK-NEXT: |-ParmVarDecl {{.*}} <col:16, col:20> col:20 used x 'int'
|
||||
// CHECK-NEXT: |-ParmVarDecl {{.*}} <col:23, col:27> col:27 used y 'int'
|
||||
// CHECK-NEXT: |-ParmVarDecl {{.*}} <col:30, col:34> col:34 used z 'int'
|
||||
// CHECK-NEXT: `-CompoundStmt {{.*}} <col:37, line:36:1>
|
||||
// CHECK-NEXT: `-OMPDistributeParallelForSimdDirective {{.*}} <line:31:1, col:53>
|
||||
// CHECK-NEXT: |-OMPCollapseClause {{.*}} <col:42, col:52>
|
||||
// CHECK-NEXT: | `-ConstantExpr {{.*}} <col:51> 'int'
|
||||
// CHECK-NEXT: | |-value: Int 2
|
||||
// CHECK-NEXT: | `-IntegerLiteral {{.*}} <col:51> 'int' 2
|
||||
// CHECK-NEXT: `-CapturedStmt {{.*}} <line:32:3, line:35:9>
|
||||
// CHECK-NEXT: |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow
|
||||
// CHECK-NEXT: | |-ForStmt {{.*}} <line:32:3, line:35:9>
|
||||
// CHECK-NEXT: | | |-DeclStmt {{.*}} <line:32:8, col:17>
|
||||
// CHECK-NEXT: | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0
|
||||
// CHECK-NEXT: | | |-<<<NULL>>>
|
||||
// CHECK-NEXT: | | |-BinaryOperator [[ADDR_164:0x[a-z0-9]*]] <col:19, col:23> 'int' '<'
|
||||
// CHECK-NEXT: | | | |-ImplicitCastExpr [[ADDR_165:0x[a-z0-9]*]] <col:19> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr [[ADDR_166:0x[a-z0-9]*]] <col:19> 'int' {{.*}}Var [[ADDR_162]] 'i' 'int'
|
||||
// CHECK-NEXT: | | | `-ImplicitCastExpr [[ADDR_167:0x[a-z0-9]*]] <col:23> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | `-DeclRefExpr [[ADDR_168:0x[a-z0-9]*]] <col:23> 'int' {{.*}}ParmVar [[ADDR_150]] 'x' 'int'
|
||||
// CHECK-NEXT: | | |-UnaryOperator [[ADDR_169:0x[a-z0-9]*]] <col:26, col:27> 'int' postfix '++'
|
||||
// CHECK-NEXT: | | | `-DeclRefExpr [[ADDR_170:0x[a-z0-9]*]] <col:26> 'int' {{.*}}Var [[ADDR_162]] 'i' 'int'
|
||||
// CHECK-NEXT: | | `-ForStmt [[ADDR_171:0x[a-z0-9]*]] <line:33:5, line:35:9>
|
||||
// CHECK-NEXT: | | |-DeclStmt [[ADDR_172:0x[a-z0-9]*]] <line:33:10, col:19>
|
||||
// CHECK-NEXT: | | | `-VarDecl [[ADDR_173:0x[a-z0-9]*]] <col:10, col:18> col:14 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | `-IntegerLiteral [[ADDR_174:0x[a-z0-9]*]] <col:18> 'int' 0
|
||||
// CHECK-NEXT: | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<'
|
||||
// CHECK-NEXT: | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int'
|
||||
// CHECK-NEXT: | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int'
|
||||
// CHECK-NEXT: | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++'
|
||||
// CHECK-NEXT: | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int'
|
||||
// CHECK-NEXT: | | `-ForStmt {{.*}} <line:33:5, line:35:9>
|
||||
// CHECK-NEXT: | | |-DeclStmt {{.*}} <line:33:10, col:19>
|
||||
// CHECK-NEXT: | | | `-VarDecl {{.*}} <col:10, col:18> col:14 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0
|
||||
// CHECK-NEXT: | | |-<<<NULL>>>
|
||||
// CHECK-NEXT: | | |-BinaryOperator [[ADDR_175:0x[a-z0-9]*]] <col:21, col:25> 'int' '<'
|
||||
// CHECK-NEXT: | | | |-ImplicitCastExpr [[ADDR_176:0x[a-z0-9]*]] <col:21> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr [[ADDR_177:0x[a-z0-9]*]] <col:21> 'int' {{.*}}Var [[ADDR_173]] 'i' 'int'
|
||||
// CHECK-NEXT: | | | `-ImplicitCastExpr [[ADDR_178:0x[a-z0-9]*]] <col:25> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | `-DeclRefExpr [[ADDR_179:0x[a-z0-9]*]] <col:25> 'int' {{.*}}ParmVar [[ADDR_151]] 'y' 'int'
|
||||
// CHECK-NEXT: | | |-UnaryOperator [[ADDR_180:0x[a-z0-9]*]] <col:28, col:29> 'int' postfix '++'
|
||||
// CHECK-NEXT: | | | `-DeclRefExpr [[ADDR_181:0x[a-z0-9]*]] <col:28> 'int' {{.*}}Var [[ADDR_173]] 'i' 'int'
|
||||
// CHECK-NEXT: | | `-ForStmt [[ADDR_182:0x[a-z0-9]*]] <line:34:7, line:35:9>
|
||||
// CHECK-NEXT: | | |-DeclStmt [[ADDR_183:0x[a-z0-9]*]] <line:34:12, col:21>
|
||||
// CHECK-NEXT: | | | `-VarDecl [[ADDR_184:0x[a-z0-9]*]] <col:12, col:20> col:16 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | `-IntegerLiteral [[ADDR_185:0x[a-z0-9]*]] <col:20> 'int' 0
|
||||
// CHECK-NEXT: | | |-BinaryOperator {{.*}} <col:21, col:25> 'int' '<'
|
||||
// CHECK-NEXT: | | | |-ImplicitCastExpr {{.*}} <col:21> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:21> 'int' lvalue Var {{.*}} 'i' 'int'
|
||||
// CHECK-NEXT: | | | `-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue ParmVar {{.*}} 'y' 'int'
|
||||
// CHECK-NEXT: | | |-UnaryOperator {{.*}} <col:28, col:29> 'int' postfix '++'
|
||||
// CHECK-NEXT: | | | `-DeclRefExpr {{.*}} <col:28> 'int' lvalue Var {{.*}} 'i' 'int'
|
||||
// CHECK-NEXT: | | `-ForStmt {{.*}} <line:34:7, line:35:9>
|
||||
// CHECK-NEXT: | | |-DeclStmt {{.*}} <line:34:12, col:21>
|
||||
// CHECK-NEXT: | | | `-VarDecl {{.*}} <col:12, col:20> col:16 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | `-IntegerLiteral {{.*}} <col:20> 'int' 0
|
||||
// CHECK-NEXT: | | |-<<<NULL>>>
|
||||
// CHECK-NEXT: | | |-BinaryOperator [[ADDR_186:0x[a-z0-9]*]] <col:23, col:27> 'int' '<'
|
||||
// CHECK-NEXT: | | | |-ImplicitCastExpr [[ADDR_187:0x[a-z0-9]*]] <col:23> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr [[ADDR_188:0x[a-z0-9]*]] <col:23> 'int' {{.*}}Var [[ADDR_184]] 'i' 'int'
|
||||
// CHECK-NEXT: | | | `-ImplicitCastExpr [[ADDR_189:0x[a-z0-9]*]] <col:27> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | `-DeclRefExpr [[ADDR_190:0x[a-z0-9]*]] <col:27> 'int' {{.*}}ParmVar [[ADDR_152]] 'z' 'int'
|
||||
// CHECK-NEXT: | | |-UnaryOperator [[ADDR_191:0x[a-z0-9]*]] <col:30, col:31> 'int' postfix '++'
|
||||
// CHECK-NEXT: | | | `-DeclRefExpr [[ADDR_192:0x[a-z0-9]*]] <col:30> 'int' {{.*}}Var [[ADDR_184]] 'i' 'int'
|
||||
// CHECK-NEXT: | | `-NullStmt [[ADDR_193:0x[a-z0-9]*]] <line:35:9>
|
||||
// CHECK-NEXT: | |-ImplicitParamDecl [[ADDR_194:0x[a-z0-9]*]] <line:31:1> col:1 implicit .global_tid. 'const int *const restrict'
|
||||
// CHECK-NEXT: | |-ImplicitParamDecl [[ADDR_195:0x[a-z0-9]*]] <col:1> col:1 implicit .bound_tid. 'const int *const restrict'
|
||||
// CHECK-NEXT: | |-ImplicitParamDecl [[ADDR_196:0x[a-z0-9]*]] <col:1> col:1 implicit __context 'struct (unnamed at {{.*}}ast-dump-openmp-distribute-parallel-for-simd.c:31:1) *const restrict'
|
||||
// CHECK-NEXT: | |-VarDecl [[ADDR_162]] <line:32:8, col:16> col:12 used i 'int' cinit
|
||||
// CHECK-NEXT: | | `-IntegerLiteral [[ADDR_163]] <col:16> 'int' 0
|
||||
// CHECK-NEXT: | |-VarDecl [[ADDR_173]] <line:33:10, col:18> col:14 used i 'int' cinit
|
||||
// CHECK-NEXT: | | `-IntegerLiteral [[ADDR_174]] <col:18> 'int' 0
|
||||
// CHECK-NEXT: | `-VarDecl [[ADDR_184]] <line:34:12, col:20> col:16 used i 'int' cinit
|
||||
// CHECK-NEXT: | `-IntegerLiteral [[ADDR_185]] <col:20> 'int' 0
|
||||
// CHECK-NEXT: |-DeclRefExpr [[ADDR_197:0x[a-z0-9]*]] <<invalid sloc>> 'const unsigned long' {{.*}}Var [[ADDR_198:0x[a-z0-9]*]] '.captured.omp.previous.lb' 'const unsigned long'
|
||||
// CHECK-NEXT: |-DeclRefExpr [[ADDR_199:0x[a-z0-9]*]] <<invalid sloc>> 'const unsigned long' {{.*}}Var [[ADDR_200:0x[a-z0-9]*]] '.captured.omp.previous.ub' 'const unsigned long'
|
||||
// CHECK-NEXT: |-DeclRefExpr [[ADDR_201:0x[a-z0-9]*]] <line:32:23> 'int' {{.*}}ParmVar [[ADDR_150]] 'x' 'int'
|
||||
// CHECK-NEXT: |-DeclRefExpr [[ADDR_202:0x[a-z0-9]*]] <line:33:25> 'int' {{.*}}ParmVar [[ADDR_151]] 'y' 'int'
|
||||
// CHECK-NEXT: `-DeclRefExpr [[ADDR_203:0x[a-z0-9]*]] <line:34:27> 'int' {{.*}}ParmVar [[ADDR_152]] 'z' 'int'
|
||||
// CHECK-NEXT: | | |-BinaryOperator {{.*}} <col:23, col:27> 'int' '<'
|
||||
// CHECK-NEXT: | | | |-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue Var {{.*}} 'i' 'int'
|
||||
// CHECK-NEXT: | | | `-ImplicitCastExpr {{.*}} <col:27> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | `-DeclRefExpr {{.*}} <col:27> 'int' lvalue ParmVar {{.*}} 'z' 'int'
|
||||
// CHECK-NEXT: | | |-UnaryOperator {{.*}} <col:30, col:31> 'int' postfix '++'
|
||||
// CHECK-NEXT: | | | `-DeclRefExpr {{.*}} <col:30> 'int' lvalue Var {{.*}} 'i' 'int'
|
||||
// CHECK-NEXT: | | `-NullStmt {{.*}} <line:35:9>
|
||||
// CHECK-NEXT: | |-ImplicitParamDecl {{.*}} <line:31:1> col:1 implicit .global_tid. 'const int *const restrict'
|
||||
// CHECK-NEXT: | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict'
|
||||
// CHECK-NEXT: | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long'
|
||||
// CHECK-NEXT: | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long'
|
||||
// CHECK-NEXT: | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (unnamed at {{.*}}ast-dump-openmp-distribute-parallel-for-simd.c:31:1) *const restrict'
|
||||
// CHECK-NEXT: | |-VarDecl {{.*}} <line:32:8, col:16> col:12 used i 'int' cinit
|
||||
// CHECK-NEXT: | | `-IntegerLiteral {{.*}} <col:16> 'int' 0
|
||||
// CHECK-NEXT: | |-VarDecl {{.*}} <line:33:10, col:18> col:14 used i 'int' cinit
|
||||
// CHECK-NEXT: | | `-IntegerLiteral {{.*}} <col:18> 'int' 0
|
||||
// CHECK-NEXT: | `-VarDecl {{.*}} <line:34:12, col:20> col:16 used i 'int' cinit
|
||||
// CHECK-NEXT: | `-IntegerLiteral {{.*}} <col:20> 'int' 0
|
||||
// CHECK-NEXT: |-DeclRefExpr {{.*}} <line:32:23> 'int' lvalue ParmVar {{.*}} 'x' 'int'
|
||||
// CHECK-NEXT: |-DeclRefExpr {{.*}} <line:33:25> 'int' lvalue ParmVar {{.*}} 'y' 'int'
|
||||
// CHECK-NEXT: `-DeclRefExpr {{.*}} <line:34:27> 'int' lvalue ParmVar {{.*}} 'z' 'int'
|
||||
|
|
|
@ -35,230 +35,231 @@ void test_five(int x, int y, int z) {
|
|||
;
|
||||
}
|
||||
|
||||
// CHECK: |-FunctionDecl [[ADDR_0:0x[a-z0-9]*]] <{{.*}}ast-dump-openmp-distribute-parallel-for.c:3:1, line:7:1> line:3:6 test_one 'void (int)'
|
||||
// CHECK-NEXT: | |-ParmVarDecl [[ADDR_1:0x[a-z0-9]*]] <col:15, col:19> col:19 used x 'int'
|
||||
// CHECK-NEXT: | `-CompoundStmt [[ADDR_2:0x[a-z0-9]*]] <col:22, line:7:1>
|
||||
// CHECK-NEXT: | `-OMPDistributeParallelForDirective [[ADDR_3:0x[a-z0-9]*]] <line:4:1, col:36>
|
||||
// CHECK-NEXT: | `-CapturedStmt [[ADDR_4:0x[a-z0-9]*]] <line:5:3, line:6:5>
|
||||
// CHECK-NEXT: | |-CapturedDecl [[ADDR_5:0x[a-z0-9]*]] <<invalid sloc>> <invalid sloc> nothrow
|
||||
// CHECK-NEXT: | | |-ForStmt [[ADDR_6:0x[a-z0-9]*]] <line:5:3, line:6:5>
|
||||
// CHECK-NEXT: | | | |-DeclStmt [[ADDR_7:0x[a-z0-9]*]] <line:5:8, col:17>
|
||||
// CHECK-NEXT: | | | | `-VarDecl [[ADDR_8:0x[a-z0-9]*]] <col:8, col:16> col:12 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | | `-IntegerLiteral [[ADDR_9:0x[a-z0-9]*]] <col:16> 'int' 0
|
||||
// CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>> <invalid sloc>
|
||||
// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-distribute-parallel-for.c:3:1, line:7:1> line:3:6 test_one 'void (int)'
|
||||
// CHECK-NEXT: | |-ParmVarDecl {{.*}} <col:15, col:19> col:19 used x 'int'
|
||||
// CHECK-NEXT: | `-CompoundStmt {{.*}} <col:22, line:7:1>
|
||||
// CHECK-NEXT: | `-OMPDistributeParallelForDirective {{.*}} <line:4:1, col:36>
|
||||
// CHECK-NEXT: | `-CapturedStmt {{.*}} <line:5:3, line:6:5>
|
||||
// CHECK-NEXT: | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow
|
||||
// CHECK-NEXT: | | |-ForStmt {{.*}} <line:5:3, line:6:5>
|
||||
// CHECK-NEXT: | | | |-DeclStmt {{.*}} <line:5:8, col:17>
|
||||
// CHECK-NEXT: | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0
|
||||
// CHECK-NEXT: | | | |-<<<NULL>>>
|
||||
// CHECK-NEXT: | | | |-BinaryOperator [[ADDR_10:0x[a-z0-9]*]] <col:19, col:23> 'int' '<'
|
||||
// CHECK-NEXT: | | | | |-ImplicitCastExpr [[ADDR_11:0x[a-z0-9]*]] <col:19> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | | `-DeclRefExpr [[ADDR_12:0x[a-z0-9]*]] <col:19> 'int' {{.*}}Var [[ADDR_8]] 'i' 'int'
|
||||
// CHECK-NEXT: | | | | `-ImplicitCastExpr [[ADDR_13:0x[a-z0-9]*]] <col:23> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr [[ADDR_14:0x[a-z0-9]*]] <col:23> 'int' {{.*}}ParmVar [[ADDR_1]] 'x' 'int'
|
||||
// CHECK-NEXT: | | | |-UnaryOperator [[ADDR_15:0x[a-z0-9]*]] <col:26, col:27> 'int' postfix '++'
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr [[ADDR_16:0x[a-z0-9]*]] <col:26> 'int' {{.*}}Var [[ADDR_8]] 'i' 'int'
|
||||
// CHECK-NEXT: | | | `-NullStmt [[ADDR_17:0x[a-z0-9]*]] <line:6:5>
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl [[ADDR_18:0x[a-z0-9]*]] <line:4:1> col:1 implicit .global_tid. 'const int *const restrict'
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl [[ADDR_19:0x[a-z0-9]*]] <col:1> col:1 implicit .bound_tid. 'const int *const restrict'
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl [[ADDR_20:0x[a-z0-9]*]] <col:1> col:1 implicit __context 'struct (unnamed at {{.*}}ast-dump-openmp-distribute-parallel-for.c:4:1) *const restrict'
|
||||
// CHECK-NEXT: | | `-VarDecl [[ADDR_8]] <line:5:8, col:16> col:12 used i 'int' cinit
|
||||
// CHECK-NEXT: | | `-IntegerLiteral [[ADDR_9]] <col:16> 'int' 0
|
||||
// CHECK-NEXT: | |-DeclRefExpr [[ADDR_21:0x[a-z0-9]*]] <<invalid sloc>> 'const unsigned long' {{.*}}Var [[ADDR_22:0x[a-z0-9]*]] '.captured.omp.previous.lb' 'const unsigned long'
|
||||
// CHECK-NEXT: | |-DeclRefExpr [[ADDR_23:0x[a-z0-9]*]] <<invalid sloc>> 'const unsigned long' {{.*}}Var [[ADDR_24:0x[a-z0-9]*]] '.captured.omp.previous.ub' 'const unsigned long'
|
||||
// CHECK-NEXT: | `-DeclRefExpr [[ADDR_25:0x[a-z0-9]*]] <col:3> 'int' {{.*}}ParmVar [[ADDR_1]] 'x' 'int'
|
||||
// CHECK-NEXT: |-FunctionDecl [[ADDR_26:0x[a-z0-9]*]] <line:9:1, line:14:1> line:9:6 test_two 'void (int, int)'
|
||||
// CHECK-NEXT: | |-ParmVarDecl [[ADDR_27:0x[a-z0-9]*]] <col:15, col:19> col:19 used x 'int'
|
||||
// CHECK-NEXT: | |-ParmVarDecl [[ADDR_28:0x[a-z0-9]*]] <col:22, col:26> col:26 used y 'int'
|
||||
// CHECK-NEXT: | `-CompoundStmt [[ADDR_29:0x[a-z0-9]*]] <col:29, line:14:1>
|
||||
// CHECK-NEXT: | `-OMPDistributeParallelForDirective [[ADDR_30:0x[a-z0-9]*]] <line:10:1, col:36>
|
||||
// CHECK-NEXT: | `-CapturedStmt [[ADDR_31:0x[a-z0-9]*]] <line:11:3, line:13:7>
|
||||
// CHECK-NEXT: | |-CapturedDecl [[ADDR_32:0x[a-z0-9]*]] <<invalid sloc>> <invalid sloc> nothrow
|
||||
// CHECK-NEXT: | | |-ForStmt [[ADDR_33:0x[a-z0-9]*]] <line:11:3, line:13:7>
|
||||
// CHECK-NEXT: | | | |-DeclStmt [[ADDR_34:0x[a-z0-9]*]] <line:11:8, col:17>
|
||||
// CHECK-NEXT: | | | | `-VarDecl [[ADDR_35:0x[a-z0-9]*]] <col:8, col:16> col:12 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | | `-IntegerLiteral [[ADDR_36:0x[a-z0-9]*]] <col:16> 'int' 0
|
||||
// CHECK-NEXT: | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<'
|
||||
// CHECK-NEXT: | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int'
|
||||
// CHECK-NEXT: | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int'
|
||||
// CHECK-NEXT: | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++'
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int'
|
||||
// CHECK-NEXT: | | | `-NullStmt {{.*}} <line:6:5>
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <line:4:1> col:1 implicit .global_tid. 'const int *const restrict'
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict'
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long'
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long'
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (unnamed at {{.*}}ast-dump-openmp-distribute-parallel-for.c:4:1) *const restrict'
|
||||
// CHECK-NEXT: | | `-VarDecl {{.*}} <line:5:8, col:16> col:12 used i 'int' cinit
|
||||
// CHECK-NEXT: | | `-IntegerLiteral {{.*}} <col:16> 'int' 0
|
||||
// CHECK-NEXT: | `-DeclRefExpr {{.*}} <col:3> 'int' lvalue ParmVar {{.*}} 'x' 'int'
|
||||
// CHECK-NEXT: |-FunctionDecl {{.*}} <line:9:1, line:14:1> line:9:6 test_two 'void (int, int)'
|
||||
// CHECK-NEXT: | |-ParmVarDecl {{.*}} <col:15, col:19> col:19 used x 'int'
|
||||
// CHECK-NEXT: | |-ParmVarDecl {{.*}} <col:22, col:26> col:26 used y 'int'
|
||||
// CHECK-NEXT: | `-CompoundStmt {{.*}} <col:29, line:14:1>
|
||||
// CHECK-NEXT: | `-OMPDistributeParallelForDirective {{.*}} <line:10:1, col:36>
|
||||
// CHECK-NEXT: | `-CapturedStmt {{.*}} <line:11:3, line:13:7>
|
||||
// CHECK-NEXT: | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow
|
||||
// CHECK-NEXT: | | |-ForStmt {{.*}} <line:11:3, line:13:7>
|
||||
// CHECK-NEXT: | | | |-DeclStmt {{.*}} <line:11:8, col:17>
|
||||
// CHECK-NEXT: | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0
|
||||
// CHECK-NEXT: | | | |-<<<NULL>>>
|
||||
// CHECK-NEXT: | | | |-BinaryOperator [[ADDR_37:0x[a-z0-9]*]] <col:19, col:23> 'int' '<'
|
||||
// CHECK-NEXT: | | | | |-ImplicitCastExpr [[ADDR_38:0x[a-z0-9]*]] <col:19> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | | `-DeclRefExpr [[ADDR_39:0x[a-z0-9]*]] <col:19> 'int' {{.*}}Var [[ADDR_35]] 'i' 'int'
|
||||
// CHECK-NEXT: | | | | `-ImplicitCastExpr [[ADDR_40:0x[a-z0-9]*]] <col:23> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr [[ADDR_41:0x[a-z0-9]*]] <col:23> 'int' {{.*}}ParmVar [[ADDR_27]] 'x' 'int'
|
||||
// CHECK-NEXT: | | | |-UnaryOperator [[ADDR_42:0x[a-z0-9]*]] <col:26, col:27> 'int' postfix '++'
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr [[ADDR_43:0x[a-z0-9]*]] <col:26> 'int' {{.*}}Var [[ADDR_35]] 'i' 'int'
|
||||
// CHECK-NEXT: | | | `-ForStmt [[ADDR_44:0x[a-z0-9]*]] <line:12:5, line:13:7>
|
||||
// CHECK-NEXT: | | | |-DeclStmt [[ADDR_45:0x[a-z0-9]*]] <line:12:10, col:19>
|
||||
// CHECK-NEXT: | | | | `-VarDecl [[ADDR_46:0x[a-z0-9]*]] <col:10, col:18> col:14 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | | `-IntegerLiteral [[ADDR_47:0x[a-z0-9]*]] <col:18> 'int' 0
|
||||
// CHECK-NEXT: | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<'
|
||||
// CHECK-NEXT: | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int'
|
||||
// CHECK-NEXT: | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int'
|
||||
// CHECK-NEXT: | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++'
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int'
|
||||
// CHECK-NEXT: | | | `-ForStmt {{.*}} <line:12:5, line:13:7>
|
||||
// CHECK-NEXT: | | | |-DeclStmt {{.*}} <line:12:10, col:19>
|
||||
// CHECK-NEXT: | | | | `-VarDecl {{.*}} <col:10, col:18> col:14 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0
|
||||
// CHECK-NEXT: | | | |-<<<NULL>>>
|
||||
// CHECK-NEXT: | | | |-BinaryOperator [[ADDR_48:0x[a-z0-9]*]] <col:21, col:25> 'int' '<'
|
||||
// CHECK-NEXT: | | | | |-ImplicitCastExpr [[ADDR_49:0x[a-z0-9]*]] <col:21> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | | `-DeclRefExpr [[ADDR_50:0x[a-z0-9]*]] <col:21> 'int' {{.*}}Var [[ADDR_46]] 'i' 'int'
|
||||
// CHECK-NEXT: | | | | `-ImplicitCastExpr [[ADDR_51:0x[a-z0-9]*]] <col:25> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr [[ADDR_52:0x[a-z0-9]*]] <col:25> 'int' {{.*}}ParmVar [[ADDR_28]] 'y' 'int'
|
||||
// CHECK-NEXT: | | | |-UnaryOperator [[ADDR_53:0x[a-z0-9]*]] <col:28, col:29> 'int' postfix '++'
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr [[ADDR_54:0x[a-z0-9]*]] <col:28> 'int' {{.*}}Var [[ADDR_46]] 'i' 'int'
|
||||
// CHECK-NEXT: | | | `-NullStmt [[ADDR_55:0x[a-z0-9]*]] <line:13:7>
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl [[ADDR_56:0x[a-z0-9]*]] <line:10:1> col:1 implicit .global_tid. 'const int *const restrict'
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl [[ADDR_57:0x[a-z0-9]*]] <col:1> col:1 implicit .bound_tid. 'const int *const restrict'
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl [[ADDR_58:0x[a-z0-9]*]] <col:1> col:1 implicit __context 'struct (unnamed at {{.*}}ast-dump-openmp-distribute-parallel-for.c:10:1) *const restrict'
|
||||
// CHECK-NEXT: | | |-VarDecl [[ADDR_35]] <line:11:8, col:16> col:12 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | `-IntegerLiteral [[ADDR_36]] <col:16> 'int' 0
|
||||
// CHECK-NEXT: | | `-VarDecl [[ADDR_46]] <line:12:10, col:18> col:14 used i 'int' cinit
|
||||
// CHECK-NEXT: | | `-IntegerLiteral [[ADDR_47]] <col:18> 'int' 0
|
||||
// CHECK-NEXT: | |-DeclRefExpr [[ADDR_59:0x[a-z0-9]*]] <<invalid sloc>> 'const unsigned long' {{.*}}Var [[ADDR_60:0x[a-z0-9]*]] '.captured.omp.previous.lb' 'const unsigned long'
|
||||
// CHECK-NEXT: | |-DeclRefExpr [[ADDR_61:0x[a-z0-9]*]] <<invalid sloc>> 'const unsigned long' {{.*}}Var [[ADDR_62:0x[a-z0-9]*]] '.captured.omp.previous.ub' 'const unsigned long'
|
||||
// CHECK-NEXT: | |-DeclRefExpr [[ADDR_63:0x[a-z0-9]*]] <line:11:3> 'int' {{.*}}ParmVar [[ADDR_27]] 'x' 'int'
|
||||
// CHECK-NEXT: | `-DeclRefExpr [[ADDR_64:0x[a-z0-9]*]] <line:12:25> 'int' {{.*}}ParmVar [[ADDR_28]] 'y' 'int'
|
||||
// CHECK-NEXT: |-FunctionDecl [[ADDR_65:0x[a-z0-9]*]] <line:16:1, line:21:1> line:16:6 test_three 'void (int, int)'
|
||||
// CHECK-NEXT: | |-ParmVarDecl [[ADDR_66:0x[a-z0-9]*]] <col:17, col:21> col:21 used x 'int'
|
||||
// CHECK-NEXT: | |-ParmVarDecl [[ADDR_67:0x[a-z0-9]*]] <col:24, col:28> col:28 used y 'int'
|
||||
// CHECK-NEXT: | `-CompoundStmt [[ADDR_68:0x[a-z0-9]*]] <col:31, line:21:1>
|
||||
// CHECK-NEXT: | `-OMPDistributeParallelForDirective [[ADDR_69:0x[a-z0-9]*]] <line:17:1, col:48>
|
||||
// CHECK-NEXT: | |-OMPCollapseClause [[ADDR_70:0x[a-z0-9]*]] <col:37, col:47>
|
||||
// CHECK-NEXT: | | `-ConstantExpr [[ADDR_71:0x[a-z0-9]*]] <col:46> 'int'
|
||||
// CHECK-NEXT: | | |-value: Int 1
|
||||
// CHECK-NEXT: | | `-IntegerLiteral [[ADDR_72:0x[a-z0-9]*]] <col:46> 'int' 1
|
||||
// CHECK-NEXT: | `-CapturedStmt [[ADDR_73:0x[a-z0-9]*]] <line:18:3, line:20:7>
|
||||
// CHECK-NEXT: | |-CapturedDecl [[ADDR_74:0x[a-z0-9]*]] <<invalid sloc>> <invalid sloc> nothrow
|
||||
// CHECK-NEXT: | | |-ForStmt [[ADDR_75:0x[a-z0-9]*]] <line:18:3, line:20:7>
|
||||
// CHECK-NEXT: | | | |-DeclStmt [[ADDR_76:0x[a-z0-9]*]] <line:18:8, col:17>
|
||||
// CHECK-NEXT: | | | | `-VarDecl [[ADDR_77:0x[a-z0-9]*]] <col:8, col:16> col:12 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | | `-IntegerLiteral [[ADDR_78:0x[a-z0-9]*]] <col:16> 'int' 0
|
||||
// CHECK-NEXT: | | | |-BinaryOperator {{.*}} <col:21, col:25> 'int' '<'
|
||||
// CHECK-NEXT: | | | | |-ImplicitCastExpr {{.*}} <col:21> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:21> 'int' lvalue Var {{.*}} 'i' 'int'
|
||||
// CHECK-NEXT: | | | | `-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue ParmVar {{.*}} 'y' 'int'
|
||||
// CHECK-NEXT: | | | |-UnaryOperator {{.*}} <col:28, col:29> 'int' postfix '++'
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:28> 'int' lvalue Var {{.*}} 'i' 'int'
|
||||
// CHECK-NEXT: | | | `-NullStmt {{.*}} <line:13:7>
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <line:10:1> col:1 implicit .global_tid. 'const int *const restrict'
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict'
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long'
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long'
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (unnamed at {{.*}}ast-dump-openmp-distribute-parallel-for.c:10:1) *const restrict'
|
||||
// CHECK-NEXT: | | |-VarDecl {{.*}} <line:11:8, col:16> col:12 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0
|
||||
// CHECK-NEXT: | | `-VarDecl {{.*}} <line:12:10, col:18> col:14 used i 'int' cinit
|
||||
// CHECK-NEXT: | | `-IntegerLiteral {{.*}} <col:18> 'int' 0
|
||||
// CHECK-NEXT: | |-DeclRefExpr {{.*}} <line:11:3> 'int' lvalue ParmVar {{.*}} 'x' 'int'
|
||||
// CHECK-NEXT: | `-DeclRefExpr {{.*}} <line:12:25> 'int' lvalue ParmVar {{.*}} 'y' 'int'
|
||||
// CHECK-NEXT: |-FunctionDecl {{.*}} <line:16:1, line:21:1> line:16:6 test_three 'void (int, int)'
|
||||
// CHECK-NEXT: | |-ParmVarDecl {{.*}} <col:17, col:21> col:21 used x 'int'
|
||||
// CHECK-NEXT: | |-ParmVarDecl {{.*}} <col:24, col:28> col:28 used y 'int'
|
||||
// CHECK-NEXT: | `-CompoundStmt {{.*}} <col:31, line:21:1>
|
||||
// CHECK-NEXT: | `-OMPDistributeParallelForDirective {{.*}} <line:17:1, col:48>
|
||||
// CHECK-NEXT: | |-OMPCollapseClause {{.*}} <col:37, col:47>
|
||||
// CHECK-NEXT: | | `-ConstantExpr {{.*}} <col:46> 'int'
|
||||
// CHECK-NEXT: | | |-value: Int 1
|
||||
// CHECK-NEXT: | | `-IntegerLiteral {{.*}} <col:46> 'int' 1
|
||||
// CHECK-NEXT: | `-CapturedStmt {{.*}} <line:18:3, line:20:7>
|
||||
// CHECK-NEXT: | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow
|
||||
// CHECK-NEXT: | | |-ForStmt {{.*}} <line:18:3, line:20:7>
|
||||
// CHECK-NEXT: | | | |-DeclStmt {{.*}} <line:18:8, col:17>
|
||||
// CHECK-NEXT: | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0
|
||||
// CHECK-NEXT: | | | |-<<<NULL>>>
|
||||
// CHECK-NEXT: | | | |-BinaryOperator [[ADDR_79:0x[a-z0-9]*]] <col:19, col:23> 'int' '<'
|
||||
// CHECK-NEXT: | | | | |-ImplicitCastExpr [[ADDR_80:0x[a-z0-9]*]] <col:19> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | | `-DeclRefExpr [[ADDR_81:0x[a-z0-9]*]] <col:19> 'int' {{.*}}Var [[ADDR_77]] 'i' 'int'
|
||||
// CHECK-NEXT: | | | | `-ImplicitCastExpr [[ADDR_82:0x[a-z0-9]*]] <col:23> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr [[ADDR_83:0x[a-z0-9]*]] <col:23> 'int' {{.*}}ParmVar [[ADDR_66]] 'x' 'int'
|
||||
// CHECK-NEXT: | | | |-UnaryOperator [[ADDR_84:0x[a-z0-9]*]] <col:26, col:27> 'int' postfix '++'
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr [[ADDR_85:0x[a-z0-9]*]] <col:26> 'int' {{.*}}Var [[ADDR_77]] 'i' 'int'
|
||||
// CHECK-NEXT: | | | `-ForStmt [[ADDR_86:0x[a-z0-9]*]] <line:19:5, line:20:7>
|
||||
// CHECK-NEXT: | | | |-DeclStmt [[ADDR_87:0x[a-z0-9]*]] <line:19:10, col:19>
|
||||
// CHECK-NEXT: | | | | `-VarDecl [[ADDR_88:0x[a-z0-9]*]] <col:10, col:18> col:14 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | | `-IntegerLiteral [[ADDR_89:0x[a-z0-9]*]] <col:18> 'int' 0
|
||||
// CHECK-NEXT: | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<'
|
||||
// CHECK-NEXT: | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int'
|
||||
// CHECK-NEXT: | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int'
|
||||
// CHECK-NEXT: | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++'
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int'
|
||||
// CHECK-NEXT: | | | `-ForStmt {{.*}} <line:19:5, line:20:7>
|
||||
// CHECK-NEXT: | | | |-DeclStmt {{.*}} <line:19:10, col:19>
|
||||
// CHECK-NEXT: | | | | `-VarDecl {{.*}} <col:10, col:18> col:14 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0
|
||||
// CHECK-NEXT: | | | |-<<<NULL>>>
|
||||
// CHECK-NEXT: | | | |-BinaryOperator [[ADDR_90:0x[a-z0-9]*]] <col:21, col:25> 'int' '<'
|
||||
// CHECK-NEXT: | | | | |-ImplicitCastExpr [[ADDR_91:0x[a-z0-9]*]] <col:21> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | | `-DeclRefExpr [[ADDR_92:0x[a-z0-9]*]] <col:21> 'int' {{.*}}Var [[ADDR_88]] 'i' 'int'
|
||||
// CHECK-NEXT: | | | | `-ImplicitCastExpr [[ADDR_93:0x[a-z0-9]*]] <col:25> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr [[ADDR_94:0x[a-z0-9]*]] <col:25> 'int' {{.*}}ParmVar [[ADDR_67]] 'y' 'int'
|
||||
// CHECK-NEXT: | | | |-UnaryOperator [[ADDR_95:0x[a-z0-9]*]] <col:28, col:29> 'int' postfix '++'
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr [[ADDR_96:0x[a-z0-9]*]] <col:28> 'int' {{.*}}Var [[ADDR_88]] 'i' 'int'
|
||||
// CHECK-NEXT: | | | `-NullStmt [[ADDR_97:0x[a-z0-9]*]] <line:20:7>
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl [[ADDR_98:0x[a-z0-9]*]] <line:17:1> col:1 implicit .global_tid. 'const int *const restrict'
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl [[ADDR_99:0x[a-z0-9]*]] <col:1> col:1 implicit .bound_tid. 'const int *const restrict'
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl [[ADDR_100:0x[a-z0-9]*]] <col:1> col:1 implicit __context 'struct (unnamed at {{.*}}ast-dump-openmp-distribute-parallel-for.c:17:1) *const restrict'
|
||||
// CHECK-NEXT: | | |-VarDecl [[ADDR_77]] <line:18:8, col:16> col:12 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | `-IntegerLiteral [[ADDR_78]] <col:16> 'int' 0
|
||||
// CHECK-NEXT: | | `-VarDecl [[ADDR_88]] <line:19:10, col:18> col:14 used i 'int' cinit
|
||||
// CHECK-NEXT: | | `-IntegerLiteral [[ADDR_89]] <col:18> 'int' 0
|
||||
// CHECK-NEXT: | |-DeclRefExpr [[ADDR_101:0x[a-z0-9]*]] <<invalid sloc>> 'const unsigned long' {{.*}}Var [[ADDR_102:0x[a-z0-9]*]] '.captured.omp.previous.lb' 'const unsigned long'
|
||||
// CHECK-NEXT: | |-DeclRefExpr [[ADDR_103:0x[a-z0-9]*]] <<invalid sloc>> 'const unsigned long' {{.*}}Var [[ADDR_104:0x[a-z0-9]*]] '.captured.omp.previous.ub' 'const unsigned long'
|
||||
// CHECK-NEXT: | |-DeclRefExpr [[ADDR_105:0x[a-z0-9]*]] <line:18:3> 'int' {{.*}}ParmVar [[ADDR_66]] 'x' 'int'
|
||||
// CHECK-NEXT: | `-DeclRefExpr [[ADDR_106:0x[a-z0-9]*]] <line:19:25> 'int' {{.*}}ParmVar [[ADDR_67]] 'y' 'int'
|
||||
// CHECK-NEXT: |-FunctionDecl [[ADDR_107:0x[a-z0-9]*]] <line:23:1, line:28:1> line:23:6 test_four 'void (int, int)'
|
||||
// CHECK-NEXT: | |-ParmVarDecl [[ADDR_108:0x[a-z0-9]*]] <col:16, col:20> col:20 used x 'int'
|
||||
// CHECK-NEXT: | |-ParmVarDecl [[ADDR_109:0x[a-z0-9]*]] <col:23, col:27> col:27 used y 'int'
|
||||
// CHECK-NEXT: | `-CompoundStmt [[ADDR_110:0x[a-z0-9]*]] <col:30, line:28:1>
|
||||
// CHECK-NEXT: | `-OMPDistributeParallelForDirective [[ADDR_111:0x[a-z0-9]*]] <line:24:1, col:48>
|
||||
// CHECK-NEXT: | |-OMPCollapseClause [[ADDR_112:0x[a-z0-9]*]] <col:37, col:47>
|
||||
// CHECK-NEXT: | | `-ConstantExpr [[ADDR_113:0x[a-z0-9]*]] <col:46> 'int'
|
||||
// CHECK-NEXT: | | |-value: Int 2
|
||||
// CHECK-NEXT: | | `-IntegerLiteral [[ADDR_114:0x[a-z0-9]*]] <col:46> 'int' 2
|
||||
// CHECK-NEXT: | `-CapturedStmt [[ADDR_115:0x[a-z0-9]*]] <line:25:3, line:27:7>
|
||||
// CHECK-NEXT: | |-CapturedDecl [[ADDR_116:0x[a-z0-9]*]] <<invalid sloc>> <invalid sloc> nothrow
|
||||
// CHECK-NEXT: | | |-ForStmt [[ADDR_117:0x[a-z0-9]*]] <line:25:3, line:27:7>
|
||||
// CHECK-NEXT: | | | |-DeclStmt [[ADDR_118:0x[a-z0-9]*]] <line:25:8, col:17>
|
||||
// CHECK-NEXT: | | | | `-VarDecl [[ADDR_119:0x[a-z0-9]*]] <col:8, col:16> col:12 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | | `-IntegerLiteral [[ADDR_120:0x[a-z0-9]*]] <col:16> 'int' 0
|
||||
// CHECK-NEXT: | | | |-BinaryOperator {{.*}} <col:21, col:25> 'int' '<'
|
||||
// CHECK-NEXT: | | | | |-ImplicitCastExpr {{.*}} <col:21> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:21> 'int' lvalue Var {{.*}} 'i' 'int'
|
||||
// CHECK-NEXT: | | | | `-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue ParmVar {{.*}} 'y' 'int'
|
||||
// CHECK-NEXT: | | | |-UnaryOperator {{.*}} <col:28, col:29> 'int' postfix '++'
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:28> 'int' lvalue Var {{.*}} 'i' 'int'
|
||||
// CHECK-NEXT: | | | `-NullStmt {{.*}} <line:20:7>
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <line:17:1> col:1 implicit .global_tid. 'const int *const restrict'
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict'
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long'
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long'
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (unnamed at {{.*}}ast-dump-openmp-distribute-parallel-for.c:17:1) *const restrict'
|
||||
// CHECK-NEXT: | | |-VarDecl {{.*}} <line:18:8, col:16> col:12 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0
|
||||
// CHECK-NEXT: | | `-VarDecl {{.*}} <line:19:10, col:18> col:14 used i 'int' cinit
|
||||
// CHECK-NEXT: | | `-IntegerLiteral {{.*}} <col:18> 'int' 0
|
||||
// CHECK-NEXT: | |-DeclRefExpr {{.*}} <line:18:3> 'int' lvalue ParmVar {{.*}} 'x' 'int'
|
||||
// CHECK-NEXT: | `-DeclRefExpr {{.*}} <line:19:25> 'int' lvalue ParmVar {{.*}} 'y' 'int'
|
||||
// CHECK-NEXT: |-FunctionDecl {{.*}} <line:23:1, line:28:1> line:23:6 test_four 'void (int, int)'
|
||||
// CHECK-NEXT: | |-ParmVarDecl {{.*}} <col:16, col:20> col:20 used x 'int'
|
||||
// CHECK-NEXT: | |-ParmVarDecl {{.*}} <col:23, col:27> col:27 used y 'int'
|
||||
// CHECK-NEXT: | `-CompoundStmt {{.*}} <col:30, line:28:1>
|
||||
// CHECK-NEXT: | `-OMPDistributeParallelForDirective {{.*}} <line:24:1, col:48>
|
||||
// CHECK-NEXT: | |-OMPCollapseClause {{.*}} <col:37, col:47>
|
||||
// CHECK-NEXT: | | `-ConstantExpr {{.*}} <col:46> 'int'
|
||||
// CHECK-NEXT: | | |-value: Int 2
|
||||
// CHECK-NEXT: | | `-IntegerLiteral {{.*}} <col:46> 'int' 2
|
||||
// CHECK-NEXT: | `-CapturedStmt {{.*}} <line:25:3, line:27:7>
|
||||
// CHECK-NEXT: | |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow
|
||||
// CHECK-NEXT: | | |-ForStmt {{.*}} <line:25:3, line:27:7>
|
||||
// CHECK-NEXT: | | | |-DeclStmt {{.*}} <line:25:8, col:17>
|
||||
// CHECK-NEXT: | | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0
|
||||
// CHECK-NEXT: | | | |-<<<NULL>>>
|
||||
// CHECK-NEXT: | | | |-BinaryOperator [[ADDR_121:0x[a-z0-9]*]] <col:19, col:23> 'int' '<'
|
||||
// CHECK-NEXT: | | | | |-ImplicitCastExpr [[ADDR_122:0x[a-z0-9]*]] <col:19> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | | `-DeclRefExpr [[ADDR_123:0x[a-z0-9]*]] <col:19> 'int' {{.*}}Var [[ADDR_119]] 'i' 'int'
|
||||
// CHECK-NEXT: | | | | `-ImplicitCastExpr [[ADDR_124:0x[a-z0-9]*]] <col:23> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr [[ADDR_125:0x[a-z0-9]*]] <col:23> 'int' {{.*}}ParmVar [[ADDR_108]] 'x' 'int'
|
||||
// CHECK-NEXT: | | | |-UnaryOperator [[ADDR_126:0x[a-z0-9]*]] <col:26, col:27> 'int' postfix '++'
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr [[ADDR_127:0x[a-z0-9]*]] <col:26> 'int' {{.*}}Var [[ADDR_119]] 'i' 'int'
|
||||
// CHECK-NEXT: | | | `-ForStmt [[ADDR_128:0x[a-z0-9]*]] <line:26:5, line:27:7>
|
||||
// CHECK-NEXT: | | | |-DeclStmt [[ADDR_129:0x[a-z0-9]*]] <line:26:10, col:19>
|
||||
// CHECK-NEXT: | | | | `-VarDecl [[ADDR_130:0x[a-z0-9]*]] <col:10, col:18> col:14 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | | `-IntegerLiteral [[ADDR_131:0x[a-z0-9]*]] <col:18> 'int' 0
|
||||
// CHECK-NEXT: | | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<'
|
||||
// CHECK-NEXT: | | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int'
|
||||
// CHECK-NEXT: | | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int'
|
||||
// CHECK-NEXT: | | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++'
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int'
|
||||
// CHECK-NEXT: | | | `-ForStmt {{.*}} <line:26:5, line:27:7>
|
||||
// CHECK-NEXT: | | | |-DeclStmt {{.*}} <line:26:10, col:19>
|
||||
// CHECK-NEXT: | | | | `-VarDecl {{.*}} <col:10, col:18> col:14 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0
|
||||
// CHECK-NEXT: | | | |-<<<NULL>>>
|
||||
// CHECK-NEXT: | | | |-BinaryOperator [[ADDR_132:0x[a-z0-9]*]] <col:21, col:25> 'int' '<'
|
||||
// CHECK-NEXT: | | | | |-ImplicitCastExpr [[ADDR_133:0x[a-z0-9]*]] <col:21> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | | `-DeclRefExpr [[ADDR_134:0x[a-z0-9]*]] <col:21> 'int' {{.*}}Var [[ADDR_130]] 'i' 'int'
|
||||
// CHECK-NEXT: | | | | `-ImplicitCastExpr [[ADDR_135:0x[a-z0-9]*]] <col:25> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr [[ADDR_136:0x[a-z0-9]*]] <col:25> 'int' {{.*}}ParmVar [[ADDR_109]] 'y' 'int'
|
||||
// CHECK-NEXT: | | | |-UnaryOperator [[ADDR_137:0x[a-z0-9]*]] <col:28, col:29> 'int' postfix '++'
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr [[ADDR_138:0x[a-z0-9]*]] <col:28> 'int' {{.*}}Var [[ADDR_130]] 'i' 'int'
|
||||
// CHECK-NEXT: | | | `-NullStmt [[ADDR_139:0x[a-z0-9]*]] <line:27:7>
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl [[ADDR_140:0x[a-z0-9]*]] <line:24:1> col:1 implicit .global_tid. 'const int *const restrict'
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl [[ADDR_141:0x[a-z0-9]*]] <col:1> col:1 implicit .bound_tid. 'const int *const restrict'
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl [[ADDR_142:0x[a-z0-9]*]] <col:1> col:1 implicit __context 'struct (unnamed at {{.*}}ast-dump-openmp-distribute-parallel-for.c:24:1) *const restrict'
|
||||
// CHECK-NEXT: | | |-VarDecl [[ADDR_119]] <line:25:8, col:16> col:12 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | `-IntegerLiteral [[ADDR_120]] <col:16> 'int' 0
|
||||
// CHECK-NEXT: | | `-VarDecl [[ADDR_130]] <line:26:10, col:18> col:14 used i 'int' cinit
|
||||
// CHECK-NEXT: | | `-IntegerLiteral [[ADDR_131]] <col:18> 'int' 0
|
||||
// CHECK-NEXT: | |-DeclRefExpr [[ADDR_143:0x[a-z0-9]*]] <<invalid sloc>> 'const unsigned long' {{.*}}Var [[ADDR_144:0x[a-z0-9]*]] '.captured.omp.previous.lb' 'const unsigned long'
|
||||
// CHECK-NEXT: | |-DeclRefExpr [[ADDR_145:0x[a-z0-9]*]] <<invalid sloc>> 'const unsigned long' {{.*}}Var [[ADDR_146:0x[a-z0-9]*]] '.captured.omp.previous.ub' 'const unsigned long'
|
||||
// CHECK-NEXT: | |-DeclRefExpr [[ADDR_147:0x[a-z0-9]*]] <line:25:3> 'int' {{.*}}ParmVar [[ADDR_108]] 'x' 'int'
|
||||
// CHECK-NEXT: | `-DeclRefExpr [[ADDR_148:0x[a-z0-9]*]] <line:26:5> 'int' {{.*}}ParmVar [[ADDR_109]] 'y' 'int'
|
||||
// CHECK-NEXT: `-FunctionDecl [[ADDR_149:0x[a-z0-9]*]] <line:30:1, line:36:1> line:30:6 test_five 'void (int, int, int)'
|
||||
// CHECK-NEXT: |-ParmVarDecl [[ADDR_150:0x[a-z0-9]*]] <col:16, col:20> col:20 used x 'int'
|
||||
// CHECK-NEXT: |-ParmVarDecl [[ADDR_151:0x[a-z0-9]*]] <col:23, col:27> col:27 used y 'int'
|
||||
// CHECK-NEXT: |-ParmVarDecl [[ADDR_152:0x[a-z0-9]*]] <col:30, col:34> col:34 used z 'int'
|
||||
// CHECK-NEXT: `-CompoundStmt [[ADDR_153:0x[a-z0-9]*]] <col:37, line:36:1>
|
||||
// CHECK-NEXT: `-OMPDistributeParallelForDirective [[ADDR_154:0x[a-z0-9]*]] <line:31:1, col:48>
|
||||
// CHECK-NEXT: |-OMPCollapseClause [[ADDR_155:0x[a-z0-9]*]] <col:37, col:47>
|
||||
// CHECK-NEXT: | `-ConstantExpr [[ADDR_156:0x[a-z0-9]*]] <col:46> 'int'
|
||||
// CHECK-NEXT: | |-value: Int 2
|
||||
// CHECK-NEXT: | `-IntegerLiteral [[ADDR_157:0x[a-z0-9]*]] <col:46> 'int' 2
|
||||
// CHECK-NEXT: `-CapturedStmt [[ADDR_158:0x[a-z0-9]*]] <line:32:3, line:35:9>
|
||||
// CHECK-NEXT: |-CapturedDecl [[ADDR_159:0x[a-z0-9]*]] <<invalid sloc>> <invalid sloc> nothrow
|
||||
// CHECK-NEXT: | |-ForStmt [[ADDR_160:0x[a-z0-9]*]] <line:32:3, line:35:9>
|
||||
// CHECK-NEXT: | | |-DeclStmt [[ADDR_161:0x[a-z0-9]*]] <line:32:8, col:17>
|
||||
// CHECK-NEXT: | | | `-VarDecl [[ADDR_162:0x[a-z0-9]*]] <col:8, col:16> col:12 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | `-IntegerLiteral [[ADDR_163:0x[a-z0-9]*]] <col:16> 'int' 0
|
||||
// CHECK-NEXT: | | | |-BinaryOperator {{.*}} <col:21, col:25> 'int' '<'
|
||||
// CHECK-NEXT: | | | | |-ImplicitCastExpr {{.*}} <col:21> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} <col:21> 'int' lvalue Var {{.*}} 'i' 'int'
|
||||
// CHECK-NEXT: | | | | `-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue ParmVar {{.*}} 'y' 'int'
|
||||
// CHECK-NEXT: | | | |-UnaryOperator {{.*}} <col:28, col:29> 'int' postfix '++'
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:28> 'int' lvalue Var {{.*}} 'i' 'int'
|
||||
// CHECK-NEXT: | | | `-NullStmt {{.*}} <line:27:7>
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <line:24:1> col:1 implicit .global_tid. 'const int *const restrict'
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict'
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long'
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long'
|
||||
// CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (unnamed at {{.*}}ast-dump-openmp-distribute-parallel-for.c:24:1) *const restrict'
|
||||
// CHECK-NEXT: | | |-VarDecl {{.*}} <line:25:8, col:16> col:12 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0
|
||||
// CHECK-NEXT: | | `-VarDecl {{.*}} <line:26:10, col:18> col:14 used i 'int' cinit
|
||||
// CHECK-NEXT: | | `-IntegerLiteral {{.*}} <col:18> 'int' 0
|
||||
// CHECK-NEXT: | |-DeclRefExpr {{.*}} <line:25:3> 'int' lvalue ParmVar {{.*}} 'x' 'int'
|
||||
// CHECK-NEXT: | `-DeclRefExpr {{.*}} <line:26:5> 'int' lvalue ParmVar {{.*}} 'y' 'int'
|
||||
// CHECK-NEXT: `-FunctionDecl {{.*}} <line:30:1, line:36:1> line:30:6 test_five 'void (int, int, int)'
|
||||
// CHECK-NEXT: |-ParmVarDecl {{.*}} <col:16, col:20> col:20 used x 'int'
|
||||
// CHECK-NEXT: |-ParmVarDecl {{.*}} <col:23, col:27> col:27 used y 'int'
|
||||
// CHECK-NEXT: |-ParmVarDecl {{.*}} <col:30, col:34> col:34 used z 'int'
|
||||
// CHECK-NEXT: `-CompoundStmt {{.*}} <col:37, line:36:1>
|
||||
// CHECK-NEXT: `-OMPDistributeParallelForDirective {{.*}} <line:31:1, col:48>
|
||||
// CHECK-NEXT: |-OMPCollapseClause {{.*}} <col:37, col:47>
|
||||
// CHECK-NEXT: | `-ConstantExpr {{.*}} <col:46> 'int'
|
||||
// CHECK-NEXT: | |-value: Int 2
|
||||
// CHECK-NEXT: | `-IntegerLiteral {{.*}} <col:46> 'int' 2
|
||||
// CHECK-NEXT: `-CapturedStmt {{.*}} <line:32:3, line:35:9>
|
||||
// CHECK-NEXT: |-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow
|
||||
// CHECK-NEXT: | |-ForStmt {{.*}} <line:32:3, line:35:9>
|
||||
// CHECK-NEXT: | | |-DeclStmt {{.*}} <line:32:8, col:17>
|
||||
// CHECK-NEXT: | | | `-VarDecl {{.*}} <col:8, col:16> col:12 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | `-IntegerLiteral {{.*}} <col:16> 'int' 0
|
||||
// CHECK-NEXT: | | |-<<<NULL>>>
|
||||
// CHECK-NEXT: | | |-BinaryOperator [[ADDR_164:0x[a-z0-9]*]] <col:19, col:23> 'int' '<'
|
||||
// CHECK-NEXT: | | | |-ImplicitCastExpr [[ADDR_165:0x[a-z0-9]*]] <col:19> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr [[ADDR_166:0x[a-z0-9]*]] <col:19> 'int' {{.*}}Var [[ADDR_162]] 'i' 'int'
|
||||
// CHECK-NEXT: | | | `-ImplicitCastExpr [[ADDR_167:0x[a-z0-9]*]] <col:23> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | `-DeclRefExpr [[ADDR_168:0x[a-z0-9]*]] <col:23> 'int' {{.*}}ParmVar [[ADDR_150]] 'x' 'int'
|
||||
// CHECK-NEXT: | | |-UnaryOperator [[ADDR_169:0x[a-z0-9]*]] <col:26, col:27> 'int' postfix '++'
|
||||
// CHECK-NEXT: | | | `-DeclRefExpr [[ADDR_170:0x[a-z0-9]*]] <col:26> 'int' {{.*}}Var [[ADDR_162]] 'i' 'int'
|
||||
// CHECK-NEXT: | | `-ForStmt [[ADDR_171:0x[a-z0-9]*]] <line:33:5, line:35:9>
|
||||
// CHECK-NEXT: | | |-DeclStmt [[ADDR_172:0x[a-z0-9]*]] <line:33:10, col:19>
|
||||
// CHECK-NEXT: | | | `-VarDecl [[ADDR_173:0x[a-z0-9]*]] <col:10, col:18> col:14 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | `-IntegerLiteral [[ADDR_174:0x[a-z0-9]*]] <col:18> 'int' 0
|
||||
// CHECK-NEXT: | | |-BinaryOperator {{.*}} <col:19, col:23> 'int' '<'
|
||||
// CHECK-NEXT: | | | |-ImplicitCastExpr {{.*}} <col:19> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:19> 'int' lvalue Var {{.*}} 'i' 'int'
|
||||
// CHECK-NEXT: | | | `-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue ParmVar {{.*}} 'x' 'int'
|
||||
// CHECK-NEXT: | | |-UnaryOperator {{.*}} <col:26, col:27> 'int' postfix '++'
|
||||
// CHECK-NEXT: | | | `-DeclRefExpr {{.*}} <col:26> 'int' lvalue Var {{.*}} 'i' 'int'
|
||||
// CHECK-NEXT: | | `-ForStmt {{.*}} <line:33:5, line:35:9>
|
||||
// CHECK-NEXT: | | |-DeclStmt {{.*}} <line:33:10, col:19>
|
||||
// CHECK-NEXT: | | | `-VarDecl {{.*}} <col:10, col:18> col:14 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | `-IntegerLiteral {{.*}} <col:18> 'int' 0
|
||||
// CHECK-NEXT: | | |-<<<NULL>>>
|
||||
// CHECK-NEXT: | | |-BinaryOperator [[ADDR_175:0x[a-z0-9]*]] <col:21, col:25> 'int' '<'
|
||||
// CHECK-NEXT: | | | |-ImplicitCastExpr [[ADDR_176:0x[a-z0-9]*]] <col:21> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr [[ADDR_177:0x[a-z0-9]*]] <col:21> 'int' {{.*}}Var [[ADDR_173]] 'i' 'int'
|
||||
// CHECK-NEXT: | | | `-ImplicitCastExpr [[ADDR_178:0x[a-z0-9]*]] <col:25> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | `-DeclRefExpr [[ADDR_179:0x[a-z0-9]*]] <col:25> 'int' {{.*}}ParmVar [[ADDR_151]] 'y' 'int'
|
||||
// CHECK-NEXT: | | |-UnaryOperator [[ADDR_180:0x[a-z0-9]*]] <col:28, col:29> 'int' postfix '++'
|
||||
// CHECK-NEXT: | | | `-DeclRefExpr [[ADDR_181:0x[a-z0-9]*]] <col:28> 'int' {{.*}}Var [[ADDR_173]] 'i' 'int'
|
||||
// CHECK-NEXT: | | `-ForStmt [[ADDR_182:0x[a-z0-9]*]] <line:34:7, line:35:9>
|
||||
// CHECK-NEXT: | | |-DeclStmt [[ADDR_183:0x[a-z0-9]*]] <line:34:12, col:21>
|
||||
// CHECK-NEXT: | | | `-VarDecl [[ADDR_184:0x[a-z0-9]*]] <col:12, col:20> col:16 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | `-IntegerLiteral [[ADDR_185:0x[a-z0-9]*]] <col:20> 'int' 0
|
||||
// CHECK-NEXT: | | |-BinaryOperator {{.*}} <col:21, col:25> 'int' '<'
|
||||
// CHECK-NEXT: | | | |-ImplicitCastExpr {{.*}} <col:21> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:21> 'int' lvalue Var {{.*}} 'i' 'int'
|
||||
// CHECK-NEXT: | | | `-ImplicitCastExpr {{.*}} <col:25> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | `-DeclRefExpr {{.*}} <col:25> 'int' lvalue ParmVar {{.*}} 'y' 'int'
|
||||
// CHECK-NEXT: | | |-UnaryOperator {{.*}} <col:28, col:29> 'int' postfix '++'
|
||||
// CHECK-NEXT: | | | `-DeclRefExpr {{.*}} <col:28> 'int' lvalue Var {{.*}} 'i' 'int'
|
||||
// CHECK-NEXT: | | `-ForStmt {{.*}} <line:34:7, line:35:9>
|
||||
// CHECK-NEXT: | | |-DeclStmt {{.*}} <line:34:12, col:21>
|
||||
// CHECK-NEXT: | | | `-VarDecl {{.*}} <col:12, col:20> col:16 used i 'int' cinit
|
||||
// CHECK-NEXT: | | | `-IntegerLiteral {{.*}} <col:20> 'int' 0
|
||||
// CHECK-NEXT: | | |-<<<NULL>>>
|
||||
// CHECK-NEXT: | | |-BinaryOperator [[ADDR_186:0x[a-z0-9]*]] <col:23, col:27> 'int' '<'
|
||||
// CHECK-NEXT: | | | |-ImplicitCastExpr [[ADDR_187:0x[a-z0-9]*]] <col:23> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr [[ADDR_188:0x[a-z0-9]*]] <col:23> 'int' {{.*}}Var [[ADDR_184]] 'i' 'int'
|
||||
// CHECK-NEXT: | | | `-ImplicitCastExpr [[ADDR_189:0x[a-z0-9]*]] <col:27> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | `-DeclRefExpr [[ADDR_190:0x[a-z0-9]*]] <col:27> 'int' {{.*}}ParmVar [[ADDR_152]] 'z' 'int'
|
||||
// CHECK-NEXT: | | |-UnaryOperator [[ADDR_191:0x[a-z0-9]*]] <col:30, col:31> 'int' postfix '++'
|
||||
// CHECK-NEXT: | | | `-DeclRefExpr [[ADDR_192:0x[a-z0-9]*]] <col:30> 'int' {{.*}}Var [[ADDR_184]] 'i' 'int'
|
||||
// CHECK-NEXT: | | `-NullStmt [[ADDR_193:0x[a-z0-9]*]] <line:35:9>
|
||||
// CHECK-NEXT: | |-ImplicitParamDecl [[ADDR_194:0x[a-z0-9]*]] <line:31:1> col:1 implicit .global_tid. 'const int *const restrict'
|
||||
// CHECK-NEXT: | |-ImplicitParamDecl [[ADDR_195:0x[a-z0-9]*]] <col:1> col:1 implicit .bound_tid. 'const int *const restrict'
|
||||
// CHECK-NEXT: | |-ImplicitParamDecl [[ADDR_196:0x[a-z0-9]*]] <col:1> col:1 implicit __context 'struct (unnamed at {{.*}}ast-dump-openmp-distribute-parallel-for.c:31:1) *const restrict'
|
||||
// CHECK-NEXT: | |-VarDecl [[ADDR_162]] <line:32:8, col:16> col:12 used i 'int' cinit
|
||||
// CHECK-NEXT: | | `-IntegerLiteral [[ADDR_163]] <col:16> 'int' 0
|
||||
// CHECK-NEXT: | |-VarDecl [[ADDR_173]] <line:33:10, col:18> col:14 used i 'int' cinit
|
||||
// CHECK-NEXT: | | `-IntegerLiteral [[ADDR_174]] <col:18> 'int' 0
|
||||
// CHECK-NEXT: | `-VarDecl [[ADDR_184]] <line:34:12, col:20> col:16 used i 'int' cinit
|
||||
// CHECK-NEXT: | `-IntegerLiteral [[ADDR_185]] <col:20> 'int' 0
|
||||
// CHECK-NEXT: |-DeclRefExpr [[ADDR_197:0x[a-z0-9]*]] <<invalid sloc>> 'const unsigned long' {{.*}}Var [[ADDR_198:0x[a-z0-9]*]] '.captured.omp.previous.lb' 'const unsigned long'
|
||||
// CHECK-NEXT: |-DeclRefExpr [[ADDR_199:0x[a-z0-9]*]] <<invalid sloc>> 'const unsigned long' {{.*}}Var [[ADDR_200:0x[a-z0-9]*]] '.captured.omp.previous.ub' 'const unsigned long'
|
||||
// CHECK-NEXT: |-DeclRefExpr [[ADDR_201:0x[a-z0-9]*]] <line:32:3> 'int' {{.*}}ParmVar [[ADDR_150]] 'x' 'int'
|
||||
// CHECK-NEXT: |-DeclRefExpr [[ADDR_202:0x[a-z0-9]*]] <line:33:5> 'int' {{.*}}ParmVar [[ADDR_151]] 'y' 'int'
|
||||
// CHECK-NEXT: `-DeclRefExpr [[ADDR_203:0x[a-z0-9]*]] <line:34:27> 'int' {{.*}}ParmVar [[ADDR_152]] 'z' 'int'
|
||||
// CHECK-NEXT: | | |-BinaryOperator {{.*}} <col:23, col:27> 'int' '<'
|
||||
// CHECK-NEXT: | | | |-ImplicitCastExpr {{.*}} <col:23> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} <col:23> 'int' lvalue Var {{.*}} 'i' 'int'
|
||||
// CHECK-NEXT: | | | `-ImplicitCastExpr {{.*}} <col:27> 'int' <LValueToRValue>
|
||||
// CHECK-NEXT: | | | `-DeclRefExpr {{.*}} <col:27> 'int' lvalue ParmVar {{.*}} 'z' 'int'
|
||||
// CHECK-NEXT: | | |-UnaryOperator {{.*}} <col:30, col:31> 'int' postfix '++'
|
||||
// CHECK-NEXT: | | | `-DeclRefExpr {{.*}} <col:30> 'int' lvalue Var {{.*}} 'i' 'int'
|
||||
// CHECK-NEXT: | | `-NullStmt {{.*}} <line:35:9>
|
||||
// CHECK-NEXT: | |-ImplicitParamDecl {{.*}} <line:31:1> col:1 implicit .global_tid. 'const int *const restrict'
|
||||
// CHECK-NEXT: | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .bound_tid. 'const int *const restrict'
|
||||
// CHECK-NEXT: | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.lb. 'const unsigned long'
|
||||
// CHECK-NEXT: | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit used .previous.ub. 'const unsigned long'
|
||||
// CHECK-NEXT: | |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (unnamed at {{.*}}ast-dump-openmp-distribute-parallel-for.c:31:1) *const restrict'
|
||||
// CHECK-NEXT: | |-VarDecl {{.*}} <line:32:8, col:16> col:12 used i 'int' cinit
|
||||
// CHECK-NEXT: | | `-IntegerLiteral {{.*}} <col:16> 'int' 0
|
||||
// CHECK-NEXT: | |-VarDecl {{.*}} <line:33:10, col:18> col:14 used i 'int' cinit
|
||||
// CHECK-NEXT: | | `-IntegerLiteral {{.*}} <col:18> 'int' 0
|
||||
// CHECK-NEXT: | `-VarDecl {{.*}} <line:34:12, col:20> col:16 used i 'int' cinit
|
||||
// CHECK-NEXT: | `-IntegerLiteral {{.*}} <col:20> 'int' 0
|
||||
// CHECK-NEXT: |-DeclRefExpr {{.*}} <line:32:3> 'int' lvalue ParmVar {{.*}} 'x' 'int'
|
||||
// CHECK-NEXT: |-DeclRefExpr {{.*}} <line:33:5> 'int' lvalue ParmVar {{.*}} 'y' 'int'
|
||||
// CHECK-NEXT: `-DeclRefExpr {{.*}} <line:34:27> 'int' lvalue ParmVar {{.*}} 'z' 'int'
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -9,7 +9,7 @@ void ffcomplex (int a) {
|
|||
|
||||
// CHECK: call { double, double } @__muldc3(double %{{.+}}, double %{{.+}}, double %{{.+}}, double %{{.+}})
|
||||
dc *= dc;
|
||||
// CHECK: call {{.+}} @__kmpc_fork_call({{.+}} [[REGNAME1:@.*]] to void (i32*, i32*, ...)*), %struct.anon* %{{.+}})
|
||||
// CHECK: call {{.+}} @__kmpc_fork_call({{.+}} [[REGNAME1:@.*]] to void (i32*, i32*, ...)*), { double, double }* %{{.+}})
|
||||
#pragma omp parallel
|
||||
{
|
||||
dc *= dc;
|
||||
|
@ -32,7 +32,7 @@ void foo(int a, int b) {
|
|||
|
||||
void (*fptr)(void) noexcept = fnoexcp;
|
||||
|
||||
// CHECK: call {{.+}} @__kmpc_fork_call({{.+}} [[REGNAME2:@.*]] to void (i32*, i32*, ...)*), %struct.anon.0* %{{.+}})
|
||||
// CHECK: call {{.+}} @__kmpc_fork_call({{.+}} [[REGNAME2:@.*]] to void (i32*, i32*, ...)*), void ()** %{{.+}})
|
||||
#pragma omp parallel
|
||||
{
|
||||
fptr();
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -15,37 +15,50 @@ void a() {
|
|||
// CHECK1-SAME: () #[[ATTR0:[0-9]+]] !dbg [[DBG6:![0-9]+]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[B:%.*]] = alloca { float, float }, align 4
|
||||
// CHECK1-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 4
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata { float, float }* [[B]], metadata [[META11:![0-9]+]], metadata !DIExpression()), !dbg [[DBG13:![0-9]+]]
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0, !dbg [[DBG14:![0-9]+]]
|
||||
// CHECK1-NEXT: [[B_REALP:%.*]] = getelementptr inbounds { float, float }, { float, float }* [[B]], i32 0, i32 0, !dbg [[DBG15:![0-9]+]]
|
||||
// CHECK1-NEXT: [[B_REAL:%.*]] = load float, float* [[B_REALP]], align 4, !dbg [[DBG15]]
|
||||
// CHECK1-NEXT: [[B_IMAGP:%.*]] = getelementptr inbounds { float, float }, { float, float }* [[B]], i32 0, i32 1, !dbg [[DBG15]]
|
||||
// CHECK1-NEXT: [[B_IMAG:%.*]] = load float, float* [[B_IMAGP]], align 4, !dbg [[DBG15]]
|
||||
// CHECK1-NEXT: [[DOTREALP:%.*]] = getelementptr inbounds { float, float }, { float, float }* [[TMP0]], i32 0, i32 0, !dbg [[DBG14]]
|
||||
// CHECK1-NEXT: [[DOTIMAGP:%.*]] = getelementptr inbounds { float, float }, { float, float }* [[TMP0]], i32 0, i32 1, !dbg [[DBG14]]
|
||||
// CHECK1-NEXT: store float [[B_REAL]], float* [[DOTREALP]], align 4, !dbg [[DBG14]]
|
||||
// CHECK1-NEXT: store float [[B_IMAG]], float* [[DOTIMAGP]], align 4, !dbg [[DBG14]]
|
||||
// CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon*)* @.omp_outlined. to void (i32*, i32*, ...)*), %struct.anon* [[OMP_OUTLINED_ARG_AGG_]]), !dbg [[DBG14]]
|
||||
// CHECK1-NEXT: ret void, !dbg [[DBG17:![0-9]+]]
|
||||
// CHECK1-NEXT: [[B_CASTED:%.*]] = alloca i64, align 8
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata { float, float }* [[B]], metadata [[META10:![0-9]+]], metadata !DIExpression()), !dbg [[DBG12:![0-9]+]]
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load { float, float }, { float, float }* [[B]], align 4, !dbg [[DBG13:![0-9]+]]
|
||||
// CHECK1-NEXT: [[CONV:%.*]] = bitcast i64* [[B_CASTED]] to { float, float }*, !dbg [[DBG13]]
|
||||
// CHECK1-NEXT: store { float, float } [[TMP0]], { float, float }* [[CONV]], align 4, !dbg [[DBG13]]
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = load i64, i64* [[B_CASTED]], align 8, !dbg [[DBG13]]
|
||||
// CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i64)* @.omp_outlined. to void (i32*, i32*, ...)*), i64 [[TMP1]]), !dbg [[DBG13]]
|
||||
// CHECK1-NEXT: ret void, !dbg [[DBG14:![0-9]+]]
|
||||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@.omp_outlined._debug__
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], <2 x float> [[B_COERCE:%.*]]) #[[ATTR2:[0-9]+]] !dbg [[DBG15:![0-9]+]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[B:%.*]] = alloca { float, float }, align 4
|
||||
// CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = bitcast { float, float }* [[B]] to <2 x float>*
|
||||
// CHECK1-NEXT: store <2 x float> [[B_COERCE]], <2 x float>* [[TMP0]], align 4
|
||||
// CHECK1-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata i32** [[DOTGLOBAL_TID__ADDR]], metadata [[META23:![0-9]+]], metadata !DIExpression()), !dbg [[DBG24:![0-9]+]]
|
||||
// CHECK1-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata i32** [[DOTBOUND_TID__ADDR]], metadata [[META25:![0-9]+]], metadata !DIExpression()), !dbg [[DBG24]]
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata { float, float }* [[B]], metadata [[META26:![0-9]+]], metadata !DIExpression()), !dbg [[DBG27:![0-9]+]]
|
||||
// CHECK1-NEXT: ret void, !dbg [[DBG28:![0-9]+]]
|
||||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@.omp_outlined.
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR2:[0-9]+]] !dbg [[DBG18:![0-9]+]] {
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i64 [[B:%.*]]) #[[ATTR3:[0-9]+]] !dbg [[DBG29:![0-9]+]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK1-NEXT: [[B:%.*]] = alloca { float, float }, align 4
|
||||
// CHECK1-NEXT: [[B_ADDR:%.*]] = alloca i64, align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata i32** [[DOTGLOBAL_TID__ADDR]], metadata [[META30:![0-9]+]], metadata !DIExpression()), !dbg [[DBG31:![0-9]+]]
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata i32** [[DOTGLOBAL_TID__ADDR]], metadata [[META33:![0-9]+]], metadata !DIExpression()), !dbg [[DBG34:![0-9]+]]
|
||||
// CHECK1-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata i32** [[DOTBOUND_TID__ADDR]], metadata [[META32:![0-9]+]], metadata !DIExpression()), !dbg [[DBG31]]
|
||||
// CHECK1-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata %struct.anon** [[__CONTEXT_ADDR]], metadata [[META33:![0-9]+]], metadata !DIExpression()), !dbg [[DBG31]]
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8, !dbg [[DBG34:![0-9]+]]
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0, !dbg [[DBG34]]
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load { float, float }, { float, float }* [[TMP1]], align 4, !dbg [[DBG34]]
|
||||
// CHECK1-NEXT: store { float, float } [[TMP2]], { float, float }* [[B]], align 4, !dbg [[DBG34]]
|
||||
// CHECK1-NEXT: ret void, !dbg [[DBG35:![0-9]+]]
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata i32** [[DOTBOUND_TID__ADDR]], metadata [[META35:![0-9]+]], metadata !DIExpression()), !dbg [[DBG34]]
|
||||
// CHECK1-NEXT: store i64 [[B]], i64* [[B_ADDR]], align 8
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata i64* [[B_ADDR]], metadata [[META36:![0-9]+]], metadata !DIExpression()), !dbg [[DBG34]]
|
||||
// CHECK1-NEXT: [[CONV:%.*]] = bitcast i64* [[B_ADDR]] to { float, float }*, !dbg [[DBG37:![0-9]+]]
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8, !dbg [[DBG37]]
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = load i32*, i32** [[DOTBOUND_TID__ADDR]], align 8, !dbg [[DBG37]]
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = bitcast { float, float }* [[CONV]] to <2 x float>*, !dbg [[DBG37]]
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = load <2 x float>, <2 x float>* [[TMP2]], align 8, !dbg [[DBG37]]
|
||||
// CHECK1-NEXT: call void @.omp_outlined._debug__(i32* [[TMP0]], i32* [[TMP1]], <2 x float> [[TMP3]]) #[[ATTR4:[0-9]+]], !dbg [[DBG37]]
|
||||
// CHECK1-NEXT: ret void, !dbg [[DBG37]]
|
||||
//
|
||||
//
|
|
@ -20,36 +20,31 @@ void f(int m) {
|
|||
// CHECK1-NEXT: [[I:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[SAVED_STACK:%.*]] = alloca i8*, align 8
|
||||
// CHECK1-NEXT: [[__VLA_EXPR0:%.*]] = alloca i64, align 8
|
||||
// CHECK1-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 8
|
||||
// CHECK1-NEXT: store i32 [[M]], i32* [[M_ADDR]], align 4
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata i32* [[M_ADDR]], metadata [[META12:![0-9]+]], metadata !DIExpression()), !dbg [[DBG13:![0-9]+]]
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata i32* [[I]], metadata [[META14:![0-9]+]], metadata !DIExpression()), !dbg [[DBG15:![0-9]+]]
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[M_ADDR]], align 4, !dbg [[DBG16:![0-9]+]]
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = zext i32 [[TMP0]] to i64, !dbg [[DBG17:![0-9]+]]
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = call i8* @llvm.stacksave(), !dbg [[DBG17]]
|
||||
// CHECK1-NEXT: store i8* [[TMP2]], i8** [[SAVED_STACK]], align 8, !dbg [[DBG17]]
|
||||
// CHECK1-NEXT: [[VLA:%.*]] = alloca i32, i64 [[TMP1]], align 16, !dbg [[DBG17]]
|
||||
// CHECK1-NEXT: store i64 [[TMP1]], i64* [[__VLA_EXPR0]], align 8, !dbg [[DBG17]]
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata i64* [[__VLA_EXPR0]], metadata [[META18:![0-9]+]], metadata !DIExpression()), !dbg [[DBG20:![0-9]+]]
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata i32* [[VLA]], metadata [[META21:![0-9]+]], metadata !DIExpression()), !dbg [[DBG25:![0-9]+]]
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0, !dbg [[DBG26:![0-9]+]]
|
||||
// CHECK1-NEXT: store i32* [[M_ADDR]], i32** [[TMP3]], align 8, !dbg [[DBG26]]
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 1, !dbg [[DBG26]]
|
||||
// CHECK1-NEXT: store i64 [[TMP1]], i64* [[TMP4]], align 8, !dbg [[DBG26]]
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 2, !dbg [[DBG26]]
|
||||
// CHECK1-NEXT: store i32* [[VLA]], i32** [[TMP5]], align 8, !dbg [[DBG26]]
|
||||
// CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB4:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon*)* @.omp_outlined. to void (i32*, i32*, ...)*), %struct.anon* [[OMP_OUTLINED_ARG_AGG_]]), !dbg [[DBG26]]
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = load i8*, i8** [[SAVED_STACK]], align 8, !dbg [[DBG27:![0-9]+]]
|
||||
// CHECK1-NEXT: call void @llvm.stackrestore(i8* [[TMP6]]), !dbg [[DBG27]]
|
||||
// CHECK1-NEXT: ret void, !dbg [[DBG27]]
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata i32* [[M_ADDR]], metadata [[META11:![0-9]+]], metadata !DIExpression()), !dbg [[DBG12:![0-9]+]]
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata i32* [[I]], metadata [[META13:![0-9]+]], metadata !DIExpression()), !dbg [[DBG14:![0-9]+]]
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[M_ADDR]], align 4, !dbg [[DBG15:![0-9]+]]
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = zext i32 [[TMP0]] to i64, !dbg [[DBG16:![0-9]+]]
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = call i8* @llvm.stacksave(), !dbg [[DBG16]]
|
||||
// CHECK1-NEXT: store i8* [[TMP2]], i8** [[SAVED_STACK]], align 8, !dbg [[DBG16]]
|
||||
// CHECK1-NEXT: [[VLA:%.*]] = alloca i32, i64 [[TMP1]], align 16, !dbg [[DBG16]]
|
||||
// CHECK1-NEXT: store i64 [[TMP1]], i64* [[__VLA_EXPR0]], align 8, !dbg [[DBG16]]
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata i64* [[__VLA_EXPR0]], metadata [[META17:![0-9]+]], metadata !DIExpression()), !dbg [[DBG19:![0-9]+]]
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata i32* [[VLA]], metadata [[META20:![0-9]+]], metadata !DIExpression()), !dbg [[DBG24:![0-9]+]]
|
||||
// CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB4:[0-9]+]], i32 3, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i64, i32*)* @.omp_outlined. to void (i32*, i32*, ...)*), i32* [[M_ADDR]], i64 [[TMP1]], i32* [[VLA]]), !dbg [[DBG25:![0-9]+]]
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = load i8*, i8** [[SAVED_STACK]], align 8, !dbg [[DBG26:![0-9]+]]
|
||||
// CHECK1-NEXT: call void @llvm.stackrestore(i8* [[TMP3]]), !dbg [[DBG26]]
|
||||
// CHECK1-NEXT: ret void, !dbg [[DBG26]]
|
||||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@.omp_outlined.
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR3:[0-9]+]] !dbg [[DBG28:![0-9]+]] {
|
||||
// CHECK1-LABEL: define {{[^@]+}}@.omp_outlined._debug__
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[M:%.*]], i64 [[VLA:%.*]], i32* nonnull align 4 dereferenceable(4) [[CEN:%.*]]) #[[ATTR3:[0-9]+]] !dbg [[DBG27:![0-9]+]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK1-NEXT: [[M_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[VLA_ADDR:%.*]] = alloca i64, align 8
|
||||
// CHECK1-NEXT: [[CEN_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[TMP:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[DOTCAPTURE_EXPR_:%.*]] = alloca i32, align 4
|
||||
|
@ -61,93 +56,123 @@ void f(int m) {
|
|||
// CHECK1-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[I3:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata i32** [[DOTGLOBAL_TID__ADDR]], metadata [[META39:![0-9]+]], metadata !DIExpression()), !dbg [[DBG40:![0-9]+]]
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata i32** [[DOTGLOBAL_TID__ADDR]], metadata [[META35:![0-9]+]], metadata !DIExpression()), !dbg [[DBG36:![0-9]+]]
|
||||
// CHECK1-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata i32** [[DOTBOUND_TID__ADDR]], metadata [[META41:![0-9]+]], metadata !DIExpression()), !dbg [[DBG40]]
|
||||
// CHECK1-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata %struct.anon** [[__CONTEXT_ADDR]], metadata [[META42:![0-9]+]], metadata !DIExpression()), !dbg [[DBG40]]
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8, !dbg [[DBG43:![0-9]+]]
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0, !dbg [[DBG43]]
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 8, !dbg [[DBG43]]
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP0]], i32 0, i32 1, !dbg [[DBG43]]
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = load i64, i64* [[TMP3]], align 8, !dbg [[DBG43]]
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP0]], i32 0, i32 2, !dbg [[DBG43]]
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = load i32*, i32** [[TMP5]], align 8, !dbg [[DBG43]]
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata i32* [[DOTOMP_IV]], metadata [[META44:![0-9]+]], metadata !DIExpression()), !dbg [[DBG40]]
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata i32* [[DOTCAPTURE_EXPR_]], metadata [[META45:![0-9]+]], metadata !DIExpression()), !dbg [[DBG40]]
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = load i32, i32* [[TMP2]], align 4, !dbg [[DBG46:![0-9]+]]
|
||||
// CHECK1-NEXT: store i32 [[TMP7]], i32* [[DOTCAPTURE_EXPR_]], align 4, !dbg [[DBG46]]
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata i32* [[DOTCAPTURE_EXPR_1]], metadata [[META45]], metadata !DIExpression()), !dbg [[DBG40]]
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = load i32, i32* [[DOTCAPTURE_EXPR_]], align 4, !dbg [[DBG46]]
|
||||
// CHECK1-NEXT: [[SUB:%.*]] = sub nsw i32 [[TMP8]], 0, !dbg [[DBG47:![0-9]+]]
|
||||
// CHECK1-NEXT: [[DIV:%.*]] = sdiv i32 [[SUB]], 1, !dbg [[DBG47]]
|
||||
// CHECK1-NEXT: [[SUB2:%.*]] = sub nsw i32 [[DIV]], 1, !dbg [[DBG47]]
|
||||
// CHECK1-NEXT: store i32 [[SUB2]], i32* [[DOTCAPTURE_EXPR_1]], align 4, !dbg [[DBG47]]
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata i32* [[I]], metadata [[META48:![0-9]+]], metadata !DIExpression()), !dbg [[DBG40]]
|
||||
// CHECK1-NEXT: store i32 0, i32* [[I]], align 4, !dbg [[DBG49:![0-9]+]]
|
||||
// CHECK1-NEXT: [[TMP9:%.*]] = load i32, i32* [[DOTCAPTURE_EXPR_]], align 4, !dbg [[DBG46]]
|
||||
// CHECK1-NEXT: [[CMP:%.*]] = icmp slt i32 0, [[TMP9]], !dbg [[DBG47]]
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata i32** [[DOTBOUND_TID__ADDR]], metadata [[META37:![0-9]+]], metadata !DIExpression()), !dbg [[DBG36]]
|
||||
// CHECK1-NEXT: store i32* [[M]], i32** [[M_ADDR]], align 8
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata i32** [[M_ADDR]], metadata [[META38:![0-9]+]], metadata !DIExpression()), !dbg [[DBG39:![0-9]+]]
|
||||
// CHECK1-NEXT: store i64 [[VLA]], i64* [[VLA_ADDR]], align 8
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata i64* [[VLA_ADDR]], metadata [[META40:![0-9]+]], metadata !DIExpression()), !dbg [[DBG36]]
|
||||
// CHECK1-NEXT: store i32* [[CEN]], i32** [[CEN_ADDR]], align 8
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata i32** [[CEN_ADDR]], metadata [[META41:![0-9]+]], metadata !DIExpression()), !dbg [[DBG42:![0-9]+]]
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load i32*, i32** [[M_ADDR]], align 8, !dbg [[DBG43:![0-9]+]]
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = load i64, i64* [[VLA_ADDR]], align 8, !dbg [[DBG43]]
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i32*, i32** [[CEN_ADDR]], align 8, !dbg [[DBG43]]
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata i32* [[DOTOMP_IV]], metadata [[META44:![0-9]+]], metadata !DIExpression()), !dbg [[DBG36]]
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata i32* [[DOTCAPTURE_EXPR_]], metadata [[META45:![0-9]+]], metadata !DIExpression()), !dbg [[DBG36]]
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP0]], align 4, !dbg [[DBG46:![0-9]+]]
|
||||
// CHECK1-NEXT: store i32 [[TMP3]], i32* [[DOTCAPTURE_EXPR_]], align 4, !dbg [[DBG46]]
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata i32* [[DOTCAPTURE_EXPR_1]], metadata [[META45]], metadata !DIExpression()), !dbg [[DBG36]]
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = load i32, i32* [[DOTCAPTURE_EXPR_]], align 4, !dbg [[DBG46]]
|
||||
// CHECK1-NEXT: [[SUB:%.*]] = sub nsw i32 [[TMP4]], 0, !dbg [[DBG43]]
|
||||
// CHECK1-NEXT: [[DIV:%.*]] = sdiv i32 [[SUB]], 1, !dbg [[DBG43]]
|
||||
// CHECK1-NEXT: [[SUB2:%.*]] = sub nsw i32 [[DIV]], 1, !dbg [[DBG43]]
|
||||
// CHECK1-NEXT: store i32 [[SUB2]], i32* [[DOTCAPTURE_EXPR_1]], align 4, !dbg [[DBG43]]
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata i32* [[I]], metadata [[META47:![0-9]+]], metadata !DIExpression()), !dbg [[DBG36]]
|
||||
// CHECK1-NEXT: store i32 0, i32* [[I]], align 4, !dbg [[DBG48:![0-9]+]]
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = load i32, i32* [[DOTCAPTURE_EXPR_]], align 4, !dbg [[DBG46]]
|
||||
// CHECK1-NEXT: [[CMP:%.*]] = icmp slt i32 0, [[TMP5]], !dbg [[DBG43]]
|
||||
// CHECK1-NEXT: br i1 [[CMP]], label [[OMP_PRECOND_THEN:%.*]], label [[OMP_PRECOND_END:%.*]], !dbg [[DBG43]]
|
||||
// CHECK1: omp.precond.then:
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata i32* [[DOTOMP_LB]], metadata [[META50:![0-9]+]], metadata !DIExpression()), !dbg [[DBG40]]
|
||||
// CHECK1-NEXT: store i32 0, i32* [[DOTOMP_LB]], align 4, !dbg [[DBG51:![0-9]+]]
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata i32* [[DOTOMP_UB]], metadata [[META52:![0-9]+]], metadata !DIExpression()), !dbg [[DBG40]]
|
||||
// CHECK1-NEXT: [[TMP10:%.*]] = load i32, i32* [[DOTCAPTURE_EXPR_1]], align 4, !dbg [[DBG47]]
|
||||
// CHECK1-NEXT: store i32 [[TMP10]], i32* [[DOTOMP_UB]], align 4, !dbg [[DBG51]]
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata i32* [[DOTOMP_STRIDE]], metadata [[META53:![0-9]+]], metadata !DIExpression()), !dbg [[DBG40]]
|
||||
// CHECK1-NEXT: store i32 1, i32* [[DOTOMP_STRIDE]], align 4, !dbg [[DBG51]]
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata i32* [[DOTOMP_IS_LAST]], metadata [[META54:![0-9]+]], metadata !DIExpression()), !dbg [[DBG40]]
|
||||
// CHECK1-NEXT: store i32 0, i32* [[DOTOMP_IS_LAST]], align 4, !dbg [[DBG51]]
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata i32* [[I3]], metadata [[META48]], metadata !DIExpression()), !dbg [[DBG40]]
|
||||
// CHECK1-NEXT: [[TMP11:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8, !dbg [[DBG43]]
|
||||
// CHECK1-NEXT: [[TMP12:%.*]] = load i32, i32* [[TMP11]], align 4, !dbg [[DBG43]]
|
||||
// CHECK1-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 [[TMP12]], i32 34, i32* [[DOTOMP_IS_LAST]], i32* [[DOTOMP_LB]], i32* [[DOTOMP_UB]], i32* [[DOTOMP_STRIDE]], i32 1, i32 1), !dbg [[DBG43]]
|
||||
// CHECK1-NEXT: [[TMP13:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4, !dbg [[DBG51]]
|
||||
// CHECK1-NEXT: [[TMP14:%.*]] = load i32, i32* [[DOTCAPTURE_EXPR_1]], align 4, !dbg [[DBG47]]
|
||||
// CHECK1-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP13]], [[TMP14]], !dbg [[DBG51]]
|
||||
// CHECK1-NEXT: br i1 [[CMP4]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]], !dbg [[DBG51]]
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata i32* [[DOTOMP_LB]], metadata [[META49:![0-9]+]], metadata !DIExpression()), !dbg [[DBG36]]
|
||||
// CHECK1-NEXT: store i32 0, i32* [[DOTOMP_LB]], align 4, !dbg [[DBG50:![0-9]+]]
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata i32* [[DOTOMP_UB]], metadata [[META51:![0-9]+]], metadata !DIExpression()), !dbg [[DBG36]]
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = load i32, i32* [[DOTCAPTURE_EXPR_1]], align 4, !dbg [[DBG43]]
|
||||
// CHECK1-NEXT: store i32 [[TMP6]], i32* [[DOTOMP_UB]], align 4, !dbg [[DBG50]]
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata i32* [[DOTOMP_STRIDE]], metadata [[META52:![0-9]+]], metadata !DIExpression()), !dbg [[DBG36]]
|
||||
// CHECK1-NEXT: store i32 1, i32* [[DOTOMP_STRIDE]], align 4, !dbg [[DBG50]]
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata i32* [[DOTOMP_IS_LAST]], metadata [[META53:![0-9]+]], metadata !DIExpression()), !dbg [[DBG36]]
|
||||
// CHECK1-NEXT: store i32 0, i32* [[DOTOMP_IS_LAST]], align 4, !dbg [[DBG50]]
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata i32* [[I3]], metadata [[META47]], metadata !DIExpression()), !dbg [[DBG36]]
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8, !dbg [[DBG43]]
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = load i32, i32* [[TMP7]], align 4, !dbg [[DBG43]]
|
||||
// CHECK1-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 [[TMP8]], i32 34, i32* [[DOTOMP_IS_LAST]], i32* [[DOTOMP_LB]], i32* [[DOTOMP_UB]], i32* [[DOTOMP_STRIDE]], i32 1, i32 1), !dbg [[DBG54:![0-9]+]]
|
||||
// CHECK1-NEXT: [[TMP9:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4, !dbg [[DBG50]]
|
||||
// CHECK1-NEXT: [[TMP10:%.*]] = load i32, i32* [[DOTCAPTURE_EXPR_1]], align 4, !dbg [[DBG43]]
|
||||
// CHECK1-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP9]], [[TMP10]], !dbg [[DBG50]]
|
||||
// CHECK1-NEXT: br i1 [[CMP4]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]], !dbg [[DBG50]]
|
||||
// CHECK1: cond.true:
|
||||
// CHECK1-NEXT: [[TMP15:%.*]] = load i32, i32* [[DOTCAPTURE_EXPR_1]], align 4, !dbg [[DBG47]]
|
||||
// CHECK1-NEXT: br label [[COND_END:%.*]], !dbg [[DBG51]]
|
||||
// CHECK1-NEXT: [[TMP11:%.*]] = load i32, i32* [[DOTCAPTURE_EXPR_1]], align 4, !dbg [[DBG43]]
|
||||
// CHECK1-NEXT: br label [[COND_END:%.*]], !dbg [[DBG50]]
|
||||
// CHECK1: cond.false:
|
||||
// CHECK1-NEXT: [[TMP16:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4, !dbg [[DBG51]]
|
||||
// CHECK1-NEXT: br label [[COND_END]], !dbg [[DBG51]]
|
||||
// CHECK1-NEXT: [[TMP12:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4, !dbg [[DBG50]]
|
||||
// CHECK1-NEXT: br label [[COND_END]], !dbg [[DBG50]]
|
||||
// CHECK1: cond.end:
|
||||
// CHECK1-NEXT: [[COND:%.*]] = phi i32 [ [[TMP15]], [[COND_TRUE]] ], [ [[TMP16]], [[COND_FALSE]] ], !dbg [[DBG51]]
|
||||
// CHECK1-NEXT: store i32 [[COND]], i32* [[DOTOMP_UB]], align 4, !dbg [[DBG51]]
|
||||
// CHECK1-NEXT: [[TMP17:%.*]] = load i32, i32* [[DOTOMP_LB]], align 4, !dbg [[DBG51]]
|
||||
// CHECK1-NEXT: store i32 [[TMP17]], i32* [[DOTOMP_IV]], align 4, !dbg [[DBG51]]
|
||||
// CHECK1-NEXT: [[COND:%.*]] = phi i32 [ [[TMP11]], [[COND_TRUE]] ], [ [[TMP12]], [[COND_FALSE]] ], !dbg [[DBG50]]
|
||||
// CHECK1-NEXT: store i32 [[COND]], i32* [[DOTOMP_UB]], align 4, !dbg [[DBG50]]
|
||||
// CHECK1-NEXT: [[TMP13:%.*]] = load i32, i32* [[DOTOMP_LB]], align 4, !dbg [[DBG50]]
|
||||
// CHECK1-NEXT: store i32 [[TMP13]], i32* [[DOTOMP_IV]], align 4, !dbg [[DBG50]]
|
||||
// CHECK1-NEXT: br label [[OMP_INNER_FOR_COND:%.*]], !dbg [[DBG43]]
|
||||
// CHECK1: omp.inner.for.cond:
|
||||
// CHECK1-NEXT: [[TMP18:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4, !dbg [[DBG51]]
|
||||
// CHECK1-NEXT: [[TMP19:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4, !dbg [[DBG51]]
|
||||
// CHECK1-NEXT: [[CMP5:%.*]] = icmp sle i32 [[TMP18]], [[TMP19]], !dbg [[DBG47]]
|
||||
// CHECK1-NEXT: [[TMP14:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4, !dbg [[DBG50]]
|
||||
// CHECK1-NEXT: [[TMP15:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4, !dbg [[DBG50]]
|
||||
// CHECK1-NEXT: [[CMP5:%.*]] = icmp sle i32 [[TMP14]], [[TMP15]], !dbg [[DBG43]]
|
||||
// CHECK1-NEXT: br i1 [[CMP5]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]], !dbg [[DBG43]]
|
||||
// CHECK1: omp.inner.for.body:
|
||||
// CHECK1-NEXT: [[TMP20:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4, !dbg [[DBG51]]
|
||||
// CHECK1-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP20]], 1, !dbg [[DBG49]]
|
||||
// CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]], !dbg [[DBG49]]
|
||||
// CHECK1-NEXT: store i32 [[ADD]], i32* [[I3]], align 4, !dbg [[DBG49]]
|
||||
// CHECK1-NEXT: [[TMP21:%.*]] = load i32, i32* [[I3]], align 4, !dbg [[DBG55:![0-9]+]]
|
||||
// CHECK1-NEXT: [[TMP22:%.*]] = load i32, i32* [[I3]], align 4, !dbg [[DBG57:![0-9]+]]
|
||||
// CHECK1-NEXT: [[IDXPROM:%.*]] = sext i32 [[TMP22]] to i64, !dbg [[DBG58:![0-9]+]]
|
||||
// CHECK1-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds i32, i32* [[TMP6]], i64 [[IDXPROM]], !dbg [[DBG58]]
|
||||
// CHECK1-NEXT: store i32 [[TMP21]], i32* [[ARRAYIDX]], align 4, !dbg [[DBG59:![0-9]+]]
|
||||
// CHECK1-NEXT: [[TMP16:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4, !dbg [[DBG50]]
|
||||
// CHECK1-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP16]], 1, !dbg [[DBG48]]
|
||||
// CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]], !dbg [[DBG48]]
|
||||
// CHECK1-NEXT: store i32 [[ADD]], i32* [[I3]], align 4, !dbg [[DBG48]]
|
||||
// CHECK1-NEXT: [[TMP17:%.*]] = load i32, i32* [[I3]], align 4, !dbg [[DBG55:![0-9]+]]
|
||||
// CHECK1-NEXT: [[TMP18:%.*]] = load i32, i32* [[I3]], align 4, !dbg [[DBG57:![0-9]+]]
|
||||
// CHECK1-NEXT: [[IDXPROM:%.*]] = sext i32 [[TMP18]] to i64, !dbg [[DBG58:![0-9]+]]
|
||||
// CHECK1-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds i32, i32* [[TMP2]], i64 [[IDXPROM]], !dbg [[DBG58]]
|
||||
// CHECK1-NEXT: store i32 [[TMP17]], i32* [[ARRAYIDX]], align 4, !dbg [[DBG59:![0-9]+]]
|
||||
// CHECK1-NEXT: br label [[OMP_BODY_CONTINUE:%.*]], !dbg [[DBG60:![0-9]+]]
|
||||
// CHECK1: omp.body.continue:
|
||||
// CHECK1-NEXT: br label [[OMP_INNER_FOR_INC:%.*]], !dbg [[DBG43]]
|
||||
// CHECK1-NEXT: br label [[OMP_INNER_FOR_INC:%.*]], !dbg [[DBG54]]
|
||||
// CHECK1: omp.inner.for.inc:
|
||||
// CHECK1-NEXT: [[TMP23:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4, !dbg [[DBG51]]
|
||||
// CHECK1-NEXT: [[ADD6:%.*]] = add nsw i32 [[TMP23]], 1, !dbg [[DBG47]]
|
||||
// CHECK1-NEXT: store i32 [[ADD6]], i32* [[DOTOMP_IV]], align 4, !dbg [[DBG47]]
|
||||
// CHECK1-NEXT: br label [[OMP_INNER_FOR_COND]], !dbg [[DBG43]], !llvm.loop [[LOOP61:![0-9]+]]
|
||||
// CHECK1-NEXT: [[TMP19:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4, !dbg [[DBG50]]
|
||||
// CHECK1-NEXT: [[ADD6:%.*]] = add nsw i32 [[TMP19]], 1, !dbg [[DBG43]]
|
||||
// CHECK1-NEXT: store i32 [[ADD6]], i32* [[DOTOMP_IV]], align 4, !dbg [[DBG43]]
|
||||
// CHECK1-NEXT: br label [[OMP_INNER_FOR_COND]], !dbg [[DBG54]], !llvm.loop [[LOOP61:![0-9]+]]
|
||||
// CHECK1: omp.inner.for.end:
|
||||
// CHECK1-NEXT: br label [[OMP_LOOP_EXIT:%.*]], !dbg [[DBG43]]
|
||||
// CHECK1-NEXT: br label [[OMP_LOOP_EXIT:%.*]], !dbg [[DBG54]]
|
||||
// CHECK1: omp.loop.exit:
|
||||
// CHECK1-NEXT: [[TMP24:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8, !dbg [[DBG43]]
|
||||
// CHECK1-NEXT: [[TMP25:%.*]] = load i32, i32* [[TMP24]], align 4, !dbg [[DBG43]]
|
||||
// CHECK1-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB3:[0-9]+]], i32 [[TMP25]]), !dbg [[DBG62:![0-9]+]]
|
||||
// CHECK1-NEXT: br label [[OMP_PRECOND_END]], !dbg [[DBG43]]
|
||||
// CHECK1-NEXT: [[TMP20:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8, !dbg [[DBG54]]
|
||||
// CHECK1-NEXT: [[TMP21:%.*]] = load i32, i32* [[TMP20]], align 4, !dbg [[DBG54]]
|
||||
// CHECK1-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB3:[0-9]+]], i32 [[TMP21]]), !dbg [[DBG62:![0-9]+]]
|
||||
// CHECK1-NEXT: br label [[OMP_PRECOND_END]], !dbg [[DBG54]]
|
||||
// CHECK1: omp.precond.end:
|
||||
// CHECK1-NEXT: ret void, !dbg [[DBG63:![0-9]+]]
|
||||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@.omp_outlined.
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[M:%.*]], i64 [[VLA:%.*]], i32* nonnull align 4 dereferenceable(4) [[CEN:%.*]]) #[[ATTR3]] !dbg [[DBG64:![0-9]+]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[M_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[VLA_ADDR:%.*]] = alloca i64, align 8
|
||||
// CHECK1-NEXT: [[CEN_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata i32** [[DOTGLOBAL_TID__ADDR]], metadata [[META65:![0-9]+]], metadata !DIExpression()), !dbg [[DBG66:![0-9]+]]
|
||||
// CHECK1-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata i32** [[DOTBOUND_TID__ADDR]], metadata [[META67:![0-9]+]], metadata !DIExpression()), !dbg [[DBG66]]
|
||||
// CHECK1-NEXT: store i32* [[M]], i32** [[M_ADDR]], align 8
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata i32** [[M_ADDR]], metadata [[META68:![0-9]+]], metadata !DIExpression()), !dbg [[DBG66]]
|
||||
// CHECK1-NEXT: store i64 [[VLA]], i64* [[VLA_ADDR]], align 8
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata i64* [[VLA_ADDR]], metadata [[META69:![0-9]+]], metadata !DIExpression()), !dbg [[DBG66]]
|
||||
// CHECK1-NEXT: store i32* [[CEN]], i32** [[CEN_ADDR]], align 8
|
||||
// CHECK1-NEXT: call void @llvm.dbg.declare(metadata i32** [[CEN_ADDR]], metadata [[META70:![0-9]+]], metadata !DIExpression()), !dbg [[DBG66]]
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load i32*, i32** [[M_ADDR]], align 8, !dbg [[DBG71:![0-9]+]]
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = load i64, i64* [[VLA_ADDR]], align 8, !dbg [[DBG71]]
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i32*, i32** [[CEN_ADDR]], align 8, !dbg [[DBG71]]
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8, !dbg [[DBG71]]
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = load i32*, i32** [[DOTBOUND_TID__ADDR]], align 8, !dbg [[DBG71]]
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = load i32*, i32** [[M_ADDR]], align 8, !dbg [[DBG71]]
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = load i32*, i32** [[CEN_ADDR]], align 8, !dbg [[DBG71]]
|
||||
// CHECK1-NEXT: call void @.omp_outlined._debug__(i32* [[TMP3]], i32* [[TMP4]], i32* [[TMP5]], i64 [[TMP1]], i32* [[TMP6]]) #[[ATTR4:[0-9]+]], !dbg [[DBG71]]
|
||||
// CHECK1-NEXT: ret void, !dbg [[DBG71]]
|
||||
//
|
||||
//
|
|
@ -28,7 +28,6 @@ int maini1() {
|
|||
// CHECK1-SAME: (i32* nonnull align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR0:[0-9]+]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[A_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 8
|
||||
// CHECK1-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 8
|
||||
// CHECK1-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load i32*, i32** [[A_ADDR]], align 8
|
||||
|
@ -37,17 +36,11 @@ int maini1() {
|
|||
// CHECK1-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
|
||||
// CHECK1: user_code.entry:
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB2:[0-9]+]])
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK1-NEXT: store i32* [[TMP0]], i32** [[TMP3]], align 8
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = call i8* @__kmpc_alloc_shared(i64 8)
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = load [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], align 8
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = bitcast i8* [[TMP5]] to %struct.anon*
|
||||
// CHECK1-NEXT: store [[STRUCT_ANON]] [[TMP6]], %struct.anon* [[TMP7]], align 8
|
||||
// CHECK1-NEXT: store i8* [[TMP5]], i8** [[TMP4]], align 8
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK1-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP2]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon*)* @__omp_outlined__ to i8*), i8* null, i8** [[TMP8]], i64 1)
|
||||
// CHECK1-NEXT: call void @__kmpc_free_shared(i8* [[TMP5]], i64 8)
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = bitcast i32* [[TMP0]] to i8*
|
||||
// CHECK1-NEXT: store i8* [[TMP4]], i8** [[TMP3]], align 8
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK1-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP2]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i32*)* @__omp_outlined__ to i8*), i8* null, i8** [[TMP5]], i64 1)
|
||||
// CHECK1-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 true, i1 true)
|
||||
// CHECK1-NEXT: ret void
|
||||
// CHECK1: worker.exit:
|
||||
|
@ -55,22 +48,20 @@ int maini1() {
|
|||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@__omp_outlined__
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK1-NEXT: [[A_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[B:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 8
|
||||
// CHECK1-NEXT: [[CALL:%.*]] = call i32 @_Z3fooRi(i32* nonnull align 4 dereferenceable(4) [[B]]) #[[ATTR5:[0-9]+]]
|
||||
// CHECK1-NEXT: [[CALL1:%.*]] = call i32 @_Z3barv() #[[ATTR5]]
|
||||
// CHECK1-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load i32*, i32** [[A_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[CALL:%.*]] = call i32 @_Z3fooRi(i32* nonnull align 4 dereferenceable(4) [[B]]) #[[ATTR4:[0-9]+]]
|
||||
// CHECK1-NEXT: [[CALL1:%.*]] = call i32 @_Z3barv() #[[ATTR4]]
|
||||
// CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 [[CALL]], [[CALL1]]
|
||||
// CHECK1-NEXT: store i32 [[ADD]], i32* [[TMP2]], align 4
|
||||
// CHECK1-NEXT: store i32 [[ADD]], i32* [[TMP0]], align 4
|
||||
// CHECK1-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -89,7 +80,7 @@ int maini1() {
|
|||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[A:%.*]] = call i8* @__kmpc_alloc_shared(i64 4)
|
||||
// CHECK1-NEXT: [[A_ON_STACK:%.*]] = bitcast i8* [[A]] to i32*
|
||||
// CHECK1-NEXT: [[CALL:%.*]] = call i32 @_Z3fooRi(i32* nonnull align 4 dereferenceable(4) [[A_ON_STACK]]) #[[ATTR5]]
|
||||
// CHECK1-NEXT: [[CALL:%.*]] = call i32 @_Z3fooRi(i32* nonnull align 4 dereferenceable(4) [[A_ON_STACK]]) #[[ATTR4]]
|
||||
// CHECK1-NEXT: call void @__kmpc_free_shared(i8* [[A]], i64 4)
|
||||
// CHECK1-NEXT: ret i32 [[CALL]]
|
||||
//
|
||||
|
|
|
@ -72,13 +72,13 @@ int test() {
|
|||
{
|
||||
vxv(v1, v2, v3, N);
|
||||
}
|
||||
// CK1: call void ({{.+}}) @__kmpc_fork_call(%struct.ident_t* {{.+}}, i32 1, void ({{.+}})* bitcast (void (i32*, i32*, {{%struct.anon.?[0-9]*}}*)* [[PARALLEL_REGION:@.+]] to void
|
||||
// CK1: call void ({{.+}}) @__kmpc_fork_call(%struct.ident_t* {{.+}}, i32 3, void ({{.+}})* bitcast (void (i32*, i32*, [100 x i32]*, [100 x i32]*, [100 x i32]*)* [[PARALLEL_REGION:@.+]] to void
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// CK1: define internal void @__omp_offloading_[[OFFLOAD]]({{.+}})
|
||||
// CK1: call void ({{.+}}) @__kmpc_fork_teams(%struct.ident_t* {{.+}}, i32 1, void ({{.+}})* bitcast (void (i32*, i32*, {{%struct.anon.?[0-9]*}}*)* [[TARGET_REGION:@.+]] to void
|
||||
// CK1: call void ({{.+}}) @__kmpc_fork_teams(%struct.ident_t* {{.+}}, i32 3, void ({{.+}})* bitcast (void (i32*, i32*, [100 x i32]*, [100 x i32]*, [100 x i32]*)* [[TARGET_REGION:@.+]] to void
|
||||
// CK1: define internal void [[TARGET_REGION]](
|
||||
// CK1: call void @t_vxv
|
||||
|
||||
|
@ -167,11 +167,11 @@ void test(int ***v1, int ***v2, int ***v3, int n) {
|
|||
{
|
||||
test_base(v1, v2, v3, 0);
|
||||
}
|
||||
// CK2: call void ({{.+}}) @__kmpc_fork_call(%struct.ident_t* {{.+}}, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, {{%struct.anon.?[0-9]*}}*)* [[PARALLEL_REGION:@.+]] to void
|
||||
// CK2: call void ({{.+}}) @__kmpc_fork_call(%struct.ident_t* {{.+}}, i32 3, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32****, i32****, i32****)* [[PARALLEL_REGION:@.+]] to void
|
||||
}
|
||||
|
||||
// CK2: define internal void @__omp_offloading_[[OFFLOAD_1]]({{.+}})
|
||||
// CK2: call void ({{.+}}) @__kmpc_fork_teams(%struct.ident_t* {{.+}}, i32 1, void ({{.+}})* bitcast (void (i32*, i32*, {{%struct.anon.?[0-9]*}}*)* [[TARGET_REGION_1:@.+]] to void
|
||||
// CK2: call void ({{.+}}) @__kmpc_fork_teams(%struct.ident_t* {{.+}}, i32 3, void ({{.+}})* bitcast (void (i32*, i32*, i32****, i32****, i32****)* [[TARGET_REGION_1:@.+]] to void
|
||||
// CK2: define internal void [[TARGET_REGION_1]](
|
||||
// CK2: call void @test_teams
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -421,7 +421,6 @@ int main() {
|
|||
// CHECK1-NEXT: [[VEC:%.*]] = alloca [2 x i32], align 4
|
||||
// CHECK1-NEXT: [[S_ARR:%.*]] = alloca [2 x %struct.S.0], align 4
|
||||
// CHECK1-NEXT: [[VAR:%.*]] = alloca %struct.S.0*, align 8
|
||||
// CHECK1-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 8
|
||||
// CHECK1-NEXT: call void @_ZN1SIiEC1Ev(%struct.S.0* nonnull align 4 dereferenceable(4) [[TEST]])
|
||||
// CHECK1-NEXT: store i32 0, i32* [[T_VAR]], align 4
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = bitcast [2 x i32]* [[VEC]] to i8*
|
||||
|
@ -431,30 +430,22 @@ int main() {
|
|||
// CHECK1-NEXT: [[ARRAYINIT_ELEMENT:%.*]] = getelementptr inbounds [[STRUCT_S_0]], %struct.S.0* [[ARRAYINIT_BEGIN]], i64 1
|
||||
// CHECK1-NEXT: call void @_ZN1SIiEC1Ei(%struct.S.0* nonnull align 4 dereferenceable(4) [[ARRAYINIT_ELEMENT]], i32 2)
|
||||
// CHECK1-NEXT: store %struct.S.0* [[TEST]], %struct.S.0** [[VAR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK1-NEXT: store i32* [[T_VAR]], i32** [[TMP1]], align 8
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 1
|
||||
// CHECK1-NEXT: store [2 x i32]* [[VEC]], [2 x i32]** [[TMP2]], align 8
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 2
|
||||
// CHECK1-NEXT: store [2 x %struct.S.0]* [[S_ARR]], [2 x %struct.S.0]** [[TMP3]], align 8
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 3
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = load %struct.S.0*, %struct.S.0** [[VAR]], align 8
|
||||
// CHECK1-NEXT: store %struct.S.0* [[TMP5]], %struct.S.0** [[TMP4]], align 8
|
||||
// CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB2]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon*)* @.omp_outlined. to void (i32*, i32*, ...)*), %struct.anon* [[OMP_OUTLINED_ARG_AGG_]])
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = load %struct.S.0*, %struct.S.0** [[VAR]], align 8
|
||||
// CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB2]], i32 4, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, [2 x i32]*, [2 x %struct.S.0]*, %struct.S.0*)* @.omp_outlined. to void (i32*, i32*, ...)*), i32* [[T_VAR]], [2 x i32]* [[VEC]], [2 x %struct.S.0]* [[S_ARR]], %struct.S.0* [[TMP1]])
|
||||
// CHECK1-NEXT: store i32 0, i32* [[RETVAL]], align 4
|
||||
// CHECK1-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S.0], [2 x %struct.S.0]* [[S_ARR]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[STRUCT_S_0]], %struct.S.0* [[ARRAY_BEGIN]], i64 2
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[STRUCT_S_0]], %struct.S.0* [[ARRAY_BEGIN]], i64 2
|
||||
// CHECK1-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
|
||||
// CHECK1: arraydestroy.body:
|
||||
// CHECK1-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi %struct.S.0* [ [[TMP6]], [[ENTRY:%.*]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
|
||||
// CHECK1-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi %struct.S.0* [ [[TMP2]], [[ENTRY:%.*]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
|
||||
// CHECK1-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S_0]], %struct.S.0* [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
|
||||
// CHECK1-NEXT: call void @_ZN1SIiED1Ev(%struct.S.0* nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR2]]
|
||||
// CHECK1-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq %struct.S.0* [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN]]
|
||||
// CHECK1-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE1:%.*]], label [[ARRAYDESTROY_BODY]]
|
||||
// CHECK1: arraydestroy.done1:
|
||||
// CHECK1-NEXT: call void @_ZN1SIiED1Ev(%struct.S.0* nonnull align 4 dereferenceable(4) [[TEST]]) #[[ATTR2]]
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = load i32, i32* [[RETVAL]], align 4
|
||||
// CHECK1-NEXT: ret i32 [[TMP7]]
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = load i32, i32* [[RETVAL]], align 4
|
||||
// CHECK1-NEXT: ret i32 [[TMP3]]
|
||||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@_ZN2StC2Ev
|
||||
|
@ -523,11 +514,14 @@ int main() {
|
|||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@.omp_outlined.
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR7:[0-9]+]] {
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[T_VAR:%.*]], [2 x i32]* nonnull align 4 dereferenceable(8) [[VEC:%.*]], [2 x %struct.S.0]* nonnull align 4 dereferenceable(8) [[S_ARR:%.*]], %struct.S.0* nonnull align 4 dereferenceable(4) [[VAR:%.*]]) #[[ATTR7:[0-9]+]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK1-NEXT: [[T_VAR_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[VEC_ADDR:%.*]] = alloca [2 x i32]*, align 8
|
||||
// CHECK1-NEXT: [[S_ARR_ADDR:%.*]] = alloca [2 x %struct.S.0]*, align 8
|
||||
// CHECK1-NEXT: [[VAR_ADDR:%.*]] = alloca %struct.S.0*, align 8
|
||||
// CHECK1-NEXT: [[TMP:%.*]] = alloca %struct.S.0*, align 8
|
||||
// CHECK1-NEXT: [[_TMP1:%.*]] = alloca %struct.S.0*, align 8
|
||||
// CHECK1-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
|
||||
|
@ -536,128 +530,126 @@ int main() {
|
|||
// CHECK1-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[T_VAR:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[VEC:%.*]] = alloca [2 x i32], align 4
|
||||
// CHECK1-NEXT: [[S_ARR:%.*]] = alloca [2 x %struct.S.0], align 4
|
||||
// CHECK1-NEXT: [[T_VAR3:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[VEC4:%.*]] = alloca [2 x i32], align 4
|
||||
// CHECK1-NEXT: [[S_ARR5:%.*]] = alloca [2 x %struct.S.0], align 4
|
||||
// CHECK1-NEXT: [[AGG_TMP:%.*]] = alloca [[STRUCT_ST:%.*]], align 4
|
||||
// CHECK1-NEXT: [[VAR:%.*]] = alloca [[STRUCT_S_0:%.*]], align 4
|
||||
// CHECK1-NEXT: [[AGG_TMP4:%.*]] = alloca [[STRUCT_ST]], align 4
|
||||
// CHECK1-NEXT: [[_TMP5:%.*]] = alloca %struct.S.0*, align 8
|
||||
// CHECK1-NEXT: [[VAR7:%.*]] = alloca [[STRUCT_S_0:%.*]], align 4
|
||||
// CHECK1-NEXT: [[AGG_TMP8:%.*]] = alloca [[STRUCT_ST]], align 4
|
||||
// CHECK1-NEXT: [[_TMP9:%.*]] = alloca %struct.S.0*, align 8
|
||||
// CHECK1-NEXT: [[I:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 8
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP0]], i32 0, i32 1
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = load [2 x i32]*, [2 x i32]** [[TMP3]], align 8
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP0]], i32 0, i32 2
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = load [2 x %struct.S.0]*, [2 x %struct.S.0]** [[TMP5]], align 8
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP0]], i32 0, i32 3
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = load %struct.S.0*, %struct.S.0** [[TMP7]], align 8
|
||||
// CHECK1-NEXT: store %struct.S.0* [[TMP8]], %struct.S.0** [[TMP]], align 8
|
||||
// CHECK1-NEXT: [[TMP9:%.*]] = load %struct.S.0*, %struct.S.0** [[TMP]], align 8
|
||||
// CHECK1-NEXT: store %struct.S.0* [[TMP9]], %struct.S.0** [[_TMP1]], align 8
|
||||
// CHECK1-NEXT: store i32* [[T_VAR]], i32** [[T_VAR_ADDR]], align 8
|
||||
// CHECK1-NEXT: store [2 x i32]* [[VEC]], [2 x i32]** [[VEC_ADDR]], align 8
|
||||
// CHECK1-NEXT: store [2 x %struct.S.0]* [[S_ARR]], [2 x %struct.S.0]** [[S_ARR_ADDR]], align 8
|
||||
// CHECK1-NEXT: store %struct.S.0* [[VAR]], %struct.S.0** [[VAR_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load i32*, i32** [[T_VAR_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = load [2 x i32]*, [2 x i32]** [[VEC_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load [2 x %struct.S.0]*, [2 x %struct.S.0]** [[S_ARR_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = load %struct.S.0*, %struct.S.0** [[VAR_ADDR]], align 8
|
||||
// CHECK1-NEXT: store %struct.S.0* [[TMP3]], %struct.S.0** [[TMP]], align 8
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = load %struct.S.0*, %struct.S.0** [[TMP]], align 8
|
||||
// CHECK1-NEXT: store %struct.S.0* [[TMP4]], %struct.S.0** [[_TMP1]], align 8
|
||||
// CHECK1-NEXT: store i32 0, i32* [[DOTOMP_LB]], align 4
|
||||
// CHECK1-NEXT: store i32 1, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK1-NEXT: store i32 1, i32* [[DOTOMP_STRIDE]], align 4
|
||||
// CHECK1-NEXT: store i32 0, i32* [[DOTOMP_IS_LAST]], align 4
|
||||
// CHECK1-NEXT: [[TMP10:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK1-NEXT: store i32 [[TMP10]], i32* [[T_VAR]], align 4
|
||||
// CHECK1-NEXT: [[TMP11:%.*]] = bitcast [2 x i32]* [[VEC]] to i8*
|
||||
// CHECK1-NEXT: [[TMP12:%.*]] = bitcast [2 x i32]* [[TMP4]] to i8*
|
||||
// CHECK1-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 [[TMP11]], i8* align 4 [[TMP12]], i64 8, i1 false)
|
||||
// CHECK1-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S.0], [2 x %struct.S.0]* [[S_ARR]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP13:%.*]] = bitcast [2 x %struct.S.0]* [[TMP6]] to %struct.S.0*
|
||||
// CHECK1-NEXT: [[TMP14:%.*]] = getelementptr [[STRUCT_S_0]], %struct.S.0* [[ARRAY_BEGIN]], i64 2
|
||||
// CHECK1-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq %struct.S.0* [[ARRAY_BEGIN]], [[TMP14]]
|
||||
// CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE3:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]]
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK1-NEXT: store i32 [[TMP5]], i32* [[T_VAR3]], align 4
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = bitcast [2 x i32]* [[VEC4]] to i8*
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = bitcast [2 x i32]* [[TMP1]] to i8*
|
||||
// CHECK1-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 [[TMP6]], i8* align 4 [[TMP7]], i64 8, i1 false)
|
||||
// CHECK1-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S.0], [2 x %struct.S.0]* [[S_ARR5]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = bitcast [2 x %struct.S.0]* [[TMP2]] to %struct.S.0*
|
||||
// CHECK1-NEXT: [[TMP9:%.*]] = getelementptr [[STRUCT_S_0]], %struct.S.0* [[ARRAY_BEGIN]], i64 2
|
||||
// CHECK1-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq %struct.S.0* [[ARRAY_BEGIN]], [[TMP9]]
|
||||
// CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE6:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]]
|
||||
// CHECK1: omp.arraycpy.body:
|
||||
// CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi %struct.S.0* [ [[TMP13]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
|
||||
// CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi %struct.S.0* [ [[TMP8]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
|
||||
// CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi %struct.S.0* [ [[ARRAY_BEGIN]], [[ENTRY]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
|
||||
// CHECK1-NEXT: call void @_ZN2StC1Ev(%struct.St* nonnull align 4 dereferenceable(8) [[AGG_TMP]])
|
||||
// CHECK1-NEXT: call void @_ZN1SIiEC1ERKS0_2St(%struct.S.0* nonnull align 4 dereferenceable(4) [[OMP_ARRAYCPY_DESTELEMENTPAST]], %struct.S.0* nonnull align 4 dereferenceable(4) [[OMP_ARRAYCPY_SRCELEMENTPAST]], %struct.St* [[AGG_TMP]])
|
||||
// CHECK1-NEXT: call void @_ZN2StD1Ev(%struct.St* nonnull align 4 dereferenceable(8) [[AGG_TMP]]) #[[ATTR2]]
|
||||
// CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr [[STRUCT_S_0]], %struct.S.0* [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1
|
||||
// CHECK1-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr [[STRUCT_S_0]], %struct.S.0* [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1
|
||||
// CHECK1-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq %struct.S.0* [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP14]]
|
||||
// CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYCPY_DONE3]], label [[OMP_ARRAYCPY_BODY]]
|
||||
// CHECK1: omp.arraycpy.done3:
|
||||
// CHECK1-NEXT: [[TMP15:%.*]] = load %struct.S.0*, %struct.S.0** [[_TMP1]], align 8
|
||||
// CHECK1-NEXT: call void @_ZN2StC1Ev(%struct.St* nonnull align 4 dereferenceable(8) [[AGG_TMP4]])
|
||||
// CHECK1-NEXT: call void @_ZN1SIiEC1ERKS0_2St(%struct.S.0* nonnull align 4 dereferenceable(4) [[VAR]], %struct.S.0* nonnull align 4 dereferenceable(4) [[TMP15]], %struct.St* [[AGG_TMP4]])
|
||||
// CHECK1-NEXT: call void @_ZN2StD1Ev(%struct.St* nonnull align 4 dereferenceable(8) [[AGG_TMP4]]) #[[ATTR2]]
|
||||
// CHECK1-NEXT: store %struct.S.0* [[VAR]], %struct.S.0** [[_TMP5]], align 8
|
||||
// CHECK1-NEXT: [[TMP16:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP17:%.*]] = load i32, i32* [[TMP16]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB1]], i32 [[TMP17]], i32 34, i32* [[DOTOMP_IS_LAST]], i32* [[DOTOMP_LB]], i32* [[DOTOMP_UB]], i32* [[DOTOMP_STRIDE]], i32 1, i32 1)
|
||||
// CHECK1-NEXT: [[TMP18:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK1-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP18]], 1
|
||||
// CHECK1-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq %struct.S.0* [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP9]]
|
||||
// CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYCPY_DONE6]], label [[OMP_ARRAYCPY_BODY]]
|
||||
// CHECK1: omp.arraycpy.done6:
|
||||
// CHECK1-NEXT: [[TMP10:%.*]] = load %struct.S.0*, %struct.S.0** [[_TMP1]], align 8
|
||||
// CHECK1-NEXT: call void @_ZN2StC1Ev(%struct.St* nonnull align 4 dereferenceable(8) [[AGG_TMP8]])
|
||||
// CHECK1-NEXT: call void @_ZN1SIiEC1ERKS0_2St(%struct.S.0* nonnull align 4 dereferenceable(4) [[VAR7]], %struct.S.0* nonnull align 4 dereferenceable(4) [[TMP10]], %struct.St* [[AGG_TMP8]])
|
||||
// CHECK1-NEXT: call void @_ZN2StD1Ev(%struct.St* nonnull align 4 dereferenceable(8) [[AGG_TMP8]]) #[[ATTR2]]
|
||||
// CHECK1-NEXT: store %struct.S.0* [[VAR7]], %struct.S.0** [[_TMP9]], align 8
|
||||
// CHECK1-NEXT: [[TMP11:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP12:%.*]] = load i32, i32* [[TMP11]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB1]], i32 [[TMP12]], i32 34, i32* [[DOTOMP_IS_LAST]], i32* [[DOTOMP_LB]], i32* [[DOTOMP_UB]], i32* [[DOTOMP_STRIDE]], i32 1, i32 1)
|
||||
// CHECK1-NEXT: [[TMP13:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK1-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP13]], 1
|
||||
// CHECK1-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
|
||||
// CHECK1: cond.true:
|
||||
// CHECK1-NEXT: br label [[COND_END:%.*]]
|
||||
// CHECK1: cond.false:
|
||||
// CHECK1-NEXT: [[TMP19:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK1-NEXT: [[TMP14:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK1-NEXT: br label [[COND_END]]
|
||||
// CHECK1: cond.end:
|
||||
// CHECK1-NEXT: [[COND:%.*]] = phi i32 [ 1, [[COND_TRUE]] ], [ [[TMP19]], [[COND_FALSE]] ]
|
||||
// CHECK1-NEXT: [[COND:%.*]] = phi i32 [ 1, [[COND_TRUE]] ], [ [[TMP14]], [[COND_FALSE]] ]
|
||||
// CHECK1-NEXT: store i32 [[COND]], i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK1-NEXT: [[TMP20:%.*]] = load i32, i32* [[DOTOMP_LB]], align 4
|
||||
// CHECK1-NEXT: store i32 [[TMP20]], i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK1-NEXT: [[TMP15:%.*]] = load i32, i32* [[DOTOMP_LB]], align 4
|
||||
// CHECK1-NEXT: store i32 [[TMP15]], i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK1-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
|
||||
// CHECK1: omp.inner.for.cond:
|
||||
// CHECK1-NEXT: [[TMP21:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK1-NEXT: [[TMP22:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK1-NEXT: [[CMP6:%.*]] = icmp sle i32 [[TMP21]], [[TMP22]]
|
||||
// CHECK1-NEXT: br i1 [[CMP6]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_COND_CLEANUP:%.*]]
|
||||
// CHECK1-NEXT: [[TMP16:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK1-NEXT: [[TMP17:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK1-NEXT: [[CMP10:%.*]] = icmp sle i32 [[TMP16]], [[TMP17]]
|
||||
// CHECK1-NEXT: br i1 [[CMP10]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_COND_CLEANUP:%.*]]
|
||||
// CHECK1: omp.inner.for.cond.cleanup:
|
||||
// CHECK1-NEXT: br label [[OMP_INNER_FOR_END:%.*]]
|
||||
// CHECK1: omp.inner.for.body:
|
||||
// CHECK1-NEXT: [[TMP23:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK1-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP23]], 1
|
||||
// CHECK1-NEXT: [[TMP18:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK1-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP18]], 1
|
||||
// CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
|
||||
// CHECK1-NEXT: store i32 [[ADD]], i32* [[I]], align 4
|
||||
// CHECK1-NEXT: [[TMP24:%.*]] = load i32, i32* [[T_VAR]], align 4
|
||||
// CHECK1-NEXT: [[TMP25:%.*]] = load i32, i32* [[I]], align 4
|
||||
// CHECK1-NEXT: [[IDXPROM:%.*]] = sext i32 [[TMP25]] to i64
|
||||
// CHECK1-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [2 x i32], [2 x i32]* [[VEC]], i64 0, i64 [[IDXPROM]]
|
||||
// CHECK1-NEXT: store i32 [[TMP24]], i32* [[ARRAYIDX]], align 4
|
||||
// CHECK1-NEXT: [[TMP26:%.*]] = load %struct.S.0*, %struct.S.0** [[_TMP5]], align 8
|
||||
// CHECK1-NEXT: [[TMP27:%.*]] = load i32, i32* [[I]], align 4
|
||||
// CHECK1-NEXT: [[IDXPROM7:%.*]] = sext i32 [[TMP27]] to i64
|
||||
// CHECK1-NEXT: [[ARRAYIDX8:%.*]] = getelementptr inbounds [2 x %struct.S.0], [2 x %struct.S.0]* [[S_ARR]], i64 0, i64 [[IDXPROM7]]
|
||||
// CHECK1-NEXT: [[TMP28:%.*]] = bitcast %struct.S.0* [[ARRAYIDX8]] to i8*
|
||||
// CHECK1-NEXT: [[TMP29:%.*]] = bitcast %struct.S.0* [[TMP26]] to i8*
|
||||
// CHECK1-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 [[TMP28]], i8* align 4 [[TMP29]], i64 4, i1 false)
|
||||
// CHECK1-NEXT: [[TMP19:%.*]] = load i32, i32* [[T_VAR3]], align 4
|
||||
// CHECK1-NEXT: [[TMP20:%.*]] = load i32, i32* [[I]], align 4
|
||||
// CHECK1-NEXT: [[IDXPROM:%.*]] = sext i32 [[TMP20]] to i64
|
||||
// CHECK1-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [2 x i32], [2 x i32]* [[VEC4]], i64 0, i64 [[IDXPROM]]
|
||||
// CHECK1-NEXT: store i32 [[TMP19]], i32* [[ARRAYIDX]], align 4
|
||||
// CHECK1-NEXT: [[TMP21:%.*]] = load %struct.S.0*, %struct.S.0** [[_TMP9]], align 8
|
||||
// CHECK1-NEXT: [[TMP22:%.*]] = load i32, i32* [[I]], align 4
|
||||
// CHECK1-NEXT: [[IDXPROM11:%.*]] = sext i32 [[TMP22]] to i64
|
||||
// CHECK1-NEXT: [[ARRAYIDX12:%.*]] = getelementptr inbounds [2 x %struct.S.0], [2 x %struct.S.0]* [[S_ARR5]], i64 0, i64 [[IDXPROM11]]
|
||||
// CHECK1-NEXT: [[TMP23:%.*]] = bitcast %struct.S.0* [[ARRAYIDX12]] to i8*
|
||||
// CHECK1-NEXT: [[TMP24:%.*]] = bitcast %struct.S.0* [[TMP21]] to i8*
|
||||
// CHECK1-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 [[TMP23]], i8* align 4 [[TMP24]], i64 4, i1 false)
|
||||
// CHECK1-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
|
||||
// CHECK1: omp.body.continue:
|
||||
// CHECK1-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
|
||||
// CHECK1: omp.inner.for.inc:
|
||||
// CHECK1-NEXT: [[TMP30:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK1-NEXT: [[ADD9:%.*]] = add nsw i32 [[TMP30]], 1
|
||||
// CHECK1-NEXT: store i32 [[ADD9]], i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK1-NEXT: [[TMP25:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK1-NEXT: [[ADD13:%.*]] = add nsw i32 [[TMP25]], 1
|
||||
// CHECK1-NEXT: store i32 [[ADD13]], i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK1-NEXT: br label [[OMP_INNER_FOR_COND]]
|
||||
// CHECK1: omp.inner.for.end:
|
||||
// CHECK1-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
|
||||
// CHECK1: omp.loop.exit:
|
||||
// CHECK1-NEXT: [[TMP31:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP32:%.*]] = load i32, i32* [[TMP31]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB1]], i32 [[TMP32]])
|
||||
// CHECK1-NEXT: call void @_ZN1SIiED1Ev(%struct.S.0* nonnull align 4 dereferenceable(4) [[VAR]]) #[[ATTR2]]
|
||||
// CHECK1-NEXT: [[ARRAY_BEGIN10:%.*]] = getelementptr inbounds [2 x %struct.S.0], [2 x %struct.S.0]* [[S_ARR]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP33:%.*]] = getelementptr inbounds [[STRUCT_S_0]], %struct.S.0* [[ARRAY_BEGIN10]], i64 2
|
||||
// CHECK1-NEXT: [[TMP26:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP27:%.*]] = load i32, i32* [[TMP26]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB1]], i32 [[TMP27]])
|
||||
// CHECK1-NEXT: call void @_ZN1SIiED1Ev(%struct.S.0* nonnull align 4 dereferenceable(4) [[VAR7]]) #[[ATTR2]]
|
||||
// CHECK1-NEXT: [[ARRAY_BEGIN14:%.*]] = getelementptr inbounds [2 x %struct.S.0], [2 x %struct.S.0]* [[S_ARR5]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP28:%.*]] = getelementptr inbounds [[STRUCT_S_0]], %struct.S.0* [[ARRAY_BEGIN14]], i64 2
|
||||
// CHECK1-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
|
||||
// CHECK1: arraydestroy.body:
|
||||
// CHECK1-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi %struct.S.0* [ [[TMP33]], [[OMP_LOOP_EXIT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
|
||||
// CHECK1-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi %struct.S.0* [ [[TMP28]], [[OMP_LOOP_EXIT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
|
||||
// CHECK1-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S_0]], %struct.S.0* [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
|
||||
// CHECK1-NEXT: call void @_ZN1SIiED1Ev(%struct.S.0* nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR2]]
|
||||
// CHECK1-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq %struct.S.0* [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN10]]
|
||||
// CHECK1-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE11:%.*]], label [[ARRAYDESTROY_BODY]]
|
||||
// CHECK1: arraydestroy.done11:
|
||||
// CHECK1-NEXT: [[TMP34:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP35:%.*]] = load i32, i32* [[TMP34]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB3]], i32 [[TMP35]])
|
||||
// CHECK1-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq %struct.S.0* [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN14]]
|
||||
// CHECK1-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE15:%.*]], label [[ARRAYDESTROY_BODY]]
|
||||
// CHECK1: arraydestroy.done15:
|
||||
// CHECK1-NEXT: [[TMP29:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP30:%.*]] = load i32, i32* [[TMP29]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB3]], i32 [[TMP30]])
|
||||
// CHECK1-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -1022,7 +1014,6 @@ int main() {
|
|||
// CHECK2-NEXT: [[VEC:%.*]] = alloca [2 x i32], align 4
|
||||
// CHECK2-NEXT: [[S_ARR:%.*]] = alloca [2 x %struct.S.0], align 4
|
||||
// CHECK2-NEXT: [[VAR:%.*]] = alloca %struct.S.0*, align 8
|
||||
// CHECK2-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 8
|
||||
// CHECK2-NEXT: call void @_ZN1SIiEC1Ev(%struct.S.0* nonnull align 4 dereferenceable(4) [[TEST]])
|
||||
// CHECK2-NEXT: store i32 0, i32* [[T_VAR]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = bitcast [2 x i32]* [[VEC]] to i8*
|
||||
|
@ -1032,30 +1023,22 @@ int main() {
|
|||
// CHECK2-NEXT: [[ARRAYINIT_ELEMENT:%.*]] = getelementptr inbounds [[STRUCT_S_0]], %struct.S.0* [[ARRAYINIT_BEGIN]], i64 1
|
||||
// CHECK2-NEXT: call void @_ZN1SIiEC1Ei(%struct.S.0* nonnull align 4 dereferenceable(4) [[ARRAYINIT_ELEMENT]], i32 2)
|
||||
// CHECK2-NEXT: store %struct.S.0* [[TEST]], %struct.S.0** [[VAR]], align 8
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK2-NEXT: store i32* [[T_VAR]], i32** [[TMP1]], align 8
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 1
|
||||
// CHECK2-NEXT: store [2 x i32]* [[VEC]], [2 x i32]** [[TMP2]], align 8
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 2
|
||||
// CHECK2-NEXT: store [2 x %struct.S.0]* [[S_ARR]], [2 x %struct.S.0]** [[TMP3]], align 8
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 3
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = load %struct.S.0*, %struct.S.0** [[VAR]], align 8
|
||||
// CHECK2-NEXT: store %struct.S.0* [[TMP5]], %struct.S.0** [[TMP4]], align 8
|
||||
// CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB2]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon*)* @.omp_outlined. to void (i32*, i32*, ...)*), %struct.anon* [[OMP_OUTLINED_ARG_AGG_]])
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = load %struct.S.0*, %struct.S.0** [[VAR]], align 8
|
||||
// CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB2]], i32 4, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, [2 x i32]*, [2 x %struct.S.0]*, %struct.S.0*)* @.omp_outlined. to void (i32*, i32*, ...)*), i32* [[T_VAR]], [2 x i32]* [[VEC]], [2 x %struct.S.0]* [[S_ARR]], %struct.S.0* [[TMP1]])
|
||||
// CHECK2-NEXT: store i32 0, i32* [[RETVAL]], align 4
|
||||
// CHECK2-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S.0], [2 x %struct.S.0]* [[S_ARR]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[STRUCT_S_0]], %struct.S.0* [[ARRAY_BEGIN]], i64 2
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[STRUCT_S_0]], %struct.S.0* [[ARRAY_BEGIN]], i64 2
|
||||
// CHECK2-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
|
||||
// CHECK2: arraydestroy.body:
|
||||
// CHECK2-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi %struct.S.0* [ [[TMP6]], [[ENTRY:%.*]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
|
||||
// CHECK2-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi %struct.S.0* [ [[TMP2]], [[ENTRY:%.*]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
|
||||
// CHECK2-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S_0]], %struct.S.0* [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
|
||||
// CHECK2-NEXT: call void @_ZN1SIiED1Ev(%struct.S.0* nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR2]]
|
||||
// CHECK2-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq %struct.S.0* [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN]]
|
||||
// CHECK2-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE1:%.*]], label [[ARRAYDESTROY_BODY]]
|
||||
// CHECK2: arraydestroy.done1:
|
||||
// CHECK2-NEXT: call void @_ZN1SIiED1Ev(%struct.S.0* nonnull align 4 dereferenceable(4) [[TEST]]) #[[ATTR2]]
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = load i32, i32* [[RETVAL]], align 4
|
||||
// CHECK2-NEXT: ret i32 [[TMP7]]
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = load i32, i32* [[RETVAL]], align 4
|
||||
// CHECK2-NEXT: ret i32 [[TMP3]]
|
||||
//
|
||||
//
|
||||
// CHECK2-LABEL: define {{[^@]+}}@_ZN2StC2Ev
|
||||
|
@ -1124,11 +1107,14 @@ int main() {
|
|||
//
|
||||
//
|
||||
// CHECK2-LABEL: define {{[^@]+}}@.omp_outlined.
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR7:[0-9]+]] {
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[T_VAR:%.*]], [2 x i32]* nonnull align 4 dereferenceable(8) [[VEC:%.*]], [2 x %struct.S.0]* nonnull align 4 dereferenceable(8) [[S_ARR:%.*]], %struct.S.0* nonnull align 4 dereferenceable(4) [[VAR:%.*]]) #[[ATTR7:[0-9]+]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK2-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK2-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK2-NEXT: [[T_VAR_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK2-NEXT: [[VEC_ADDR:%.*]] = alloca [2 x i32]*, align 8
|
||||
// CHECK2-NEXT: [[S_ARR_ADDR:%.*]] = alloca [2 x %struct.S.0]*, align 8
|
||||
// CHECK2-NEXT: [[VAR_ADDR:%.*]] = alloca %struct.S.0*, align 8
|
||||
// CHECK2-NEXT: [[TMP:%.*]] = alloca %struct.S.0*, align 8
|
||||
// CHECK2-NEXT: [[_TMP1:%.*]] = alloca %struct.S.0*, align 8
|
||||
// CHECK2-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
|
||||
|
@ -1137,128 +1123,126 @@ int main() {
|
|||
// CHECK2-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[T_VAR:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[VEC:%.*]] = alloca [2 x i32], align 4
|
||||
// CHECK2-NEXT: [[S_ARR:%.*]] = alloca [2 x %struct.S.0], align 4
|
||||
// CHECK2-NEXT: [[T_VAR3:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[VEC4:%.*]] = alloca [2 x i32], align 4
|
||||
// CHECK2-NEXT: [[S_ARR5:%.*]] = alloca [2 x %struct.S.0], align 4
|
||||
// CHECK2-NEXT: [[AGG_TMP:%.*]] = alloca [[STRUCT_ST:%.*]], align 4
|
||||
// CHECK2-NEXT: [[VAR:%.*]] = alloca [[STRUCT_S_0:%.*]], align 4
|
||||
// CHECK2-NEXT: [[AGG_TMP4:%.*]] = alloca [[STRUCT_ST]], align 4
|
||||
// CHECK2-NEXT: [[_TMP5:%.*]] = alloca %struct.S.0*, align 8
|
||||
// CHECK2-NEXT: [[VAR7:%.*]] = alloca [[STRUCT_S_0:%.*]], align 4
|
||||
// CHECK2-NEXT: [[AGG_TMP8:%.*]] = alloca [[STRUCT_ST]], align 4
|
||||
// CHECK2-NEXT: [[_TMP9:%.*]] = alloca %struct.S.0*, align 8
|
||||
// CHECK2-NEXT: [[I:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 8
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP0]], i32 0, i32 1
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = load [2 x i32]*, [2 x i32]** [[TMP3]], align 8
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP0]], i32 0, i32 2
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = load [2 x %struct.S.0]*, [2 x %struct.S.0]** [[TMP5]], align 8
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP0]], i32 0, i32 3
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = load %struct.S.0*, %struct.S.0** [[TMP7]], align 8
|
||||
// CHECK2-NEXT: store %struct.S.0* [[TMP8]], %struct.S.0** [[TMP]], align 8
|
||||
// CHECK2-NEXT: [[TMP9:%.*]] = load %struct.S.0*, %struct.S.0** [[TMP]], align 8
|
||||
// CHECK2-NEXT: store %struct.S.0* [[TMP9]], %struct.S.0** [[_TMP1]], align 8
|
||||
// CHECK2-NEXT: store i32* [[T_VAR]], i32** [[T_VAR_ADDR]], align 8
|
||||
// CHECK2-NEXT: store [2 x i32]* [[VEC]], [2 x i32]** [[VEC_ADDR]], align 8
|
||||
// CHECK2-NEXT: store [2 x %struct.S.0]* [[S_ARR]], [2 x %struct.S.0]** [[S_ARR_ADDR]], align 8
|
||||
// CHECK2-NEXT: store %struct.S.0* [[VAR]], %struct.S.0** [[VAR_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load i32*, i32** [[T_VAR_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = load [2 x i32]*, [2 x i32]** [[VEC_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load [2 x %struct.S.0]*, [2 x %struct.S.0]** [[S_ARR_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = load %struct.S.0*, %struct.S.0** [[VAR_ADDR]], align 8
|
||||
// CHECK2-NEXT: store %struct.S.0* [[TMP3]], %struct.S.0** [[TMP]], align 8
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = load %struct.S.0*, %struct.S.0** [[TMP]], align 8
|
||||
// CHECK2-NEXT: store %struct.S.0* [[TMP4]], %struct.S.0** [[_TMP1]], align 8
|
||||
// CHECK2-NEXT: store i32 0, i32* [[DOTOMP_LB]], align 4
|
||||
// CHECK2-NEXT: store i32 1, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK2-NEXT: store i32 1, i32* [[DOTOMP_STRIDE]], align 4
|
||||
// CHECK2-NEXT: store i32 0, i32* [[DOTOMP_IS_LAST]], align 4
|
||||
// CHECK2-NEXT: [[TMP10:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK2-NEXT: store i32 [[TMP10]], i32* [[T_VAR]], align 4
|
||||
// CHECK2-NEXT: [[TMP11:%.*]] = bitcast [2 x i32]* [[VEC]] to i8*
|
||||
// CHECK2-NEXT: [[TMP12:%.*]] = bitcast [2 x i32]* [[TMP4]] to i8*
|
||||
// CHECK2-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 [[TMP11]], i8* align 4 [[TMP12]], i64 8, i1 false)
|
||||
// CHECK2-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S.0], [2 x %struct.S.0]* [[S_ARR]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP13:%.*]] = bitcast [2 x %struct.S.0]* [[TMP6]] to %struct.S.0*
|
||||
// CHECK2-NEXT: [[TMP14:%.*]] = getelementptr [[STRUCT_S_0]], %struct.S.0* [[ARRAY_BEGIN]], i64 2
|
||||
// CHECK2-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq %struct.S.0* [[ARRAY_BEGIN]], [[TMP14]]
|
||||
// CHECK2-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE3:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]]
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK2-NEXT: store i32 [[TMP5]], i32* [[T_VAR3]], align 4
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = bitcast [2 x i32]* [[VEC4]] to i8*
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = bitcast [2 x i32]* [[TMP1]] to i8*
|
||||
// CHECK2-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 [[TMP6]], i8* align 4 [[TMP7]], i64 8, i1 false)
|
||||
// CHECK2-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S.0], [2 x %struct.S.0]* [[S_ARR5]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = bitcast [2 x %struct.S.0]* [[TMP2]] to %struct.S.0*
|
||||
// CHECK2-NEXT: [[TMP9:%.*]] = getelementptr [[STRUCT_S_0]], %struct.S.0* [[ARRAY_BEGIN]], i64 2
|
||||
// CHECK2-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq %struct.S.0* [[ARRAY_BEGIN]], [[TMP9]]
|
||||
// CHECK2-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE6:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]]
|
||||
// CHECK2: omp.arraycpy.body:
|
||||
// CHECK2-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi %struct.S.0* [ [[TMP13]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
|
||||
// CHECK2-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi %struct.S.0* [ [[TMP8]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
|
||||
// CHECK2-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi %struct.S.0* [ [[ARRAY_BEGIN]], [[ENTRY]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
|
||||
// CHECK2-NEXT: call void @_ZN2StC1Ev(%struct.St* nonnull align 4 dereferenceable(8) [[AGG_TMP]])
|
||||
// CHECK2-NEXT: call void @_ZN1SIiEC1ERKS0_2St(%struct.S.0* nonnull align 4 dereferenceable(4) [[OMP_ARRAYCPY_DESTELEMENTPAST]], %struct.S.0* nonnull align 4 dereferenceable(4) [[OMP_ARRAYCPY_SRCELEMENTPAST]], %struct.St* [[AGG_TMP]])
|
||||
// CHECK2-NEXT: call void @_ZN2StD1Ev(%struct.St* nonnull align 4 dereferenceable(8) [[AGG_TMP]]) #[[ATTR2]]
|
||||
// CHECK2-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr [[STRUCT_S_0]], %struct.S.0* [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1
|
||||
// CHECK2-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr [[STRUCT_S_0]], %struct.S.0* [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1
|
||||
// CHECK2-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq %struct.S.0* [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP14]]
|
||||
// CHECK2-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYCPY_DONE3]], label [[OMP_ARRAYCPY_BODY]]
|
||||
// CHECK2: omp.arraycpy.done3:
|
||||
// CHECK2-NEXT: [[TMP15:%.*]] = load %struct.S.0*, %struct.S.0** [[_TMP1]], align 8
|
||||
// CHECK2-NEXT: call void @_ZN2StC1Ev(%struct.St* nonnull align 4 dereferenceable(8) [[AGG_TMP4]])
|
||||
// CHECK2-NEXT: call void @_ZN1SIiEC1ERKS0_2St(%struct.S.0* nonnull align 4 dereferenceable(4) [[VAR]], %struct.S.0* nonnull align 4 dereferenceable(4) [[TMP15]], %struct.St* [[AGG_TMP4]])
|
||||
// CHECK2-NEXT: call void @_ZN2StD1Ev(%struct.St* nonnull align 4 dereferenceable(8) [[AGG_TMP4]]) #[[ATTR2]]
|
||||
// CHECK2-NEXT: store %struct.S.0* [[VAR]], %struct.S.0** [[_TMP5]], align 8
|
||||
// CHECK2-NEXT: [[TMP16:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP17:%.*]] = load i32, i32* [[TMP16]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB1]], i32 [[TMP17]], i32 34, i32* [[DOTOMP_IS_LAST]], i32* [[DOTOMP_LB]], i32* [[DOTOMP_UB]], i32* [[DOTOMP_STRIDE]], i32 1, i32 1)
|
||||
// CHECK2-NEXT: [[TMP18:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK2-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP18]], 1
|
||||
// CHECK2-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq %struct.S.0* [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP9]]
|
||||
// CHECK2-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYCPY_DONE6]], label [[OMP_ARRAYCPY_BODY]]
|
||||
// CHECK2: omp.arraycpy.done6:
|
||||
// CHECK2-NEXT: [[TMP10:%.*]] = load %struct.S.0*, %struct.S.0** [[_TMP1]], align 8
|
||||
// CHECK2-NEXT: call void @_ZN2StC1Ev(%struct.St* nonnull align 4 dereferenceable(8) [[AGG_TMP8]])
|
||||
// CHECK2-NEXT: call void @_ZN1SIiEC1ERKS0_2St(%struct.S.0* nonnull align 4 dereferenceable(4) [[VAR7]], %struct.S.0* nonnull align 4 dereferenceable(4) [[TMP10]], %struct.St* [[AGG_TMP8]])
|
||||
// CHECK2-NEXT: call void @_ZN2StD1Ev(%struct.St* nonnull align 4 dereferenceable(8) [[AGG_TMP8]]) #[[ATTR2]]
|
||||
// CHECK2-NEXT: store %struct.S.0* [[VAR7]], %struct.S.0** [[_TMP9]], align 8
|
||||
// CHECK2-NEXT: [[TMP11:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP12:%.*]] = load i32, i32* [[TMP11]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB1]], i32 [[TMP12]], i32 34, i32* [[DOTOMP_IS_LAST]], i32* [[DOTOMP_LB]], i32* [[DOTOMP_UB]], i32* [[DOTOMP_STRIDE]], i32 1, i32 1)
|
||||
// CHECK2-NEXT: [[TMP13:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK2-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP13]], 1
|
||||
// CHECK2-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
|
||||
// CHECK2: cond.true:
|
||||
// CHECK2-NEXT: br label [[COND_END:%.*]]
|
||||
// CHECK2: cond.false:
|
||||
// CHECK2-NEXT: [[TMP19:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK2-NEXT: [[TMP14:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK2-NEXT: br label [[COND_END]]
|
||||
// CHECK2: cond.end:
|
||||
// CHECK2-NEXT: [[COND:%.*]] = phi i32 [ 1, [[COND_TRUE]] ], [ [[TMP19]], [[COND_FALSE]] ]
|
||||
// CHECK2-NEXT: [[COND:%.*]] = phi i32 [ 1, [[COND_TRUE]] ], [ [[TMP14]], [[COND_FALSE]] ]
|
||||
// CHECK2-NEXT: store i32 [[COND]], i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK2-NEXT: [[TMP20:%.*]] = load i32, i32* [[DOTOMP_LB]], align 4
|
||||
// CHECK2-NEXT: store i32 [[TMP20]], i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK2-NEXT: [[TMP15:%.*]] = load i32, i32* [[DOTOMP_LB]], align 4
|
||||
// CHECK2-NEXT: store i32 [[TMP15]], i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK2-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
|
||||
// CHECK2: omp.inner.for.cond:
|
||||
// CHECK2-NEXT: [[TMP21:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK2-NEXT: [[TMP22:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK2-NEXT: [[CMP6:%.*]] = icmp sle i32 [[TMP21]], [[TMP22]]
|
||||
// CHECK2-NEXT: br i1 [[CMP6]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_COND_CLEANUP:%.*]]
|
||||
// CHECK2-NEXT: [[TMP16:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK2-NEXT: [[TMP17:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK2-NEXT: [[CMP10:%.*]] = icmp sle i32 [[TMP16]], [[TMP17]]
|
||||
// CHECK2-NEXT: br i1 [[CMP10]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_COND_CLEANUP:%.*]]
|
||||
// CHECK2: omp.inner.for.cond.cleanup:
|
||||
// CHECK2-NEXT: br label [[OMP_INNER_FOR_END:%.*]]
|
||||
// CHECK2: omp.inner.for.body:
|
||||
// CHECK2-NEXT: [[TMP23:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK2-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP23]], 1
|
||||
// CHECK2-NEXT: [[TMP18:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK2-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP18]], 1
|
||||
// CHECK2-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
|
||||
// CHECK2-NEXT: store i32 [[ADD]], i32* [[I]], align 4
|
||||
// CHECK2-NEXT: [[TMP24:%.*]] = load i32, i32* [[T_VAR]], align 4
|
||||
// CHECK2-NEXT: [[TMP25:%.*]] = load i32, i32* [[I]], align 4
|
||||
// CHECK2-NEXT: [[IDXPROM:%.*]] = sext i32 [[TMP25]] to i64
|
||||
// CHECK2-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [2 x i32], [2 x i32]* [[VEC]], i64 0, i64 [[IDXPROM]]
|
||||
// CHECK2-NEXT: store i32 [[TMP24]], i32* [[ARRAYIDX]], align 4
|
||||
// CHECK2-NEXT: [[TMP26:%.*]] = load %struct.S.0*, %struct.S.0** [[_TMP5]], align 8
|
||||
// CHECK2-NEXT: [[TMP27:%.*]] = load i32, i32* [[I]], align 4
|
||||
// CHECK2-NEXT: [[IDXPROM7:%.*]] = sext i32 [[TMP27]] to i64
|
||||
// CHECK2-NEXT: [[ARRAYIDX8:%.*]] = getelementptr inbounds [2 x %struct.S.0], [2 x %struct.S.0]* [[S_ARR]], i64 0, i64 [[IDXPROM7]]
|
||||
// CHECK2-NEXT: [[TMP28:%.*]] = bitcast %struct.S.0* [[ARRAYIDX8]] to i8*
|
||||
// CHECK2-NEXT: [[TMP29:%.*]] = bitcast %struct.S.0* [[TMP26]] to i8*
|
||||
// CHECK2-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 [[TMP28]], i8* align 4 [[TMP29]], i64 4, i1 false)
|
||||
// CHECK2-NEXT: [[TMP19:%.*]] = load i32, i32* [[T_VAR3]], align 4
|
||||
// CHECK2-NEXT: [[TMP20:%.*]] = load i32, i32* [[I]], align 4
|
||||
// CHECK2-NEXT: [[IDXPROM:%.*]] = sext i32 [[TMP20]] to i64
|
||||
// CHECK2-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [2 x i32], [2 x i32]* [[VEC4]], i64 0, i64 [[IDXPROM]]
|
||||
// CHECK2-NEXT: store i32 [[TMP19]], i32* [[ARRAYIDX]], align 4
|
||||
// CHECK2-NEXT: [[TMP21:%.*]] = load %struct.S.0*, %struct.S.0** [[_TMP9]], align 8
|
||||
// CHECK2-NEXT: [[TMP22:%.*]] = load i32, i32* [[I]], align 4
|
||||
// CHECK2-NEXT: [[IDXPROM11:%.*]] = sext i32 [[TMP22]] to i64
|
||||
// CHECK2-NEXT: [[ARRAYIDX12:%.*]] = getelementptr inbounds [2 x %struct.S.0], [2 x %struct.S.0]* [[S_ARR5]], i64 0, i64 [[IDXPROM11]]
|
||||
// CHECK2-NEXT: [[TMP23:%.*]] = bitcast %struct.S.0* [[ARRAYIDX12]] to i8*
|
||||
// CHECK2-NEXT: [[TMP24:%.*]] = bitcast %struct.S.0* [[TMP21]] to i8*
|
||||
// CHECK2-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 [[TMP23]], i8* align 4 [[TMP24]], i64 4, i1 false)
|
||||
// CHECK2-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
|
||||
// CHECK2: omp.body.continue:
|
||||
// CHECK2-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
|
||||
// CHECK2: omp.inner.for.inc:
|
||||
// CHECK2-NEXT: [[TMP30:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK2-NEXT: [[ADD9:%.*]] = add nsw i32 [[TMP30]], 1
|
||||
// CHECK2-NEXT: store i32 [[ADD9]], i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK2-NEXT: [[TMP25:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK2-NEXT: [[ADD13:%.*]] = add nsw i32 [[TMP25]], 1
|
||||
// CHECK2-NEXT: store i32 [[ADD13]], i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK2-NEXT: br label [[OMP_INNER_FOR_COND]]
|
||||
// CHECK2: omp.inner.for.end:
|
||||
// CHECK2-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
|
||||
// CHECK2: omp.loop.exit:
|
||||
// CHECK2-NEXT: [[TMP31:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP32:%.*]] = load i32, i32* [[TMP31]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB1]], i32 [[TMP32]])
|
||||
// CHECK2-NEXT: call void @_ZN1SIiED1Ev(%struct.S.0* nonnull align 4 dereferenceable(4) [[VAR]]) #[[ATTR2]]
|
||||
// CHECK2-NEXT: [[ARRAY_BEGIN10:%.*]] = getelementptr inbounds [2 x %struct.S.0], [2 x %struct.S.0]* [[S_ARR]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP33:%.*]] = getelementptr inbounds [[STRUCT_S_0]], %struct.S.0* [[ARRAY_BEGIN10]], i64 2
|
||||
// CHECK2-NEXT: [[TMP26:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP27:%.*]] = load i32, i32* [[TMP26]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB1]], i32 [[TMP27]])
|
||||
// CHECK2-NEXT: call void @_ZN1SIiED1Ev(%struct.S.0* nonnull align 4 dereferenceable(4) [[VAR7]]) #[[ATTR2]]
|
||||
// CHECK2-NEXT: [[ARRAY_BEGIN14:%.*]] = getelementptr inbounds [2 x %struct.S.0], [2 x %struct.S.0]* [[S_ARR5]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP28:%.*]] = getelementptr inbounds [[STRUCT_S_0]], %struct.S.0* [[ARRAY_BEGIN14]], i64 2
|
||||
// CHECK2-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
|
||||
// CHECK2: arraydestroy.body:
|
||||
// CHECK2-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi %struct.S.0* [ [[TMP33]], [[OMP_LOOP_EXIT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
|
||||
// CHECK2-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi %struct.S.0* [ [[TMP28]], [[OMP_LOOP_EXIT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
|
||||
// CHECK2-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S_0]], %struct.S.0* [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
|
||||
// CHECK2-NEXT: call void @_ZN1SIiED1Ev(%struct.S.0* nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR2]]
|
||||
// CHECK2-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq %struct.S.0* [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN10]]
|
||||
// CHECK2-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE11:%.*]], label [[ARRAYDESTROY_BODY]]
|
||||
// CHECK2: arraydestroy.done11:
|
||||
// CHECK2-NEXT: [[TMP34:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP35:%.*]] = load i32, i32* [[TMP34]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB3]], i32 [[TMP35]])
|
||||
// CHECK2-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq %struct.S.0* [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN14]]
|
||||
// CHECK2-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE15:%.*]], label [[ARRAYDESTROY_BODY]]
|
||||
// CHECK2: arraydestroy.done15:
|
||||
// CHECK2-NEXT: [[TMP29:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP30:%.*]] = load i32, i32* [[TMP29]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB3]], i32 [[TMP30]])
|
||||
// CHECK2-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -1476,11 +1460,11 @@ int main() {
|
|||
//
|
||||
//
|
||||
// CHECK3-LABEL: define {{[^@]+}}@.omp_outlined.
|
||||
// CHECK3-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR5:[0-9]+]] {
|
||||
// CHECK3-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[SIVAR:%.*]]) #[[ATTR5:[0-9]+]] {
|
||||
// CHECK3-NEXT: entry:
|
||||
// CHECK3-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK3-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK3-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK3-NEXT: [[SIVAR_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK3-NEXT: [[TMP:%.*]] = alloca i32*, align 8
|
||||
// CHECK3-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
|
||||
// CHECK3-NEXT: [[_TMP1:%.*]] = alloca i32, align 4
|
||||
|
@ -1491,80 +1475,78 @@ int main() {
|
|||
// CHECK3-NEXT: [[G:%.*]] = alloca i32, align 4
|
||||
// CHECK3-NEXT: [[G1:%.*]] = alloca i32, align 4
|
||||
// CHECK3-NEXT: [[_TMP2:%.*]] = alloca i32*, align 8
|
||||
// CHECK3-NEXT: [[SIVAR:%.*]] = alloca i32, align 4
|
||||
// CHECK3-NEXT: [[SIVAR3:%.*]] = alloca i32, align 4
|
||||
// CHECK3-NEXT: [[I:%.*]] = alloca i32, align 4
|
||||
// CHECK3-NEXT: [[REF_TMP:%.*]] = alloca [[CLASS_ANON_0:%.*]], align 8
|
||||
// CHECK3-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK3-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK3-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK3-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 8
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = load i32*, i32** @g1, align 8
|
||||
// CHECK3-NEXT: store i32* [[TMP3]], i32** [[TMP]], align 8
|
||||
// CHECK3-NEXT: store i32* [[SIVAR]], i32** [[SIVAR_ADDR]], align 8
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = load i32*, i32** [[SIVAR_ADDR]], align 8
|
||||
// CHECK3-NEXT: [[TMP1:%.*]] = load i32*, i32** @g1, align 8
|
||||
// CHECK3-NEXT: store i32* [[TMP1]], i32** [[TMP]], align 8
|
||||
// CHECK3-NEXT: store i32 0, i32* [[DOTOMP_LB]], align 4
|
||||
// CHECK3-NEXT: store i32 1, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK3-NEXT: store i32 1, i32* [[DOTOMP_STRIDE]], align 4
|
||||
// CHECK3-NEXT: store i32 0, i32* [[DOTOMP_IS_LAST]], align 4
|
||||
// CHECK3-NEXT: [[TMP4:%.*]] = load volatile i32, i32* @g, align 4
|
||||
// CHECK3-NEXT: store i32 [[TMP4]], i32* [[G]], align 4
|
||||
// CHECK3-NEXT: [[TMP5:%.*]] = load volatile i32, i32* @g, align 4
|
||||
// CHECK3-NEXT: store i32 [[TMP5]], i32* [[G1]], align 4
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = load volatile i32, i32* @g, align 4
|
||||
// CHECK3-NEXT: store i32 [[TMP2]], i32* [[G]], align 4
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = load volatile i32, i32* @g, align 4
|
||||
// CHECK3-NEXT: store i32 [[TMP3]], i32* [[G1]], align 4
|
||||
// CHECK3-NEXT: store i32* [[G1]], i32** [[_TMP2]], align 8
|
||||
// CHECK3-NEXT: [[TMP6:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK3-NEXT: store i32 [[TMP6]], i32* [[SIVAR]], align 4
|
||||
// CHECK3-NEXT: [[TMP7:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK3-NEXT: [[TMP8:%.*]] = load i32, i32* [[TMP7]], align 4
|
||||
// CHECK3-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 [[TMP8]], i32 34, i32* [[DOTOMP_IS_LAST]], i32* [[DOTOMP_LB]], i32* [[DOTOMP_UB]], i32* [[DOTOMP_STRIDE]], i32 1, i32 1)
|
||||
// CHECK3-NEXT: [[TMP9:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK3-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP9]], 1
|
||||
// CHECK3-NEXT: [[TMP4:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK3-NEXT: store i32 [[TMP4]], i32* [[SIVAR3]], align 4
|
||||
// CHECK3-NEXT: [[TMP5:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK3-NEXT: [[TMP6:%.*]] = load i32, i32* [[TMP5]], align 4
|
||||
// CHECK3-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 [[TMP6]], i32 34, i32* [[DOTOMP_IS_LAST]], i32* [[DOTOMP_LB]], i32* [[DOTOMP_UB]], i32* [[DOTOMP_STRIDE]], i32 1, i32 1)
|
||||
// CHECK3-NEXT: [[TMP7:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK3-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP7]], 1
|
||||
// CHECK3-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
|
||||
// CHECK3: cond.true:
|
||||
// CHECK3-NEXT: br label [[COND_END:%.*]]
|
||||
// CHECK3: cond.false:
|
||||
// CHECK3-NEXT: [[TMP10:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK3-NEXT: [[TMP8:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK3-NEXT: br label [[COND_END]]
|
||||
// CHECK3: cond.end:
|
||||
// CHECK3-NEXT: [[COND:%.*]] = phi i32 [ 1, [[COND_TRUE]] ], [ [[TMP10]], [[COND_FALSE]] ]
|
||||
// CHECK3-NEXT: [[COND:%.*]] = phi i32 [ 1, [[COND_TRUE]] ], [ [[TMP8]], [[COND_FALSE]] ]
|
||||
// CHECK3-NEXT: store i32 [[COND]], i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK3-NEXT: [[TMP11:%.*]] = load i32, i32* [[DOTOMP_LB]], align 4
|
||||
// CHECK3-NEXT: store i32 [[TMP11]], i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK3-NEXT: [[TMP9:%.*]] = load i32, i32* [[DOTOMP_LB]], align 4
|
||||
// CHECK3-NEXT: store i32 [[TMP9]], i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK3-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
|
||||
// CHECK3: omp.inner.for.cond:
|
||||
// CHECK3-NEXT: [[TMP12:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK3-NEXT: [[TMP13:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK3-NEXT: [[CMP3:%.*]] = icmp sle i32 [[TMP12]], [[TMP13]]
|
||||
// CHECK3-NEXT: br i1 [[CMP3]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
|
||||
// CHECK3-NEXT: [[TMP10:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK3-NEXT: [[TMP11:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK3-NEXT: [[CMP4:%.*]] = icmp sle i32 [[TMP10]], [[TMP11]]
|
||||
// CHECK3-NEXT: br i1 [[CMP4]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
|
||||
// CHECK3: omp.inner.for.body:
|
||||
// CHECK3-NEXT: [[TMP14:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK3-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP14]], 1
|
||||
// CHECK3-NEXT: [[TMP12:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK3-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP12]], 1
|
||||
// CHECK3-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
|
||||
// CHECK3-NEXT: store i32 [[ADD]], i32* [[I]], align 4
|
||||
// CHECK3-NEXT: store i32 1, i32* [[G]], align 4
|
||||
// CHECK3-NEXT: [[TMP15:%.*]] = load i32*, i32** [[_TMP2]], align 8
|
||||
// CHECK3-NEXT: store volatile i32 2, i32* [[TMP15]], align 4
|
||||
// CHECK3-NEXT: store i32 3, i32* [[SIVAR]], align 4
|
||||
// CHECK3-NEXT: [[TMP16:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], %class.anon.0* [[REF_TMP]], i32 0, i32 0
|
||||
// CHECK3-NEXT: store i32* [[G]], i32** [[TMP16]], align 8
|
||||
// CHECK3-NEXT: [[TMP17:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], %class.anon.0* [[REF_TMP]], i32 0, i32 1
|
||||
// CHECK3-NEXT: [[TMP18:%.*]] = load i32*, i32** [[_TMP2]], align 8
|
||||
// CHECK3-NEXT: store i32* [[TMP18]], i32** [[TMP17]], align 8
|
||||
// CHECK3-NEXT: [[TMP19:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], %class.anon.0* [[REF_TMP]], i32 0, i32 2
|
||||
// CHECK3-NEXT: store i32* [[SIVAR]], i32** [[TMP19]], align 8
|
||||
// CHECK3-NEXT: [[TMP13:%.*]] = load i32*, i32** [[_TMP2]], align 8
|
||||
// CHECK3-NEXT: store volatile i32 2, i32* [[TMP13]], align 4
|
||||
// CHECK3-NEXT: store i32 3, i32* [[SIVAR3]], align 4
|
||||
// CHECK3-NEXT: [[TMP14:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], %class.anon.0* [[REF_TMP]], i32 0, i32 0
|
||||
// CHECK3-NEXT: store i32* [[G]], i32** [[TMP14]], align 8
|
||||
// CHECK3-NEXT: [[TMP15:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], %class.anon.0* [[REF_TMP]], i32 0, i32 1
|
||||
// CHECK3-NEXT: [[TMP16:%.*]] = load i32*, i32** [[_TMP2]], align 8
|
||||
// CHECK3-NEXT: store i32* [[TMP16]], i32** [[TMP15]], align 8
|
||||
// CHECK3-NEXT: [[TMP17:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], %class.anon.0* [[REF_TMP]], i32 0, i32 2
|
||||
// CHECK3-NEXT: store i32* [[SIVAR3]], i32** [[TMP17]], align 8
|
||||
// CHECK3-NEXT: call void @"_ZZZ4mainENK3$_0clEvENKUlvE_clEv"(%class.anon.0* nonnull align 8 dereferenceable(24) [[REF_TMP]])
|
||||
// CHECK3-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
|
||||
// CHECK3: omp.body.continue:
|
||||
// CHECK3-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
|
||||
// CHECK3: omp.inner.for.inc:
|
||||
// CHECK3-NEXT: [[TMP20:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK3-NEXT: [[ADD4:%.*]] = add nsw i32 [[TMP20]], 1
|
||||
// CHECK3-NEXT: store i32 [[ADD4]], i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK3-NEXT: [[TMP18:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK3-NEXT: [[ADD5:%.*]] = add nsw i32 [[TMP18]], 1
|
||||
// CHECK3-NEXT: store i32 [[ADD5]], i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK3-NEXT: br label [[OMP_INNER_FOR_COND]]
|
||||
// CHECK3: omp.inner.for.end:
|
||||
// CHECK3-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
|
||||
// CHECK3: omp.loop.exit:
|
||||
// CHECK3-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB1]], i32 [[TMP8]])
|
||||
// CHECK3-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 [[TMP8]])
|
||||
// CHECK3-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB1]], i32 [[TMP6]])
|
||||
// CHECK3-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 [[TMP6]])
|
||||
// CHECK3-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -1724,22 +1706,19 @@ int main() {
|
|||
// CHECK4-NEXT: entry:
|
||||
// CHECK4-NEXT: [[DOTBLOCK_DESCRIPTOR_ADDR:%.*]] = alloca i8*, align 8
|
||||
// CHECK4-NEXT: [[BLOCK_ADDR:%.*]] = alloca <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i32 }>*, align 8
|
||||
// CHECK4-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 8
|
||||
// CHECK4-NEXT: store i8* [[DOTBLOCK_DESCRIPTOR]], i8** [[DOTBLOCK_DESCRIPTOR_ADDR]], align 8
|
||||
// CHECK4-NEXT: [[BLOCK:%.*]] = bitcast i8* [[DOTBLOCK_DESCRIPTOR]] to <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i32 }>*
|
||||
// CHECK4-NEXT: store <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i32 }>* [[BLOCK]], <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i32 }>** [[BLOCK_ADDR]], align 8
|
||||
// CHECK4-NEXT: [[TMP0:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK4-NEXT: store i32* @_ZZ4mainE5sivar, i32** [[TMP0]], align 8
|
||||
// CHECK4-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB3:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon*)* @.omp_outlined. to void (i32*, i32*, ...)*), %struct.anon* [[OMP_OUTLINED_ARG_AGG_]])
|
||||
// CHECK4-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB3:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @.omp_outlined. to void (i32*, i32*, ...)*), i32* @_ZZ4mainE5sivar)
|
||||
// CHECK4-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK4-LABEL: define {{[^@]+}}@.omp_outlined.
|
||||
// CHECK4-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR4:[0-9]+]] {
|
||||
// CHECK4-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[SIVAR:%.*]]) #[[ATTR4:[0-9]+]] {
|
||||
// CHECK4-NEXT: entry:
|
||||
// CHECK4-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK4-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK4-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK4-NEXT: [[SIVAR_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK4-NEXT: [[TMP:%.*]] = alloca i32*, align 8
|
||||
// CHECK4-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
|
||||
// CHECK4-NEXT: [[_TMP1:%.*]] = alloca i32, align 4
|
||||
|
@ -1750,59 +1729,57 @@ int main() {
|
|||
// CHECK4-NEXT: [[G:%.*]] = alloca i32, align 4
|
||||
// CHECK4-NEXT: [[G1:%.*]] = alloca i32, align 4
|
||||
// CHECK4-NEXT: [[_TMP2:%.*]] = alloca i32*, align 8
|
||||
// CHECK4-NEXT: [[SIVAR:%.*]] = alloca i32, align 4
|
||||
// CHECK4-NEXT: [[SIVAR3:%.*]] = alloca i32, align 4
|
||||
// CHECK4-NEXT: [[I:%.*]] = alloca i32, align 4
|
||||
// CHECK4-NEXT: [[BLOCK:%.*]] = alloca <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i32*, i32, i32 }>, align 8
|
||||
// CHECK4-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK4-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK4-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK4-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK4-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK4-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 8
|
||||
// CHECK4-NEXT: [[TMP3:%.*]] = load i32*, i32** @g1, align 8
|
||||
// CHECK4-NEXT: store i32* [[TMP3]], i32** [[TMP]], align 8
|
||||
// CHECK4-NEXT: store i32* [[SIVAR]], i32** [[SIVAR_ADDR]], align 8
|
||||
// CHECK4-NEXT: [[TMP0:%.*]] = load i32*, i32** [[SIVAR_ADDR]], align 8
|
||||
// CHECK4-NEXT: [[TMP1:%.*]] = load i32*, i32** @g1, align 8
|
||||
// CHECK4-NEXT: store i32* [[TMP1]], i32** [[TMP]], align 8
|
||||
// CHECK4-NEXT: store i32 0, i32* [[DOTOMP_LB]], align 4
|
||||
// CHECK4-NEXT: store i32 1, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK4-NEXT: store i32 1, i32* [[DOTOMP_STRIDE]], align 4
|
||||
// CHECK4-NEXT: store i32 0, i32* [[DOTOMP_IS_LAST]], align 4
|
||||
// CHECK4-NEXT: [[TMP4:%.*]] = load volatile i32, i32* @g, align 4
|
||||
// CHECK4-NEXT: store i32 [[TMP4]], i32* [[G]], align 4
|
||||
// CHECK4-NEXT: [[TMP5:%.*]] = load volatile i32, i32* @g, align 4
|
||||
// CHECK4-NEXT: store i32 [[TMP5]], i32* [[G1]], align 4
|
||||
// CHECK4-NEXT: [[TMP2:%.*]] = load volatile i32, i32* @g, align 4
|
||||
// CHECK4-NEXT: store i32 [[TMP2]], i32* [[G]], align 4
|
||||
// CHECK4-NEXT: [[TMP3:%.*]] = load volatile i32, i32* @g, align 4
|
||||
// CHECK4-NEXT: store i32 [[TMP3]], i32* [[G1]], align 4
|
||||
// CHECK4-NEXT: store i32* [[G1]], i32** [[_TMP2]], align 8
|
||||
// CHECK4-NEXT: [[TMP6:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK4-NEXT: store i32 [[TMP6]], i32* [[SIVAR]], align 4
|
||||
// CHECK4-NEXT: [[TMP7:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK4-NEXT: [[TMP8:%.*]] = load i32, i32* [[TMP7]], align 4
|
||||
// CHECK4-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 [[TMP8]], i32 34, i32* [[DOTOMP_IS_LAST]], i32* [[DOTOMP_LB]], i32* [[DOTOMP_UB]], i32* [[DOTOMP_STRIDE]], i32 1, i32 1)
|
||||
// CHECK4-NEXT: [[TMP9:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK4-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP9]], 1
|
||||
// CHECK4-NEXT: [[TMP4:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK4-NEXT: store i32 [[TMP4]], i32* [[SIVAR3]], align 4
|
||||
// CHECK4-NEXT: [[TMP5:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK4-NEXT: [[TMP6:%.*]] = load i32, i32* [[TMP5]], align 4
|
||||
// CHECK4-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 [[TMP6]], i32 34, i32* [[DOTOMP_IS_LAST]], i32* [[DOTOMP_LB]], i32* [[DOTOMP_UB]], i32* [[DOTOMP_STRIDE]], i32 1, i32 1)
|
||||
// CHECK4-NEXT: [[TMP7:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK4-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP7]], 1
|
||||
// CHECK4-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
|
||||
// CHECK4: cond.true:
|
||||
// CHECK4-NEXT: br label [[COND_END:%.*]]
|
||||
// CHECK4: cond.false:
|
||||
// CHECK4-NEXT: [[TMP10:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK4-NEXT: [[TMP8:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK4-NEXT: br label [[COND_END]]
|
||||
// CHECK4: cond.end:
|
||||
// CHECK4-NEXT: [[COND:%.*]] = phi i32 [ 1, [[COND_TRUE]] ], [ [[TMP10]], [[COND_FALSE]] ]
|
||||
// CHECK4-NEXT: [[COND:%.*]] = phi i32 [ 1, [[COND_TRUE]] ], [ [[TMP8]], [[COND_FALSE]] ]
|
||||
// CHECK4-NEXT: store i32 [[COND]], i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK4-NEXT: [[TMP11:%.*]] = load i32, i32* [[DOTOMP_LB]], align 4
|
||||
// CHECK4-NEXT: store i32 [[TMP11]], i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK4-NEXT: [[TMP9:%.*]] = load i32, i32* [[DOTOMP_LB]], align 4
|
||||
// CHECK4-NEXT: store i32 [[TMP9]], i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK4-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
|
||||
// CHECK4: omp.inner.for.cond:
|
||||
// CHECK4-NEXT: [[TMP12:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK4-NEXT: [[TMP13:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK4-NEXT: [[CMP3:%.*]] = icmp sle i32 [[TMP12]], [[TMP13]]
|
||||
// CHECK4-NEXT: br i1 [[CMP3]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
|
||||
// CHECK4-NEXT: [[TMP10:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK4-NEXT: [[TMP11:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK4-NEXT: [[CMP4:%.*]] = icmp sle i32 [[TMP10]], [[TMP11]]
|
||||
// CHECK4-NEXT: br i1 [[CMP4]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
|
||||
// CHECK4: omp.inner.for.body:
|
||||
// CHECK4-NEXT: [[TMP14:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK4-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP14]], 1
|
||||
// CHECK4-NEXT: [[TMP12:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK4-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP12]], 1
|
||||
// CHECK4-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
|
||||
// CHECK4-NEXT: store i32 [[ADD]], i32* [[I]], align 4
|
||||
// CHECK4-NEXT: store i32 1, i32* [[G]], align 4
|
||||
// CHECK4-NEXT: [[TMP15:%.*]] = load i32*, i32** [[_TMP2]], align 8
|
||||
// CHECK4-NEXT: store volatile i32 1, i32* [[TMP15]], align 4
|
||||
// CHECK4-NEXT: store i32 2, i32* [[SIVAR]], align 4
|
||||
// CHECK4-NEXT: [[TMP13:%.*]] = load i32*, i32** [[_TMP2]], align 8
|
||||
// CHECK4-NEXT: store volatile i32 1, i32* [[TMP13]], align 4
|
||||
// CHECK4-NEXT: store i32 2, i32* [[SIVAR3]], align 4
|
||||
// CHECK4-NEXT: [[BLOCK_ISA:%.*]] = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i32*, i32, i32 }>, <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i32*, i32, i32 }>* [[BLOCK]], i32 0, i32 0
|
||||
// CHECK4-NEXT: store i8* bitcast (i8** @_NSConcreteStackBlock to i8*), i8** [[BLOCK_ISA]], align 8
|
||||
// CHECK4-NEXT: [[BLOCK_FLAGS:%.*]] = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i32*, i32, i32 }>, <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i32*, i32, i32 }>* [[BLOCK]], i32 0, i32 1
|
||||
|
@ -1814,34 +1791,34 @@ int main() {
|
|||
// CHECK4-NEXT: [[BLOCK_DESCRIPTOR:%.*]] = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i32*, i32, i32 }>, <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i32*, i32, i32 }>* [[BLOCK]], i32 0, i32 4
|
||||
// CHECK4-NEXT: store %struct.__block_descriptor* bitcast ({ i64, i64, i8*, i8* }* @__block_descriptor_tmp to %struct.__block_descriptor*), %struct.__block_descriptor** [[BLOCK_DESCRIPTOR]], align 8
|
||||
// CHECK4-NEXT: [[BLOCK_CAPTURED:%.*]] = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i32*, i32, i32 }>, <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i32*, i32, i32 }>* [[BLOCK]], i32 0, i32 6
|
||||
// CHECK4-NEXT: [[TMP16:%.*]] = load volatile i32, i32* [[G]], align 4
|
||||
// CHECK4-NEXT: store volatile i32 [[TMP16]], i32* [[BLOCK_CAPTURED]], align 8
|
||||
// CHECK4-NEXT: [[BLOCK_CAPTURED4:%.*]] = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i32*, i32, i32 }>, <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i32*, i32, i32 }>* [[BLOCK]], i32 0, i32 5
|
||||
// CHECK4-NEXT: [[TMP17:%.*]] = load i32*, i32** [[_TMP2]], align 8
|
||||
// CHECK4-NEXT: store i32* [[TMP17]], i32** [[BLOCK_CAPTURED4]], align 8
|
||||
// CHECK4-NEXT: [[BLOCK_CAPTURED5:%.*]] = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i32*, i32, i32 }>, <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i32*, i32, i32 }>* [[BLOCK]], i32 0, i32 7
|
||||
// CHECK4-NEXT: [[TMP18:%.*]] = load i32, i32* [[SIVAR]], align 4
|
||||
// CHECK4-NEXT: store i32 [[TMP18]], i32* [[BLOCK_CAPTURED5]], align 4
|
||||
// CHECK4-NEXT: [[TMP19:%.*]] = bitcast <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i32*, i32, i32 }>* [[BLOCK]] to void ()*
|
||||
// CHECK4-NEXT: [[BLOCK_LITERAL:%.*]] = bitcast void ()* [[TMP19]] to %struct.__block_literal_generic*
|
||||
// CHECK4-NEXT: [[TMP20:%.*]] = getelementptr inbounds [[STRUCT___BLOCK_LITERAL_GENERIC:%.*]], %struct.__block_literal_generic* [[BLOCK_LITERAL]], i32 0, i32 3
|
||||
// CHECK4-NEXT: [[TMP21:%.*]] = bitcast %struct.__block_literal_generic* [[BLOCK_LITERAL]] to i8*
|
||||
// CHECK4-NEXT: [[TMP22:%.*]] = load i8*, i8** [[TMP20]], align 8
|
||||
// CHECK4-NEXT: [[TMP23:%.*]] = bitcast i8* [[TMP22]] to void (i8*)*
|
||||
// CHECK4-NEXT: call void [[TMP23]](i8* [[TMP21]])
|
||||
// CHECK4-NEXT: [[TMP14:%.*]] = load volatile i32, i32* [[G]], align 4
|
||||
// CHECK4-NEXT: store volatile i32 [[TMP14]], i32* [[BLOCK_CAPTURED]], align 8
|
||||
// CHECK4-NEXT: [[BLOCK_CAPTURED5:%.*]] = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i32*, i32, i32 }>, <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i32*, i32, i32 }>* [[BLOCK]], i32 0, i32 5
|
||||
// CHECK4-NEXT: [[TMP15:%.*]] = load i32*, i32** [[_TMP2]], align 8
|
||||
// CHECK4-NEXT: store i32* [[TMP15]], i32** [[BLOCK_CAPTURED5]], align 8
|
||||
// CHECK4-NEXT: [[BLOCK_CAPTURED6:%.*]] = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i32*, i32, i32 }>, <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i32*, i32, i32 }>* [[BLOCK]], i32 0, i32 7
|
||||
// CHECK4-NEXT: [[TMP16:%.*]] = load i32, i32* [[SIVAR3]], align 4
|
||||
// CHECK4-NEXT: store i32 [[TMP16]], i32* [[BLOCK_CAPTURED6]], align 4
|
||||
// CHECK4-NEXT: [[TMP17:%.*]] = bitcast <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i32*, i32, i32 }>* [[BLOCK]] to void ()*
|
||||
// CHECK4-NEXT: [[BLOCK_LITERAL:%.*]] = bitcast void ()* [[TMP17]] to %struct.__block_literal_generic*
|
||||
// CHECK4-NEXT: [[TMP18:%.*]] = getelementptr inbounds [[STRUCT___BLOCK_LITERAL_GENERIC:%.*]], %struct.__block_literal_generic* [[BLOCK_LITERAL]], i32 0, i32 3
|
||||
// CHECK4-NEXT: [[TMP19:%.*]] = bitcast %struct.__block_literal_generic* [[BLOCK_LITERAL]] to i8*
|
||||
// CHECK4-NEXT: [[TMP20:%.*]] = load i8*, i8** [[TMP18]], align 8
|
||||
// CHECK4-NEXT: [[TMP21:%.*]] = bitcast i8* [[TMP20]] to void (i8*)*
|
||||
// CHECK4-NEXT: call void [[TMP21]](i8* [[TMP19]])
|
||||
// CHECK4-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
|
||||
// CHECK4: omp.body.continue:
|
||||
// CHECK4-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
|
||||
// CHECK4: omp.inner.for.inc:
|
||||
// CHECK4-NEXT: [[TMP24:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK4-NEXT: [[ADD6:%.*]] = add nsw i32 [[TMP24]], 1
|
||||
// CHECK4-NEXT: store i32 [[ADD6]], i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK4-NEXT: [[TMP22:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK4-NEXT: [[ADD7:%.*]] = add nsw i32 [[TMP22]], 1
|
||||
// CHECK4-NEXT: store i32 [[ADD7]], i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK4-NEXT: br label [[OMP_INNER_FOR_COND]]
|
||||
// CHECK4: omp.inner.for.end:
|
||||
// CHECK4-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
|
||||
// CHECK4: omp.loop.exit:
|
||||
// CHECK4-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB1]], i32 [[TMP8]])
|
||||
// CHECK4-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 [[TMP8]])
|
||||
// CHECK4-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB1]], i32 [[TMP6]])
|
||||
// CHECK4-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 [[TMP6]])
|
||||
// CHECK4-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -1871,3 +1848,4 @@ int main() {
|
|||
// CHECK4-NEXT: call void @__cxx_global_var_init.2()
|
||||
// CHECK4-NEXT: ret void
|
||||
//
|
||||
//
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -55,7 +55,6 @@ int main(int argc, char **argv) {
|
|||
// CHECK1-NEXT: [[DOTTASK_RED_:%.*]] = alloca i8*, align 8
|
||||
// CHECK1-NEXT: [[DOTRD_INPUT_3:%.*]] = alloca [2 x %struct.kmp_taskred_input_t.0], align 8
|
||||
// CHECK1-NEXT: [[DOTTASK_RED_6:%.*]] = alloca i8*, align 8
|
||||
// CHECK1-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1:[0-9]+]])
|
||||
// CHECK1-NEXT: store i32 0, i32* [[RETVAL]], align 4
|
||||
// CHECK1-NEXT: store i32 [[ARGC]], i32* [[ARGC_ADDR]], align 4
|
||||
|
@ -175,34 +174,24 @@ int main(int argc, char **argv) {
|
|||
// CHECK1-NEXT: [[TMP57:%.*]] = bitcast [2 x %struct.kmp_taskred_input_t.0]* [[DOTRD_INPUT_3]] to i8*
|
||||
// CHECK1-NEXT: [[TMP58:%.*]] = call i8* @__kmpc_taskred_init(i32 [[TMP0]], i32 2, i8* [[TMP57]])
|
||||
// CHECK1-NEXT: store i8* [[TMP58]], i8** [[DOTTASK_RED_6]], align 8
|
||||
// CHECK1-NEXT: [[TMP59:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK1-NEXT: store i32* [[A]], i32** [[TMP59]], align 8
|
||||
// CHECK1-NEXT: [[TMP60:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 1
|
||||
// CHECK1-NEXT: store i64 [[TMP2]], i64* [[TMP60]], align 8
|
||||
// CHECK1-NEXT: [[TMP61:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 2
|
||||
// CHECK1-NEXT: store i16* [[VLA]], i16** [[TMP61]], align 8
|
||||
// CHECK1-NEXT: [[TMP62:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 3
|
||||
// CHECK1-NEXT: store i8** [[DOTTASK_RED_]], i8*** [[TMP62]], align 8
|
||||
// CHECK1-NEXT: [[TMP63:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 4
|
||||
// CHECK1-NEXT: store i8** [[DOTTASK_RED_6]], i8*** [[TMP63]], align 8
|
||||
// CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon*)* @.omp_outlined. to void (i32*, i32*, ...)*), %struct.anon* [[OMP_OUTLINED_ARG_AGG_]])
|
||||
// CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 5, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i64, i16*, i8**, i8**)* @.omp_outlined. to void (i32*, i32*, ...)*), i32* [[A]], i64 [[TMP2]], i16* [[VLA]], i8** [[DOTTASK_RED_]], i8** [[DOTTASK_RED_6]])
|
||||
// CHECK1-NEXT: call void @__kmpc_end_taskgroup(%struct.ident_t* @[[GLOB1]], i32 [[TMP0]])
|
||||
// CHECK1-NEXT: call void @__kmpc_end_taskgroup(%struct.ident_t* @[[GLOB1]], i32 [[TMP0]])
|
||||
// CHECK1-NEXT: store i32 0, i32* [[RETVAL]], align 4
|
||||
// CHECK1-NEXT: [[TMP64:%.*]] = load i8*, i8** [[SAVED_STACK]], align 8
|
||||
// CHECK1-NEXT: call void @llvm.stackrestore(i8* [[TMP64]])
|
||||
// CHECK1-NEXT: [[TMP59:%.*]] = load i8*, i8** [[SAVED_STACK]], align 8
|
||||
// CHECK1-NEXT: call void @llvm.stackrestore(i8* [[TMP59]])
|
||||
// CHECK1-NEXT: [[ARRAY_BEGIN7:%.*]] = getelementptr inbounds [5 x %struct.S], [5 x %struct.S]* [[C]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP65:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[ARRAY_BEGIN7]], i64 5
|
||||
// CHECK1-NEXT: [[TMP60:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[ARRAY_BEGIN7]], i64 5
|
||||
// CHECK1-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
|
||||
// CHECK1: arraydestroy.body:
|
||||
// CHECK1-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi %struct.S* [ [[TMP65]], [[ARRAYCTOR_CONT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
|
||||
// CHECK1-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi %struct.S* [ [[TMP60]], [[ARRAYCTOR_CONT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
|
||||
// CHECK1-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
|
||||
// CHECK1-NEXT: call void @_ZN1SD1Ev(%struct.S* nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR3:[0-9]+]]
|
||||
// CHECK1-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq %struct.S* [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN7]]
|
||||
// CHECK1-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE8:%.*]], label [[ARRAYDESTROY_BODY]]
|
||||
// CHECK1: arraydestroy.done8:
|
||||
// CHECK1-NEXT: [[TMP66:%.*]] = load i32, i32* [[RETVAL]], align 4
|
||||
// CHECK1-NEXT: ret i32 [[TMP66]]
|
||||
// CHECK1-NEXT: [[TMP61:%.*]] = load i32, i32* [[RETVAL]], align 4
|
||||
// CHECK1-NEXT: ret i32 [[TMP61]]
|
||||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@_ZN1SC1Ev
|
||||
|
@ -479,71 +468,73 @@ int main(int argc, char **argv) {
|
|||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@.omp_outlined.
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR8:[0-9]+]] {
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[A:%.*]], i64 [[VLA:%.*]], i16* nonnull align 2 dereferenceable(2) [[D:%.*]], i8** nonnull align 8 dereferenceable(8) [[DOTTASK_RED_:%.*]], i8** nonnull align 8 dereferenceable(8) [[DOTTASK_RED_1:%.*]]) #[[ATTR8:[0-9]+]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK1-NEXT: [[AGG_CAPTURED:%.*]] = alloca [[STRUCT_ANON_1:%.*]], align 8
|
||||
// CHECK1-NEXT: [[A_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[VLA_ADDR:%.*]] = alloca i64, align 8
|
||||
// CHECK1-NEXT: [[D_ADDR:%.*]] = alloca i16*, align 8
|
||||
// CHECK1-NEXT: [[DOTTASK_RED__ADDR:%.*]] = alloca i8**, align 8
|
||||
// CHECK1-NEXT: [[DOTTASK_RED__ADDR2:%.*]] = alloca i8**, align 8
|
||||
// CHECK1-NEXT: [[AGG_CAPTURED:%.*]] = alloca [[STRUCT_ANON:%.*]], align 8
|
||||
// CHECK1-NEXT: [[TMP:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 8
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP0]], i32 0, i32 1
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = load i64, i64* [[TMP3]], align 8
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP0]], i32 0, i32 2
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = load i16*, i16** [[TMP5]], align 8
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP0]], i32 0, i32 3
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = load i8**, i8*** [[TMP7]], align 8
|
||||
// CHECK1-NEXT: [[TMP9:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP0]], i32 0, i32 4
|
||||
// CHECK1-NEXT: [[TMP10:%.*]] = load i8**, i8*** [[TMP9]], align 8
|
||||
// CHECK1-NEXT: [[TMP11:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP12:%.*]] = load i32, i32* [[TMP11]], align 4
|
||||
// CHECK1-NEXT: [[TMP13:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP12]])
|
||||
// CHECK1-NEXT: [[TMP14:%.*]] = icmp ne i32 [[TMP13]], 0
|
||||
// CHECK1-NEXT: br i1 [[TMP14]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
|
||||
// CHECK1-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 8
|
||||
// CHECK1-NEXT: store i64 [[VLA]], i64* [[VLA_ADDR]], align 8
|
||||
// CHECK1-NEXT: store i16* [[D]], i16** [[D_ADDR]], align 8
|
||||
// CHECK1-NEXT: store i8** [[DOTTASK_RED_]], i8*** [[DOTTASK_RED__ADDR]], align 8
|
||||
// CHECK1-NEXT: store i8** [[DOTTASK_RED_1]], i8*** [[DOTTASK_RED__ADDR2]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load i32*, i32** [[A_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = load i64, i64* [[VLA_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i16*, i16** [[D_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = load i8**, i8*** [[DOTTASK_RED__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = load i8**, i8*** [[DOTTASK_RED__ADDR2]], align 8
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = load i32, i32* [[TMP5]], align 4
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP6]])
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = icmp ne i32 [[TMP7]], 0
|
||||
// CHECK1-NEXT: br i1 [[TMP8]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
|
||||
// CHECK1: omp_if.then:
|
||||
// CHECK1-NEXT: [[TMP15:%.*]] = getelementptr inbounds [[STRUCT_ANON_1]], %struct.anon.1* [[AGG_CAPTURED]], i32 0, i32 0
|
||||
// CHECK1-NEXT: store i32* [[TMP2]], i32** [[TMP15]], align 8
|
||||
// CHECK1-NEXT: [[TMP16:%.*]] = getelementptr inbounds [[STRUCT_ANON_1]], %struct.anon.1* [[AGG_CAPTURED]], i32 0, i32 1
|
||||
// CHECK1-NEXT: store i64 [[TMP4]], i64* [[TMP16]], align 8
|
||||
// CHECK1-NEXT: [[TMP17:%.*]] = getelementptr inbounds [[STRUCT_ANON_1]], %struct.anon.1* [[AGG_CAPTURED]], i32 0, i32 2
|
||||
// CHECK1-NEXT: store i16* [[TMP6]], i16** [[TMP17]], align 8
|
||||
// CHECK1-NEXT: [[TMP18:%.*]] = getelementptr inbounds [[STRUCT_ANON_1]], %struct.anon.1* [[AGG_CAPTURED]], i32 0, i32 3
|
||||
// CHECK1-NEXT: store i8** [[TMP8]], i8*** [[TMP18]], align 8
|
||||
// CHECK1-NEXT: [[TMP19:%.*]] = getelementptr inbounds [[STRUCT_ANON_1]], %struct.anon.1* [[AGG_CAPTURED]], i32 0, i32 4
|
||||
// CHECK1-NEXT: store i8** [[TMP10]], i8*** [[TMP19]], align 8
|
||||
// CHECK1-NEXT: call void @__kmpc_taskgroup(%struct.ident_t* @[[GLOB1]], i32 [[TMP12]])
|
||||
// CHECK1-NEXT: [[TMP20:%.*]] = call i8* @__kmpc_omp_task_alloc(%struct.ident_t* @[[GLOB1]], i32 [[TMP12]], i32 1, i64 96, i64 40, i32 (i32, i8*)* bitcast (i32 (i32, %struct.kmp_task_t_with_privates*)* @.omp_task_entry. to i32 (i32, i8*)*))
|
||||
// CHECK1-NEXT: [[TMP21:%.*]] = bitcast i8* [[TMP20]] to %struct.kmp_task_t_with_privates*
|
||||
// CHECK1-NEXT: [[TMP22:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES:%.*]], %struct.kmp_task_t_with_privates* [[TMP21]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP23:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T:%.*]], %struct.kmp_task_t* [[TMP22]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP24:%.*]] = load i8*, i8** [[TMP23]], align 8
|
||||
// CHECK1-NEXT: [[TMP25:%.*]] = bitcast %struct.anon.1* [[AGG_CAPTURED]] to i8*
|
||||
// CHECK1-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 [[TMP24]], i8* align 8 [[TMP25]], i64 40, i1 false)
|
||||
// CHECK1-NEXT: [[TMP26:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES]], %struct.kmp_task_t_with_privates* [[TMP21]], i32 0, i32 1
|
||||
// CHECK1-NEXT: [[TMP27:%.*]] = getelementptr inbounds [[STRUCT__KMP_PRIVATES_T:%.*]], %struct..kmp_privates.t* [[TMP26]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP28:%.*]] = load i8*, i8** [[TMP8]], align 8
|
||||
// CHECK1-NEXT: store i8* [[TMP28]], i8** [[TMP27]], align 8
|
||||
// CHECK1-NEXT: [[TMP29:%.*]] = getelementptr inbounds [[STRUCT__KMP_PRIVATES_T]], %struct..kmp_privates.t* [[TMP26]], i32 0, i32 1
|
||||
// CHECK1-NEXT: [[TMP30:%.*]] = load i8*, i8** [[TMP10]], align 8
|
||||
// CHECK1-NEXT: store i8* [[TMP30]], i8** [[TMP29]], align 8
|
||||
// CHECK1-NEXT: [[TMP31:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP22]], i32 0, i32 5
|
||||
// CHECK1-NEXT: store i64 0, i64* [[TMP31]], align 8
|
||||
// CHECK1-NEXT: [[TMP32:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP22]], i32 0, i32 6
|
||||
// CHECK1-NEXT: store i64 4, i64* [[TMP32]], align 8
|
||||
// CHECK1-NEXT: [[TMP33:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP22]], i32 0, i32 7
|
||||
// CHECK1-NEXT: store i64 1, i64* [[TMP33]], align 8
|
||||
// CHECK1-NEXT: [[TMP34:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP22]], i32 0, i32 9
|
||||
// CHECK1-NEXT: [[TMP35:%.*]] = bitcast i8** [[TMP34]] to i8*
|
||||
// CHECK1-NEXT: call void @llvm.memset.p0i8.i64(i8* align 8 [[TMP35]], i8 0, i64 8, i1 false)
|
||||
// CHECK1-NEXT: [[TMP36:%.*]] = load i64, i64* [[TMP33]], align 8
|
||||
// CHECK1-NEXT: call void @__kmpc_taskloop(%struct.ident_t* @[[GLOB1]], i32 [[TMP12]], i8* [[TMP20]], i32 1, i64* [[TMP31]], i64* [[TMP32]], i64 [[TMP36]], i32 1, i32 0, i64 0, i8* null)
|
||||
// CHECK1-NEXT: call void @__kmpc_end_taskgroup(%struct.ident_t* @[[GLOB1]], i32 [[TMP12]])
|
||||
// CHECK1-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP12]])
|
||||
// CHECK1-NEXT: [[TMP9:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[AGG_CAPTURED]], i32 0, i32 0
|
||||
// CHECK1-NEXT: store i32* [[TMP0]], i32** [[TMP9]], align 8
|
||||
// CHECK1-NEXT: [[TMP10:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[AGG_CAPTURED]], i32 0, i32 1
|
||||
// CHECK1-NEXT: store i64 [[TMP1]], i64* [[TMP10]], align 8
|
||||
// CHECK1-NEXT: [[TMP11:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[AGG_CAPTURED]], i32 0, i32 2
|
||||
// CHECK1-NEXT: store i16* [[TMP2]], i16** [[TMP11]], align 8
|
||||
// CHECK1-NEXT: [[TMP12:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[AGG_CAPTURED]], i32 0, i32 3
|
||||
// CHECK1-NEXT: store i8** [[TMP3]], i8*** [[TMP12]], align 8
|
||||
// CHECK1-NEXT: [[TMP13:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[AGG_CAPTURED]], i32 0, i32 4
|
||||
// CHECK1-NEXT: store i8** [[TMP4]], i8*** [[TMP13]], align 8
|
||||
// CHECK1-NEXT: call void @__kmpc_taskgroup(%struct.ident_t* @[[GLOB1]], i32 [[TMP6]])
|
||||
// CHECK1-NEXT: [[TMP14:%.*]] = call i8* @__kmpc_omp_task_alloc(%struct.ident_t* @[[GLOB1]], i32 [[TMP6]], i32 1, i64 96, i64 40, i32 (i32, i8*)* bitcast (i32 (i32, %struct.kmp_task_t_with_privates*)* @.omp_task_entry. to i32 (i32, i8*)*))
|
||||
// CHECK1-NEXT: [[TMP15:%.*]] = bitcast i8* [[TMP14]] to %struct.kmp_task_t_with_privates*
|
||||
// CHECK1-NEXT: [[TMP16:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES:%.*]], %struct.kmp_task_t_with_privates* [[TMP15]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP17:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T:%.*]], %struct.kmp_task_t* [[TMP16]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP18:%.*]] = load i8*, i8** [[TMP17]], align 8
|
||||
// CHECK1-NEXT: [[TMP19:%.*]] = bitcast %struct.anon* [[AGG_CAPTURED]] to i8*
|
||||
// CHECK1-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 [[TMP18]], i8* align 8 [[TMP19]], i64 40, i1 false)
|
||||
// CHECK1-NEXT: [[TMP20:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES]], %struct.kmp_task_t_with_privates* [[TMP15]], i32 0, i32 1
|
||||
// CHECK1-NEXT: [[TMP21:%.*]] = getelementptr inbounds [[STRUCT__KMP_PRIVATES_T:%.*]], %struct..kmp_privates.t* [[TMP20]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP22:%.*]] = load i8*, i8** [[TMP3]], align 8
|
||||
// CHECK1-NEXT: store i8* [[TMP22]], i8** [[TMP21]], align 8
|
||||
// CHECK1-NEXT: [[TMP23:%.*]] = getelementptr inbounds [[STRUCT__KMP_PRIVATES_T]], %struct..kmp_privates.t* [[TMP20]], i32 0, i32 1
|
||||
// CHECK1-NEXT: [[TMP24:%.*]] = load i8*, i8** [[TMP4]], align 8
|
||||
// CHECK1-NEXT: store i8* [[TMP24]], i8** [[TMP23]], align 8
|
||||
// CHECK1-NEXT: [[TMP25:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP16]], i32 0, i32 5
|
||||
// CHECK1-NEXT: store i64 0, i64* [[TMP25]], align 8
|
||||
// CHECK1-NEXT: [[TMP26:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP16]], i32 0, i32 6
|
||||
// CHECK1-NEXT: store i64 4, i64* [[TMP26]], align 8
|
||||
// CHECK1-NEXT: [[TMP27:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP16]], i32 0, i32 7
|
||||
// CHECK1-NEXT: store i64 1, i64* [[TMP27]], align 8
|
||||
// CHECK1-NEXT: [[TMP28:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP16]], i32 0, i32 9
|
||||
// CHECK1-NEXT: [[TMP29:%.*]] = bitcast i8** [[TMP28]] to i8*
|
||||
// CHECK1-NEXT: call void @llvm.memset.p0i8.i64(i8* align 8 [[TMP29]], i8 0, i64 8, i1 false)
|
||||
// CHECK1-NEXT: [[TMP30:%.*]] = load i64, i64* [[TMP27]], align 8
|
||||
// CHECK1-NEXT: call void @__kmpc_taskloop(%struct.ident_t* @[[GLOB1]], i32 [[TMP6]], i8* [[TMP14]], i32 1, i64* [[TMP25]], i64* [[TMP26]], i64 [[TMP30]], i32 1, i32 0, i64 0, i8* null)
|
||||
// CHECK1-NEXT: call void @__kmpc_end_taskgroup(%struct.ident_t* @[[GLOB1]], i32 [[TMP6]])
|
||||
// CHECK1-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP6]])
|
||||
// CHECK1-NEXT: br label [[OMP_IF_END]]
|
||||
// CHECK1: omp_if.end:
|
||||
// CHECK1-NEXT: ret void
|
||||
|
@ -581,7 +572,7 @@ int main(int argc, char **argv) {
|
|||
// CHECK1-NEXT: [[DOTST__ADDR_I:%.*]] = alloca i64, align 8
|
||||
// CHECK1-NEXT: [[DOTLITER__ADDR_I:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[DOTREDUCTIONS__ADDR_I:%.*]] = alloca i8*, align 8
|
||||
// CHECK1-NEXT: [[__CONTEXT_ADDR_I:%.*]] = alloca %struct.anon.1*, align 8
|
||||
// CHECK1-NEXT: [[__CONTEXT_ADDR_I:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK1-NEXT: [[DOTFIRSTPRIV_PTR_ADDR_I:%.*]] = alloca i8**, align 8
|
||||
// CHECK1-NEXT: [[DOTFIRSTPRIV_PTR_ADDR1_I:%.*]] = alloca i8**, align 8
|
||||
// CHECK1-NEXT: [[I_I:%.*]] = alloca i32, align 4
|
||||
|
@ -596,7 +587,7 @@ int main(int argc, char **argv) {
|
|||
// CHECK1-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T:%.*]], %struct.kmp_task_t* [[TMP4]], i32 0, i32 2
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP4]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = load i8*, i8** [[TMP6]], align 8
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = bitcast i8* [[TMP7]] to %struct.anon.1*
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = bitcast i8* [[TMP7]] to %struct.anon*
|
||||
// CHECK1-NEXT: [[TMP9:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES]], %struct.kmp_task_t_with_privates* [[TMP3]], i32 0, i32 1
|
||||
// CHECK1-NEXT: [[TMP10:%.*]] = bitcast %struct..kmp_privates.t* [[TMP9]] to i8*
|
||||
// CHECK1-NEXT: [[TMP11:%.*]] = bitcast %struct.kmp_task_t_with_privates* [[TMP3]] to i8*
|
||||
|
@ -625,9 +616,9 @@ int main(int argc, char **argv) {
|
|||
// CHECK1-NEXT: store i64 [[TMP17]], i64* [[DOTST__ADDR_I]], align 8, !noalias !14
|
||||
// CHECK1-NEXT: store i32 [[TMP19]], i32* [[DOTLITER__ADDR_I]], align 4, !noalias !14
|
||||
// CHECK1-NEXT: store i8* [[TMP21]], i8** [[DOTREDUCTIONS__ADDR_I]], align 8, !noalias !14
|
||||
// CHECK1-NEXT: store %struct.anon.1* [[TMP8]], %struct.anon.1** [[__CONTEXT_ADDR_I]], align 8, !noalias !14
|
||||
// CHECK1-NEXT: [[TMP22:%.*]] = load %struct.anon.1*, %struct.anon.1** [[__CONTEXT_ADDR_I]], align 8, !noalias !14
|
||||
// CHECK1-NEXT: [[TMP23:%.*]] = getelementptr inbounds [[STRUCT_ANON_1:%.*]], %struct.anon.1* [[TMP22]], i32 0, i32 1
|
||||
// CHECK1-NEXT: store %struct.anon* [[TMP8]], %struct.anon** [[__CONTEXT_ADDR_I]], align 8, !noalias !14
|
||||
// CHECK1-NEXT: [[TMP22:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR_I]], align 8, !noalias !14
|
||||
// CHECK1-NEXT: [[TMP23:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP22]], i32 0, i32 1
|
||||
// CHECK1-NEXT: [[TMP24:%.*]] = load i64, i64* [[TMP23]], align 8
|
||||
// CHECK1-NEXT: [[TMP25:%.*]] = load void (i8*, ...)*, void (i8*, ...)** [[DOTCOPY_FN__ADDR_I]], align 8, !noalias !14
|
||||
// CHECK1-NEXT: [[TMP26:%.*]] = load i8*, i8** [[DOTPRIVATES__ADDR_I]], align 8, !noalias !14
|
||||
|
@ -635,14 +626,14 @@ int main(int argc, char **argv) {
|
|||
// CHECK1-NEXT: call void [[TMP27]](i8* [[TMP26]], i8*** [[DOTFIRSTPRIV_PTR_ADDR_I]], i8*** [[DOTFIRSTPRIV_PTR_ADDR1_I]]) #[[ATTR3]]
|
||||
// CHECK1-NEXT: [[TMP28:%.*]] = load i8**, i8*** [[DOTFIRSTPRIV_PTR_ADDR_I]], align 8, !noalias !14
|
||||
// CHECK1-NEXT: [[TMP29:%.*]] = load i8**, i8*** [[DOTFIRSTPRIV_PTR_ADDR1_I]], align 8, !noalias !14
|
||||
// CHECK1-NEXT: [[TMP30:%.*]] = getelementptr inbounds [[STRUCT_ANON_1]], %struct.anon.1* [[TMP22]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP30:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP22]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP31:%.*]] = load i32*, i32** [[TMP30]], align 8
|
||||
// CHECK1-NEXT: [[TMP32:%.*]] = load i8*, i8** [[TMP28]], align 8
|
||||
// CHECK1-NEXT: [[TMP33:%.*]] = load i32, i32* [[DOTGLOBAL_TID__ADDR_I]], align 4, !noalias !14
|
||||
// CHECK1-NEXT: [[TMP34:%.*]] = bitcast i32* [[TMP31]] to i8*
|
||||
// CHECK1-NEXT: [[TMP35:%.*]] = call i8* @__kmpc_task_reduction_get_th_data(i32 [[TMP33]], i8* [[TMP32]], i8* [[TMP34]]) #[[ATTR3]]
|
||||
// CHECK1-NEXT: [[CONV_I:%.*]] = bitcast i8* [[TMP35]] to i32*
|
||||
// CHECK1-NEXT: [[TMP36:%.*]] = getelementptr inbounds [[STRUCT_ANON_1]], %struct.anon.1* [[TMP22]], i32 0, i32 2
|
||||
// CHECK1-NEXT: [[TMP36:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP22]], i32 0, i32 2
|
||||
// CHECK1-NEXT: [[TMP37:%.*]] = load i16*, i16** [[TMP36]], align 8
|
||||
// CHECK1-NEXT: [[TMP38:%.*]] = mul nuw i64 [[TMP24]], 2
|
||||
// CHECK1-NEXT: [[TMP39:%.*]] = udiv exact i64 [[TMP38]], ptrtoint (i16* getelementptr (i16, i16* null, i32 1) to i64)
|
||||
|
@ -741,7 +732,6 @@ int main(int argc, char **argv) {
|
|||
// CHECK2-NEXT: [[DOTTASK_RED_:%.*]] = alloca i8*, align 8
|
||||
// CHECK2-NEXT: [[DOTRD_INPUT_3:%.*]] = alloca [2 x %struct.kmp_taskred_input_t.0], align 8
|
||||
// CHECK2-NEXT: [[DOTTASK_RED_6:%.*]] = alloca i8*, align 8
|
||||
// CHECK2-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 8
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1:[0-9]+]])
|
||||
// CHECK2-NEXT: store i32 0, i32* [[RETVAL]], align 4
|
||||
// CHECK2-NEXT: store i32 [[ARGC]], i32* [[ARGC_ADDR]], align 4
|
||||
|
@ -861,34 +851,24 @@ int main(int argc, char **argv) {
|
|||
// CHECK2-NEXT: [[TMP57:%.*]] = bitcast [2 x %struct.kmp_taskred_input_t.0]* [[DOTRD_INPUT_3]] to i8*
|
||||
// CHECK2-NEXT: [[TMP58:%.*]] = call i8* @__kmpc_taskred_init(i32 [[TMP0]], i32 2, i8* [[TMP57]])
|
||||
// CHECK2-NEXT: store i8* [[TMP58]], i8** [[DOTTASK_RED_6]], align 8
|
||||
// CHECK2-NEXT: [[TMP59:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK2-NEXT: store i32* [[A]], i32** [[TMP59]], align 8
|
||||
// CHECK2-NEXT: [[TMP60:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 1
|
||||
// CHECK2-NEXT: store i64 [[TMP2]], i64* [[TMP60]], align 8
|
||||
// CHECK2-NEXT: [[TMP61:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 2
|
||||
// CHECK2-NEXT: store i16* [[VLA]], i16** [[TMP61]], align 8
|
||||
// CHECK2-NEXT: [[TMP62:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 3
|
||||
// CHECK2-NEXT: store i8** [[DOTTASK_RED_]], i8*** [[TMP62]], align 8
|
||||
// CHECK2-NEXT: [[TMP63:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 4
|
||||
// CHECK2-NEXT: store i8** [[DOTTASK_RED_6]], i8*** [[TMP63]], align 8
|
||||
// CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon*)* @.omp_outlined. to void (i32*, i32*, ...)*), %struct.anon* [[OMP_OUTLINED_ARG_AGG_]])
|
||||
// CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 5, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i64, i16*, i8**, i8**)* @.omp_outlined. to void (i32*, i32*, ...)*), i32* [[A]], i64 [[TMP2]], i16* [[VLA]], i8** [[DOTTASK_RED_]], i8** [[DOTTASK_RED_6]])
|
||||
// CHECK2-NEXT: call void @__kmpc_end_taskgroup(%struct.ident_t* @[[GLOB1]], i32 [[TMP0]])
|
||||
// CHECK2-NEXT: call void @__kmpc_end_taskgroup(%struct.ident_t* @[[GLOB1]], i32 [[TMP0]])
|
||||
// CHECK2-NEXT: store i32 0, i32* [[RETVAL]], align 4
|
||||
// CHECK2-NEXT: [[TMP64:%.*]] = load i8*, i8** [[SAVED_STACK]], align 8
|
||||
// CHECK2-NEXT: call void @llvm.stackrestore(i8* [[TMP64]])
|
||||
// CHECK2-NEXT: [[TMP59:%.*]] = load i8*, i8** [[SAVED_STACK]], align 8
|
||||
// CHECK2-NEXT: call void @llvm.stackrestore(i8* [[TMP59]])
|
||||
// CHECK2-NEXT: [[ARRAY_BEGIN7:%.*]] = getelementptr inbounds [5 x %struct.S], [5 x %struct.S]* [[C]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP65:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[ARRAY_BEGIN7]], i64 5
|
||||
// CHECK2-NEXT: [[TMP60:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[ARRAY_BEGIN7]], i64 5
|
||||
// CHECK2-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
|
||||
// CHECK2: arraydestroy.body:
|
||||
// CHECK2-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi %struct.S* [ [[TMP65]], [[ARRAYCTOR_CONT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
|
||||
// CHECK2-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi %struct.S* [ [[TMP60]], [[ARRAYCTOR_CONT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
|
||||
// CHECK2-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
|
||||
// CHECK2-NEXT: call void @_ZN1SD1Ev(%struct.S* nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR3:[0-9]+]]
|
||||
// CHECK2-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq %struct.S* [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN7]]
|
||||
// CHECK2-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE8:%.*]], label [[ARRAYDESTROY_BODY]]
|
||||
// CHECK2: arraydestroy.done8:
|
||||
// CHECK2-NEXT: [[TMP66:%.*]] = load i32, i32* [[RETVAL]], align 4
|
||||
// CHECK2-NEXT: ret i32 [[TMP66]]
|
||||
// CHECK2-NEXT: [[TMP61:%.*]] = load i32, i32* [[RETVAL]], align 4
|
||||
// CHECK2-NEXT: ret i32 [[TMP61]]
|
||||
//
|
||||
//
|
||||
// CHECK2-LABEL: define {{[^@]+}}@_ZN1SC1Ev
|
||||
|
@ -1165,71 +1145,73 @@ int main(int argc, char **argv) {
|
|||
//
|
||||
//
|
||||
// CHECK2-LABEL: define {{[^@]+}}@.omp_outlined.
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR8:[0-9]+]] {
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[A:%.*]], i64 [[VLA:%.*]], i16* nonnull align 2 dereferenceable(2) [[D:%.*]], i8** nonnull align 8 dereferenceable(8) [[DOTTASK_RED_:%.*]], i8** nonnull align 8 dereferenceable(8) [[DOTTASK_RED_1:%.*]]) #[[ATTR8:[0-9]+]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK2-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK2-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK2-NEXT: [[AGG_CAPTURED:%.*]] = alloca [[STRUCT_ANON_1:%.*]], align 8
|
||||
// CHECK2-NEXT: [[A_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK2-NEXT: [[VLA_ADDR:%.*]] = alloca i64, align 8
|
||||
// CHECK2-NEXT: [[D_ADDR:%.*]] = alloca i16*, align 8
|
||||
// CHECK2-NEXT: [[DOTTASK_RED__ADDR:%.*]] = alloca i8**, align 8
|
||||
// CHECK2-NEXT: [[DOTTASK_RED__ADDR2:%.*]] = alloca i8**, align 8
|
||||
// CHECK2-NEXT: [[AGG_CAPTURED:%.*]] = alloca [[STRUCT_ANON:%.*]], align 8
|
||||
// CHECK2-NEXT: [[TMP:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 8
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP0]], i32 0, i32 1
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = load i64, i64* [[TMP3]], align 8
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP0]], i32 0, i32 2
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = load i16*, i16** [[TMP5]], align 8
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP0]], i32 0, i32 3
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = load i8**, i8*** [[TMP7]], align 8
|
||||
// CHECK2-NEXT: [[TMP9:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP0]], i32 0, i32 4
|
||||
// CHECK2-NEXT: [[TMP10:%.*]] = load i8**, i8*** [[TMP9]], align 8
|
||||
// CHECK2-NEXT: [[TMP11:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP12:%.*]] = load i32, i32* [[TMP11]], align 4
|
||||
// CHECK2-NEXT: [[TMP13:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP12]])
|
||||
// CHECK2-NEXT: [[TMP14:%.*]] = icmp ne i32 [[TMP13]], 0
|
||||
// CHECK2-NEXT: br i1 [[TMP14]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
|
||||
// CHECK2-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 8
|
||||
// CHECK2-NEXT: store i64 [[VLA]], i64* [[VLA_ADDR]], align 8
|
||||
// CHECK2-NEXT: store i16* [[D]], i16** [[D_ADDR]], align 8
|
||||
// CHECK2-NEXT: store i8** [[DOTTASK_RED_]], i8*** [[DOTTASK_RED__ADDR]], align 8
|
||||
// CHECK2-NEXT: store i8** [[DOTTASK_RED_1]], i8*** [[DOTTASK_RED__ADDR2]], align 8
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load i32*, i32** [[A_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = load i64, i64* [[VLA_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i16*, i16** [[D_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = load i8**, i8*** [[DOTTASK_RED__ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = load i8**, i8*** [[DOTTASK_RED__ADDR2]], align 8
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = load i32, i32* [[TMP5]], align 4
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP6]])
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = icmp ne i32 [[TMP7]], 0
|
||||
// CHECK2-NEXT: br i1 [[TMP8]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
|
||||
// CHECK2: omp_if.then:
|
||||
// CHECK2-NEXT: [[TMP15:%.*]] = getelementptr inbounds [[STRUCT_ANON_1]], %struct.anon.1* [[AGG_CAPTURED]], i32 0, i32 0
|
||||
// CHECK2-NEXT: store i32* [[TMP2]], i32** [[TMP15]], align 8
|
||||
// CHECK2-NEXT: [[TMP16:%.*]] = getelementptr inbounds [[STRUCT_ANON_1]], %struct.anon.1* [[AGG_CAPTURED]], i32 0, i32 1
|
||||
// CHECK2-NEXT: store i64 [[TMP4]], i64* [[TMP16]], align 8
|
||||
// CHECK2-NEXT: [[TMP17:%.*]] = getelementptr inbounds [[STRUCT_ANON_1]], %struct.anon.1* [[AGG_CAPTURED]], i32 0, i32 2
|
||||
// CHECK2-NEXT: store i16* [[TMP6]], i16** [[TMP17]], align 8
|
||||
// CHECK2-NEXT: [[TMP18:%.*]] = getelementptr inbounds [[STRUCT_ANON_1]], %struct.anon.1* [[AGG_CAPTURED]], i32 0, i32 3
|
||||
// CHECK2-NEXT: store i8** [[TMP8]], i8*** [[TMP18]], align 8
|
||||
// CHECK2-NEXT: [[TMP19:%.*]] = getelementptr inbounds [[STRUCT_ANON_1]], %struct.anon.1* [[AGG_CAPTURED]], i32 0, i32 4
|
||||
// CHECK2-NEXT: store i8** [[TMP10]], i8*** [[TMP19]], align 8
|
||||
// CHECK2-NEXT: call void @__kmpc_taskgroup(%struct.ident_t* @[[GLOB1]], i32 [[TMP12]])
|
||||
// CHECK2-NEXT: [[TMP20:%.*]] = call i8* @__kmpc_omp_task_alloc(%struct.ident_t* @[[GLOB1]], i32 [[TMP12]], i32 1, i64 96, i64 40, i32 (i32, i8*)* bitcast (i32 (i32, %struct.kmp_task_t_with_privates*)* @.omp_task_entry. to i32 (i32, i8*)*))
|
||||
// CHECK2-NEXT: [[TMP21:%.*]] = bitcast i8* [[TMP20]] to %struct.kmp_task_t_with_privates*
|
||||
// CHECK2-NEXT: [[TMP22:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES:%.*]], %struct.kmp_task_t_with_privates* [[TMP21]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP23:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T:%.*]], %struct.kmp_task_t* [[TMP22]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP24:%.*]] = load i8*, i8** [[TMP23]], align 8
|
||||
// CHECK2-NEXT: [[TMP25:%.*]] = bitcast %struct.anon.1* [[AGG_CAPTURED]] to i8*
|
||||
// CHECK2-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 [[TMP24]], i8* align 8 [[TMP25]], i64 40, i1 false)
|
||||
// CHECK2-NEXT: [[TMP26:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES]], %struct.kmp_task_t_with_privates* [[TMP21]], i32 0, i32 1
|
||||
// CHECK2-NEXT: [[TMP27:%.*]] = getelementptr inbounds [[STRUCT__KMP_PRIVATES_T:%.*]], %struct..kmp_privates.t* [[TMP26]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP28:%.*]] = load i8*, i8** [[TMP8]], align 8
|
||||
// CHECK2-NEXT: store i8* [[TMP28]], i8** [[TMP27]], align 8
|
||||
// CHECK2-NEXT: [[TMP29:%.*]] = getelementptr inbounds [[STRUCT__KMP_PRIVATES_T]], %struct..kmp_privates.t* [[TMP26]], i32 0, i32 1
|
||||
// CHECK2-NEXT: [[TMP30:%.*]] = load i8*, i8** [[TMP10]], align 8
|
||||
// CHECK2-NEXT: store i8* [[TMP30]], i8** [[TMP29]], align 8
|
||||
// CHECK2-NEXT: [[TMP31:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP22]], i32 0, i32 5
|
||||
// CHECK2-NEXT: store i64 0, i64* [[TMP31]], align 8
|
||||
// CHECK2-NEXT: [[TMP32:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP22]], i32 0, i32 6
|
||||
// CHECK2-NEXT: store i64 4, i64* [[TMP32]], align 8
|
||||
// CHECK2-NEXT: [[TMP33:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP22]], i32 0, i32 7
|
||||
// CHECK2-NEXT: store i64 1, i64* [[TMP33]], align 8
|
||||
// CHECK2-NEXT: [[TMP34:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP22]], i32 0, i32 9
|
||||
// CHECK2-NEXT: [[TMP35:%.*]] = bitcast i8** [[TMP34]] to i8*
|
||||
// CHECK2-NEXT: call void @llvm.memset.p0i8.i64(i8* align 8 [[TMP35]], i8 0, i64 8, i1 false)
|
||||
// CHECK2-NEXT: [[TMP36:%.*]] = load i64, i64* [[TMP33]], align 8
|
||||
// CHECK2-NEXT: call void @__kmpc_taskloop(%struct.ident_t* @[[GLOB1]], i32 [[TMP12]], i8* [[TMP20]], i32 1, i64* [[TMP31]], i64* [[TMP32]], i64 [[TMP36]], i32 1, i32 0, i64 0, i8* null)
|
||||
// CHECK2-NEXT: call void @__kmpc_end_taskgroup(%struct.ident_t* @[[GLOB1]], i32 [[TMP12]])
|
||||
// CHECK2-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP12]])
|
||||
// CHECK2-NEXT: [[TMP9:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[AGG_CAPTURED]], i32 0, i32 0
|
||||
// CHECK2-NEXT: store i32* [[TMP0]], i32** [[TMP9]], align 8
|
||||
// CHECK2-NEXT: [[TMP10:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[AGG_CAPTURED]], i32 0, i32 1
|
||||
// CHECK2-NEXT: store i64 [[TMP1]], i64* [[TMP10]], align 8
|
||||
// CHECK2-NEXT: [[TMP11:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[AGG_CAPTURED]], i32 0, i32 2
|
||||
// CHECK2-NEXT: store i16* [[TMP2]], i16** [[TMP11]], align 8
|
||||
// CHECK2-NEXT: [[TMP12:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[AGG_CAPTURED]], i32 0, i32 3
|
||||
// CHECK2-NEXT: store i8** [[TMP3]], i8*** [[TMP12]], align 8
|
||||
// CHECK2-NEXT: [[TMP13:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[AGG_CAPTURED]], i32 0, i32 4
|
||||
// CHECK2-NEXT: store i8** [[TMP4]], i8*** [[TMP13]], align 8
|
||||
// CHECK2-NEXT: call void @__kmpc_taskgroup(%struct.ident_t* @[[GLOB1]], i32 [[TMP6]])
|
||||
// CHECK2-NEXT: [[TMP14:%.*]] = call i8* @__kmpc_omp_task_alloc(%struct.ident_t* @[[GLOB1]], i32 [[TMP6]], i32 1, i64 96, i64 40, i32 (i32, i8*)* bitcast (i32 (i32, %struct.kmp_task_t_with_privates*)* @.omp_task_entry. to i32 (i32, i8*)*))
|
||||
// CHECK2-NEXT: [[TMP15:%.*]] = bitcast i8* [[TMP14]] to %struct.kmp_task_t_with_privates*
|
||||
// CHECK2-NEXT: [[TMP16:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES:%.*]], %struct.kmp_task_t_with_privates* [[TMP15]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP17:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T:%.*]], %struct.kmp_task_t* [[TMP16]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP18:%.*]] = load i8*, i8** [[TMP17]], align 8
|
||||
// CHECK2-NEXT: [[TMP19:%.*]] = bitcast %struct.anon* [[AGG_CAPTURED]] to i8*
|
||||
// CHECK2-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 [[TMP18]], i8* align 8 [[TMP19]], i64 40, i1 false)
|
||||
// CHECK2-NEXT: [[TMP20:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES]], %struct.kmp_task_t_with_privates* [[TMP15]], i32 0, i32 1
|
||||
// CHECK2-NEXT: [[TMP21:%.*]] = getelementptr inbounds [[STRUCT__KMP_PRIVATES_T:%.*]], %struct..kmp_privates.t* [[TMP20]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP22:%.*]] = load i8*, i8** [[TMP3]], align 8
|
||||
// CHECK2-NEXT: store i8* [[TMP22]], i8** [[TMP21]], align 8
|
||||
// CHECK2-NEXT: [[TMP23:%.*]] = getelementptr inbounds [[STRUCT__KMP_PRIVATES_T]], %struct..kmp_privates.t* [[TMP20]], i32 0, i32 1
|
||||
// CHECK2-NEXT: [[TMP24:%.*]] = load i8*, i8** [[TMP4]], align 8
|
||||
// CHECK2-NEXT: store i8* [[TMP24]], i8** [[TMP23]], align 8
|
||||
// CHECK2-NEXT: [[TMP25:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP16]], i32 0, i32 5
|
||||
// CHECK2-NEXT: store i64 0, i64* [[TMP25]], align 8
|
||||
// CHECK2-NEXT: [[TMP26:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP16]], i32 0, i32 6
|
||||
// CHECK2-NEXT: store i64 4, i64* [[TMP26]], align 8
|
||||
// CHECK2-NEXT: [[TMP27:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP16]], i32 0, i32 7
|
||||
// CHECK2-NEXT: store i64 1, i64* [[TMP27]], align 8
|
||||
// CHECK2-NEXT: [[TMP28:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP16]], i32 0, i32 9
|
||||
// CHECK2-NEXT: [[TMP29:%.*]] = bitcast i8** [[TMP28]] to i8*
|
||||
// CHECK2-NEXT: call void @llvm.memset.p0i8.i64(i8* align 8 [[TMP29]], i8 0, i64 8, i1 false)
|
||||
// CHECK2-NEXT: [[TMP30:%.*]] = load i64, i64* [[TMP27]], align 8
|
||||
// CHECK2-NEXT: call void @__kmpc_taskloop(%struct.ident_t* @[[GLOB1]], i32 [[TMP6]], i8* [[TMP14]], i32 1, i64* [[TMP25]], i64* [[TMP26]], i64 [[TMP30]], i32 1, i32 0, i64 0, i8* null)
|
||||
// CHECK2-NEXT: call void @__kmpc_end_taskgroup(%struct.ident_t* @[[GLOB1]], i32 [[TMP6]])
|
||||
// CHECK2-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP6]])
|
||||
// CHECK2-NEXT: br label [[OMP_IF_END]]
|
||||
// CHECK2: omp_if.end:
|
||||
// CHECK2-NEXT: ret void
|
||||
|
@ -1267,7 +1249,7 @@ int main(int argc, char **argv) {
|
|||
// CHECK2-NEXT: [[DOTST__ADDR_I:%.*]] = alloca i64, align 8
|
||||
// CHECK2-NEXT: [[DOTLITER__ADDR_I:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[DOTREDUCTIONS__ADDR_I:%.*]] = alloca i8*, align 8
|
||||
// CHECK2-NEXT: [[__CONTEXT_ADDR_I:%.*]] = alloca %struct.anon.1*, align 8
|
||||
// CHECK2-NEXT: [[__CONTEXT_ADDR_I:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK2-NEXT: [[DOTFIRSTPRIV_PTR_ADDR_I:%.*]] = alloca i8**, align 8
|
||||
// CHECK2-NEXT: [[DOTFIRSTPRIV_PTR_ADDR1_I:%.*]] = alloca i8**, align 8
|
||||
// CHECK2-NEXT: [[I_I:%.*]] = alloca i32, align 4
|
||||
|
@ -1282,7 +1264,7 @@ int main(int argc, char **argv) {
|
|||
// CHECK2-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T:%.*]], %struct.kmp_task_t* [[TMP4]], i32 0, i32 2
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP4]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = load i8*, i8** [[TMP6]], align 8
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = bitcast i8* [[TMP7]] to %struct.anon.1*
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = bitcast i8* [[TMP7]] to %struct.anon*
|
||||
// CHECK2-NEXT: [[TMP9:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES]], %struct.kmp_task_t_with_privates* [[TMP3]], i32 0, i32 1
|
||||
// CHECK2-NEXT: [[TMP10:%.*]] = bitcast %struct..kmp_privates.t* [[TMP9]] to i8*
|
||||
// CHECK2-NEXT: [[TMP11:%.*]] = bitcast %struct.kmp_task_t_with_privates* [[TMP3]] to i8*
|
||||
|
@ -1311,9 +1293,9 @@ int main(int argc, char **argv) {
|
|||
// CHECK2-NEXT: store i64 [[TMP17]], i64* [[DOTST__ADDR_I]], align 8, !noalias !14
|
||||
// CHECK2-NEXT: store i32 [[TMP19]], i32* [[DOTLITER__ADDR_I]], align 4, !noalias !14
|
||||
// CHECK2-NEXT: store i8* [[TMP21]], i8** [[DOTREDUCTIONS__ADDR_I]], align 8, !noalias !14
|
||||
// CHECK2-NEXT: store %struct.anon.1* [[TMP8]], %struct.anon.1** [[__CONTEXT_ADDR_I]], align 8, !noalias !14
|
||||
// CHECK2-NEXT: [[TMP22:%.*]] = load %struct.anon.1*, %struct.anon.1** [[__CONTEXT_ADDR_I]], align 8, !noalias !14
|
||||
// CHECK2-NEXT: [[TMP23:%.*]] = getelementptr inbounds [[STRUCT_ANON_1:%.*]], %struct.anon.1* [[TMP22]], i32 0, i32 1
|
||||
// CHECK2-NEXT: store %struct.anon* [[TMP8]], %struct.anon** [[__CONTEXT_ADDR_I]], align 8, !noalias !14
|
||||
// CHECK2-NEXT: [[TMP22:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR_I]], align 8, !noalias !14
|
||||
// CHECK2-NEXT: [[TMP23:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP22]], i32 0, i32 1
|
||||
// CHECK2-NEXT: [[TMP24:%.*]] = load i64, i64* [[TMP23]], align 8
|
||||
// CHECK2-NEXT: [[TMP25:%.*]] = load void (i8*, ...)*, void (i8*, ...)** [[DOTCOPY_FN__ADDR_I]], align 8, !noalias !14
|
||||
// CHECK2-NEXT: [[TMP26:%.*]] = load i8*, i8** [[DOTPRIVATES__ADDR_I]], align 8, !noalias !14
|
||||
|
@ -1321,14 +1303,14 @@ int main(int argc, char **argv) {
|
|||
// CHECK2-NEXT: call void [[TMP27]](i8* [[TMP26]], i8*** [[DOTFIRSTPRIV_PTR_ADDR_I]], i8*** [[DOTFIRSTPRIV_PTR_ADDR1_I]]) #[[ATTR3]]
|
||||
// CHECK2-NEXT: [[TMP28:%.*]] = load i8**, i8*** [[DOTFIRSTPRIV_PTR_ADDR_I]], align 8, !noalias !14
|
||||
// CHECK2-NEXT: [[TMP29:%.*]] = load i8**, i8*** [[DOTFIRSTPRIV_PTR_ADDR1_I]], align 8, !noalias !14
|
||||
// CHECK2-NEXT: [[TMP30:%.*]] = getelementptr inbounds [[STRUCT_ANON_1]], %struct.anon.1* [[TMP22]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP30:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP22]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP31:%.*]] = load i32*, i32** [[TMP30]], align 8
|
||||
// CHECK2-NEXT: [[TMP32:%.*]] = load i8*, i8** [[TMP28]], align 8
|
||||
// CHECK2-NEXT: [[TMP33:%.*]] = load i32, i32* [[DOTGLOBAL_TID__ADDR_I]], align 4, !noalias !14
|
||||
// CHECK2-NEXT: [[TMP34:%.*]] = bitcast i32* [[TMP31]] to i8*
|
||||
// CHECK2-NEXT: [[TMP35:%.*]] = call i8* @__kmpc_task_reduction_get_th_data(i32 [[TMP33]], i8* [[TMP32]], i8* [[TMP34]]) #[[ATTR3]]
|
||||
// CHECK2-NEXT: [[CONV_I:%.*]] = bitcast i8* [[TMP35]] to i32*
|
||||
// CHECK2-NEXT: [[TMP36:%.*]] = getelementptr inbounds [[STRUCT_ANON_1]], %struct.anon.1* [[TMP22]], i32 0, i32 2
|
||||
// CHECK2-NEXT: [[TMP36:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP22]], i32 0, i32 2
|
||||
// CHECK2-NEXT: [[TMP37:%.*]] = load i16*, i16** [[TMP36]], align 8
|
||||
// CHECK2-NEXT: [[TMP38:%.*]] = mul nuw i64 [[TMP24]], 2
|
||||
// CHECK2-NEXT: [[TMP39:%.*]] = udiv exact i64 [[TMP38]], ptrtoint (i16* getelementptr (i16, i16* null, i32 1) to i64)
|
||||
|
|
|
@ -55,7 +55,6 @@ int main(int argc, char **argv) {
|
|||
// CHECK1-NEXT: [[DOTTASK_RED_:%.*]] = alloca i8*, align 8
|
||||
// CHECK1-NEXT: [[DOTRD_INPUT_3:%.*]] = alloca [2 x %struct.kmp_taskred_input_t.0], align 8
|
||||
// CHECK1-NEXT: [[DOTTASK_RED_6:%.*]] = alloca i8*, align 8
|
||||
// CHECK1-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1:[0-9]+]])
|
||||
// CHECK1-NEXT: store i32 0, i32* [[RETVAL]], align 4
|
||||
// CHECK1-NEXT: store i32 [[ARGC]], i32* [[ARGC_ADDR]], align 4
|
||||
|
@ -175,34 +174,24 @@ int main(int argc, char **argv) {
|
|||
// CHECK1-NEXT: [[TMP57:%.*]] = bitcast [2 x %struct.kmp_taskred_input_t.0]* [[DOTRD_INPUT_3]] to i8*
|
||||
// CHECK1-NEXT: [[TMP58:%.*]] = call i8* @__kmpc_taskred_init(i32 [[TMP0]], i32 2, i8* [[TMP57]])
|
||||
// CHECK1-NEXT: store i8* [[TMP58]], i8** [[DOTTASK_RED_6]], align 8
|
||||
// CHECK1-NEXT: [[TMP59:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK1-NEXT: store i32* [[A]], i32** [[TMP59]], align 8
|
||||
// CHECK1-NEXT: [[TMP60:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 1
|
||||
// CHECK1-NEXT: store i64 [[TMP2]], i64* [[TMP60]], align 8
|
||||
// CHECK1-NEXT: [[TMP61:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 2
|
||||
// CHECK1-NEXT: store i16* [[VLA]], i16** [[TMP61]], align 8
|
||||
// CHECK1-NEXT: [[TMP62:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 3
|
||||
// CHECK1-NEXT: store i8** [[DOTTASK_RED_]], i8*** [[TMP62]], align 8
|
||||
// CHECK1-NEXT: [[TMP63:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 4
|
||||
// CHECK1-NEXT: store i8** [[DOTTASK_RED_6]], i8*** [[TMP63]], align 8
|
||||
// CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon*)* @.omp_outlined. to void (i32*, i32*, ...)*), %struct.anon* [[OMP_OUTLINED_ARG_AGG_]])
|
||||
// CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 5, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i64, i16*, i8**, i8**)* @.omp_outlined. to void (i32*, i32*, ...)*), i32* [[A]], i64 [[TMP2]], i16* [[VLA]], i8** [[DOTTASK_RED_]], i8** [[DOTTASK_RED_6]])
|
||||
// CHECK1-NEXT: call void @__kmpc_end_taskgroup(%struct.ident_t* @[[GLOB1]], i32 [[TMP0]])
|
||||
// CHECK1-NEXT: call void @__kmpc_end_taskgroup(%struct.ident_t* @[[GLOB1]], i32 [[TMP0]])
|
||||
// CHECK1-NEXT: store i32 0, i32* [[RETVAL]], align 4
|
||||
// CHECK1-NEXT: [[TMP64:%.*]] = load i8*, i8** [[SAVED_STACK]], align 8
|
||||
// CHECK1-NEXT: call void @llvm.stackrestore(i8* [[TMP64]])
|
||||
// CHECK1-NEXT: [[TMP59:%.*]] = load i8*, i8** [[SAVED_STACK]], align 8
|
||||
// CHECK1-NEXT: call void @llvm.stackrestore(i8* [[TMP59]])
|
||||
// CHECK1-NEXT: [[ARRAY_BEGIN7:%.*]] = getelementptr inbounds [5 x %struct.S], [5 x %struct.S]* [[C]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP65:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[ARRAY_BEGIN7]], i64 5
|
||||
// CHECK1-NEXT: [[TMP60:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[ARRAY_BEGIN7]], i64 5
|
||||
// CHECK1-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
|
||||
// CHECK1: arraydestroy.body:
|
||||
// CHECK1-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi %struct.S* [ [[TMP65]], [[ARRAYCTOR_CONT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
|
||||
// CHECK1-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi %struct.S* [ [[TMP60]], [[ARRAYCTOR_CONT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
|
||||
// CHECK1-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
|
||||
// CHECK1-NEXT: call void @_ZN1SD1Ev(%struct.S* nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR3:[0-9]+]]
|
||||
// CHECK1-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq %struct.S* [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN7]]
|
||||
// CHECK1-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE8:%.*]], label [[ARRAYDESTROY_BODY]]
|
||||
// CHECK1: arraydestroy.done8:
|
||||
// CHECK1-NEXT: [[TMP66:%.*]] = load i32, i32* [[RETVAL]], align 4
|
||||
// CHECK1-NEXT: ret i32 [[TMP66]]
|
||||
// CHECK1-NEXT: [[TMP61:%.*]] = load i32, i32* [[RETVAL]], align 4
|
||||
// CHECK1-NEXT: ret i32 [[TMP61]]
|
||||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@_ZN1SC1Ev
|
||||
|
@ -479,71 +468,73 @@ int main(int argc, char **argv) {
|
|||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@.omp_outlined.
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR8:[0-9]+]] {
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[A:%.*]], i64 [[VLA:%.*]], i16* nonnull align 2 dereferenceable(2) [[D:%.*]], i8** nonnull align 8 dereferenceable(8) [[DOTTASK_RED_:%.*]], i8** nonnull align 8 dereferenceable(8) [[DOTTASK_RED_1:%.*]]) #[[ATTR8:[0-9]+]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK1-NEXT: [[AGG_CAPTURED:%.*]] = alloca [[STRUCT_ANON_1:%.*]], align 8
|
||||
// CHECK1-NEXT: [[A_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[VLA_ADDR:%.*]] = alloca i64, align 8
|
||||
// CHECK1-NEXT: [[D_ADDR:%.*]] = alloca i16*, align 8
|
||||
// CHECK1-NEXT: [[DOTTASK_RED__ADDR:%.*]] = alloca i8**, align 8
|
||||
// CHECK1-NEXT: [[DOTTASK_RED__ADDR2:%.*]] = alloca i8**, align 8
|
||||
// CHECK1-NEXT: [[AGG_CAPTURED:%.*]] = alloca [[STRUCT_ANON:%.*]], align 8
|
||||
// CHECK1-NEXT: [[TMP:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 8
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP0]], i32 0, i32 1
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = load i64, i64* [[TMP3]], align 8
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP0]], i32 0, i32 2
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = load i16*, i16** [[TMP5]], align 8
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP0]], i32 0, i32 3
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = load i8**, i8*** [[TMP7]], align 8
|
||||
// CHECK1-NEXT: [[TMP9:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP0]], i32 0, i32 4
|
||||
// CHECK1-NEXT: [[TMP10:%.*]] = load i8**, i8*** [[TMP9]], align 8
|
||||
// CHECK1-NEXT: [[TMP11:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP12:%.*]] = load i32, i32* [[TMP11]], align 4
|
||||
// CHECK1-NEXT: [[TMP13:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP12]])
|
||||
// CHECK1-NEXT: [[TMP14:%.*]] = icmp ne i32 [[TMP13]], 0
|
||||
// CHECK1-NEXT: br i1 [[TMP14]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
|
||||
// CHECK1-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 8
|
||||
// CHECK1-NEXT: store i64 [[VLA]], i64* [[VLA_ADDR]], align 8
|
||||
// CHECK1-NEXT: store i16* [[D]], i16** [[D_ADDR]], align 8
|
||||
// CHECK1-NEXT: store i8** [[DOTTASK_RED_]], i8*** [[DOTTASK_RED__ADDR]], align 8
|
||||
// CHECK1-NEXT: store i8** [[DOTTASK_RED_1]], i8*** [[DOTTASK_RED__ADDR2]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load i32*, i32** [[A_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = load i64, i64* [[VLA_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i16*, i16** [[D_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = load i8**, i8*** [[DOTTASK_RED__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = load i8**, i8*** [[DOTTASK_RED__ADDR2]], align 8
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = load i32, i32* [[TMP5]], align 4
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP6]])
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = icmp ne i32 [[TMP7]], 0
|
||||
// CHECK1-NEXT: br i1 [[TMP8]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
|
||||
// CHECK1: omp_if.then:
|
||||
// CHECK1-NEXT: [[TMP15:%.*]] = getelementptr inbounds [[STRUCT_ANON_1]], %struct.anon.1* [[AGG_CAPTURED]], i32 0, i32 0
|
||||
// CHECK1-NEXT: store i32* [[TMP2]], i32** [[TMP15]], align 8
|
||||
// CHECK1-NEXT: [[TMP16:%.*]] = getelementptr inbounds [[STRUCT_ANON_1]], %struct.anon.1* [[AGG_CAPTURED]], i32 0, i32 1
|
||||
// CHECK1-NEXT: store i64 [[TMP4]], i64* [[TMP16]], align 8
|
||||
// CHECK1-NEXT: [[TMP17:%.*]] = getelementptr inbounds [[STRUCT_ANON_1]], %struct.anon.1* [[AGG_CAPTURED]], i32 0, i32 2
|
||||
// CHECK1-NEXT: store i16* [[TMP6]], i16** [[TMP17]], align 8
|
||||
// CHECK1-NEXT: [[TMP18:%.*]] = getelementptr inbounds [[STRUCT_ANON_1]], %struct.anon.1* [[AGG_CAPTURED]], i32 0, i32 3
|
||||
// CHECK1-NEXT: store i8** [[TMP8]], i8*** [[TMP18]], align 8
|
||||
// CHECK1-NEXT: [[TMP19:%.*]] = getelementptr inbounds [[STRUCT_ANON_1]], %struct.anon.1* [[AGG_CAPTURED]], i32 0, i32 4
|
||||
// CHECK1-NEXT: store i8** [[TMP10]], i8*** [[TMP19]], align 8
|
||||
// CHECK1-NEXT: call void @__kmpc_taskgroup(%struct.ident_t* @[[GLOB1]], i32 [[TMP12]])
|
||||
// CHECK1-NEXT: [[TMP20:%.*]] = call i8* @__kmpc_omp_task_alloc(%struct.ident_t* @[[GLOB1]], i32 [[TMP12]], i32 1, i64 96, i64 40, i32 (i32, i8*)* bitcast (i32 (i32, %struct.kmp_task_t_with_privates*)* @.omp_task_entry. to i32 (i32, i8*)*))
|
||||
// CHECK1-NEXT: [[TMP21:%.*]] = bitcast i8* [[TMP20]] to %struct.kmp_task_t_with_privates*
|
||||
// CHECK1-NEXT: [[TMP22:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES:%.*]], %struct.kmp_task_t_with_privates* [[TMP21]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP23:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T:%.*]], %struct.kmp_task_t* [[TMP22]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP24:%.*]] = load i8*, i8** [[TMP23]], align 8
|
||||
// CHECK1-NEXT: [[TMP25:%.*]] = bitcast %struct.anon.1* [[AGG_CAPTURED]] to i8*
|
||||
// CHECK1-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 [[TMP24]], i8* align 8 [[TMP25]], i64 40, i1 false)
|
||||
// CHECK1-NEXT: [[TMP26:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES]], %struct.kmp_task_t_with_privates* [[TMP21]], i32 0, i32 1
|
||||
// CHECK1-NEXT: [[TMP27:%.*]] = getelementptr inbounds [[STRUCT__KMP_PRIVATES_T:%.*]], %struct..kmp_privates.t* [[TMP26]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP28:%.*]] = load i8*, i8** [[TMP8]], align 8
|
||||
// CHECK1-NEXT: store i8* [[TMP28]], i8** [[TMP27]], align 8
|
||||
// CHECK1-NEXT: [[TMP29:%.*]] = getelementptr inbounds [[STRUCT__KMP_PRIVATES_T]], %struct..kmp_privates.t* [[TMP26]], i32 0, i32 1
|
||||
// CHECK1-NEXT: [[TMP30:%.*]] = load i8*, i8** [[TMP10]], align 8
|
||||
// CHECK1-NEXT: store i8* [[TMP30]], i8** [[TMP29]], align 8
|
||||
// CHECK1-NEXT: [[TMP31:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP22]], i32 0, i32 5
|
||||
// CHECK1-NEXT: store i64 0, i64* [[TMP31]], align 8
|
||||
// CHECK1-NEXT: [[TMP32:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP22]], i32 0, i32 6
|
||||
// CHECK1-NEXT: store i64 4, i64* [[TMP32]], align 8
|
||||
// CHECK1-NEXT: [[TMP33:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP22]], i32 0, i32 7
|
||||
// CHECK1-NEXT: store i64 1, i64* [[TMP33]], align 8
|
||||
// CHECK1-NEXT: [[TMP34:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP22]], i32 0, i32 9
|
||||
// CHECK1-NEXT: [[TMP35:%.*]] = bitcast i8** [[TMP34]] to i8*
|
||||
// CHECK1-NEXT: call void @llvm.memset.p0i8.i64(i8* align 8 [[TMP35]], i8 0, i64 8, i1 false)
|
||||
// CHECK1-NEXT: [[TMP36:%.*]] = load i64, i64* [[TMP33]], align 8
|
||||
// CHECK1-NEXT: call void @__kmpc_taskloop(%struct.ident_t* @[[GLOB1]], i32 [[TMP12]], i8* [[TMP20]], i32 1, i64* [[TMP31]], i64* [[TMP32]], i64 [[TMP36]], i32 1, i32 0, i64 0, i8* null)
|
||||
// CHECK1-NEXT: call void @__kmpc_end_taskgroup(%struct.ident_t* @[[GLOB1]], i32 [[TMP12]])
|
||||
// CHECK1-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP12]])
|
||||
// CHECK1-NEXT: [[TMP9:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[AGG_CAPTURED]], i32 0, i32 0
|
||||
// CHECK1-NEXT: store i32* [[TMP0]], i32** [[TMP9]], align 8
|
||||
// CHECK1-NEXT: [[TMP10:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[AGG_CAPTURED]], i32 0, i32 1
|
||||
// CHECK1-NEXT: store i64 [[TMP1]], i64* [[TMP10]], align 8
|
||||
// CHECK1-NEXT: [[TMP11:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[AGG_CAPTURED]], i32 0, i32 2
|
||||
// CHECK1-NEXT: store i16* [[TMP2]], i16** [[TMP11]], align 8
|
||||
// CHECK1-NEXT: [[TMP12:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[AGG_CAPTURED]], i32 0, i32 3
|
||||
// CHECK1-NEXT: store i8** [[TMP3]], i8*** [[TMP12]], align 8
|
||||
// CHECK1-NEXT: [[TMP13:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[AGG_CAPTURED]], i32 0, i32 4
|
||||
// CHECK1-NEXT: store i8** [[TMP4]], i8*** [[TMP13]], align 8
|
||||
// CHECK1-NEXT: call void @__kmpc_taskgroup(%struct.ident_t* @[[GLOB1]], i32 [[TMP6]])
|
||||
// CHECK1-NEXT: [[TMP14:%.*]] = call i8* @__kmpc_omp_task_alloc(%struct.ident_t* @[[GLOB1]], i32 [[TMP6]], i32 1, i64 96, i64 40, i32 (i32, i8*)* bitcast (i32 (i32, %struct.kmp_task_t_with_privates*)* @.omp_task_entry. to i32 (i32, i8*)*))
|
||||
// CHECK1-NEXT: [[TMP15:%.*]] = bitcast i8* [[TMP14]] to %struct.kmp_task_t_with_privates*
|
||||
// CHECK1-NEXT: [[TMP16:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES:%.*]], %struct.kmp_task_t_with_privates* [[TMP15]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP17:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T:%.*]], %struct.kmp_task_t* [[TMP16]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP18:%.*]] = load i8*, i8** [[TMP17]], align 8
|
||||
// CHECK1-NEXT: [[TMP19:%.*]] = bitcast %struct.anon* [[AGG_CAPTURED]] to i8*
|
||||
// CHECK1-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 [[TMP18]], i8* align 8 [[TMP19]], i64 40, i1 false)
|
||||
// CHECK1-NEXT: [[TMP20:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES]], %struct.kmp_task_t_with_privates* [[TMP15]], i32 0, i32 1
|
||||
// CHECK1-NEXT: [[TMP21:%.*]] = getelementptr inbounds [[STRUCT__KMP_PRIVATES_T:%.*]], %struct..kmp_privates.t* [[TMP20]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP22:%.*]] = load i8*, i8** [[TMP3]], align 8
|
||||
// CHECK1-NEXT: store i8* [[TMP22]], i8** [[TMP21]], align 8
|
||||
// CHECK1-NEXT: [[TMP23:%.*]] = getelementptr inbounds [[STRUCT__KMP_PRIVATES_T]], %struct..kmp_privates.t* [[TMP20]], i32 0, i32 1
|
||||
// CHECK1-NEXT: [[TMP24:%.*]] = load i8*, i8** [[TMP4]], align 8
|
||||
// CHECK1-NEXT: store i8* [[TMP24]], i8** [[TMP23]], align 8
|
||||
// CHECK1-NEXT: [[TMP25:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP16]], i32 0, i32 5
|
||||
// CHECK1-NEXT: store i64 0, i64* [[TMP25]], align 8
|
||||
// CHECK1-NEXT: [[TMP26:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP16]], i32 0, i32 6
|
||||
// CHECK1-NEXT: store i64 4, i64* [[TMP26]], align 8
|
||||
// CHECK1-NEXT: [[TMP27:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP16]], i32 0, i32 7
|
||||
// CHECK1-NEXT: store i64 1, i64* [[TMP27]], align 8
|
||||
// CHECK1-NEXT: [[TMP28:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP16]], i32 0, i32 9
|
||||
// CHECK1-NEXT: [[TMP29:%.*]] = bitcast i8** [[TMP28]] to i8*
|
||||
// CHECK1-NEXT: call void @llvm.memset.p0i8.i64(i8* align 8 [[TMP29]], i8 0, i64 8, i1 false)
|
||||
// CHECK1-NEXT: [[TMP30:%.*]] = load i64, i64* [[TMP27]], align 8
|
||||
// CHECK1-NEXT: call void @__kmpc_taskloop(%struct.ident_t* @[[GLOB1]], i32 [[TMP6]], i8* [[TMP14]], i32 1, i64* [[TMP25]], i64* [[TMP26]], i64 [[TMP30]], i32 1, i32 0, i64 0, i8* null)
|
||||
// CHECK1-NEXT: call void @__kmpc_end_taskgroup(%struct.ident_t* @[[GLOB1]], i32 [[TMP6]])
|
||||
// CHECK1-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP6]])
|
||||
// CHECK1-NEXT: br label [[OMP_IF_END]]
|
||||
// CHECK1: omp_if.end:
|
||||
// CHECK1-NEXT: ret void
|
||||
|
@ -581,7 +572,7 @@ int main(int argc, char **argv) {
|
|||
// CHECK1-NEXT: [[DOTST__ADDR_I:%.*]] = alloca i64, align 8
|
||||
// CHECK1-NEXT: [[DOTLITER__ADDR_I:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[DOTREDUCTIONS__ADDR_I:%.*]] = alloca i8*, align 8
|
||||
// CHECK1-NEXT: [[__CONTEXT_ADDR_I:%.*]] = alloca %struct.anon.1*, align 8
|
||||
// CHECK1-NEXT: [[__CONTEXT_ADDR_I:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK1-NEXT: [[DOTFIRSTPRIV_PTR_ADDR_I:%.*]] = alloca i8**, align 8
|
||||
// CHECK1-NEXT: [[DOTFIRSTPRIV_PTR_ADDR1_I:%.*]] = alloca i8**, align 8
|
||||
// CHECK1-NEXT: [[I_I:%.*]] = alloca i32, align 4
|
||||
|
@ -596,7 +587,7 @@ int main(int argc, char **argv) {
|
|||
// CHECK1-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T:%.*]], %struct.kmp_task_t* [[TMP4]], i32 0, i32 2
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP4]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = load i8*, i8** [[TMP6]], align 8
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = bitcast i8* [[TMP7]] to %struct.anon.1*
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = bitcast i8* [[TMP7]] to %struct.anon*
|
||||
// CHECK1-NEXT: [[TMP9:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES]], %struct.kmp_task_t_with_privates* [[TMP3]], i32 0, i32 1
|
||||
// CHECK1-NEXT: [[TMP10:%.*]] = bitcast %struct..kmp_privates.t* [[TMP9]] to i8*
|
||||
// CHECK1-NEXT: [[TMP11:%.*]] = bitcast %struct.kmp_task_t_with_privates* [[TMP3]] to i8*
|
||||
|
@ -625,9 +616,9 @@ int main(int argc, char **argv) {
|
|||
// CHECK1-NEXT: store i64 [[TMP17]], i64* [[DOTST__ADDR_I]], align 8, !noalias !14
|
||||
// CHECK1-NEXT: store i32 [[TMP19]], i32* [[DOTLITER__ADDR_I]], align 4, !noalias !14
|
||||
// CHECK1-NEXT: store i8* [[TMP21]], i8** [[DOTREDUCTIONS__ADDR_I]], align 8, !noalias !14
|
||||
// CHECK1-NEXT: store %struct.anon.1* [[TMP8]], %struct.anon.1** [[__CONTEXT_ADDR_I]], align 8, !noalias !14
|
||||
// CHECK1-NEXT: [[TMP22:%.*]] = load %struct.anon.1*, %struct.anon.1** [[__CONTEXT_ADDR_I]], align 8, !noalias !14
|
||||
// CHECK1-NEXT: [[TMP23:%.*]] = getelementptr inbounds [[STRUCT_ANON_1:%.*]], %struct.anon.1* [[TMP22]], i32 0, i32 1
|
||||
// CHECK1-NEXT: store %struct.anon* [[TMP8]], %struct.anon** [[__CONTEXT_ADDR_I]], align 8, !noalias !14
|
||||
// CHECK1-NEXT: [[TMP22:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR_I]], align 8, !noalias !14
|
||||
// CHECK1-NEXT: [[TMP23:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP22]], i32 0, i32 1
|
||||
// CHECK1-NEXT: [[TMP24:%.*]] = load i64, i64* [[TMP23]], align 8
|
||||
// CHECK1-NEXT: [[TMP25:%.*]] = load void (i8*, ...)*, void (i8*, ...)** [[DOTCOPY_FN__ADDR_I]], align 8, !noalias !14
|
||||
// CHECK1-NEXT: [[TMP26:%.*]] = load i8*, i8** [[DOTPRIVATES__ADDR_I]], align 8, !noalias !14
|
||||
|
@ -635,14 +626,14 @@ int main(int argc, char **argv) {
|
|||
// CHECK1-NEXT: call void [[TMP27]](i8* [[TMP26]], i8*** [[DOTFIRSTPRIV_PTR_ADDR_I]], i8*** [[DOTFIRSTPRIV_PTR_ADDR1_I]]) #[[ATTR3]]
|
||||
// CHECK1-NEXT: [[TMP28:%.*]] = load i8**, i8*** [[DOTFIRSTPRIV_PTR_ADDR_I]], align 8, !noalias !14
|
||||
// CHECK1-NEXT: [[TMP29:%.*]] = load i8**, i8*** [[DOTFIRSTPRIV_PTR_ADDR1_I]], align 8, !noalias !14
|
||||
// CHECK1-NEXT: [[TMP30:%.*]] = getelementptr inbounds [[STRUCT_ANON_1]], %struct.anon.1* [[TMP22]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP30:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP22]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP31:%.*]] = load i32*, i32** [[TMP30]], align 8
|
||||
// CHECK1-NEXT: [[TMP32:%.*]] = load i8*, i8** [[TMP28]], align 8
|
||||
// CHECK1-NEXT: [[TMP33:%.*]] = load i32, i32* [[DOTGLOBAL_TID__ADDR_I]], align 4, !noalias !14
|
||||
// CHECK1-NEXT: [[TMP34:%.*]] = bitcast i32* [[TMP31]] to i8*
|
||||
// CHECK1-NEXT: [[TMP35:%.*]] = call i8* @__kmpc_task_reduction_get_th_data(i32 [[TMP33]], i8* [[TMP32]], i8* [[TMP34]]) #[[ATTR3]]
|
||||
// CHECK1-NEXT: [[CONV_I:%.*]] = bitcast i8* [[TMP35]] to i32*
|
||||
// CHECK1-NEXT: [[TMP36:%.*]] = getelementptr inbounds [[STRUCT_ANON_1]], %struct.anon.1* [[TMP22]], i32 0, i32 2
|
||||
// CHECK1-NEXT: [[TMP36:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP22]], i32 0, i32 2
|
||||
// CHECK1-NEXT: [[TMP37:%.*]] = load i16*, i16** [[TMP36]], align 8
|
||||
// CHECK1-NEXT: [[TMP38:%.*]] = mul nuw i64 [[TMP24]], 2
|
||||
// CHECK1-NEXT: [[TMP39:%.*]] = udiv exact i64 [[TMP38]], ptrtoint (i16* getelementptr (i16, i16* null, i32 1) to i64)
|
||||
|
@ -741,7 +732,6 @@ int main(int argc, char **argv) {
|
|||
// CHECK2-NEXT: [[DOTTASK_RED_:%.*]] = alloca i8*, align 8
|
||||
// CHECK2-NEXT: [[DOTRD_INPUT_3:%.*]] = alloca [2 x %struct.kmp_taskred_input_t.0], align 8
|
||||
// CHECK2-NEXT: [[DOTTASK_RED_6:%.*]] = alloca i8*, align 8
|
||||
// CHECK2-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 8
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1:[0-9]+]])
|
||||
// CHECK2-NEXT: store i32 0, i32* [[RETVAL]], align 4
|
||||
// CHECK2-NEXT: store i32 [[ARGC]], i32* [[ARGC_ADDR]], align 4
|
||||
|
@ -861,34 +851,24 @@ int main(int argc, char **argv) {
|
|||
// CHECK2-NEXT: [[TMP57:%.*]] = bitcast [2 x %struct.kmp_taskred_input_t.0]* [[DOTRD_INPUT_3]] to i8*
|
||||
// CHECK2-NEXT: [[TMP58:%.*]] = call i8* @__kmpc_taskred_init(i32 [[TMP0]], i32 2, i8* [[TMP57]])
|
||||
// CHECK2-NEXT: store i8* [[TMP58]], i8** [[DOTTASK_RED_6]], align 8
|
||||
// CHECK2-NEXT: [[TMP59:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK2-NEXT: store i32* [[A]], i32** [[TMP59]], align 8
|
||||
// CHECK2-NEXT: [[TMP60:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 1
|
||||
// CHECK2-NEXT: store i64 [[TMP2]], i64* [[TMP60]], align 8
|
||||
// CHECK2-NEXT: [[TMP61:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 2
|
||||
// CHECK2-NEXT: store i16* [[VLA]], i16** [[TMP61]], align 8
|
||||
// CHECK2-NEXT: [[TMP62:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 3
|
||||
// CHECK2-NEXT: store i8** [[DOTTASK_RED_]], i8*** [[TMP62]], align 8
|
||||
// CHECK2-NEXT: [[TMP63:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 4
|
||||
// CHECK2-NEXT: store i8** [[DOTTASK_RED_6]], i8*** [[TMP63]], align 8
|
||||
// CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon*)* @.omp_outlined. to void (i32*, i32*, ...)*), %struct.anon* [[OMP_OUTLINED_ARG_AGG_]])
|
||||
// CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 5, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i64, i16*, i8**, i8**)* @.omp_outlined. to void (i32*, i32*, ...)*), i32* [[A]], i64 [[TMP2]], i16* [[VLA]], i8** [[DOTTASK_RED_]], i8** [[DOTTASK_RED_6]])
|
||||
// CHECK2-NEXT: call void @__kmpc_end_taskgroup(%struct.ident_t* @[[GLOB1]], i32 [[TMP0]])
|
||||
// CHECK2-NEXT: call void @__kmpc_end_taskgroup(%struct.ident_t* @[[GLOB1]], i32 [[TMP0]])
|
||||
// CHECK2-NEXT: store i32 0, i32* [[RETVAL]], align 4
|
||||
// CHECK2-NEXT: [[TMP64:%.*]] = load i8*, i8** [[SAVED_STACK]], align 8
|
||||
// CHECK2-NEXT: call void @llvm.stackrestore(i8* [[TMP64]])
|
||||
// CHECK2-NEXT: [[TMP59:%.*]] = load i8*, i8** [[SAVED_STACK]], align 8
|
||||
// CHECK2-NEXT: call void @llvm.stackrestore(i8* [[TMP59]])
|
||||
// CHECK2-NEXT: [[ARRAY_BEGIN7:%.*]] = getelementptr inbounds [5 x %struct.S], [5 x %struct.S]* [[C]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP65:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[ARRAY_BEGIN7]], i64 5
|
||||
// CHECK2-NEXT: [[TMP60:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[ARRAY_BEGIN7]], i64 5
|
||||
// CHECK2-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
|
||||
// CHECK2: arraydestroy.body:
|
||||
// CHECK2-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi %struct.S* [ [[TMP65]], [[ARRAYCTOR_CONT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
|
||||
// CHECK2-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi %struct.S* [ [[TMP60]], [[ARRAYCTOR_CONT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
|
||||
// CHECK2-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
|
||||
// CHECK2-NEXT: call void @_ZN1SD1Ev(%struct.S* nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR3:[0-9]+]]
|
||||
// CHECK2-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq %struct.S* [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN7]]
|
||||
// CHECK2-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE8:%.*]], label [[ARRAYDESTROY_BODY]]
|
||||
// CHECK2: arraydestroy.done8:
|
||||
// CHECK2-NEXT: [[TMP66:%.*]] = load i32, i32* [[RETVAL]], align 4
|
||||
// CHECK2-NEXT: ret i32 [[TMP66]]
|
||||
// CHECK2-NEXT: [[TMP61:%.*]] = load i32, i32* [[RETVAL]], align 4
|
||||
// CHECK2-NEXT: ret i32 [[TMP61]]
|
||||
//
|
||||
//
|
||||
// CHECK2-LABEL: define {{[^@]+}}@_ZN1SC1Ev
|
||||
|
@ -1165,71 +1145,73 @@ int main(int argc, char **argv) {
|
|||
//
|
||||
//
|
||||
// CHECK2-LABEL: define {{[^@]+}}@.omp_outlined.
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR8:[0-9]+]] {
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[A:%.*]], i64 [[VLA:%.*]], i16* nonnull align 2 dereferenceable(2) [[D:%.*]], i8** nonnull align 8 dereferenceable(8) [[DOTTASK_RED_:%.*]], i8** nonnull align 8 dereferenceable(8) [[DOTTASK_RED_1:%.*]]) #[[ATTR8:[0-9]+]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK2-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK2-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK2-NEXT: [[AGG_CAPTURED:%.*]] = alloca [[STRUCT_ANON_1:%.*]], align 8
|
||||
// CHECK2-NEXT: [[A_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK2-NEXT: [[VLA_ADDR:%.*]] = alloca i64, align 8
|
||||
// CHECK2-NEXT: [[D_ADDR:%.*]] = alloca i16*, align 8
|
||||
// CHECK2-NEXT: [[DOTTASK_RED__ADDR:%.*]] = alloca i8**, align 8
|
||||
// CHECK2-NEXT: [[DOTTASK_RED__ADDR2:%.*]] = alloca i8**, align 8
|
||||
// CHECK2-NEXT: [[AGG_CAPTURED:%.*]] = alloca [[STRUCT_ANON:%.*]], align 8
|
||||
// CHECK2-NEXT: [[TMP:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 8
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP0]], i32 0, i32 1
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = load i64, i64* [[TMP3]], align 8
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP0]], i32 0, i32 2
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = load i16*, i16** [[TMP5]], align 8
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP0]], i32 0, i32 3
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = load i8**, i8*** [[TMP7]], align 8
|
||||
// CHECK2-NEXT: [[TMP9:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP0]], i32 0, i32 4
|
||||
// CHECK2-NEXT: [[TMP10:%.*]] = load i8**, i8*** [[TMP9]], align 8
|
||||
// CHECK2-NEXT: [[TMP11:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP12:%.*]] = load i32, i32* [[TMP11]], align 4
|
||||
// CHECK2-NEXT: [[TMP13:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP12]])
|
||||
// CHECK2-NEXT: [[TMP14:%.*]] = icmp ne i32 [[TMP13]], 0
|
||||
// CHECK2-NEXT: br i1 [[TMP14]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
|
||||
// CHECK2-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 8
|
||||
// CHECK2-NEXT: store i64 [[VLA]], i64* [[VLA_ADDR]], align 8
|
||||
// CHECK2-NEXT: store i16* [[D]], i16** [[D_ADDR]], align 8
|
||||
// CHECK2-NEXT: store i8** [[DOTTASK_RED_]], i8*** [[DOTTASK_RED__ADDR]], align 8
|
||||
// CHECK2-NEXT: store i8** [[DOTTASK_RED_1]], i8*** [[DOTTASK_RED__ADDR2]], align 8
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load i32*, i32** [[A_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = load i64, i64* [[VLA_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i16*, i16** [[D_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = load i8**, i8*** [[DOTTASK_RED__ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = load i8**, i8*** [[DOTTASK_RED__ADDR2]], align 8
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = load i32, i32* [[TMP5]], align 4
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP6]])
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = icmp ne i32 [[TMP7]], 0
|
||||
// CHECK2-NEXT: br i1 [[TMP8]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
|
||||
// CHECK2: omp_if.then:
|
||||
// CHECK2-NEXT: [[TMP15:%.*]] = getelementptr inbounds [[STRUCT_ANON_1]], %struct.anon.1* [[AGG_CAPTURED]], i32 0, i32 0
|
||||
// CHECK2-NEXT: store i32* [[TMP2]], i32** [[TMP15]], align 8
|
||||
// CHECK2-NEXT: [[TMP16:%.*]] = getelementptr inbounds [[STRUCT_ANON_1]], %struct.anon.1* [[AGG_CAPTURED]], i32 0, i32 1
|
||||
// CHECK2-NEXT: store i64 [[TMP4]], i64* [[TMP16]], align 8
|
||||
// CHECK2-NEXT: [[TMP17:%.*]] = getelementptr inbounds [[STRUCT_ANON_1]], %struct.anon.1* [[AGG_CAPTURED]], i32 0, i32 2
|
||||
// CHECK2-NEXT: store i16* [[TMP6]], i16** [[TMP17]], align 8
|
||||
// CHECK2-NEXT: [[TMP18:%.*]] = getelementptr inbounds [[STRUCT_ANON_1]], %struct.anon.1* [[AGG_CAPTURED]], i32 0, i32 3
|
||||
// CHECK2-NEXT: store i8** [[TMP8]], i8*** [[TMP18]], align 8
|
||||
// CHECK2-NEXT: [[TMP19:%.*]] = getelementptr inbounds [[STRUCT_ANON_1]], %struct.anon.1* [[AGG_CAPTURED]], i32 0, i32 4
|
||||
// CHECK2-NEXT: store i8** [[TMP10]], i8*** [[TMP19]], align 8
|
||||
// CHECK2-NEXT: call void @__kmpc_taskgroup(%struct.ident_t* @[[GLOB1]], i32 [[TMP12]])
|
||||
// CHECK2-NEXT: [[TMP20:%.*]] = call i8* @__kmpc_omp_task_alloc(%struct.ident_t* @[[GLOB1]], i32 [[TMP12]], i32 1, i64 96, i64 40, i32 (i32, i8*)* bitcast (i32 (i32, %struct.kmp_task_t_with_privates*)* @.omp_task_entry. to i32 (i32, i8*)*))
|
||||
// CHECK2-NEXT: [[TMP21:%.*]] = bitcast i8* [[TMP20]] to %struct.kmp_task_t_with_privates*
|
||||
// CHECK2-NEXT: [[TMP22:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES:%.*]], %struct.kmp_task_t_with_privates* [[TMP21]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP23:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T:%.*]], %struct.kmp_task_t* [[TMP22]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP24:%.*]] = load i8*, i8** [[TMP23]], align 8
|
||||
// CHECK2-NEXT: [[TMP25:%.*]] = bitcast %struct.anon.1* [[AGG_CAPTURED]] to i8*
|
||||
// CHECK2-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 [[TMP24]], i8* align 8 [[TMP25]], i64 40, i1 false)
|
||||
// CHECK2-NEXT: [[TMP26:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES]], %struct.kmp_task_t_with_privates* [[TMP21]], i32 0, i32 1
|
||||
// CHECK2-NEXT: [[TMP27:%.*]] = getelementptr inbounds [[STRUCT__KMP_PRIVATES_T:%.*]], %struct..kmp_privates.t* [[TMP26]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP28:%.*]] = load i8*, i8** [[TMP8]], align 8
|
||||
// CHECK2-NEXT: store i8* [[TMP28]], i8** [[TMP27]], align 8
|
||||
// CHECK2-NEXT: [[TMP29:%.*]] = getelementptr inbounds [[STRUCT__KMP_PRIVATES_T]], %struct..kmp_privates.t* [[TMP26]], i32 0, i32 1
|
||||
// CHECK2-NEXT: [[TMP30:%.*]] = load i8*, i8** [[TMP10]], align 8
|
||||
// CHECK2-NEXT: store i8* [[TMP30]], i8** [[TMP29]], align 8
|
||||
// CHECK2-NEXT: [[TMP31:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP22]], i32 0, i32 5
|
||||
// CHECK2-NEXT: store i64 0, i64* [[TMP31]], align 8
|
||||
// CHECK2-NEXT: [[TMP32:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP22]], i32 0, i32 6
|
||||
// CHECK2-NEXT: store i64 4, i64* [[TMP32]], align 8
|
||||
// CHECK2-NEXT: [[TMP33:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP22]], i32 0, i32 7
|
||||
// CHECK2-NEXT: store i64 1, i64* [[TMP33]], align 8
|
||||
// CHECK2-NEXT: [[TMP34:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP22]], i32 0, i32 9
|
||||
// CHECK2-NEXT: [[TMP35:%.*]] = bitcast i8** [[TMP34]] to i8*
|
||||
// CHECK2-NEXT: call void @llvm.memset.p0i8.i64(i8* align 8 [[TMP35]], i8 0, i64 8, i1 false)
|
||||
// CHECK2-NEXT: [[TMP36:%.*]] = load i64, i64* [[TMP33]], align 8
|
||||
// CHECK2-NEXT: call void @__kmpc_taskloop(%struct.ident_t* @[[GLOB1]], i32 [[TMP12]], i8* [[TMP20]], i32 1, i64* [[TMP31]], i64* [[TMP32]], i64 [[TMP36]], i32 1, i32 0, i64 0, i8* null)
|
||||
// CHECK2-NEXT: call void @__kmpc_end_taskgroup(%struct.ident_t* @[[GLOB1]], i32 [[TMP12]])
|
||||
// CHECK2-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP12]])
|
||||
// CHECK2-NEXT: [[TMP9:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[AGG_CAPTURED]], i32 0, i32 0
|
||||
// CHECK2-NEXT: store i32* [[TMP0]], i32** [[TMP9]], align 8
|
||||
// CHECK2-NEXT: [[TMP10:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[AGG_CAPTURED]], i32 0, i32 1
|
||||
// CHECK2-NEXT: store i64 [[TMP1]], i64* [[TMP10]], align 8
|
||||
// CHECK2-NEXT: [[TMP11:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[AGG_CAPTURED]], i32 0, i32 2
|
||||
// CHECK2-NEXT: store i16* [[TMP2]], i16** [[TMP11]], align 8
|
||||
// CHECK2-NEXT: [[TMP12:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[AGG_CAPTURED]], i32 0, i32 3
|
||||
// CHECK2-NEXT: store i8** [[TMP3]], i8*** [[TMP12]], align 8
|
||||
// CHECK2-NEXT: [[TMP13:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[AGG_CAPTURED]], i32 0, i32 4
|
||||
// CHECK2-NEXT: store i8** [[TMP4]], i8*** [[TMP13]], align 8
|
||||
// CHECK2-NEXT: call void @__kmpc_taskgroup(%struct.ident_t* @[[GLOB1]], i32 [[TMP6]])
|
||||
// CHECK2-NEXT: [[TMP14:%.*]] = call i8* @__kmpc_omp_task_alloc(%struct.ident_t* @[[GLOB1]], i32 [[TMP6]], i32 1, i64 96, i64 40, i32 (i32, i8*)* bitcast (i32 (i32, %struct.kmp_task_t_with_privates*)* @.omp_task_entry. to i32 (i32, i8*)*))
|
||||
// CHECK2-NEXT: [[TMP15:%.*]] = bitcast i8* [[TMP14]] to %struct.kmp_task_t_with_privates*
|
||||
// CHECK2-NEXT: [[TMP16:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES:%.*]], %struct.kmp_task_t_with_privates* [[TMP15]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP17:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T:%.*]], %struct.kmp_task_t* [[TMP16]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP18:%.*]] = load i8*, i8** [[TMP17]], align 8
|
||||
// CHECK2-NEXT: [[TMP19:%.*]] = bitcast %struct.anon* [[AGG_CAPTURED]] to i8*
|
||||
// CHECK2-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 [[TMP18]], i8* align 8 [[TMP19]], i64 40, i1 false)
|
||||
// CHECK2-NEXT: [[TMP20:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES]], %struct.kmp_task_t_with_privates* [[TMP15]], i32 0, i32 1
|
||||
// CHECK2-NEXT: [[TMP21:%.*]] = getelementptr inbounds [[STRUCT__KMP_PRIVATES_T:%.*]], %struct..kmp_privates.t* [[TMP20]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP22:%.*]] = load i8*, i8** [[TMP3]], align 8
|
||||
// CHECK2-NEXT: store i8* [[TMP22]], i8** [[TMP21]], align 8
|
||||
// CHECK2-NEXT: [[TMP23:%.*]] = getelementptr inbounds [[STRUCT__KMP_PRIVATES_T]], %struct..kmp_privates.t* [[TMP20]], i32 0, i32 1
|
||||
// CHECK2-NEXT: [[TMP24:%.*]] = load i8*, i8** [[TMP4]], align 8
|
||||
// CHECK2-NEXT: store i8* [[TMP24]], i8** [[TMP23]], align 8
|
||||
// CHECK2-NEXT: [[TMP25:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP16]], i32 0, i32 5
|
||||
// CHECK2-NEXT: store i64 0, i64* [[TMP25]], align 8
|
||||
// CHECK2-NEXT: [[TMP26:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP16]], i32 0, i32 6
|
||||
// CHECK2-NEXT: store i64 4, i64* [[TMP26]], align 8
|
||||
// CHECK2-NEXT: [[TMP27:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP16]], i32 0, i32 7
|
||||
// CHECK2-NEXT: store i64 1, i64* [[TMP27]], align 8
|
||||
// CHECK2-NEXT: [[TMP28:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP16]], i32 0, i32 9
|
||||
// CHECK2-NEXT: [[TMP29:%.*]] = bitcast i8** [[TMP28]] to i8*
|
||||
// CHECK2-NEXT: call void @llvm.memset.p0i8.i64(i8* align 8 [[TMP29]], i8 0, i64 8, i1 false)
|
||||
// CHECK2-NEXT: [[TMP30:%.*]] = load i64, i64* [[TMP27]], align 8
|
||||
// CHECK2-NEXT: call void @__kmpc_taskloop(%struct.ident_t* @[[GLOB1]], i32 [[TMP6]], i8* [[TMP14]], i32 1, i64* [[TMP25]], i64* [[TMP26]], i64 [[TMP30]], i32 1, i32 0, i64 0, i8* null)
|
||||
// CHECK2-NEXT: call void @__kmpc_end_taskgroup(%struct.ident_t* @[[GLOB1]], i32 [[TMP6]])
|
||||
// CHECK2-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP6]])
|
||||
// CHECK2-NEXT: br label [[OMP_IF_END]]
|
||||
// CHECK2: omp_if.end:
|
||||
// CHECK2-NEXT: ret void
|
||||
|
@ -1267,7 +1249,7 @@ int main(int argc, char **argv) {
|
|||
// CHECK2-NEXT: [[DOTST__ADDR_I:%.*]] = alloca i64, align 8
|
||||
// CHECK2-NEXT: [[DOTLITER__ADDR_I:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[DOTREDUCTIONS__ADDR_I:%.*]] = alloca i8*, align 8
|
||||
// CHECK2-NEXT: [[__CONTEXT_ADDR_I:%.*]] = alloca %struct.anon.1*, align 8
|
||||
// CHECK2-NEXT: [[__CONTEXT_ADDR_I:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK2-NEXT: [[DOTFIRSTPRIV_PTR_ADDR_I:%.*]] = alloca i8**, align 8
|
||||
// CHECK2-NEXT: [[DOTFIRSTPRIV_PTR_ADDR1_I:%.*]] = alloca i8**, align 8
|
||||
// CHECK2-NEXT: [[I_I:%.*]] = alloca i32, align 4
|
||||
|
@ -1282,7 +1264,7 @@ int main(int argc, char **argv) {
|
|||
// CHECK2-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T:%.*]], %struct.kmp_task_t* [[TMP4]], i32 0, i32 2
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP4]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = load i8*, i8** [[TMP6]], align 8
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = bitcast i8* [[TMP7]] to %struct.anon.1*
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = bitcast i8* [[TMP7]] to %struct.anon*
|
||||
// CHECK2-NEXT: [[TMP9:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES]], %struct.kmp_task_t_with_privates* [[TMP3]], i32 0, i32 1
|
||||
// CHECK2-NEXT: [[TMP10:%.*]] = bitcast %struct..kmp_privates.t* [[TMP9]] to i8*
|
||||
// CHECK2-NEXT: [[TMP11:%.*]] = bitcast %struct.kmp_task_t_with_privates* [[TMP3]] to i8*
|
||||
|
@ -1311,9 +1293,9 @@ int main(int argc, char **argv) {
|
|||
// CHECK2-NEXT: store i64 [[TMP17]], i64* [[DOTST__ADDR_I]], align 8, !noalias !14
|
||||
// CHECK2-NEXT: store i32 [[TMP19]], i32* [[DOTLITER__ADDR_I]], align 4, !noalias !14
|
||||
// CHECK2-NEXT: store i8* [[TMP21]], i8** [[DOTREDUCTIONS__ADDR_I]], align 8, !noalias !14
|
||||
// CHECK2-NEXT: store %struct.anon.1* [[TMP8]], %struct.anon.1** [[__CONTEXT_ADDR_I]], align 8, !noalias !14
|
||||
// CHECK2-NEXT: [[TMP22:%.*]] = load %struct.anon.1*, %struct.anon.1** [[__CONTEXT_ADDR_I]], align 8, !noalias !14
|
||||
// CHECK2-NEXT: [[TMP23:%.*]] = getelementptr inbounds [[STRUCT_ANON_1:%.*]], %struct.anon.1* [[TMP22]], i32 0, i32 1
|
||||
// CHECK2-NEXT: store %struct.anon* [[TMP8]], %struct.anon** [[__CONTEXT_ADDR_I]], align 8, !noalias !14
|
||||
// CHECK2-NEXT: [[TMP22:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR_I]], align 8, !noalias !14
|
||||
// CHECK2-NEXT: [[TMP23:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP22]], i32 0, i32 1
|
||||
// CHECK2-NEXT: [[TMP24:%.*]] = load i64, i64* [[TMP23]], align 8
|
||||
// CHECK2-NEXT: [[TMP25:%.*]] = load void (i8*, ...)*, void (i8*, ...)** [[DOTCOPY_FN__ADDR_I]], align 8, !noalias !14
|
||||
// CHECK2-NEXT: [[TMP26:%.*]] = load i8*, i8** [[DOTPRIVATES__ADDR_I]], align 8, !noalias !14
|
||||
|
@ -1321,14 +1303,14 @@ int main(int argc, char **argv) {
|
|||
// CHECK2-NEXT: call void [[TMP27]](i8* [[TMP26]], i8*** [[DOTFIRSTPRIV_PTR_ADDR_I]], i8*** [[DOTFIRSTPRIV_PTR_ADDR1_I]]) #[[ATTR3]]
|
||||
// CHECK2-NEXT: [[TMP28:%.*]] = load i8**, i8*** [[DOTFIRSTPRIV_PTR_ADDR_I]], align 8, !noalias !14
|
||||
// CHECK2-NEXT: [[TMP29:%.*]] = load i8**, i8*** [[DOTFIRSTPRIV_PTR_ADDR1_I]], align 8, !noalias !14
|
||||
// CHECK2-NEXT: [[TMP30:%.*]] = getelementptr inbounds [[STRUCT_ANON_1]], %struct.anon.1* [[TMP22]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP30:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP22]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP31:%.*]] = load i32*, i32** [[TMP30]], align 8
|
||||
// CHECK2-NEXT: [[TMP32:%.*]] = load i8*, i8** [[TMP28]], align 8
|
||||
// CHECK2-NEXT: [[TMP33:%.*]] = load i32, i32* [[DOTGLOBAL_TID__ADDR_I]], align 4, !noalias !14
|
||||
// CHECK2-NEXT: [[TMP34:%.*]] = bitcast i32* [[TMP31]] to i8*
|
||||
// CHECK2-NEXT: [[TMP35:%.*]] = call i8* @__kmpc_task_reduction_get_th_data(i32 [[TMP33]], i8* [[TMP32]], i8* [[TMP34]]) #[[ATTR3]]
|
||||
// CHECK2-NEXT: [[CONV_I:%.*]] = bitcast i8* [[TMP35]] to i32*
|
||||
// CHECK2-NEXT: [[TMP36:%.*]] = getelementptr inbounds [[STRUCT_ANON_1]], %struct.anon.1* [[TMP22]], i32 0, i32 2
|
||||
// CHECK2-NEXT: [[TMP36:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP22]], i32 0, i32 2
|
||||
// CHECK2-NEXT: [[TMP37:%.*]] = load i16*, i16** [[TMP36]], align 8
|
||||
// CHECK2-NEXT: [[TMP38:%.*]] = mul nuw i64 [[TMP24]], 2
|
||||
// CHECK2-NEXT: [[TMP39:%.*]] = udiv exact i64 [[TMP38]], ptrtoint (i16* getelementptr (i16, i16* null, i32 1) to i64)
|
||||
|
|
|
@ -36,14 +36,14 @@ void foo() {
|
|||
}
|
||||
|
||||
// CHECK-LABEL: define {{.+}} void @foo()
|
||||
// CHECK: @__kmpc_fork_call(%struct.ident_t* {{.+}}, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, {{%struct.anon.?[0-9]*}}*)* [[OUTLINED_1:@.+]] to void
|
||||
// CHECK: @__kmpc_fork_call(%struct.ident_t* {{.+}}, i32 0, void (i32*, i32*, ...)* bitcast (void (i32*, i32*)* [[OUTLINED_1:@.+]] to void
|
||||
// CHECK-NEXT: @__kmpc_push_num_threads
|
||||
// CHECK: @__kmpc_fork_call(%struct.ident_t* {{.+}}, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, {{%struct.anon.?[0-9]*}}*)* [[OUTLINED_2:@.+]] to void
|
||||
// CHECK: @__kmpc_fork_call(%struct.ident_t* {{.+}}, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, {{%struct.anon.?[0-9]*}}*)* [[OUTLINED_3:@.+]] to void
|
||||
// CHECK: @__kmpc_fork_call(%struct.ident_t* {{.+}}, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, {{%struct.anon.?[0-9]*}}*)* [[OUTLINED_4:@.+]] to void
|
||||
// CHECK: @__kmpc_fork_call(%struct.ident_t* {{.+}}, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, {{%struct.anon.?[0-9]*}}*)* [[OUTLINED_5:@.+]] to void
|
||||
// CHECK: @__kmpc_fork_call(%struct.ident_t* {{.+}}, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, {{%struct.anon.?[0-9]*}}*)* [[OUTLINED_6:@.+]] to void
|
||||
// CHECK: @__kmpc_fork_call(%struct.ident_t* {{.+}}, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, {{%struct.anon.?[0-9]*}}*)* [[OUTLINED_7:@.+]] to void
|
||||
// CHECK: @__kmpc_fork_call(%struct.ident_t* {{.+}}, i32 0, void (i32*, i32*, ...)* bitcast (void (i32*, i32*)* [[OUTLINED_2:@.+]] to void
|
||||
// CHECK: @__kmpc_fork_call(%struct.ident_t* {{.+}}, i32 0, void (i32*, i32*, ...)* bitcast (void (i32*, i32*)* [[OUTLINED_3:@.+]] to void
|
||||
// CHECK: @__kmpc_fork_call(%struct.ident_t* {{.+}}, i32 0, void (i32*, i32*, ...)* bitcast (void (i32*, i32*)* [[OUTLINED_4:@.+]] to void
|
||||
// CHECK: @__kmpc_fork_call(%struct.ident_t* {{.+}}, i32 0, void (i32*, i32*, ...)* bitcast (void (i32*, i32*)* [[OUTLINED_5:@.+]] to void
|
||||
// CHECK: @__kmpc_fork_call(%struct.ident_t* {{.+}}, i32 0, void (i32*, i32*, ...)* bitcast (void (i32*, i32*)* [[OUTLINED_6:@.+]] to void
|
||||
// CHECK: @__kmpc_fork_call(%struct.ident_t* {{.+}}, i32 0, void (i32*, i32*, ...)* bitcast (void (i32*, i32*)* [[OUTLINED_7:@.+]] to void
|
||||
// CHECK: ret void
|
||||
|
||||
// CHECK: define internal void [[OUTLINED_1]](
|
||||
|
|
|
@ -37,14 +37,14 @@ void foo() {
|
|||
}
|
||||
|
||||
// CHECK-LABEL: define {{.+}} void @_Z3foov()
|
||||
// CHECK: @__kmpc_fork_call(%struct.ident_t* {{.+}}, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, {{%struct.anon.?[0-9]*}}*)* [[OUTLINED_1:@.+]] to void
|
||||
// CHECK: @__kmpc_fork_call(%struct.ident_t* {{.+}}, i32 0, void (i32*, i32*, ...)* bitcast (void (i32*, i32*)* [[OUTLINED_1:@.+]] to void
|
||||
// CHECK-NEXT: @__kmpc_push_num_threads
|
||||
// CHECK: @__kmpc_fork_call(%struct.ident_t* {{.+}}, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, {{%struct.anon.?[0-9]*}}*)* [[OUTLINED_2:@.+]] to void
|
||||
// CHECK: @__kmpc_fork_call(%struct.ident_t* {{.+}}, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, {{%struct.anon.?[0-9]*}}*)* [[OUTLINED_3:@.+]] to void
|
||||
// CHECK: @__kmpc_fork_call(%struct.ident_t* {{.+}}, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, {{%struct.anon.?[0-9]*}}*)* [[OUTLINED_4:@.+]] to void
|
||||
// CHECK: @__kmpc_fork_call(%struct.ident_t* {{.+}}, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, {{%struct.anon.?[0-9]*}}*)* [[OUTLINED_5:@.+]] to void
|
||||
// CHECK: @__kmpc_fork_call(%struct.ident_t* {{.+}}, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, {{%struct.anon.?[0-9]*}}*)* [[OUTLINED_6:@.+]] to void
|
||||
// CHECK: @__kmpc_fork_call(%struct.ident_t* {{.+}}, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, {{%struct.anon.?[0-9]*}}*)* [[OUTLINED_7:@.+]] to void
|
||||
// CHECK: @__kmpc_fork_call(%struct.ident_t* {{.+}}, i32 0, void (i32*, i32*, ...)* bitcast (void (i32*, i32*)* [[OUTLINED_2:@.+]] to void
|
||||
// CHECK: @__kmpc_fork_call(%struct.ident_t* {{.+}}, i32 0, void (i32*, i32*, ...)* bitcast (void (i32*, i32*)* [[OUTLINED_3:@.+]] to void
|
||||
// CHECK: @__kmpc_fork_call(%struct.ident_t* {{.+}}, i32 0, void (i32*, i32*, ...)* bitcast (void (i32*, i32*)* [[OUTLINED_4:@.+]] to void
|
||||
// CHECK: @__kmpc_fork_call(%struct.ident_t* {{.+}}, i32 0, void (i32*, i32*, ...)* bitcast (void (i32*, i32*)* [[OUTLINED_5:@.+]] to void
|
||||
// CHECK: @__kmpc_fork_call(%struct.ident_t* {{.+}}, i32 0, void (i32*, i32*, ...)* bitcast (void (i32*, i32*)* [[OUTLINED_6:@.+]] to void
|
||||
// CHECK: @__kmpc_fork_call(%struct.ident_t* {{.+}}, i32 0, void (i32*, i32*, ...)* bitcast (void (i32*, i32*)* [[OUTLINED_7:@.+]] to void
|
||||
// CHECK: ret void
|
||||
|
||||
// CHECK: define internal void [[OUTLINED_1]](
|
||||
|
|
|
@ -38,12 +38,12 @@ void foo() {
|
|||
}
|
||||
|
||||
// CHECK-LABEL: void @_Z3foov()
|
||||
// CHECK: @__kmpc_fork_call(%struct.ident_t* {{.+}}, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %{{struct.anon.?[0-9]*}}*)* [[OUTLINED_2:@.+]] to void
|
||||
// CHECK: @__kmpc_fork_call(%struct.ident_t* {{.+}}, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %{{struct.anon.?[0-9]*}}*)* [[OUTLINED_3:@.+]] to void
|
||||
// CHECK: @__kmpc_fork_call(%struct.ident_t* {{.+}}, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %{{struct.anon.?[0-9]*}}*)* [[OUTLINED_4:@.+]] to void
|
||||
// CHECK: @__kmpc_fork_call(%struct.ident_t* {{.+}}, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %{{struct.anon.?[0-9]*}}*)* [[OUTLINED_5:@.+]] to void
|
||||
// CHECK: @__kmpc_fork_call(%struct.ident_t* {{.+}}, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %{{struct.anon.?[0-9]*}}*)* [[OUTLINED_6:@.+]] to void
|
||||
// CHECK: @__kmpc_fork_call(%struct.ident_t* {{.+}}, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %{{struct.anon.?[0-9]*}}*)* [[OUTLINED_7:@.+]] to void
|
||||
// CHECK: @__kmpc_fork_call(%struct.ident_t* {{.+}}, i32 0, void (i32*, i32*, ...)* bitcast (void (i32*, i32*)* [[OUTLINED_2:@.+]] to void
|
||||
// CHECK: @__kmpc_fork_call(%struct.ident_t* {{.+}}, i32 0, void (i32*, i32*, ...)* bitcast (void (i32*, i32*)* [[OUTLINED_3:@.+]] to void
|
||||
// CHECK: @__kmpc_fork_call(%struct.ident_t* {{.+}}, i32 0, void (i32*, i32*, ...)* bitcast (void (i32*, i32*)* [[OUTLINED_4:@.+]] to void
|
||||
// CHECK: @__kmpc_fork_call(%struct.ident_t* {{.+}}, i32 0, void (i32*, i32*, ...)* bitcast (void (i32*, i32*)* [[OUTLINED_5:@.+]] to void
|
||||
// CHECK: @__kmpc_fork_call(%struct.ident_t* {{.+}}, i32 0, void (i32*, i32*, ...)* bitcast (void (i32*, i32*)* [[OUTLINED_6:@.+]] to void
|
||||
// CHECK: @__kmpc_fork_call(%struct.ident_t* {{.+}}, i32 0, void (i32*, i32*, ...)* bitcast (void (i32*, i32*)* [[OUTLINED_7:@.+]] to void
|
||||
// CHECK: ret void
|
||||
|
||||
// CHECK: define internal void [[OUTLINED_2]](
|
||||
|
|
|
@ -91,7 +91,7 @@ void bar() {
|
|||
// CHECK1-NEXT: store i32 0, i32* [[RETVAL]], align 4
|
||||
// CHECK1-NEXT: store i32 2, i32* @_ZZ4mainE1a, align 4
|
||||
// CHECK1-NEXT: store double 3.000000e+00, double* [[B]], align 8
|
||||
// CHECK1-NEXT: [[CALL:%.*]] = call i32 @_Z3fooIiET_v() #[[ATTR7:[0-9]+]]
|
||||
// CHECK1-NEXT: [[CALL:%.*]] = call i32 @_Z3fooIiET_v() #[[ATTR6:[0-9]+]]
|
||||
// CHECK1-NEXT: ret i32 [[CALL]]
|
||||
//
|
||||
//
|
||||
|
@ -109,36 +109,25 @@ void bar() {
|
|||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[BAR_A:%.*]] = alloca float, align 4
|
||||
// CHECK1-NEXT: [[BAR_B:%.*]] = alloca double, align 8
|
||||
// CHECK1-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 1
|
||||
// CHECK1-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 8
|
||||
// CHECK1-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x i8*], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1:[0-9]+]])
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = call i8* @__kmpc_alloc_shared(i64 1)
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = load [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], align 1
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = bitcast i8* [[TMP2]] to %struct.anon*
|
||||
// CHECK1-NEXT: store [[STRUCT_ANON]] [[TMP3]], %struct.anon* [[TMP4]], align 1
|
||||
// CHECK1-NEXT: store i8* [[TMP2]], i8** [[TMP1]], align 8
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK1-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB1]], i32 [[TMP0]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon*)* @__omp_outlined__ to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined___wrapper to i8*), i8** [[TMP5]], i64 1)
|
||||
// CHECK1-NEXT: call void @__kmpc_free_shared(i8* [[TMP2]], i64 1)
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = bitcast [0 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK1-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB1]], i32 [[TMP0]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*)* @__omp_outlined__ to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined___wrapper to i8*), i8** [[TMP1]], i64 0)
|
||||
// CHECK1-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@__omp_outlined__
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR2:[0-9]+]] {
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]]) #[[ATTR2:[0-9]+]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK1-NEXT: [[BAR_A:%.*]] = alloca float, align 4
|
||||
// CHECK1-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = load float, float* [[BAR_A]], align 4
|
||||
// CHECK1-NEXT: [[CONV:%.*]] = fpext float [[TMP1]] to double
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load float, float* [[BAR_A]], align 4
|
||||
// CHECK1-NEXT: [[CONV:%.*]] = fpext float [[TMP0]] to double
|
||||
// CHECK1-NEXT: store double [[CONV]], double* addrspacecast (double addrspace(3)* @bar_b to double*), align 8
|
||||
// CHECK1-NEXT: call void @_Z3bazRf(float* nonnull align 4 dereferenceable(4) [[BAR_A]]) #[[ATTR7]]
|
||||
// CHECK1-NEXT: call void @_Z3bazRf(float* nonnull align 4 dereferenceable(4) [[BAR_A]]) #[[ATTR6]]
|
||||
// CHECK1-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -153,6 +142,6 @@ void bar() {
|
|||
// CHECK1-NEXT: store i16 [[TMP0]], i16* [[DOTADDR]], align 2
|
||||
// CHECK1-NEXT: store i32 [[TMP1]], i32* [[DOTADDR1]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_get_shared_variables(i8*** [[GLOBAL_ARGS]])
|
||||
// CHECK1-NEXT: call void @__omp_outlined__(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]], %struct.anon* null) #[[ATTR5:[0-9]+]]
|
||||
// CHECK1-NEXT: call void @__omp_outlined__(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]]) #[[ATTR5:[0-9]+]]
|
||||
// CHECK1-NEXT: ret void
|
||||
//
|
||||
|
|
|
@ -390,11 +390,9 @@ void test_ds(){
|
|||
// CHECK-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z7test_dsv_l14
|
||||
// CHECK-SAME: () #[[ATTR0:[0-9]+]] {
|
||||
// CHECK-NEXT: entry:
|
||||
// CHECK-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 8
|
||||
// CHECK-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 8
|
||||
// CHECK-NEXT: [[C:%.*]] = alloca i32, align 4
|
||||
// CHECK-NEXT: [[OMP_OUTLINED_ARG_AGG_1:%.*]] = alloca [[STRUCT_ANON_0:%.*]], align 8
|
||||
// CHECK-NEXT: [[CAPTURED_VARS_ADDRS2:%.*]] = alloca [1 x i8*], align 8
|
||||
// CHECK-NEXT: [[CAPTURED_VARS_ADDRS1:%.*]] = alloca [2 x i8*], align 8
|
||||
// CHECK-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(%struct.ident_t* @[[GLOB1:[0-9]+]], i1 false, i1 true, i1 true)
|
||||
// CHECK-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
|
||||
// CHECK-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
|
||||
|
@ -405,32 +403,21 @@ void test_ds(){
|
|||
// CHECK-NEXT: [[B_ON_STACK:%.*]] = bitcast i8* [[B]] to i32*
|
||||
// CHECK-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
|
||||
// CHECK-NEXT: store i32 10, i32* [[A_ON_STACK]], align 4
|
||||
// CHECK-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK-NEXT: store i32* [[A_ON_STACK]], i32** [[TMP2]], align 8
|
||||
// CHECK-NEXT: [[TMP3:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
|
||||
// CHECK-NEXT: [[TMP4:%.*]] = call i8* @__kmpc_alloc_shared(i64 8)
|
||||
// CHECK-NEXT: [[TMP5:%.*]] = load [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], align 8
|
||||
// CHECK-NEXT: [[TMP6:%.*]] = bitcast i8* [[TMP4]] to %struct.anon*
|
||||
// CHECK-NEXT: store [[STRUCT_ANON]] [[TMP5]], %struct.anon* [[TMP6]], align 8
|
||||
// CHECK-NEXT: store i8* [[TMP4]], i8** [[TMP3]], align 8
|
||||
// CHECK-NEXT: [[TMP7:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon*)* @__omp_outlined__ to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined___wrapper to i8*), i8** [[TMP7]], i64 1)
|
||||
// CHECK-NEXT: call void @__kmpc_free_shared(i8* [[TMP4]], i64 8)
|
||||
// CHECK-NEXT: [[TMP2:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
|
||||
// CHECK-NEXT: [[TMP3:%.*]] = bitcast i32* [[A_ON_STACK]] to i8*
|
||||
// CHECK-NEXT: store i8* [[TMP3]], i8** [[TMP2]], align 8
|
||||
// CHECK-NEXT: [[TMP4:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i32*)* @__omp_outlined__ to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined___wrapper to i8*), i8** [[TMP4]], i64 1)
|
||||
// CHECK-NEXT: store i32 100, i32* [[B_ON_STACK]], align 4
|
||||
// CHECK-NEXT: store i32 1000, i32* [[C]], align 4
|
||||
// CHECK-NEXT: [[TMP8:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_1]], i32 0, i32 0
|
||||
// CHECK-NEXT: store i32* [[B_ON_STACK]], i32** [[TMP8]], align 8
|
||||
// CHECK-NEXT: [[TMP9:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_1]], i32 0, i32 1
|
||||
// CHECK-NEXT: store i32* [[A_ON_STACK]], i32** [[TMP9]], align 8
|
||||
// CHECK-NEXT: [[TMP10:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS2]], i64 0, i64 0
|
||||
// CHECK-NEXT: [[TMP11:%.*]] = call i8* @__kmpc_alloc_shared(i64 16)
|
||||
// CHECK-NEXT: [[TMP12:%.*]] = load [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_1]], align 8
|
||||
// CHECK-NEXT: [[TMP13:%.*]] = bitcast i8* [[TMP11]] to %struct.anon.0*
|
||||
// CHECK-NEXT: store [[STRUCT_ANON_0]] [[TMP12]], %struct.anon.0* [[TMP13]], align 8
|
||||
// CHECK-NEXT: store i8* [[TMP11]], i8** [[TMP10]], align 8
|
||||
// CHECK-NEXT: [[TMP14:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS2]] to i8**
|
||||
// CHECK-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon.0*)* @__omp_outlined__1 to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined__1_wrapper to i8*), i8** [[TMP14]], i64 1)
|
||||
// CHECK-NEXT: call void @__kmpc_free_shared(i8* [[TMP11]], i64 16)
|
||||
// CHECK-NEXT: [[TMP5:%.*]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[CAPTURED_VARS_ADDRS1]], i64 0, i64 0
|
||||
// CHECK-NEXT: [[TMP6:%.*]] = bitcast i32* [[B_ON_STACK]] to i8*
|
||||
// CHECK-NEXT: store i8* [[TMP6]], i8** [[TMP5]], align 8
|
||||
// CHECK-NEXT: [[TMP7:%.*]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[CAPTURED_VARS_ADDRS1]], i64 0, i64 1
|
||||
// CHECK-NEXT: [[TMP8:%.*]] = bitcast i32* [[A_ON_STACK]] to i8*
|
||||
// CHECK-NEXT: store i8* [[TMP8]], i8** [[TMP7]], align 8
|
||||
// CHECK-NEXT: [[TMP9:%.*]] = bitcast [2 x i8*]* [[CAPTURED_VARS_ADDRS1]] to i8**
|
||||
// CHECK-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i32*, i32*)* @__omp_outlined__1 to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined__1_wrapper to i8*), i8** [[TMP9]], i64 2)
|
||||
// CHECK-NEXT: call void @__kmpc_free_shared(i8* [[B]], i64 4)
|
||||
// CHECK-NEXT: call void @__kmpc_free_shared(i8* [[A]], i64 4)
|
||||
// CHECK-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 false, i1 true)
|
||||
|
@ -440,18 +427,16 @@ void test_ds(){
|
|||
//
|
||||
//
|
||||
// CHECK-LABEL: define {{[^@]+}}@__omp_outlined__
|
||||
// CHECK-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR0]] {
|
||||
// CHECK-NEXT: entry:
|
||||
// CHECK-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 8
|
||||
// CHECK-NEXT: store i32 1000, i32* [[TMP2]], align 4
|
||||
// CHECK-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 8
|
||||
// CHECK-NEXT: [[TMP0:%.*]] = load i32*, i32** [[A_ADDR]], align 8
|
||||
// CHECK-NEXT: store i32 1000, i32* [[TMP0]], align 4
|
||||
// CHECK-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -468,32 +453,31 @@ void test_ds(){
|
|||
// CHECK-NEXT: call void @__kmpc_get_shared_variables(i8*** [[GLOBAL_ARGS]])
|
||||
// CHECK-NEXT: [[TMP2:%.*]] = load i8**, i8*** [[GLOBAL_ARGS]], align 8
|
||||
// CHECK-NEXT: [[TMP3:%.*]] = getelementptr inbounds i8*, i8** [[TMP2]], i64 0
|
||||
// CHECK-NEXT: [[TMP4:%.*]] = bitcast i8** [[TMP3]] to %struct.anon**
|
||||
// CHECK-NEXT: [[TMP5:%.*]] = load %struct.anon*, %struct.anon** [[TMP4]], align 8
|
||||
// CHECK-NEXT: call void @__omp_outlined__(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]], %struct.anon* [[TMP5]]) #[[ATTR1:[0-9]+]]
|
||||
// CHECK-NEXT: [[TMP4:%.*]] = bitcast i8** [[TMP3]] to i32**
|
||||
// CHECK-NEXT: [[TMP5:%.*]] = load i32*, i32** [[TMP4]], align 8
|
||||
// CHECK-NEXT: call void @__omp_outlined__(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]], i32* [[TMP5]]) #[[ATTR1:[0-9]+]]
|
||||
// CHECK-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK-LABEL: define {{[^@]+}}@__omp_outlined__1
|
||||
// CHECK-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.0* noalias [[__CONTEXT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[B:%.*]], i32* nonnull align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR0]] {
|
||||
// CHECK-NEXT: entry:
|
||||
// CHECK-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.0*, align 8
|
||||
// CHECK-NEXT: [[B_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK-NEXT: [[C:%.*]] = alloca i32, align 4
|
||||
// CHECK-NEXT: [[C1:%.*]] = alloca i32*, align 8
|
||||
// CHECK-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK-NEXT: store %struct.anon.0* [[__CONTEXT]], %struct.anon.0** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK-NEXT: [[TMP0:%.*]] = load %struct.anon.0*, %struct.anon.0** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_0:%.*]], %struct.anon.0* [[TMP0]], i32 0, i32 0
|
||||
// CHECK-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 8
|
||||
// CHECK-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[TMP0]], i32 0, i32 1
|
||||
// CHECK-NEXT: [[TMP4:%.*]] = load i32*, i32** [[TMP3]], align 8
|
||||
// CHECK-NEXT: store i32* [[B]], i32** [[B_ADDR]], align 8
|
||||
// CHECK-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 8
|
||||
// CHECK-NEXT: [[TMP0:%.*]] = load i32*, i32** [[B_ADDR]], align 8
|
||||
// CHECK-NEXT: [[TMP1:%.*]] = load i32*, i32** [[A_ADDR]], align 8
|
||||
// CHECK-NEXT: store i32* [[C]], i32** [[C1]], align 8
|
||||
// CHECK-NEXT: [[TMP5:%.*]] = load i32, i32* [[TMP4]], align 4
|
||||
// CHECK-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP5]], 10000
|
||||
// CHECK-NEXT: store i32 [[ADD]], i32* [[TMP2]], align 4
|
||||
// CHECK-NEXT: [[TMP2:%.*]] = load i32, i32* [[TMP1]], align 4
|
||||
// CHECK-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP2]], 10000
|
||||
// CHECK-NEXT: store i32 [[ADD]], i32* [[TMP0]], align 4
|
||||
// CHECK-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -510,8 +494,11 @@ void test_ds(){
|
|||
// CHECK-NEXT: call void @__kmpc_get_shared_variables(i8*** [[GLOBAL_ARGS]])
|
||||
// CHECK-NEXT: [[TMP2:%.*]] = load i8**, i8*** [[GLOBAL_ARGS]], align 8
|
||||
// CHECK-NEXT: [[TMP3:%.*]] = getelementptr inbounds i8*, i8** [[TMP2]], i64 0
|
||||
// CHECK-NEXT: [[TMP4:%.*]] = bitcast i8** [[TMP3]] to %struct.anon.0**
|
||||
// CHECK-NEXT: [[TMP5:%.*]] = load %struct.anon.0*, %struct.anon.0** [[TMP4]], align 8
|
||||
// CHECK-NEXT: call void @__omp_outlined__1(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]], %struct.anon.0* [[TMP5]]) #[[ATTR1]]
|
||||
// CHECK-NEXT: [[TMP4:%.*]] = bitcast i8** [[TMP3]] to i32**
|
||||
// CHECK-NEXT: [[TMP5:%.*]] = load i32*, i32** [[TMP4]], align 8
|
||||
// CHECK-NEXT: [[TMP6:%.*]] = getelementptr inbounds i8*, i8** [[TMP2]], i64 1
|
||||
// CHECK-NEXT: [[TMP7:%.*]] = bitcast i8** [[TMP6]] to i32**
|
||||
// CHECK-NEXT: [[TMP8:%.*]] = load i32*, i32** [[TMP7]], align 8
|
||||
// CHECK-NEXT: call void @__omp_outlined__1(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]], i32* [[TMP5]], i32* [[TMP8]]) #[[ATTR1]]
|
||||
// CHECK-NEXT: ret void
|
||||
//
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -28,22 +28,14 @@ int main() {
|
|||
// CHECK1-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l21
|
||||
// CHECK1-SAME: () #[[ATTR0:[0-9]+]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 1
|
||||
// CHECK1-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 8
|
||||
// CHECK1-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x i8*], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(%struct.ident_t* @[[GLOB1:[0-9]+]], i1 true, i1 false, i1 true)
|
||||
// CHECK1-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
|
||||
// CHECK1-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
|
||||
// CHECK1: user_code.entry:
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB2:[0-9]+]])
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = call i8* @__kmpc_alloc_shared(i64 1)
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = load [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], align 1
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = bitcast i8* [[TMP3]] to %struct.anon*
|
||||
// CHECK1-NEXT: store [[STRUCT_ANON]] [[TMP4]], %struct.anon* [[TMP5]], align 1
|
||||
// CHECK1-NEXT: store i8* [[TMP3]], i8** [[TMP2]], align 8
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK1-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon*)* @__omp_outlined__ to i8*), i8* null, i8** [[TMP6]], i64 1)
|
||||
// CHECK1-NEXT: call void @__kmpc_free_shared(i8* [[TMP3]], i64 1)
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = bitcast [0 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK1-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*)* @__omp_outlined__ to i8*), i8* null, i8** [[TMP2]], i64 0)
|
||||
// CHECK1-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 true, i1 true)
|
||||
// CHECK1-NEXT: ret void
|
||||
// CHECK1: worker.exit:
|
||||
|
@ -51,34 +43,23 @@ int main() {
|
|||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@__omp_outlined__
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: call void @_Z3usev() #[[ATTR7:[0-9]+]]
|
||||
// CHECK1-NEXT: call void @_Z3usev() #[[ATTR6:[0-9]+]]
|
||||
// CHECK1-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@_Z3usev
|
||||
// CHECK1-SAME: () #[[ATTR2:[0-9]+]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON_0:%.*]], align 1
|
||||
// CHECK1-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 8
|
||||
// CHECK1-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x i8*], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB3:[0-9]+]])
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = call i8* @__kmpc_alloc_shared(i64 1)
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = load [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], align 1
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = bitcast i8* [[TMP2]] to %struct.anon.0*
|
||||
// CHECK1-NEXT: store [[STRUCT_ANON_0]] [[TMP3]], %struct.anon.0* [[TMP4]], align 1
|
||||
// CHECK1-NEXT: store i8* [[TMP2]], i8** [[TMP1]], align 8
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK1-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB3]], i32 [[TMP0]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon.0*)* @__omp_outlined__1 to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined__1_wrapper to i8*), i8** [[TMP5]], i64 1)
|
||||
// CHECK1-NEXT: call void @__kmpc_free_shared(i8* [[TMP2]], i64 1)
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = bitcast [0 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK1-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB3]], i32 [[TMP0]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*)* @__omp_outlined__1 to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined__1_wrapper to i8*), i8** [[TMP1]], i64 0)
|
||||
// CHECK1-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -89,7 +70,7 @@ int main() {
|
|||
// CHECK1-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
|
||||
// CHECK1-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
|
||||
// CHECK1: user_code.entry:
|
||||
// CHECK1-NEXT: call void @_Z3usev() #[[ATTR7]]
|
||||
// CHECK1-NEXT: call void @_Z3usev() #[[ATTR6]]
|
||||
// CHECK1-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 false, i1 true)
|
||||
// CHECK1-NEXT: ret void
|
||||
// CHECK1: worker.exit:
|
||||
|
@ -97,21 +78,18 @@ int main() {
|
|||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@__omp_outlined__1
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.0* noalias [[__CONTEXT:%.*]]) #[[ATTR1]] {
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.0*, align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store %struct.anon.0* [[__CONTEXT]], %struct.anon.0** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load %struct.anon.0*, %struct.anon.0** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: call void @_Z4workv() #[[ATTR7]]
|
||||
// CHECK1-NEXT: call void @_Z4workv() #[[ATTR6]]
|
||||
// CHECK1-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@__omp_outlined__1_wrapper
|
||||
// CHECK1-SAME: (i16 zeroext [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR6:[0-9]+]] {
|
||||
// CHECK1-SAME: (i16 zeroext [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR5:[0-9]+]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[DOTADDR:%.*]] = alloca i16, align 2
|
||||
// CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca i32, align 4
|
||||
|
@ -121,29 +99,21 @@ int main() {
|
|||
// CHECK1-NEXT: store i16 [[TMP0]], i16* [[DOTADDR]], align 2
|
||||
// CHECK1-NEXT: store i32 [[TMP1]], i32* [[DOTADDR1]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_get_shared_variables(i8*** [[GLOBAL_ARGS]])
|
||||
// CHECK1-NEXT: call void @__omp_outlined__1(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]], %struct.anon.0* null) #[[ATTR3:[0-9]+]]
|
||||
// CHECK1-NEXT: call void @__omp_outlined__1(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]]) #[[ATTR3:[0-9]+]]
|
||||
// CHECK1-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK2-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l21
|
||||
// CHECK2-SAME: () #[[ATTR0:[0-9]+]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 1
|
||||
// CHECK2-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 4
|
||||
// CHECK2-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x i8*], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(%struct.ident_t* @[[GLOB1:[0-9]+]], i1 true, i1 false, i1 true)
|
||||
// CHECK2-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
|
||||
// CHECK2-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
|
||||
// CHECK2: user_code.entry:
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB2:[0-9]+]])
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = call i8* @__kmpc_alloc_shared(i32 1)
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = load [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], align 1
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = bitcast i8* [[TMP3]] to %struct.anon*
|
||||
// CHECK2-NEXT: store [[STRUCT_ANON]] [[TMP4]], %struct.anon* [[TMP5]], align 1
|
||||
// CHECK2-NEXT: store i8* [[TMP3]], i8** [[TMP2]], align 4
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK2-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon*)* @__omp_outlined__ to i8*), i8* null, i8** [[TMP6]], i32 1)
|
||||
// CHECK2-NEXT: call void @__kmpc_free_shared(i8* [[TMP3]], i32 1)
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = bitcast [0 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK2-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*)* @__omp_outlined__ to i8*), i8* null, i8** [[TMP2]], i32 0)
|
||||
// CHECK2-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 true, i1 true)
|
||||
// CHECK2-NEXT: ret void
|
||||
// CHECK2: worker.exit:
|
||||
|
@ -151,34 +121,23 @@ int main() {
|
|||
//
|
||||
//
|
||||
// CHECK2-LABEL: define {{[^@]+}}@__omp_outlined__
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK2-NEXT: call void @_Z3usev() #[[ATTR7:[0-9]+]]
|
||||
// CHECK2-NEXT: call void @_Z3usev() #[[ATTR6:[0-9]+]]
|
||||
// CHECK2-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK2-LABEL: define {{[^@]+}}@_Z3usev
|
||||
// CHECK2-SAME: () #[[ATTR2:[0-9]+]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON_0:%.*]], align 1
|
||||
// CHECK2-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 4
|
||||
// CHECK2-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x i8*], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB3:[0-9]+]])
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = call i8* @__kmpc_alloc_shared(i32 1)
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = load [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], align 1
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = bitcast i8* [[TMP2]] to %struct.anon.0*
|
||||
// CHECK2-NEXT: store [[STRUCT_ANON_0]] [[TMP3]], %struct.anon.0* [[TMP4]], align 1
|
||||
// CHECK2-NEXT: store i8* [[TMP2]], i8** [[TMP1]], align 4
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK2-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB3]], i32 [[TMP0]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon.0*)* @__omp_outlined__1 to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined__1_wrapper to i8*), i8** [[TMP5]], i32 1)
|
||||
// CHECK2-NEXT: call void @__kmpc_free_shared(i8* [[TMP2]], i32 1)
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = bitcast [0 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK2-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB3]], i32 [[TMP0]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*)* @__omp_outlined__1 to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined__1_wrapper to i8*), i8** [[TMP1]], i32 0)
|
||||
// CHECK2-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -189,7 +148,7 @@ int main() {
|
|||
// CHECK2-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
|
||||
// CHECK2-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
|
||||
// CHECK2: user_code.entry:
|
||||
// CHECK2-NEXT: call void @_Z3usev() #[[ATTR7]]
|
||||
// CHECK2-NEXT: call void @_Z3usev() #[[ATTR6]]
|
||||
// CHECK2-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 false, i1 true)
|
||||
// CHECK2-NEXT: ret void
|
||||
// CHECK2: worker.exit:
|
||||
|
@ -197,21 +156,18 @@ int main() {
|
|||
//
|
||||
//
|
||||
// CHECK2-LABEL: define {{[^@]+}}@__omp_outlined__1
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.0* noalias [[__CONTEXT:%.*]]) #[[ATTR1]] {
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.0*, align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: store %struct.anon.0* [[__CONTEXT]], %struct.anon.0** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load %struct.anon.0*, %struct.anon.0** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK2-NEXT: call void @_Z4workv() #[[ATTR7]]
|
||||
// CHECK2-NEXT: call void @_Z4workv() #[[ATTR6]]
|
||||
// CHECK2-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK2-LABEL: define {{[^@]+}}@__omp_outlined__1_wrapper
|
||||
// CHECK2-SAME: (i16 zeroext [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR6:[0-9]+]] {
|
||||
// CHECK2-SAME: (i16 zeroext [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR5:[0-9]+]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[DOTADDR:%.*]] = alloca i16, align 2
|
||||
// CHECK2-NEXT: [[DOTADDR1:%.*]] = alloca i32, align 4
|
||||
|
@ -221,29 +177,21 @@ int main() {
|
|||
// CHECK2-NEXT: store i16 [[TMP0]], i16* [[DOTADDR]], align 2
|
||||
// CHECK2-NEXT: store i32 [[TMP1]], i32* [[DOTADDR1]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_get_shared_variables(i8*** [[GLOBAL_ARGS]])
|
||||
// CHECK2-NEXT: call void @__omp_outlined__1(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]], %struct.anon.0* null) #[[ATTR3:[0-9]+]]
|
||||
// CHECK2-NEXT: call void @__omp_outlined__1(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]]) #[[ATTR3:[0-9]+]]
|
||||
// CHECK2-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK3-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l21
|
||||
// CHECK3-SAME: () #[[ATTR0:[0-9]+]] {
|
||||
// CHECK3-NEXT: entry:
|
||||
// CHECK3-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 1
|
||||
// CHECK3-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 4
|
||||
// CHECK3-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x i8*], align 4
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(%struct.ident_t* @[[GLOB1:[0-9]+]], i1 true, i1 false, i1 true)
|
||||
// CHECK3-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
|
||||
// CHECK3-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
|
||||
// CHECK3: user_code.entry:
|
||||
// CHECK3-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB2:[0-9]+]])
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = call i8* @__kmpc_alloc_shared(i32 1)
|
||||
// CHECK3-NEXT: [[TMP4:%.*]] = load [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], align 1
|
||||
// CHECK3-NEXT: [[TMP5:%.*]] = bitcast i8* [[TMP3]] to %struct.anon*
|
||||
// CHECK3-NEXT: store [[STRUCT_ANON]] [[TMP4]], %struct.anon* [[TMP5]], align 1
|
||||
// CHECK3-NEXT: store i8* [[TMP3]], i8** [[TMP2]], align 4
|
||||
// CHECK3-NEXT: [[TMP6:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK3-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon*)* @__omp_outlined__ to i8*), i8* null, i8** [[TMP6]], i32 1)
|
||||
// CHECK3-NEXT: call void @__kmpc_free_shared(i8* [[TMP3]], i32 1)
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = bitcast [0 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK3-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*)* @__omp_outlined__ to i8*), i8* null, i8** [[TMP2]], i32 0)
|
||||
// CHECK3-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 true, i1 true)
|
||||
// CHECK3-NEXT: ret void
|
||||
// CHECK3: worker.exit:
|
||||
|
@ -251,34 +199,23 @@ int main() {
|
|||
//
|
||||
//
|
||||
// CHECK3-LABEL: define {{[^@]+}}@__omp_outlined__
|
||||
// CHECK3-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK3-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK3-NEXT: entry:
|
||||
// CHECK3-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK3-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK3-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 4
|
||||
// CHECK3-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK3-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK3-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK3-NEXT: call void @_Z3usev() #[[ATTR7:[0-9]+]]
|
||||
// CHECK3-NEXT: call void @_Z3usev() #[[ATTR6:[0-9]+]]
|
||||
// CHECK3-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK3-LABEL: define {{[^@]+}}@_Z3usev
|
||||
// CHECK3-SAME: () #[[ATTR2:[0-9]+]] {
|
||||
// CHECK3-NEXT: entry:
|
||||
// CHECK3-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON_0:%.*]], align 1
|
||||
// CHECK3-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 4
|
||||
// CHECK3-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x i8*], align 4
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB3:[0-9]+]])
|
||||
// CHECK3-NEXT: [[TMP1:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = call i8* @__kmpc_alloc_shared(i32 1)
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = load [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], align 1
|
||||
// CHECK3-NEXT: [[TMP4:%.*]] = bitcast i8* [[TMP2]] to %struct.anon.0*
|
||||
// CHECK3-NEXT: store [[STRUCT_ANON_0]] [[TMP3]], %struct.anon.0* [[TMP4]], align 1
|
||||
// CHECK3-NEXT: store i8* [[TMP2]], i8** [[TMP1]], align 4
|
||||
// CHECK3-NEXT: [[TMP5:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK3-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB3]], i32 [[TMP0]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon.0*)* @__omp_outlined__1 to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined__1_wrapper to i8*), i8** [[TMP5]], i32 1)
|
||||
// CHECK3-NEXT: call void @__kmpc_free_shared(i8* [[TMP2]], i32 1)
|
||||
// CHECK3-NEXT: [[TMP1:%.*]] = bitcast [0 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK3-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB3]], i32 [[TMP0]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*)* @__omp_outlined__1 to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined__1_wrapper to i8*), i8** [[TMP1]], i32 0)
|
||||
// CHECK3-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -289,7 +226,7 @@ int main() {
|
|||
// CHECK3-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
|
||||
// CHECK3-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
|
||||
// CHECK3: user_code.entry:
|
||||
// CHECK3-NEXT: call void @_Z3usev() #[[ATTR7]]
|
||||
// CHECK3-NEXT: call void @_Z3usev() #[[ATTR6]]
|
||||
// CHECK3-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 false, i1 true)
|
||||
// CHECK3-NEXT: ret void
|
||||
// CHECK3: worker.exit:
|
||||
|
@ -297,21 +234,18 @@ int main() {
|
|||
//
|
||||
//
|
||||
// CHECK3-LABEL: define {{[^@]+}}@__omp_outlined__1
|
||||
// CHECK3-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.0* noalias [[__CONTEXT:%.*]]) #[[ATTR1]] {
|
||||
// CHECK3-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
|
||||
// CHECK3-NEXT: entry:
|
||||
// CHECK3-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK3-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK3-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.0*, align 4
|
||||
// CHECK3-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK3-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK3-NEXT: store %struct.anon.0* [[__CONTEXT]], %struct.anon.0** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = load %struct.anon.0*, %struct.anon.0** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK3-NEXT: call void @_Z4workv() #[[ATTR7]]
|
||||
// CHECK3-NEXT: call void @_Z4workv() #[[ATTR6]]
|
||||
// CHECK3-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK3-LABEL: define {{[^@]+}}@__omp_outlined__1_wrapper
|
||||
// CHECK3-SAME: (i16 zeroext [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR6:[0-9]+]] {
|
||||
// CHECK3-SAME: (i16 zeroext [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR5:[0-9]+]] {
|
||||
// CHECK3-NEXT: entry:
|
||||
// CHECK3-NEXT: [[DOTADDR:%.*]] = alloca i16, align 2
|
||||
// CHECK3-NEXT: [[DOTADDR1:%.*]] = alloca i32, align 4
|
||||
|
@ -321,6 +255,6 @@ int main() {
|
|||
// CHECK3-NEXT: store i16 [[TMP0]], i16* [[DOTADDR]], align 2
|
||||
// CHECK3-NEXT: store i32 [[TMP1]], i32* [[DOTADDR1]], align 4
|
||||
// CHECK3-NEXT: call void @__kmpc_get_shared_variables(i8*** [[GLOBAL_ARGS]])
|
||||
// CHECK3-NEXT: call void @__omp_outlined__1(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]], %struct.anon.0* null) #[[ATTR3:[0-9]+]]
|
||||
// CHECK3-NEXT: call void @__omp_outlined__1(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]]) #[[ATTR3:[0-9]+]]
|
||||
// CHECK3-NEXT: ret void
|
||||
//
|
||||
|
|
|
@ -37,7 +37,6 @@ int main() {
|
|||
// CHECK1-SAME: (i32* nonnull align 4 dereferenceable(4) [[C:%.*]]) #[[ATTR0:[0-9]+]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[C_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 8
|
||||
// CHECK1-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 8
|
||||
// CHECK1-NEXT: store i32* [[C]], i32** [[C_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load i32*, i32** [[C_ADDR]], align 8
|
||||
|
@ -46,19 +45,13 @@ int main() {
|
|||
// CHECK1-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
|
||||
// CHECK1: user_code.entry:
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
|
||||
// CHECK1-NEXT: call void @_Z3usePi(i32* [[TMP0]]) #[[ATTR6:[0-9]+]]
|
||||
// CHECK1-NEXT: call void @_Z3usePi(i32* [[TMP0]]) #[[ATTR5:[0-9]+]]
|
||||
// CHECK1-NEXT: call void @__kmpc_push_num_threads(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]], i32 2)
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK1-NEXT: store i32* [[TMP0]], i32** [[TMP3]], align 8
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = call i8* @__kmpc_alloc_shared(i64 8)
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = load [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], align 8
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = bitcast i8* [[TMP5]] to %struct.anon*
|
||||
// CHECK1-NEXT: store [[STRUCT_ANON]] [[TMP6]], %struct.anon* [[TMP7]], align 8
|
||||
// CHECK1-NEXT: store i8* [[TMP5]], i8** [[TMP4]], align 8
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK1-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon*)* @__omp_outlined__ to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined___wrapper to i8*), i8** [[TMP8]], i64 1)
|
||||
// CHECK1-NEXT: call void @__kmpc_free_shared(i8* [[TMP5]], i64 8)
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = bitcast i32* [[TMP0]] to i8*
|
||||
// CHECK1-NEXT: store i8* [[TMP4]], i8** [[TMP3]], align 8
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK1-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i32*)* @__omp_outlined__ to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined___wrapper to i8*), i8** [[TMP5]], i64 1)
|
||||
// CHECK1-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 false, i1 true)
|
||||
// CHECK1-NEXT: ret void
|
||||
// CHECK1: worker.exit:
|
||||
|
@ -69,38 +62,29 @@ int main() {
|
|||
// CHECK1-SAME: (i32* [[C:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[C_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON_0:%.*]], align 8
|
||||
// CHECK1-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB2:[0-9]+]])
|
||||
// CHECK1-NEXT: store i32* [[C]], i32** [[C_ADDR]], align 8
|
||||
// CHECK1-NEXT: call void @__kmpc_push_num_threads(%struct.ident_t* @[[GLOB2]], i32 [[TMP0]], i32 2)
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK1-NEXT: store i32** [[C_ADDR]], i32*** [[TMP1]], align 8
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = call i8* @__kmpc_alloc_shared(i64 8)
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = load [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], align 8
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = bitcast i8* [[TMP3]] to %struct.anon.0*
|
||||
// CHECK1-NEXT: store [[STRUCT_ANON_0]] [[TMP4]], %struct.anon.0* [[TMP5]], align 8
|
||||
// CHECK1-NEXT: store i8* [[TMP3]], i8** [[TMP2]], align 8
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK1-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP0]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon.0*)* @__omp_outlined__1 to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined__1_wrapper to i8*), i8** [[TMP6]], i64 1)
|
||||
// CHECK1-NEXT: call void @__kmpc_free_shared(i8* [[TMP3]], i64 8)
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = bitcast i32** [[C_ADDR]] to i8*
|
||||
// CHECK1-NEXT: store i8* [[TMP2]], i8** [[TMP1]], align 8
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK1-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP0]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i32**)* @__omp_outlined__1 to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined__1_wrapper to i8*), i8** [[TMP3]], i64 1)
|
||||
// CHECK1-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@__omp_outlined__
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[C:%.*]]) #[[ATTR0]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK1-NEXT: [[C_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 8
|
||||
// CHECK1-NEXT: call void @_Z3usePi(i32* [[TMP2]]) #[[ATTR6]]
|
||||
// CHECK1-NEXT: store i32* [[C]], i32** [[C_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load i32*, i32** [[C_ADDR]], align 8
|
||||
// CHECK1-NEXT: call void @_Z3usePi(i32* [[TMP0]]) #[[ATTR5]]
|
||||
// CHECK1-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -117,26 +101,24 @@ int main() {
|
|||
// CHECK1-NEXT: call void @__kmpc_get_shared_variables(i8*** [[GLOBAL_ARGS]])
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i8**, i8*** [[GLOBAL_ARGS]], align 8
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = getelementptr inbounds i8*, i8** [[TMP2]], i64 0
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = bitcast i8** [[TMP3]] to %struct.anon**
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = load %struct.anon*, %struct.anon** [[TMP4]], align 8
|
||||
// CHECK1-NEXT: call void @__omp_outlined__(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]], %struct.anon* [[TMP5]]) #[[ATTR3:[0-9]+]]
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = bitcast i8** [[TMP3]] to i32**
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = load i32*, i32** [[TMP4]], align 8
|
||||
// CHECK1-NEXT: call void @__omp_outlined__(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]], i32* [[TMP5]]) #[[ATTR3:[0-9]+]]
|
||||
// CHECK1-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@__omp_outlined__1
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.0* noalias [[__CONTEXT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32** nonnull align 8 dereferenceable(8) [[C:%.*]]) #[[ATTR0]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.0*, align 8
|
||||
// CHECK1-NEXT: [[C_ADDR:%.*]] = alloca i32**, align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store %struct.anon.0* [[__CONTEXT]], %struct.anon.0** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load %struct.anon.0*, %struct.anon.0** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_0:%.*]], %struct.anon.0* [[TMP0]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i32**, i32*** [[TMP1]], align 8
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = load i32*, i32** [[TMP2]], align 8
|
||||
// CHECK1-NEXT: call void @_Z4workPi(i32* [[TMP3]]) #[[ATTR6]]
|
||||
// CHECK1-NEXT: store i32** [[C]], i32*** [[C_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load i32**, i32*** [[C_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = load i32*, i32** [[TMP0]], align 8
|
||||
// CHECK1-NEXT: call void @_Z4workPi(i32* [[TMP1]]) #[[ATTR5]]
|
||||
// CHECK1-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -150,7 +132,7 @@ int main() {
|
|||
// CHECK1-NEXT: [[TMP0:%.*]] = load i32*, i32** [[C_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = bitcast i32* [[TMP0]] to i8*
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = bitcast i32* [[ATOMIC_TEMP]] to i8*
|
||||
// CHECK1-NEXT: call void @__atomic_load(i64 4, i8* [[TMP1]], i8* [[TMP2]], i32 0) #[[ATTR6]]
|
||||
// CHECK1-NEXT: call void @__atomic_load(i64 4, i8* [[TMP1]], i8* [[TMP2]], i32 0) #[[ATTR5]]
|
||||
// CHECK1-NEXT: br label [[ATOMIC_CONT:%.*]]
|
||||
// CHECK1: atomic_cont:
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = load i32, i32* [[ATOMIC_TEMP]], align 4
|
||||
|
@ -159,7 +141,7 @@ int main() {
|
|||
// CHECK1-NEXT: [[TMP4:%.*]] = bitcast i32* [[TMP0]] to i8*
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = bitcast i32* [[ATOMIC_TEMP]] to i8*
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = bitcast i32* [[ATOMIC_TEMP1]] to i8*
|
||||
// CHECK1-NEXT: [[CALL:%.*]] = call zeroext i1 @__atomic_compare_exchange(i64 4, i8* [[TMP4]], i8* [[TMP5]], i8* [[TMP6]], i32 0, i32 0) #[[ATTR6]]
|
||||
// CHECK1-NEXT: [[CALL:%.*]] = call zeroext i1 @__atomic_compare_exchange(i64 4, i8* [[TMP4]], i8* [[TMP5]], i8* [[TMP6]], i32 0, i32 0) #[[ATTR5]]
|
||||
// CHECK1-NEXT: br i1 [[CALL]], label [[ATOMIC_EXIT:%.*]], label [[ATOMIC_CONT]]
|
||||
// CHECK1: atomic_exit:
|
||||
// CHECK1-NEXT: ret void
|
||||
|
@ -178,9 +160,9 @@ int main() {
|
|||
// CHECK1-NEXT: call void @__kmpc_get_shared_variables(i8*** [[GLOBAL_ARGS]])
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i8**, i8*** [[GLOBAL_ARGS]], align 8
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = getelementptr inbounds i8*, i8** [[TMP2]], i64 0
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = bitcast i8** [[TMP3]] to %struct.anon.0**
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = load %struct.anon.0*, %struct.anon.0** [[TMP4]], align 8
|
||||
// CHECK1-NEXT: call void @__omp_outlined__1(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]], %struct.anon.0* [[TMP5]]) #[[ATTR3]]
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = bitcast i8** [[TMP3]] to i32***
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = load i32**, i32*** [[TMP4]], align 8
|
||||
// CHECK1-NEXT: call void @__omp_outlined__1(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]], i32** [[TMP5]]) #[[ATTR3]]
|
||||
// CHECK1-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -188,7 +170,6 @@ int main() {
|
|||
// CHECK2-SAME: (i32* nonnull align 4 dereferenceable(4) [[C:%.*]]) #[[ATTR0:[0-9]+]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[C_ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 4
|
||||
// CHECK2-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 4
|
||||
// CHECK2-NEXT: store i32* [[C]], i32** [[C_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load i32*, i32** [[C_ADDR]], align 4
|
||||
|
@ -197,19 +178,13 @@ int main() {
|
|||
// CHECK2-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
|
||||
// CHECK2: user_code.entry:
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
|
||||
// CHECK2-NEXT: call void @_Z3usePi(i32* [[TMP0]]) #[[ATTR6:[0-9]+]]
|
||||
// CHECK2-NEXT: call void @_Z3usePi(i32* [[TMP0]]) #[[ATTR5:[0-9]+]]
|
||||
// CHECK2-NEXT: call void @__kmpc_push_num_threads(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]], i32 2)
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK2-NEXT: store i32* [[TMP0]], i32** [[TMP3]], align 4
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = call i8* @__kmpc_alloc_shared(i32 4)
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = load [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], align 4
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = bitcast i8* [[TMP5]] to %struct.anon*
|
||||
// CHECK2-NEXT: store [[STRUCT_ANON]] [[TMP6]], %struct.anon* [[TMP7]], align 4
|
||||
// CHECK2-NEXT: store i8* [[TMP5]], i8** [[TMP4]], align 4
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK2-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon*)* @__omp_outlined__ to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined___wrapper to i8*), i8** [[TMP8]], i32 1)
|
||||
// CHECK2-NEXT: call void @__kmpc_free_shared(i8* [[TMP5]], i32 4)
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = bitcast i32* [[TMP0]] to i8*
|
||||
// CHECK2-NEXT: store i8* [[TMP4]], i8** [[TMP3]], align 4
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK2-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i32*)* @__omp_outlined__ to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined___wrapper to i8*), i8** [[TMP5]], i32 1)
|
||||
// CHECK2-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 false, i1 true)
|
||||
// CHECK2-NEXT: ret void
|
||||
// CHECK2: worker.exit:
|
||||
|
@ -220,38 +195,29 @@ int main() {
|
|||
// CHECK2-SAME: (i32* [[C:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[C_ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON_0:%.*]], align 4
|
||||
// CHECK2-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB2:[0-9]+]])
|
||||
// CHECK2-NEXT: store i32* [[C]], i32** [[C_ADDR]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_push_num_threads(%struct.ident_t* @[[GLOB2]], i32 [[TMP0]], i32 2)
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK2-NEXT: store i32** [[C_ADDR]], i32*** [[TMP1]], align 4
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = call i8* @__kmpc_alloc_shared(i32 4)
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = load [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], align 4
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = bitcast i8* [[TMP3]] to %struct.anon.0*
|
||||
// CHECK2-NEXT: store [[STRUCT_ANON_0]] [[TMP4]], %struct.anon.0* [[TMP5]], align 4
|
||||
// CHECK2-NEXT: store i8* [[TMP3]], i8** [[TMP2]], align 4
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK2-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP0]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon.0*)* @__omp_outlined__1 to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined__1_wrapper to i8*), i8** [[TMP6]], i32 1)
|
||||
// CHECK2-NEXT: call void @__kmpc_free_shared(i8* [[TMP3]], i32 4)
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = bitcast i32** [[C_ADDR]] to i8*
|
||||
// CHECK2-NEXT: store i8* [[TMP2]], i8** [[TMP1]], align 4
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK2-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP0]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i32**)* @__omp_outlined__1 to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined__1_wrapper to i8*), i8** [[TMP3]], i32 1)
|
||||
// CHECK2-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK2-LABEL: define {{[^@]+}}@__omp_outlined__
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[C:%.*]]) #[[ATTR0]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 4
|
||||
// CHECK2-NEXT: [[C_ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 4
|
||||
// CHECK2-NEXT: call void @_Z3usePi(i32* [[TMP2]]) #[[ATTR6]]
|
||||
// CHECK2-NEXT: store i32* [[C]], i32** [[C_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load i32*, i32** [[C_ADDR]], align 4
|
||||
// CHECK2-NEXT: call void @_Z3usePi(i32* [[TMP0]]) #[[ATTR5]]
|
||||
// CHECK2-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -268,26 +234,24 @@ int main() {
|
|||
// CHECK2-NEXT: call void @__kmpc_get_shared_variables(i8*** [[GLOBAL_ARGS]])
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i8**, i8*** [[GLOBAL_ARGS]], align 4
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = getelementptr inbounds i8*, i8** [[TMP2]], i32 0
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = bitcast i8** [[TMP3]] to %struct.anon**
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = load %struct.anon*, %struct.anon** [[TMP4]], align 4
|
||||
// CHECK2-NEXT: call void @__omp_outlined__(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]], %struct.anon* [[TMP5]]) #[[ATTR3:[0-9]+]]
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = bitcast i8** [[TMP3]] to i32**
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = load i32*, i32** [[TMP4]], align 4
|
||||
// CHECK2-NEXT: call void @__omp_outlined__(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]], i32* [[TMP5]]) #[[ATTR3:[0-9]+]]
|
||||
// CHECK2-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK2-LABEL: define {{[^@]+}}@__omp_outlined__1
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.0* noalias [[__CONTEXT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32** nonnull align 4 dereferenceable(4) [[C:%.*]]) #[[ATTR0]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.0*, align 4
|
||||
// CHECK2-NEXT: [[C_ADDR:%.*]] = alloca i32**, align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: store %struct.anon.0* [[__CONTEXT]], %struct.anon.0** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load %struct.anon.0*, %struct.anon.0** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_0:%.*]], %struct.anon.0* [[TMP0]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i32**, i32*** [[TMP1]], align 4
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = load i32*, i32** [[TMP2]], align 4
|
||||
// CHECK2-NEXT: call void @_Z4workPi(i32* [[TMP3]]) #[[ATTR6]]
|
||||
// CHECK2-NEXT: store i32** [[C]], i32*** [[C_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load i32**, i32*** [[C_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = load i32*, i32** [[TMP0]], align 4
|
||||
// CHECK2-NEXT: call void @_Z4workPi(i32* [[TMP1]]) #[[ATTR5]]
|
||||
// CHECK2-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -301,7 +265,7 @@ int main() {
|
|||
// CHECK2-NEXT: [[TMP0:%.*]] = load i32*, i32** [[C_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = bitcast i32* [[TMP0]] to i8*
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = bitcast i32* [[ATOMIC_TEMP]] to i8*
|
||||
// CHECK2-NEXT: call void @__atomic_load(i32 4, i8* [[TMP1]], i8* [[TMP2]], i32 0) #[[ATTR6]]
|
||||
// CHECK2-NEXT: call void @__atomic_load(i32 4, i8* [[TMP1]], i8* [[TMP2]], i32 0) #[[ATTR5]]
|
||||
// CHECK2-NEXT: br label [[ATOMIC_CONT:%.*]]
|
||||
// CHECK2: atomic_cont:
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = load i32, i32* [[ATOMIC_TEMP]], align 4
|
||||
|
@ -310,7 +274,7 @@ int main() {
|
|||
// CHECK2-NEXT: [[TMP4:%.*]] = bitcast i32* [[TMP0]] to i8*
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = bitcast i32* [[ATOMIC_TEMP]] to i8*
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = bitcast i32* [[ATOMIC_TEMP1]] to i8*
|
||||
// CHECK2-NEXT: [[CALL:%.*]] = call zeroext i1 @__atomic_compare_exchange(i32 4, i8* [[TMP4]], i8* [[TMP5]], i8* [[TMP6]], i32 0, i32 0) #[[ATTR6]]
|
||||
// CHECK2-NEXT: [[CALL:%.*]] = call zeroext i1 @__atomic_compare_exchange(i32 4, i8* [[TMP4]], i8* [[TMP5]], i8* [[TMP6]], i32 0, i32 0) #[[ATTR5]]
|
||||
// CHECK2-NEXT: br i1 [[CALL]], label [[ATOMIC_EXIT:%.*]], label [[ATOMIC_CONT]]
|
||||
// CHECK2: atomic_exit:
|
||||
// CHECK2-NEXT: ret void
|
||||
|
@ -329,9 +293,9 @@ int main() {
|
|||
// CHECK2-NEXT: call void @__kmpc_get_shared_variables(i8*** [[GLOBAL_ARGS]])
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i8**, i8*** [[GLOBAL_ARGS]], align 4
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = getelementptr inbounds i8*, i8** [[TMP2]], i32 0
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = bitcast i8** [[TMP3]] to %struct.anon.0**
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = load %struct.anon.0*, %struct.anon.0** [[TMP4]], align 4
|
||||
// CHECK2-NEXT: call void @__omp_outlined__1(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]], %struct.anon.0* [[TMP5]]) #[[ATTR3]]
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = bitcast i8** [[TMP3]] to i32***
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = load i32**, i32*** [[TMP4]], align 4
|
||||
// CHECK2-NEXT: call void @__omp_outlined__1(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]], i32** [[TMP5]]) #[[ATTR3]]
|
||||
// CHECK2-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -339,7 +303,6 @@ int main() {
|
|||
// CHECK3-SAME: (i32* nonnull align 4 dereferenceable(4) [[C:%.*]]) #[[ATTR0:[0-9]+]] {
|
||||
// CHECK3-NEXT: entry:
|
||||
// CHECK3-NEXT: [[C_ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK3-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 4
|
||||
// CHECK3-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 4
|
||||
// CHECK3-NEXT: store i32* [[C]], i32** [[C_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = load i32*, i32** [[C_ADDR]], align 4
|
||||
|
@ -348,19 +311,13 @@ int main() {
|
|||
// CHECK3-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
|
||||
// CHECK3: user_code.entry:
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
|
||||
// CHECK3-NEXT: call void @_Z3usePi(i32* [[TMP0]]) #[[ATTR6:[0-9]+]]
|
||||
// CHECK3-NEXT: call void @_Z3usePi(i32* [[TMP0]]) #[[ATTR5:[0-9]+]]
|
||||
// CHECK3-NEXT: call void @__kmpc_push_num_threads(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]], i32 2)
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK3-NEXT: store i32* [[TMP0]], i32** [[TMP3]], align 4
|
||||
// CHECK3-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK3-NEXT: [[TMP5:%.*]] = call i8* @__kmpc_alloc_shared(i32 4)
|
||||
// CHECK3-NEXT: [[TMP6:%.*]] = load [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], align 4
|
||||
// CHECK3-NEXT: [[TMP7:%.*]] = bitcast i8* [[TMP5]] to %struct.anon*
|
||||
// CHECK3-NEXT: store [[STRUCT_ANON]] [[TMP6]], %struct.anon* [[TMP7]], align 4
|
||||
// CHECK3-NEXT: store i8* [[TMP5]], i8** [[TMP4]], align 4
|
||||
// CHECK3-NEXT: [[TMP8:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK3-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon*)* @__omp_outlined__ to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined___wrapper to i8*), i8** [[TMP8]], i32 1)
|
||||
// CHECK3-NEXT: call void @__kmpc_free_shared(i8* [[TMP5]], i32 4)
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK3-NEXT: [[TMP4:%.*]] = bitcast i32* [[TMP0]] to i8*
|
||||
// CHECK3-NEXT: store i8* [[TMP4]], i8** [[TMP3]], align 4
|
||||
// CHECK3-NEXT: [[TMP5:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK3-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i32*)* @__omp_outlined__ to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined___wrapper to i8*), i8** [[TMP5]], i32 1)
|
||||
// CHECK3-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 false, i1 true)
|
||||
// CHECK3-NEXT: ret void
|
||||
// CHECK3: worker.exit:
|
||||
|
@ -371,38 +328,29 @@ int main() {
|
|||
// CHECK3-SAME: (i32* [[C:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK3-NEXT: entry:
|
||||
// CHECK3-NEXT: [[C_ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK3-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON_0:%.*]], align 4
|
||||
// CHECK3-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 4
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB2:[0-9]+]])
|
||||
// CHECK3-NEXT: store i32* [[C]], i32** [[C_ADDR]], align 4
|
||||
// CHECK3-NEXT: call void @__kmpc_push_num_threads(%struct.ident_t* @[[GLOB2]], i32 [[TMP0]], i32 2)
|
||||
// CHECK3-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK3-NEXT: store i32** [[C_ADDR]], i32*** [[TMP1]], align 4
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = call i8* @__kmpc_alloc_shared(i32 4)
|
||||
// CHECK3-NEXT: [[TMP4:%.*]] = load [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], align 4
|
||||
// CHECK3-NEXT: [[TMP5:%.*]] = bitcast i8* [[TMP3]] to %struct.anon.0*
|
||||
// CHECK3-NEXT: store [[STRUCT_ANON_0]] [[TMP4]], %struct.anon.0* [[TMP5]], align 4
|
||||
// CHECK3-NEXT: store i8* [[TMP3]], i8** [[TMP2]], align 4
|
||||
// CHECK3-NEXT: [[TMP6:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK3-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP0]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon.0*)* @__omp_outlined__1 to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined__1_wrapper to i8*), i8** [[TMP6]], i32 1)
|
||||
// CHECK3-NEXT: call void @__kmpc_free_shared(i8* [[TMP3]], i32 4)
|
||||
// CHECK3-NEXT: [[TMP1:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = bitcast i32** [[C_ADDR]] to i8*
|
||||
// CHECK3-NEXT: store i8* [[TMP2]], i8** [[TMP1]], align 4
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK3-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP0]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i32**)* @__omp_outlined__1 to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined__1_wrapper to i8*), i8** [[TMP3]], i32 1)
|
||||
// CHECK3-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK3-LABEL: define {{[^@]+}}@__omp_outlined__
|
||||
// CHECK3-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK3-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[C:%.*]]) #[[ATTR0]] {
|
||||
// CHECK3-NEXT: entry:
|
||||
// CHECK3-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK3-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK3-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 4
|
||||
// CHECK3-NEXT: [[C_ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK3-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK3-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK3-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 4
|
||||
// CHECK3-NEXT: call void @_Z3usePi(i32* [[TMP2]]) #[[ATTR6]]
|
||||
// CHECK3-NEXT: store i32* [[C]], i32** [[C_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = load i32*, i32** [[C_ADDR]], align 4
|
||||
// CHECK3-NEXT: call void @_Z3usePi(i32* [[TMP0]]) #[[ATTR5]]
|
||||
// CHECK3-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -419,26 +367,24 @@ int main() {
|
|||
// CHECK3-NEXT: call void @__kmpc_get_shared_variables(i8*** [[GLOBAL_ARGS]])
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = load i8**, i8*** [[GLOBAL_ARGS]], align 4
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = getelementptr inbounds i8*, i8** [[TMP2]], i32 0
|
||||
// CHECK3-NEXT: [[TMP4:%.*]] = bitcast i8** [[TMP3]] to %struct.anon**
|
||||
// CHECK3-NEXT: [[TMP5:%.*]] = load %struct.anon*, %struct.anon** [[TMP4]], align 4
|
||||
// CHECK3-NEXT: call void @__omp_outlined__(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]], %struct.anon* [[TMP5]]) #[[ATTR3:[0-9]+]]
|
||||
// CHECK3-NEXT: [[TMP4:%.*]] = bitcast i8** [[TMP3]] to i32**
|
||||
// CHECK3-NEXT: [[TMP5:%.*]] = load i32*, i32** [[TMP4]], align 4
|
||||
// CHECK3-NEXT: call void @__omp_outlined__(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]], i32* [[TMP5]]) #[[ATTR3:[0-9]+]]
|
||||
// CHECK3-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK3-LABEL: define {{[^@]+}}@__omp_outlined__1
|
||||
// CHECK3-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.0* noalias [[__CONTEXT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK3-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32** nonnull align 4 dereferenceable(4) [[C:%.*]]) #[[ATTR0]] {
|
||||
// CHECK3-NEXT: entry:
|
||||
// CHECK3-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK3-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK3-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.0*, align 4
|
||||
// CHECK3-NEXT: [[C_ADDR:%.*]] = alloca i32**, align 4
|
||||
// CHECK3-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK3-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK3-NEXT: store %struct.anon.0* [[__CONTEXT]], %struct.anon.0** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = load %struct.anon.0*, %struct.anon.0** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_0:%.*]], %struct.anon.0* [[TMP0]], i32 0, i32 0
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = load i32**, i32*** [[TMP1]], align 4
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = load i32*, i32** [[TMP2]], align 4
|
||||
// CHECK3-NEXT: call void @_Z4workPi(i32* [[TMP3]]) #[[ATTR6]]
|
||||
// CHECK3-NEXT: store i32** [[C]], i32*** [[C_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = load i32**, i32*** [[C_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP1:%.*]] = load i32*, i32** [[TMP0]], align 4
|
||||
// CHECK3-NEXT: call void @_Z4workPi(i32* [[TMP1]]) #[[ATTR5]]
|
||||
// CHECK3-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -452,7 +398,7 @@ int main() {
|
|||
// CHECK3-NEXT: [[TMP0:%.*]] = load i32*, i32** [[C_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP1:%.*]] = bitcast i32* [[TMP0]] to i8*
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = bitcast i32* [[ATOMIC_TEMP]] to i8*
|
||||
// CHECK3-NEXT: call void @__atomic_load(i32 4, i8* [[TMP1]], i8* [[TMP2]], i32 0) #[[ATTR6]]
|
||||
// CHECK3-NEXT: call void @__atomic_load(i32 4, i8* [[TMP1]], i8* [[TMP2]], i32 0) #[[ATTR5]]
|
||||
// CHECK3-NEXT: br label [[ATOMIC_CONT:%.*]]
|
||||
// CHECK3: atomic_cont:
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = load i32, i32* [[ATOMIC_TEMP]], align 4
|
||||
|
@ -461,7 +407,7 @@ int main() {
|
|||
// CHECK3-NEXT: [[TMP4:%.*]] = bitcast i32* [[TMP0]] to i8*
|
||||
// CHECK3-NEXT: [[TMP5:%.*]] = bitcast i32* [[ATOMIC_TEMP]] to i8*
|
||||
// CHECK3-NEXT: [[TMP6:%.*]] = bitcast i32* [[ATOMIC_TEMP1]] to i8*
|
||||
// CHECK3-NEXT: [[CALL:%.*]] = call zeroext i1 @__atomic_compare_exchange(i32 4, i8* [[TMP4]], i8* [[TMP5]], i8* [[TMP6]], i32 0, i32 0) #[[ATTR6]]
|
||||
// CHECK3-NEXT: [[CALL:%.*]] = call zeroext i1 @__atomic_compare_exchange(i32 4, i8* [[TMP4]], i8* [[TMP5]], i8* [[TMP6]], i32 0, i32 0) #[[ATTR5]]
|
||||
// CHECK3-NEXT: br i1 [[CALL]], label [[ATOMIC_EXIT:%.*]], label [[ATOMIC_CONT]]
|
||||
// CHECK3: atomic_exit:
|
||||
// CHECK3-NEXT: ret void
|
||||
|
@ -480,8 +426,8 @@ int main() {
|
|||
// CHECK3-NEXT: call void @__kmpc_get_shared_variables(i8*** [[GLOBAL_ARGS]])
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = load i8**, i8*** [[GLOBAL_ARGS]], align 4
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = getelementptr inbounds i8*, i8** [[TMP2]], i32 0
|
||||
// CHECK3-NEXT: [[TMP4:%.*]] = bitcast i8** [[TMP3]] to %struct.anon.0**
|
||||
// CHECK3-NEXT: [[TMP5:%.*]] = load %struct.anon.0*, %struct.anon.0** [[TMP4]], align 4
|
||||
// CHECK3-NEXT: call void @__omp_outlined__1(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]], %struct.anon.0* [[TMP5]]) #[[ATTR3]]
|
||||
// CHECK3-NEXT: [[TMP4:%.*]] = bitcast i8** [[TMP3]] to i32***
|
||||
// CHECK3-NEXT: [[TMP5:%.*]] = load i32**, i32*** [[TMP4]], align 4
|
||||
// CHECK3-NEXT: call void @__omp_outlined__1(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]], i32** [[TMP5]]) #[[ATTR3]]
|
||||
// CHECK3-NEXT: ret void
|
||||
//
|
||||
|
|
|
@ -1441,12 +1441,9 @@ int bar(int n){
|
|||
// CHECK1-SAME: (i64 [[A:%.*]]) #[[ATTR0:[0-9]+]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[A_ADDR:%.*]] = alloca i64, align 8
|
||||
// CHECK1-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 1
|
||||
// CHECK1-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 8
|
||||
// CHECK1-NEXT: [[OMP_OUTLINED_ARG_AGG_1:%.*]] = alloca [[STRUCT_ANON_0:%.*]], align 1
|
||||
// CHECK1-NEXT: [[CAPTURED_VARS_ADDRS2:%.*]] = alloca [1 x i8*], align 8
|
||||
// CHECK1-NEXT: [[OMP_OUTLINED_ARG_AGG_3:%.*]] = alloca [[STRUCT_ANON_1:%.*]], align 1
|
||||
// CHECK1-NEXT: [[CAPTURED_VARS_ADDRS4:%.*]] = alloca [1 x i8*], align 8
|
||||
// CHECK1-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x i8*], align 8
|
||||
// CHECK1-NEXT: [[CAPTURED_VARS_ADDRS1:%.*]] = alloca [0 x i8*], align 8
|
||||
// CHECK1-NEXT: [[CAPTURED_VARS_ADDRS2:%.*]] = alloca [0 x i8*], align 8
|
||||
// CHECK1-NEXT: store i64 [[A]], i64* [[A_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[CONV:%.*]] = bitcast i64* [[A_ADDR]] to i32*
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(%struct.ident_t* @[[GLOB1:[0-9]+]], i1 false, i1 true, i1 true)
|
||||
|
@ -1454,35 +1451,14 @@ int bar(int n){
|
|||
// CHECK1-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
|
||||
// CHECK1: user_code.entry:
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = call i8* @__kmpc_alloc_shared(i64 1)
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = load [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], align 1
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = bitcast i8* [[TMP3]] to %struct.anon*
|
||||
// CHECK1-NEXT: store [[STRUCT_ANON]] [[TMP4]], %struct.anon* [[TMP5]], align 1
|
||||
// CHECK1-NEXT: store i8* [[TMP3]], i8** [[TMP2]], align 8
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK1-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon*)* @__omp_outlined__ to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined___wrapper to i8*), i8** [[TMP6]], i64 1)
|
||||
// CHECK1-NEXT: call void @__kmpc_free_shared(i8* [[TMP3]], i64 1)
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS2]], i64 0, i64 0
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = call i8* @__kmpc_alloc_shared(i64 1)
|
||||
// CHECK1-NEXT: [[TMP9:%.*]] = load [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_1]], align 1
|
||||
// CHECK1-NEXT: [[TMP10:%.*]] = bitcast i8* [[TMP8]] to %struct.anon.0*
|
||||
// CHECK1-NEXT: store [[STRUCT_ANON_0]] [[TMP9]], %struct.anon.0* [[TMP10]], align 1
|
||||
// CHECK1-NEXT: store i8* [[TMP8]], i8** [[TMP7]], align 8
|
||||
// CHECK1-NEXT: [[TMP11:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS2]] to i8**
|
||||
// CHECK1-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]], i32 0, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon.0*)* @__omp_outlined__1 to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined__1_wrapper to i8*), i8** [[TMP11]], i64 1)
|
||||
// CHECK1-NEXT: call void @__kmpc_free_shared(i8* [[TMP8]], i64 1)
|
||||
// CHECK1-NEXT: [[TMP12:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS4]], i64 0, i64 0
|
||||
// CHECK1-NEXT: [[TMP13:%.*]] = call i8* @__kmpc_alloc_shared(i64 1)
|
||||
// CHECK1-NEXT: [[TMP14:%.*]] = load [[STRUCT_ANON_1]], %struct.anon.1* [[OMP_OUTLINED_ARG_AGG_3]], align 1
|
||||
// CHECK1-NEXT: [[TMP15:%.*]] = bitcast i8* [[TMP13]] to %struct.anon.1*
|
||||
// CHECK1-NEXT: store [[STRUCT_ANON_1]] [[TMP14]], %struct.anon.1* [[TMP15]], align 1
|
||||
// CHECK1-NEXT: store i8* [[TMP13]], i8** [[TMP12]], align 8
|
||||
// CHECK1-NEXT: [[TMP16:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS4]] to i8**
|
||||
// CHECK1-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon.1*)* @__omp_outlined__2 to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined__2_wrapper to i8*), i8** [[TMP16]], i64 1)
|
||||
// CHECK1-NEXT: call void @__kmpc_free_shared(i8* [[TMP13]], i64 1)
|
||||
// CHECK1-NEXT: [[TMP17:%.*]] = load i32, i32* [[CONV]], align 8
|
||||
// CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP17]], 1
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = bitcast [0 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK1-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*)* @__omp_outlined__ to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined___wrapper to i8*), i8** [[TMP2]], i64 0)
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = bitcast [0 x i8*]* [[CAPTURED_VARS_ADDRS1]] to i8**
|
||||
// CHECK1-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]], i32 0, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*)* @__omp_outlined__1 to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined__1_wrapper to i8*), i8** [[TMP3]], i64 0)
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = bitcast [0 x i8*]* [[CAPTURED_VARS_ADDRS2]] to i8**
|
||||
// CHECK1-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*)* @__omp_outlined__2 to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined__2_wrapper to i8*), i8** [[TMP4]], i64 0)
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = load i32, i32* [[CONV]], align 8
|
||||
// CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP5]], 1
|
||||
// CHECK1-NEXT: store i32 [[ADD]], i32* [[CONV]], align 8
|
||||
// CHECK1-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 false, i1 true)
|
||||
// CHECK1-NEXT: ret void
|
||||
|
@ -1491,16 +1467,13 @@ int bar(int n){
|
|||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@__omp_outlined__
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]]) #[[ATTR0]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK1-NEXT: [[A:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32 42, i32* [[A]], align 4
|
||||
// CHECK1-NEXT: ret void
|
||||
//
|
||||
|
@ -1516,21 +1489,18 @@ int bar(int n){
|
|||
// CHECK1-NEXT: store i16 [[TMP0]], i16* [[DOTADDR]], align 2
|
||||
// CHECK1-NEXT: store i32 [[TMP1]], i32* [[DOTADDR1]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_get_shared_variables(i8*** [[GLOBAL_ARGS]])
|
||||
// CHECK1-NEXT: call void @__omp_outlined__(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]], %struct.anon* null) #[[ATTR2:[0-9]+]]
|
||||
// CHECK1-NEXT: call void @__omp_outlined__(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]]) #[[ATTR2:[0-9]+]]
|
||||
// CHECK1-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@__omp_outlined__1
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.0* noalias [[__CONTEXT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]]) #[[ATTR0]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.0*, align 8
|
||||
// CHECK1-NEXT: [[A:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store %struct.anon.0* [[__CONTEXT]], %struct.anon.0** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load %struct.anon.0*, %struct.anon.0** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32 43, i32* [[A]], align 4
|
||||
// CHECK1-NEXT: ret void
|
||||
//
|
||||
|
@ -1546,21 +1516,18 @@ int bar(int n){
|
|||
// CHECK1-NEXT: store i16 [[TMP0]], i16* [[DOTADDR]], align 2
|
||||
// CHECK1-NEXT: store i32 [[TMP1]], i32* [[DOTADDR1]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_get_shared_variables(i8*** [[GLOBAL_ARGS]])
|
||||
// CHECK1-NEXT: call void @__omp_outlined__1(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]], %struct.anon.0* null) #[[ATTR2]]
|
||||
// CHECK1-NEXT: call void @__omp_outlined__1(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]]) #[[ATTR2]]
|
||||
// CHECK1-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@__omp_outlined__2
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.1* noalias [[__CONTEXT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]]) #[[ATTR0]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.1*, align 8
|
||||
// CHECK1-NEXT: [[A:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store %struct.anon.1* [[__CONTEXT]], %struct.anon.1** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load %struct.anon.1*, %struct.anon.1** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32 44, i32* [[A]], align 4
|
||||
// CHECK1-NEXT: ret void
|
||||
//
|
||||
|
@ -1576,7 +1543,7 @@ int bar(int n){
|
|||
// CHECK1-NEXT: store i16 [[TMP0]], i16* [[DOTADDR]], align 2
|
||||
// CHECK1-NEXT: store i32 [[TMP1]], i32* [[DOTADDR1]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_get_shared_variables(i8*** [[GLOBAL_ARGS]])
|
||||
// CHECK1-NEXT: call void @__omp_outlined__2(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]], %struct.anon.1* null) #[[ATTR2]]
|
||||
// CHECK1-NEXT: call void @__omp_outlined__2(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]]) #[[ATTR2]]
|
||||
// CHECK1-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -1587,8 +1554,7 @@ int bar(int n){
|
|||
// CHECK1-NEXT: [[A_ADDR:%.*]] = alloca i64, align 8
|
||||
// CHECK1-NEXT: [[AA_ADDR:%.*]] = alloca i64, align 8
|
||||
// CHECK1-NEXT: [[B_ADDR:%.*]] = alloca [10 x i32]*, align 8
|
||||
// CHECK1-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON_2:%.*]], align 1
|
||||
// CHECK1-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 8
|
||||
// CHECK1-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x i8*], align 8
|
||||
// CHECK1-NEXT: store i64 [[N]], i64* [[N_ADDR]], align 8
|
||||
// CHECK1-NEXT: store i64 [[A]], i64* [[A_ADDR]], align 8
|
||||
// CHECK1-NEXT: store i64 [[AA]], i64* [[AA_ADDR]], align 8
|
||||
|
@ -1602,29 +1568,22 @@ int bar(int n){
|
|||
// CHECK1-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
|
||||
// CHECK1: user_code.entry:
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = call i8* @__kmpc_alloc_shared(i64 1)
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = load [[STRUCT_ANON_2]], %struct.anon.2* [[OMP_OUTLINED_ARG_AGG_]], align 1
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = bitcast i8* [[TMP4]] to %struct.anon.2*
|
||||
// CHECK1-NEXT: store [[STRUCT_ANON_2]] [[TMP5]], %struct.anon.2* [[TMP6]], align 1
|
||||
// CHECK1-NEXT: store i8* [[TMP4]], i8** [[TMP3]], align 8
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = load i32, i32* [[CONV]], align 8
|
||||
// CHECK1-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP7]], 1000
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = zext i1 [[CMP]] to i32
|
||||
// CHECK1-NEXT: [[TMP9:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK1-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]], i32 [[TMP8]], i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon.2*)* @__omp_outlined__3 to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined__3_wrapper to i8*), i8** [[TMP9]], i64 1)
|
||||
// CHECK1-NEXT: call void @__kmpc_free_shared(i8* [[TMP4]], i64 1)
|
||||
// CHECK1-NEXT: [[TMP10:%.*]] = load i32, i32* [[CONV1]], align 8
|
||||
// CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP10]], 1
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = load i32, i32* [[CONV]], align 8
|
||||
// CHECK1-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP3]], 1000
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = zext i1 [[CMP]] to i32
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = bitcast [0 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK1-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]], i32 [[TMP4]], i32 -1, i32 -1, i8* bitcast (void (i32*, i32*)* @__omp_outlined__3 to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined__3_wrapper to i8*), i8** [[TMP5]], i64 0)
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = load i32, i32* [[CONV1]], align 8
|
||||
// CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP6]], 1
|
||||
// CHECK1-NEXT: store i32 [[ADD]], i32* [[CONV1]], align 8
|
||||
// CHECK1-NEXT: [[TMP11:%.*]] = load i16, i16* [[CONV2]], align 8
|
||||
// CHECK1-NEXT: [[CONV3:%.*]] = sext i16 [[TMP11]] to i32
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = load i16, i16* [[CONV2]], align 8
|
||||
// CHECK1-NEXT: [[CONV3:%.*]] = sext i16 [[TMP7]] to i32
|
||||
// CHECK1-NEXT: [[ADD4:%.*]] = add nsw i32 [[CONV3]], 1
|
||||
// CHECK1-NEXT: [[CONV5:%.*]] = trunc i32 [[ADD4]] to i16
|
||||
// CHECK1-NEXT: store i16 [[CONV5]], i16* [[CONV2]], align 8
|
||||
// CHECK1-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [10 x i32], [10 x i32]* [[TMP0]], i64 0, i64 2
|
||||
// CHECK1-NEXT: [[TMP12:%.*]] = load i32, i32* [[ARRAYIDX]], align 4
|
||||
// CHECK1-NEXT: [[ADD6:%.*]] = add nsw i32 [[TMP12]], 1
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = load i32, i32* [[ARRAYIDX]], align 4
|
||||
// CHECK1-NEXT: [[ADD6:%.*]] = add nsw i32 [[TMP8]], 1
|
||||
// CHECK1-NEXT: store i32 [[ADD6]], i32* [[ARRAYIDX]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 false, i1 true)
|
||||
// CHECK1-NEXT: ret void
|
||||
|
@ -1633,20 +1592,17 @@ int bar(int n){
|
|||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@__omp_outlined__3
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.2* noalias [[__CONTEXT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]]) #[[ATTR0]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.2*, align 8
|
||||
// CHECK1-NEXT: [[A:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store %struct.anon.2* [[__CONTEXT]], %struct.anon.2** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load %struct.anon.2*, %struct.anon.2** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32 45, i32* [[A]], align 4
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i32, i32* [[TMP1]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 [[TMP2]])
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 [[TMP1]])
|
||||
// CHECK1-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -1661,7 +1617,7 @@ int bar(int n){
|
|||
// CHECK1-NEXT: store i16 [[TMP0]], i16* [[DOTADDR]], align 2
|
||||
// CHECK1-NEXT: store i32 [[TMP1]], i32* [[DOTADDR1]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_get_shared_variables(i8*** [[GLOBAL_ARGS]])
|
||||
// CHECK1-NEXT: call void @__omp_outlined__3(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]], %struct.anon.2* null) #[[ATTR2]]
|
||||
// CHECK1-NEXT: call void @__omp_outlined__3(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]]) #[[ATTR2]]
|
||||
// CHECK1-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -1669,7 +1625,6 @@ int bar(int n){
|
|||
// CHECK1-SAME: (i64 [[A:%.*]]) #[[ATTR0]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[A_ADDR:%.*]] = alloca i64, align 8
|
||||
// CHECK1-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON_3:%.*]], align 8
|
||||
// CHECK1-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 8
|
||||
// CHECK1-NEXT: store i64 [[A]], i64* [[A_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[CONV:%.*]] = bitcast i64* [[A_ADDR]] to i32*
|
||||
|
@ -1682,19 +1637,13 @@ int bar(int n){
|
|||
// CHECK1-NEXT: [[A_ON_STACK:%.*]] = bitcast i8* [[A1]] to i32*
|
||||
// CHECK1-NEXT: store i32 [[TMP1]], i32* [[A_ON_STACK]], align 4
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON_3]], %struct.anon.3* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK1-NEXT: store i32* [[A_ON_STACK]], i32** [[TMP3]], align 8
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = call i8* @__kmpc_alloc_shared(i64 8)
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = load [[STRUCT_ANON_3]], %struct.anon.3* [[OMP_OUTLINED_ARG_AGG_]], align 8
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = bitcast i8* [[TMP5]] to %struct.anon.3*
|
||||
// CHECK1-NEXT: store [[STRUCT_ANON_3]] [[TMP6]], %struct.anon.3* [[TMP7]], align 8
|
||||
// CHECK1-NEXT: store i8* [[TMP5]], i8** [[TMP4]], align 8
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK1-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon.3*)* @__omp_outlined__4 to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined__4_wrapper to i8*), i8** [[TMP8]], i64 1)
|
||||
// CHECK1-NEXT: call void @__kmpc_free_shared(i8* [[TMP5]], i64 8)
|
||||
// CHECK1-NEXT: [[TMP9:%.*]] = load i32, i32* [[A_ON_STACK]], align 4
|
||||
// CHECK1-NEXT: [[INC:%.*]] = add nsw i32 [[TMP9]], 1
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = bitcast i32* [[A_ON_STACK]] to i8*
|
||||
// CHECK1-NEXT: store i8* [[TMP4]], i8** [[TMP3]], align 8
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK1-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i32*)* @__omp_outlined__4 to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined__4_wrapper to i8*), i8** [[TMP5]], i64 1)
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = load i32, i32* [[A_ON_STACK]], align 4
|
||||
// CHECK1-NEXT: [[INC:%.*]] = add nsw i32 [[TMP6]], 1
|
||||
// CHECK1-NEXT: store i32 [[INC]], i32* [[A_ON_STACK]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_free_shared(i8* [[A1]], i64 4)
|
||||
// CHECK1-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 false, i1 true)
|
||||
|
@ -1704,44 +1653,42 @@ int bar(int n){
|
|||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@__omp_outlined__4
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.3* noalias [[__CONTEXT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR0]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.3*, align 8
|
||||
// CHECK1-NEXT: [[A_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[CRITICAL_COUNTER:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store %struct.anon.3* [[__CONTEXT]], %struct.anon.3** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load %struct.anon.3*, %struct.anon.3** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_3:%.*]], %struct.anon.3* [[TMP0]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 8
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = call i64 @__kmpc_warp_active_thread_mask()
|
||||
// CHECK1-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load i32*, i32** [[A_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = call i64 @__kmpc_warp_active_thread_mask()
|
||||
// CHECK1-NEXT: [[NVPTX_TID:%.*]] = call i32 @llvm.nvvm.read.ptx.sreg.tid.x()
|
||||
// CHECK1-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @llvm.nvvm.read.ptx.sreg.ntid.x()
|
||||
// CHECK1-NEXT: store i32 0, i32* [[CRITICAL_COUNTER]], align 4
|
||||
// CHECK1-NEXT: br label [[OMP_CRITICAL_LOOP:%.*]]
|
||||
// CHECK1: omp.critical.loop:
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = load i32, i32* [[CRITICAL_COUNTER]], align 4
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = icmp slt i32 [[TMP4]], [[NVPTX_NUM_THREADS]]
|
||||
// CHECK1-NEXT: br i1 [[TMP5]], label [[OMP_CRITICAL_TEST:%.*]], label [[OMP_CRITICAL_EXIT:%.*]]
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i32, i32* [[CRITICAL_COUNTER]], align 4
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = icmp slt i32 [[TMP2]], [[NVPTX_NUM_THREADS]]
|
||||
// CHECK1-NEXT: br i1 [[TMP3]], label [[OMP_CRITICAL_TEST:%.*]], label [[OMP_CRITICAL_EXIT:%.*]]
|
||||
// CHECK1: omp.critical.test:
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = load i32, i32* [[CRITICAL_COUNTER]], align 4
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = icmp eq i32 [[NVPTX_TID]], [[TMP6]]
|
||||
// CHECK1-NEXT: br i1 [[TMP7]], label [[OMP_CRITICAL_BODY:%.*]], label [[OMP_CRITICAL_SYNC:%.*]]
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = load i32, i32* [[CRITICAL_COUNTER]], align 4
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = icmp eq i32 [[NVPTX_TID]], [[TMP4]]
|
||||
// CHECK1-NEXT: br i1 [[TMP5]], label [[OMP_CRITICAL_BODY:%.*]], label [[OMP_CRITICAL_SYNC:%.*]]
|
||||
// CHECK1: omp.critical.body:
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP9:%.*]] = load i32, i32* [[TMP8]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_critical(%struct.ident_t* @[[GLOB1]], i32 [[TMP9]], [8 x i32]* @"_gomp_critical_user_$var")
|
||||
// CHECK1-NEXT: [[TMP10:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK1-NEXT: [[INC:%.*]] = add nsw i32 [[TMP10]], 1
|
||||
// CHECK1-NEXT: store i32 [[INC]], i32* [[TMP2]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_end_critical(%struct.ident_t* @[[GLOB1]], i32 [[TMP9]], [8 x i32]* @"_gomp_critical_user_$var")
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = load i32, i32* [[TMP6]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_critical(%struct.ident_t* @[[GLOB1]], i32 [[TMP7]], [8 x i32]* @"_gomp_critical_user_$var")
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK1-NEXT: [[INC:%.*]] = add nsw i32 [[TMP8]], 1
|
||||
// CHECK1-NEXT: store i32 [[INC]], i32* [[TMP0]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_end_critical(%struct.ident_t* @[[GLOB1]], i32 [[TMP7]], [8 x i32]* @"_gomp_critical_user_$var")
|
||||
// CHECK1-NEXT: br label [[OMP_CRITICAL_SYNC]]
|
||||
// CHECK1: omp.critical.sync:
|
||||
// CHECK1-NEXT: call void @__kmpc_syncwarp(i64 [[TMP3]])
|
||||
// CHECK1-NEXT: [[TMP11:%.*]] = add nsw i32 [[TMP6]], 1
|
||||
// CHECK1-NEXT: store i32 [[TMP11]], i32* [[CRITICAL_COUNTER]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_syncwarp(i64 [[TMP1]])
|
||||
// CHECK1-NEXT: [[TMP9:%.*]] = add nsw i32 [[TMP4]], 1
|
||||
// CHECK1-NEXT: store i32 [[TMP9]], i32* [[CRITICAL_COUNTER]], align 4
|
||||
// CHECK1-NEXT: br label [[OMP_CRITICAL_LOOP]]
|
||||
// CHECK1: omp.critical.exit:
|
||||
// CHECK1-NEXT: ret void
|
||||
|
@ -1760,9 +1707,9 @@ int bar(int n){
|
|||
// CHECK1-NEXT: call void @__kmpc_get_shared_variables(i8*** [[GLOBAL_ARGS]])
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i8**, i8*** [[GLOBAL_ARGS]], align 8
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = getelementptr inbounds i8*, i8** [[TMP2]], i64 0
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = bitcast i8** [[TMP3]] to %struct.anon.3**
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = load %struct.anon.3*, %struct.anon.3** [[TMP4]], align 8
|
||||
// CHECK1-NEXT: call void @__omp_outlined__4(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]], %struct.anon.3* [[TMP5]]) #[[ATTR2]]
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = bitcast i8** [[TMP3]] to i32**
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = load i32*, i32** [[TMP4]], align 8
|
||||
// CHECK1-NEXT: call void @__omp_outlined__4(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]], i32* [[TMP5]]) #[[ATTR2]]
|
||||
// CHECK1-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -1770,47 +1717,23 @@ int bar(int n){
|
|||
// CHECK2-SAME: (i32 [[A:%.*]]) #[[ATTR0:[0-9]+]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 1
|
||||
// CHECK2-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 4
|
||||
// CHECK2-NEXT: [[OMP_OUTLINED_ARG_AGG_1:%.*]] = alloca [[STRUCT_ANON_0:%.*]], align 1
|
||||
// CHECK2-NEXT: [[CAPTURED_VARS_ADDRS2:%.*]] = alloca [1 x i8*], align 4
|
||||
// CHECK2-NEXT: [[OMP_OUTLINED_ARG_AGG_3:%.*]] = alloca [[STRUCT_ANON_1:%.*]], align 1
|
||||
// CHECK2-NEXT: [[CAPTURED_VARS_ADDRS4:%.*]] = alloca [1 x i8*], align 4
|
||||
// CHECK2-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x i8*], align 4
|
||||
// CHECK2-NEXT: [[CAPTURED_VARS_ADDRS1:%.*]] = alloca [0 x i8*], align 4
|
||||
// CHECK2-NEXT: [[CAPTURED_VARS_ADDRS2:%.*]] = alloca [0 x i8*], align 4
|
||||
// CHECK2-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(%struct.ident_t* @[[GLOB1:[0-9]+]], i1 false, i1 true, i1 true)
|
||||
// CHECK2-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
|
||||
// CHECK2-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
|
||||
// CHECK2: user_code.entry:
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = call i8* @__kmpc_alloc_shared(i32 1)
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = load [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], align 1
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = bitcast i8* [[TMP3]] to %struct.anon*
|
||||
// CHECK2-NEXT: store [[STRUCT_ANON]] [[TMP4]], %struct.anon* [[TMP5]], align 1
|
||||
// CHECK2-NEXT: store i8* [[TMP3]], i8** [[TMP2]], align 4
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK2-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon*)* @__omp_outlined__ to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined___wrapper to i8*), i8** [[TMP6]], i32 1)
|
||||
// CHECK2-NEXT: call void @__kmpc_free_shared(i8* [[TMP3]], i32 1)
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS2]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = call i8* @__kmpc_alloc_shared(i32 1)
|
||||
// CHECK2-NEXT: [[TMP9:%.*]] = load [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_1]], align 1
|
||||
// CHECK2-NEXT: [[TMP10:%.*]] = bitcast i8* [[TMP8]] to %struct.anon.0*
|
||||
// CHECK2-NEXT: store [[STRUCT_ANON_0]] [[TMP9]], %struct.anon.0* [[TMP10]], align 1
|
||||
// CHECK2-NEXT: store i8* [[TMP8]], i8** [[TMP7]], align 4
|
||||
// CHECK2-NEXT: [[TMP11:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS2]] to i8**
|
||||
// CHECK2-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]], i32 0, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon.0*)* @__omp_outlined__1 to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined__1_wrapper to i8*), i8** [[TMP11]], i32 1)
|
||||
// CHECK2-NEXT: call void @__kmpc_free_shared(i8* [[TMP8]], i32 1)
|
||||
// CHECK2-NEXT: [[TMP12:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS4]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP13:%.*]] = call i8* @__kmpc_alloc_shared(i32 1)
|
||||
// CHECK2-NEXT: [[TMP14:%.*]] = load [[STRUCT_ANON_1]], %struct.anon.1* [[OMP_OUTLINED_ARG_AGG_3]], align 1
|
||||
// CHECK2-NEXT: [[TMP15:%.*]] = bitcast i8* [[TMP13]] to %struct.anon.1*
|
||||
// CHECK2-NEXT: store [[STRUCT_ANON_1]] [[TMP14]], %struct.anon.1* [[TMP15]], align 1
|
||||
// CHECK2-NEXT: store i8* [[TMP13]], i8** [[TMP12]], align 4
|
||||
// CHECK2-NEXT: [[TMP16:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS4]] to i8**
|
||||
// CHECK2-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon.1*)* @__omp_outlined__2 to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined__2_wrapper to i8*), i8** [[TMP16]], i32 1)
|
||||
// CHECK2-NEXT: call void @__kmpc_free_shared(i8* [[TMP13]], i32 1)
|
||||
// CHECK2-NEXT: [[TMP17:%.*]] = load i32, i32* [[A_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP17]], 1
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = bitcast [0 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK2-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*)* @__omp_outlined__ to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined___wrapper to i8*), i8** [[TMP2]], i32 0)
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = bitcast [0 x i8*]* [[CAPTURED_VARS_ADDRS1]] to i8**
|
||||
// CHECK2-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]], i32 0, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*)* @__omp_outlined__1 to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined__1_wrapper to i8*), i8** [[TMP3]], i32 0)
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = bitcast [0 x i8*]* [[CAPTURED_VARS_ADDRS2]] to i8**
|
||||
// CHECK2-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*)* @__omp_outlined__2 to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined__2_wrapper to i8*), i8** [[TMP4]], i32 0)
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = load i32, i32* [[A_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP5]], 1
|
||||
// CHECK2-NEXT: store i32 [[ADD]], i32* [[A_ADDR]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 false, i1 true)
|
||||
// CHECK2-NEXT: ret void
|
||||
|
@ -1819,16 +1742,13 @@ int bar(int n){
|
|||
//
|
||||
//
|
||||
// CHECK2-LABEL: define {{[^@]+}}@__omp_outlined__
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]]) #[[ATTR0]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 4
|
||||
// CHECK2-NEXT: [[A:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK2-NEXT: store i32 42, i32* [[A]], align 4
|
||||
// CHECK2-NEXT: ret void
|
||||
//
|
||||
|
@ -1844,21 +1764,18 @@ int bar(int n){
|
|||
// CHECK2-NEXT: store i16 [[TMP0]], i16* [[DOTADDR]], align 2
|
||||
// CHECK2-NEXT: store i32 [[TMP1]], i32* [[DOTADDR1]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_get_shared_variables(i8*** [[GLOBAL_ARGS]])
|
||||
// CHECK2-NEXT: call void @__omp_outlined__(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]], %struct.anon* null) #[[ATTR1:[0-9]+]]
|
||||
// CHECK2-NEXT: call void @__omp_outlined__(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]]) #[[ATTR1:[0-9]+]]
|
||||
// CHECK2-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK2-LABEL: define {{[^@]+}}@__omp_outlined__1
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.0* noalias [[__CONTEXT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]]) #[[ATTR0]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.0*, align 4
|
||||
// CHECK2-NEXT: [[A:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: store %struct.anon.0* [[__CONTEXT]], %struct.anon.0** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load %struct.anon.0*, %struct.anon.0** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK2-NEXT: store i32 43, i32* [[A]], align 4
|
||||
// CHECK2-NEXT: ret void
|
||||
//
|
||||
|
@ -1874,21 +1791,18 @@ int bar(int n){
|
|||
// CHECK2-NEXT: store i16 [[TMP0]], i16* [[DOTADDR]], align 2
|
||||
// CHECK2-NEXT: store i32 [[TMP1]], i32* [[DOTADDR1]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_get_shared_variables(i8*** [[GLOBAL_ARGS]])
|
||||
// CHECK2-NEXT: call void @__omp_outlined__1(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]], %struct.anon.0* null) #[[ATTR1]]
|
||||
// CHECK2-NEXT: call void @__omp_outlined__1(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]]) #[[ATTR1]]
|
||||
// CHECK2-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK2-LABEL: define {{[^@]+}}@__omp_outlined__2
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.1* noalias [[__CONTEXT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]]) #[[ATTR0]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.1*, align 4
|
||||
// CHECK2-NEXT: [[A:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: store %struct.anon.1* [[__CONTEXT]], %struct.anon.1** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load %struct.anon.1*, %struct.anon.1** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK2-NEXT: store i32 44, i32* [[A]], align 4
|
||||
// CHECK2-NEXT: ret void
|
||||
//
|
||||
|
@ -1904,7 +1818,7 @@ int bar(int n){
|
|||
// CHECK2-NEXT: store i16 [[TMP0]], i16* [[DOTADDR]], align 2
|
||||
// CHECK2-NEXT: store i32 [[TMP1]], i32* [[DOTADDR1]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_get_shared_variables(i8*** [[GLOBAL_ARGS]])
|
||||
// CHECK2-NEXT: call void @__omp_outlined__2(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]], %struct.anon.1* null) #[[ATTR1]]
|
||||
// CHECK2-NEXT: call void @__omp_outlined__2(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]]) #[[ATTR1]]
|
||||
// CHECK2-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -1915,8 +1829,7 @@ int bar(int n){
|
|||
// CHECK2-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[AA_ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[B_ADDR:%.*]] = alloca [10 x i32]*, align 4
|
||||
// CHECK2-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON_2:%.*]], align 1
|
||||
// CHECK2-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 4
|
||||
// CHECK2-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x i8*], align 4
|
||||
// CHECK2-NEXT: store i32 [[N]], i32* [[N_ADDR]], align 4
|
||||
// CHECK2-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
|
||||
// CHECK2-NEXT: store i32 [[AA]], i32* [[AA_ADDR]], align 4
|
||||
|
@ -1928,29 +1841,22 @@ int bar(int n){
|
|||
// CHECK2-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
|
||||
// CHECK2: user_code.entry:
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = call i8* @__kmpc_alloc_shared(i32 1)
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = load [[STRUCT_ANON_2]], %struct.anon.2* [[OMP_OUTLINED_ARG_AGG_]], align 1
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = bitcast i8* [[TMP4]] to %struct.anon.2*
|
||||
// CHECK2-NEXT: store [[STRUCT_ANON_2]] [[TMP5]], %struct.anon.2* [[TMP6]], align 1
|
||||
// CHECK2-NEXT: store i8* [[TMP4]], i8** [[TMP3]], align 4
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = load i32, i32* [[N_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP7]], 1000
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = zext i1 [[CMP]] to i32
|
||||
// CHECK2-NEXT: [[TMP9:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK2-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]], i32 [[TMP8]], i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon.2*)* @__omp_outlined__3 to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined__3_wrapper to i8*), i8** [[TMP9]], i32 1)
|
||||
// CHECK2-NEXT: call void @__kmpc_free_shared(i8* [[TMP4]], i32 1)
|
||||
// CHECK2-NEXT: [[TMP10:%.*]] = load i32, i32* [[A_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP10]], 1
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = load i32, i32* [[N_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP3]], 1000
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = zext i1 [[CMP]] to i32
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = bitcast [0 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK2-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]], i32 [[TMP4]], i32 -1, i32 -1, i8* bitcast (void (i32*, i32*)* @__omp_outlined__3 to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined__3_wrapper to i8*), i8** [[TMP5]], i32 0)
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = load i32, i32* [[A_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP6]], 1
|
||||
// CHECK2-NEXT: store i32 [[ADD]], i32* [[A_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP11:%.*]] = load i16, i16* [[CONV]], align 4
|
||||
// CHECK2-NEXT: [[CONV1:%.*]] = sext i16 [[TMP11]] to i32
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = load i16, i16* [[CONV]], align 4
|
||||
// CHECK2-NEXT: [[CONV1:%.*]] = sext i16 [[TMP7]] to i32
|
||||
// CHECK2-NEXT: [[ADD2:%.*]] = add nsw i32 [[CONV1]], 1
|
||||
// CHECK2-NEXT: [[CONV3:%.*]] = trunc i32 [[ADD2]] to i16
|
||||
// CHECK2-NEXT: store i16 [[CONV3]], i16* [[CONV]], align 4
|
||||
// CHECK2-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [10 x i32], [10 x i32]* [[TMP0]], i32 0, i32 2
|
||||
// CHECK2-NEXT: [[TMP12:%.*]] = load i32, i32* [[ARRAYIDX]], align 4
|
||||
// CHECK2-NEXT: [[ADD4:%.*]] = add nsw i32 [[TMP12]], 1
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = load i32, i32* [[ARRAYIDX]], align 4
|
||||
// CHECK2-NEXT: [[ADD4:%.*]] = add nsw i32 [[TMP8]], 1
|
||||
// CHECK2-NEXT: store i32 [[ADD4]], i32* [[ARRAYIDX]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 false, i1 true)
|
||||
// CHECK2-NEXT: ret void
|
||||
|
@ -1959,20 +1865,17 @@ int bar(int n){
|
|||
//
|
||||
//
|
||||
// CHECK2-LABEL: define {{[^@]+}}@__omp_outlined__3
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.2* noalias [[__CONTEXT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]]) #[[ATTR0]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.2*, align 4
|
||||
// CHECK2-NEXT: [[A:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: store %struct.anon.2* [[__CONTEXT]], %struct.anon.2** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load %struct.anon.2*, %struct.anon.2** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK2-NEXT: store i32 45, i32* [[A]], align 4
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i32, i32* [[TMP1]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 [[TMP2]])
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 [[TMP1]])
|
||||
// CHECK2-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -1987,7 +1890,7 @@ int bar(int n){
|
|||
// CHECK2-NEXT: store i16 [[TMP0]], i16* [[DOTADDR]], align 2
|
||||
// CHECK2-NEXT: store i32 [[TMP1]], i32* [[DOTADDR1]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_get_shared_variables(i8*** [[GLOBAL_ARGS]])
|
||||
// CHECK2-NEXT: call void @__omp_outlined__3(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]], %struct.anon.2* null) #[[ATTR1]]
|
||||
// CHECK2-NEXT: call void @__omp_outlined__3(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]]) #[[ATTR1]]
|
||||
// CHECK2-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -1995,7 +1898,6 @@ int bar(int n){
|
|||
// CHECK2-SAME: (i32 [[A:%.*]]) #[[ATTR0]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON_3:%.*]], align 4
|
||||
// CHECK2-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 4
|
||||
// CHECK2-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(%struct.ident_t* @[[GLOB1]], i1 false, i1 true, i1 true)
|
||||
|
@ -2007,19 +1909,13 @@ int bar(int n){
|
|||
// CHECK2-NEXT: [[A_ON_STACK:%.*]] = bitcast i8* [[A1]] to i32*
|
||||
// CHECK2-NEXT: store i32 [[TMP1]], i32* [[A_ON_STACK]], align 4
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON_3]], %struct.anon.3* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK2-NEXT: store i32* [[A_ON_STACK]], i32** [[TMP3]], align 4
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = call i8* @__kmpc_alloc_shared(i32 4)
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = load [[STRUCT_ANON_3]], %struct.anon.3* [[OMP_OUTLINED_ARG_AGG_]], align 4
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = bitcast i8* [[TMP5]] to %struct.anon.3*
|
||||
// CHECK2-NEXT: store [[STRUCT_ANON_3]] [[TMP6]], %struct.anon.3* [[TMP7]], align 4
|
||||
// CHECK2-NEXT: store i8* [[TMP5]], i8** [[TMP4]], align 4
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK2-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon.3*)* @__omp_outlined__4 to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined__4_wrapper to i8*), i8** [[TMP8]], i32 1)
|
||||
// CHECK2-NEXT: call void @__kmpc_free_shared(i8* [[TMP5]], i32 4)
|
||||
// CHECK2-NEXT: [[TMP9:%.*]] = load i32, i32* [[A_ON_STACK]], align 4
|
||||
// CHECK2-NEXT: [[INC:%.*]] = add nsw i32 [[TMP9]], 1
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = bitcast i32* [[A_ON_STACK]] to i8*
|
||||
// CHECK2-NEXT: store i8* [[TMP4]], i8** [[TMP3]], align 4
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK2-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i32*)* @__omp_outlined__4 to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined__4_wrapper to i8*), i8** [[TMP5]], i32 1)
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = load i32, i32* [[A_ON_STACK]], align 4
|
||||
// CHECK2-NEXT: [[INC:%.*]] = add nsw i32 [[TMP6]], 1
|
||||
// CHECK2-NEXT: store i32 [[INC]], i32* [[A_ON_STACK]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_free_shared(i8* [[A1]], i32 4)
|
||||
// CHECK2-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 false, i1 true)
|
||||
|
@ -2029,44 +1925,42 @@ int bar(int n){
|
|||
//
|
||||
//
|
||||
// CHECK2-LABEL: define {{[^@]+}}@__omp_outlined__4
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.3* noalias [[__CONTEXT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR0]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.3*, align 4
|
||||
// CHECK2-NEXT: [[A_ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[CRITICAL_COUNTER:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: store %struct.anon.3* [[__CONTEXT]], %struct.anon.3** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load %struct.anon.3*, %struct.anon.3** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_3:%.*]], %struct.anon.3* [[TMP0]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 4
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = call i64 @__kmpc_warp_active_thread_mask()
|
||||
// CHECK2-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load i32*, i32** [[A_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = call i64 @__kmpc_warp_active_thread_mask()
|
||||
// CHECK2-NEXT: [[NVPTX_TID:%.*]] = call i32 @llvm.nvvm.read.ptx.sreg.tid.x()
|
||||
// CHECK2-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @llvm.nvvm.read.ptx.sreg.ntid.x()
|
||||
// CHECK2-NEXT: store i32 0, i32* [[CRITICAL_COUNTER]], align 4
|
||||
// CHECK2-NEXT: br label [[OMP_CRITICAL_LOOP:%.*]]
|
||||
// CHECK2: omp.critical.loop:
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = load i32, i32* [[CRITICAL_COUNTER]], align 4
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = icmp slt i32 [[TMP4]], [[NVPTX_NUM_THREADS]]
|
||||
// CHECK2-NEXT: br i1 [[TMP5]], label [[OMP_CRITICAL_TEST:%.*]], label [[OMP_CRITICAL_EXIT:%.*]]
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i32, i32* [[CRITICAL_COUNTER]], align 4
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = icmp slt i32 [[TMP2]], [[NVPTX_NUM_THREADS]]
|
||||
// CHECK2-NEXT: br i1 [[TMP3]], label [[OMP_CRITICAL_TEST:%.*]], label [[OMP_CRITICAL_EXIT:%.*]]
|
||||
// CHECK2: omp.critical.test:
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = load i32, i32* [[CRITICAL_COUNTER]], align 4
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = icmp eq i32 [[NVPTX_TID]], [[TMP6]]
|
||||
// CHECK2-NEXT: br i1 [[TMP7]], label [[OMP_CRITICAL_BODY:%.*]], label [[OMP_CRITICAL_SYNC:%.*]]
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = load i32, i32* [[CRITICAL_COUNTER]], align 4
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = icmp eq i32 [[NVPTX_TID]], [[TMP4]]
|
||||
// CHECK2-NEXT: br i1 [[TMP5]], label [[OMP_CRITICAL_BODY:%.*]], label [[OMP_CRITICAL_SYNC:%.*]]
|
||||
// CHECK2: omp.critical.body:
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP9:%.*]] = load i32, i32* [[TMP8]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_critical(%struct.ident_t* @[[GLOB1]], i32 [[TMP9]], [8 x i32]* @"_gomp_critical_user_$var")
|
||||
// CHECK2-NEXT: [[TMP10:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK2-NEXT: [[INC:%.*]] = add nsw i32 [[TMP10]], 1
|
||||
// CHECK2-NEXT: store i32 [[INC]], i32* [[TMP2]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_end_critical(%struct.ident_t* @[[GLOB1]], i32 [[TMP9]], [8 x i32]* @"_gomp_critical_user_$var")
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = load i32, i32* [[TMP6]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_critical(%struct.ident_t* @[[GLOB1]], i32 [[TMP7]], [8 x i32]* @"_gomp_critical_user_$var")
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK2-NEXT: [[INC:%.*]] = add nsw i32 [[TMP8]], 1
|
||||
// CHECK2-NEXT: store i32 [[INC]], i32* [[TMP0]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_end_critical(%struct.ident_t* @[[GLOB1]], i32 [[TMP7]], [8 x i32]* @"_gomp_critical_user_$var")
|
||||
// CHECK2-NEXT: br label [[OMP_CRITICAL_SYNC]]
|
||||
// CHECK2: omp.critical.sync:
|
||||
// CHECK2-NEXT: call void @__kmpc_syncwarp(i64 [[TMP3]])
|
||||
// CHECK2-NEXT: [[TMP11:%.*]] = add nsw i32 [[TMP6]], 1
|
||||
// CHECK2-NEXT: store i32 [[TMP11]], i32* [[CRITICAL_COUNTER]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_syncwarp(i64 [[TMP1]])
|
||||
// CHECK2-NEXT: [[TMP9:%.*]] = add nsw i32 [[TMP4]], 1
|
||||
// CHECK2-NEXT: store i32 [[TMP9]], i32* [[CRITICAL_COUNTER]], align 4
|
||||
// CHECK2-NEXT: br label [[OMP_CRITICAL_LOOP]]
|
||||
// CHECK2: omp.critical.exit:
|
||||
// CHECK2-NEXT: ret void
|
||||
|
@ -2085,8 +1979,8 @@ int bar(int n){
|
|||
// CHECK2-NEXT: call void @__kmpc_get_shared_variables(i8*** [[GLOBAL_ARGS]])
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i8**, i8*** [[GLOBAL_ARGS]], align 4
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = getelementptr inbounds i8*, i8** [[TMP2]], i32 0
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = bitcast i8** [[TMP3]] to %struct.anon.3**
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = load %struct.anon.3*, %struct.anon.3** [[TMP4]], align 4
|
||||
// CHECK2-NEXT: call void @__omp_outlined__4(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]], %struct.anon.3* [[TMP5]]) #[[ATTR1]]
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = bitcast i8** [[TMP3]] to i32**
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = load i32*, i32** [[TMP4]], align 4
|
||||
// CHECK2-NEXT: call void @__omp_outlined__4(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]], i32* [[TMP5]]) #[[ATTR1]]
|
||||
// CHECK2-NEXT: ret void
|
||||
//
|
||||
|
|
|
@ -460,8 +460,7 @@ int bar(int n){
|
|||
// CHECK-NEXT: entry:
|
||||
// CHECK-NEXT: [[N_ADDR:%.*]] = alloca i64, align 8
|
||||
// CHECK-NEXT: [[B_ADDR:%.*]] = alloca [10 x i32]*, align 8
|
||||
// CHECK-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 8
|
||||
// CHECK-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 8
|
||||
// CHECK-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x i8*], align 8
|
||||
// CHECK-NEXT: store i64 [[N]], i64* [[N_ADDR]], align 8
|
||||
// CHECK-NEXT: store [10 x i32]* [[B]], [10 x i32]** [[B_ADDR]], align 8
|
||||
// CHECK-NEXT: [[CONV:%.*]] = bitcast i64* [[N_ADDR]] to i32*
|
||||
|
@ -475,22 +474,17 @@ int bar(int n){
|
|||
// CHECK-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
|
||||
// CHECK-NEXT: [[TMP3:%.*]] = load i32, i32* [[CONV]], align 8
|
||||
// CHECK-NEXT: store i32 [[TMP3]], i32* [[D_ON_STACK]], align 4
|
||||
// CHECK-NEXT: [[TMP4:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK-NEXT: store [10 x i32]* [[TMP0]], [10 x i32]** [[TMP4]], align 8
|
||||
// CHECK-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 1
|
||||
// CHECK-NEXT: store i32* [[D_ON_STACK]], i32** [[TMP5]], align 8
|
||||
// CHECK-NEXT: [[TMP6:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
|
||||
// CHECK-NEXT: [[TMP7:%.*]] = call i8* @__kmpc_alloc_shared(i64 16)
|
||||
// CHECK-NEXT: [[TMP8:%.*]] = load [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], align 8
|
||||
// CHECK-NEXT: [[TMP9:%.*]] = bitcast i8* [[TMP7]] to %struct.anon*
|
||||
// CHECK-NEXT: store [[STRUCT_ANON]] [[TMP8]], %struct.anon* [[TMP9]], align 8
|
||||
// CHECK-NEXT: [[TMP4:%.*]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
|
||||
// CHECK-NEXT: [[TMP5:%.*]] = bitcast [10 x i32]* [[TMP0]] to i8*
|
||||
// CHECK-NEXT: store i8* [[TMP5]], i8** [[TMP4]], align 8
|
||||
// CHECK-NEXT: [[TMP6:%.*]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 1
|
||||
// CHECK-NEXT: [[TMP7:%.*]] = bitcast i32* [[D_ON_STACK]] to i8*
|
||||
// CHECK-NEXT: store i8* [[TMP7]], i8** [[TMP6]], align 8
|
||||
// CHECK-NEXT: [[TMP10:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon*)* @__omp_outlined__ to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined___wrapper to i8*), i8** [[TMP10]], i64 1)
|
||||
// CHECK-NEXT: call void @__kmpc_free_shared(i8* [[TMP7]], i64 16)
|
||||
// CHECK-NEXT: [[TMP8:%.*]] = bitcast [2 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, [10 x i32]*, i32*)* @__omp_outlined__ to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined___wrapper to i8*), i8** [[TMP8]], i64 2)
|
||||
// CHECK-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [10 x i32], [10 x i32]* [[TMP0]], i64 0, i64 3
|
||||
// CHECK-NEXT: [[TMP11:%.*]] = load i32, i32* [[ARRAYIDX]], align 4
|
||||
// CHECK-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP11]], 1
|
||||
// CHECK-NEXT: [[TMP9:%.*]] = load i32, i32* [[ARRAYIDX]], align 4
|
||||
// CHECK-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP9]], 1
|
||||
// CHECK-NEXT: store i32 [[ADD]], i32* [[ARRAYIDX]], align 4
|
||||
// CHECK-NEXT: call void @__kmpc_free_shared(i8* [[D]], i64 4)
|
||||
// CHECK-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 false, i1 true)
|
||||
|
@ -500,11 +494,12 @@ int bar(int n){
|
|||
//
|
||||
//
|
||||
// CHECK-LABEL: define {{[^@]+}}@__omp_outlined__
|
||||
// CHECK-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], [10 x i32]* nonnull align 4 dereferenceable(40) [[B:%.*]], i32* nonnull align 4 dereferenceable(4) [[D:%.*]]) #[[ATTR0]] {
|
||||
// CHECK-NEXT: entry:
|
||||
// CHECK-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK-NEXT: [[B_ADDR:%.*]] = alloca [10 x i32]*, align 8
|
||||
// CHECK-NEXT: [[D_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
|
||||
// CHECK-NEXT: [[TMP:%.*]] = alloca i32, align 4
|
||||
// CHECK-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
|
||||
|
@ -514,79 +509,77 @@ int bar(int n){
|
|||
// CHECK-NEXT: [[I:%.*]] = alloca i32, align 4
|
||||
// CHECK-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK-NEXT: [[TMP2:%.*]] = load [10 x i32]*, [10 x i32]** [[TMP1]], align 8
|
||||
// CHECK-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP0]], i32 0, i32 1
|
||||
// CHECK-NEXT: [[TMP4:%.*]] = load i32*, i32** [[TMP3]], align 8
|
||||
// CHECK-NEXT: store [10 x i32]* [[B]], [10 x i32]** [[B_ADDR]], align 8
|
||||
// CHECK-NEXT: store i32* [[D]], i32** [[D_ADDR]], align 8
|
||||
// CHECK-NEXT: [[TMP0:%.*]] = load [10 x i32]*, [10 x i32]** [[B_ADDR]], align 8
|
||||
// CHECK-NEXT: [[TMP1:%.*]] = load i32*, i32** [[D_ADDR]], align 8
|
||||
// CHECK-NEXT: store i32 0, i32* [[DOTOMP_LB]], align 4
|
||||
// CHECK-NEXT: store i32 9, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK-NEXT: store i32 1, i32* [[DOTOMP_STRIDE]], align 4
|
||||
// CHECK-NEXT: store i32 0, i32* [[DOTOMP_IS_LAST]], align 4
|
||||
// CHECK-NEXT: [[TMP5:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK-NEXT: [[TMP6:%.*]] = load i32, i32* [[TMP5]], align 4
|
||||
// CHECK-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 [[TMP6]], i32 33, i32* [[DOTOMP_IS_LAST]], i32* [[DOTOMP_LB]], i32* [[DOTOMP_UB]], i32* [[DOTOMP_STRIDE]], i32 1, i32 1)
|
||||
// CHECK-NEXT: [[TMP2:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 [[TMP3]], i32 33, i32* [[DOTOMP_IS_LAST]], i32* [[DOTOMP_LB]], i32* [[DOTOMP_UB]], i32* [[DOTOMP_STRIDE]], i32 1, i32 1)
|
||||
// CHECK-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
|
||||
// CHECK: omp.dispatch.cond:
|
||||
// CHECK-NEXT: [[TMP7:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP7]], 9
|
||||
// CHECK-NEXT: [[TMP4:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP4]], 9
|
||||
// CHECK-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
|
||||
// CHECK: cond.true:
|
||||
// CHECK-NEXT: br label [[COND_END:%.*]]
|
||||
// CHECK: cond.false:
|
||||
// CHECK-NEXT: [[TMP8:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK-NEXT: [[TMP5:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK-NEXT: br label [[COND_END]]
|
||||
// CHECK: cond.end:
|
||||
// CHECK-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP8]], [[COND_FALSE]] ]
|
||||
// CHECK-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP5]], [[COND_FALSE]] ]
|
||||
// CHECK-NEXT: store i32 [[COND]], i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK-NEXT: [[TMP9:%.*]] = load i32, i32* [[DOTOMP_LB]], align 4
|
||||
// CHECK-NEXT: store i32 [[TMP9]], i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK-NEXT: [[TMP10:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK-NEXT: [[TMP11:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP10]], [[TMP11]]
|
||||
// CHECK-NEXT: [[TMP6:%.*]] = load i32, i32* [[DOTOMP_LB]], align 4
|
||||
// CHECK-NEXT: store i32 [[TMP6]], i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK-NEXT: [[TMP7:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK-NEXT: [[TMP8:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP7]], [[TMP8]]
|
||||
// CHECK-NEXT: br i1 [[CMP1]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
|
||||
// CHECK: omp.dispatch.body:
|
||||
// CHECK-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
|
||||
// CHECK: omp.inner.for.cond:
|
||||
// CHECK-NEXT: [[TMP12:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK-NEXT: [[TMP13:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK-NEXT: [[CMP2:%.*]] = icmp sle i32 [[TMP12]], [[TMP13]]
|
||||
// CHECK-NEXT: [[TMP9:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK-NEXT: [[TMP10:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK-NEXT: [[CMP2:%.*]] = icmp sle i32 [[TMP9]], [[TMP10]]
|
||||
// CHECK-NEXT: br i1 [[CMP2]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
|
||||
// CHECK: omp.inner.for.body:
|
||||
// CHECK-NEXT: [[TMP14:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP14]], 1
|
||||
// CHECK-NEXT: [[TMP11:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP11]], 1
|
||||
// CHECK-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
|
||||
// CHECK-NEXT: store i32 [[ADD]], i32* [[I]], align 4
|
||||
// CHECK-NEXT: [[TMP15:%.*]] = load i32, i32* [[TMP4]], align 4
|
||||
// CHECK-NEXT: [[TMP16:%.*]] = load i32, i32* [[I]], align 4
|
||||
// CHECK-NEXT: [[IDXPROM:%.*]] = sext i32 [[TMP16]] to i64
|
||||
// CHECK-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [10 x i32], [10 x i32]* [[TMP2]], i64 0, i64 [[IDXPROM]]
|
||||
// CHECK-NEXT: [[TMP17:%.*]] = load i32, i32* [[ARRAYIDX]], align 4
|
||||
// CHECK-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP17]], [[TMP15]]
|
||||
// CHECK-NEXT: [[TMP12:%.*]] = load i32, i32* [[TMP1]], align 4
|
||||
// CHECK-NEXT: [[TMP13:%.*]] = load i32, i32* [[I]], align 4
|
||||
// CHECK-NEXT: [[IDXPROM:%.*]] = sext i32 [[TMP13]] to i64
|
||||
// CHECK-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [10 x i32], [10 x i32]* [[TMP0]], i64 0, i64 [[IDXPROM]]
|
||||
// CHECK-NEXT: [[TMP14:%.*]] = load i32, i32* [[ARRAYIDX]], align 4
|
||||
// CHECK-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP14]], [[TMP12]]
|
||||
// CHECK-NEXT: store i32 [[ADD3]], i32* [[ARRAYIDX]], align 4
|
||||
// CHECK-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
|
||||
// CHECK: omp.body.continue:
|
||||
// CHECK-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
|
||||
// CHECK: omp.inner.for.inc:
|
||||
// CHECK-NEXT: [[TMP18:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK-NEXT: [[ADD4:%.*]] = add nsw i32 [[TMP18]], 1
|
||||
// CHECK-NEXT: [[TMP15:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK-NEXT: [[ADD4:%.*]] = add nsw i32 [[TMP15]], 1
|
||||
// CHECK-NEXT: store i32 [[ADD4]], i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK-NEXT: br label [[OMP_INNER_FOR_COND]]
|
||||
// CHECK: omp.inner.for.end:
|
||||
// CHECK-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
|
||||
// CHECK: omp.dispatch.inc:
|
||||
// CHECK-NEXT: [[TMP19:%.*]] = load i32, i32* [[DOTOMP_LB]], align 4
|
||||
// CHECK-NEXT: [[TMP20:%.*]] = load i32, i32* [[DOTOMP_STRIDE]], align 4
|
||||
// CHECK-NEXT: [[ADD5:%.*]] = add nsw i32 [[TMP19]], [[TMP20]]
|
||||
// CHECK-NEXT: [[TMP16:%.*]] = load i32, i32* [[DOTOMP_LB]], align 4
|
||||
// CHECK-NEXT: [[TMP17:%.*]] = load i32, i32* [[DOTOMP_STRIDE]], align 4
|
||||
// CHECK-NEXT: [[ADD5:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
|
||||
// CHECK-NEXT: store i32 [[ADD5]], i32* [[DOTOMP_LB]], align 4
|
||||
// CHECK-NEXT: [[TMP21:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK-NEXT: [[TMP22:%.*]] = load i32, i32* [[DOTOMP_STRIDE]], align 4
|
||||
// CHECK-NEXT: [[ADD6:%.*]] = add nsw i32 [[TMP21]], [[TMP22]]
|
||||
// CHECK-NEXT: [[TMP18:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK-NEXT: [[TMP19:%.*]] = load i32, i32* [[DOTOMP_STRIDE]], align 4
|
||||
// CHECK-NEXT: [[ADD6:%.*]] = add nsw i32 [[TMP18]], [[TMP19]]
|
||||
// CHECK-NEXT: store i32 [[ADD6]], i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK-NEXT: br label [[OMP_DISPATCH_COND]]
|
||||
// CHECK: omp.dispatch.end:
|
||||
// CHECK-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB2]], i32 [[TMP6]])
|
||||
// CHECK-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB2]], i32 [[TMP3]])
|
||||
// CHECK-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -603,8 +596,11 @@ int bar(int n){
|
|||
// CHECK-NEXT: call void @__kmpc_get_shared_variables(i8*** [[GLOBAL_ARGS]])
|
||||
// CHECK-NEXT: [[TMP2:%.*]] = load i8**, i8*** [[GLOBAL_ARGS]], align 8
|
||||
// CHECK-NEXT: [[TMP3:%.*]] = getelementptr inbounds i8*, i8** [[TMP2]], i64 0
|
||||
// CHECK-NEXT: [[TMP4:%.*]] = bitcast i8** [[TMP3]] to %struct.anon**
|
||||
// CHECK-NEXT: [[TMP5:%.*]] = load %struct.anon*, %struct.anon** [[TMP4]], align 8
|
||||
// CHECK-NEXT: call void @__omp_outlined__(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]], %struct.anon* [[TMP5]]) #[[ATTR1:[0-9]+]]
|
||||
// CHECK-NEXT: [[TMP4:%.*]] = bitcast i8** [[TMP3]] to [10 x i32]**
|
||||
// CHECK-NEXT: [[TMP5:%.*]] = load [10 x i32]*, [10 x i32]** [[TMP4]], align 8
|
||||
// CHECK-NEXT: [[TMP6:%.*]] = getelementptr inbounds i8*, i8** [[TMP2]], i64 1
|
||||
// CHECK-NEXT: [[TMP7:%.*]] = bitcast i8** [[TMP6]] to i32**
|
||||
// CHECK-NEXT: [[TMP8:%.*]] = load i32*, i32** [[TMP7]], align 8
|
||||
// CHECK-NEXT: call void @__omp_outlined__(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]], [10 x i32]* [[TMP5]], i32* [[TMP8]]) #[[ATTR1:[0-9]+]]
|
||||
// CHECK-NEXT: ret void
|
||||
//
|
||||
|
|
|
@ -149,8 +149,7 @@ void unreachable_call() {
|
|||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[PTR1_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[PTR2_ADDR:%.*]] = alloca i32**, align 8
|
||||
// CHECK1-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 8
|
||||
// CHECK1-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 8
|
||||
// CHECK1-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x i8*], align 8
|
||||
// CHECK1-NEXT: store i32* [[PTR1]], i32** [[PTR1_ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32** [[PTR2]], i32*** [[PTR2_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load i32**, i32*** [[PTR2_ADDR]], align 8
|
||||
|
@ -159,19 +158,14 @@ void unreachable_call() {
|
|||
// CHECK1-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
|
||||
// CHECK1: user_code.entry:
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB2:[0-9]+]])
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK1-NEXT: store i32** [[PTR1_ADDR]], i32*** [[TMP3]], align 8
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 1
|
||||
// CHECK1-NEXT: store i32** [[TMP0]], i32*** [[TMP4]], align 8
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = call i8* @__kmpc_alloc_shared(i64 16)
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = load [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], align 8
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = bitcast i8* [[TMP6]] to %struct.anon*
|
||||
// CHECK1-NEXT: store [[STRUCT_ANON]] [[TMP7]], %struct.anon* [[TMP8]], align 8
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = bitcast i32** [[PTR1_ADDR]] to i8*
|
||||
// CHECK1-NEXT: store i8* [[TMP4]], i8** [[TMP3]], align 8
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 1
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = bitcast i32** [[TMP0]] to i8*
|
||||
// CHECK1-NEXT: store i8* [[TMP6]], i8** [[TMP5]], align 8
|
||||
// CHECK1-NEXT: [[TMP9:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK1-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP2]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon*)* @__omp_outlined__ to i8*), i8* null, i8** [[TMP9]], i64 1)
|
||||
// CHECK1-NEXT: call void @__kmpc_free_shared(i8* [[TMP6]], i64 16)
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = bitcast [2 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK1-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP2]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i32**, i32**)* @__omp_outlined__ to i8*), i8* null, i8** [[TMP7]], i64 2)
|
||||
// CHECK1-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 true, i1 true)
|
||||
// CHECK1-NEXT: ret void
|
||||
// CHECK1: worker.exit:
|
||||
|
@ -179,23 +173,22 @@ void unreachable_call() {
|
|||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@__omp_outlined__
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32** nonnull align 8 dereferenceable(8) [[PTR1:%.*]], i32** nonnull align 8 dereferenceable(8) [[PTR2:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK1-NEXT: [[PTR1_ADDR:%.*]] = alloca i32**, align 8
|
||||
// CHECK1-NEXT: [[PTR2_ADDR:%.*]] = alloca i32**, align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i32**, i32*** [[TMP1]], align 8
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP0]], i32 0, i32 1
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = load i32**, i32*** [[TMP3]], align 8
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = load i32*, i32** [[TMP4]], align 8
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = load i32, i32* [[TMP5]], align 4
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = load i32*, i32** [[TMP2]], align 8
|
||||
// CHECK1-NEXT: store i32 [[TMP6]], i32* [[TMP7]], align 4
|
||||
// CHECK1-NEXT: store i32** [[PTR1]], i32*** [[PTR1_ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32** [[PTR2]], i32*** [[PTR2_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load i32**, i32*** [[PTR1_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = load i32**, i32*** [[PTR2_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 8
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = load i32*, i32** [[TMP0]], align 8
|
||||
// CHECK1-NEXT: store i32 [[TMP3]], i32* [[TMP4]], align 4
|
||||
// CHECK1-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -308,7 +301,7 @@ void unreachable_call() {
|
|||
// CHECK1-NEXT: [[ADD20:%.*]] = add nsw i32 [[CONV19]], 1
|
||||
// CHECK1-NEXT: [[CONV21:%.*]] = trunc i32 [[ADD20]] to i8
|
||||
// CHECK1-NEXT: store i8 [[CONV21]], i8* [[Y]], align 8
|
||||
// CHECK1-NEXT: [[CALL:%.*]] = call nonnull align 8 dereferenceable(8) i64* @_ZN2TTIxcEixEi(%struct.TT* nonnull align 8 dereferenceable(16) [[TMP7]], i32 0) #[[ATTR7:[0-9]+]]
|
||||
// CHECK1-NEXT: [[CALL:%.*]] = call nonnull align 8 dereferenceable(8) i64* @_ZN2TTIxcEixEi(%struct.TT* nonnull align 8 dereferenceable(16) [[TMP7]], i32 0) #[[ATTR6:[0-9]+]]
|
||||
// CHECK1-NEXT: [[TMP17:%.*]] = load i64, i64* [[CALL]], align 8
|
||||
// CHECK1-NEXT: [[ADD22:%.*]] = add nsw i64 [[TMP17]], 1
|
||||
// CHECK1-NEXT: store i64 [[ADD22]], i64* [[CALL]], align 8
|
||||
|
@ -319,7 +312,7 @@ void unreachable_call() {
|
|||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@_ZN2TTIxcEixEi
|
||||
// CHECK1-SAME: (%struct.TT* nonnull align 8 dereferenceable(16) [[THIS:%.*]], i32 [[I:%.*]]) #[[ATTR4:[0-9]+]] comdat align 2 {
|
||||
// CHECK1-SAME: (%struct.TT* nonnull align 8 dereferenceable(16) [[THIS:%.*]], i32 [[I:%.*]]) #[[ATTR3:[0-9]+]] comdat align 2 {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca %struct.TT*, align 8
|
||||
// CHECK1-NEXT: [[I_ADDR:%.*]] = alloca i32, align 4
|
||||
|
@ -412,7 +405,7 @@ void unreachable_call() {
|
|||
// CHECK1-NEXT: [[TMP8:%.*]] = load double, double* [[A7]], align 8
|
||||
// CHECK1-NEXT: [[CONV8:%.*]] = fptosi double [[TMP8]] to i32
|
||||
// CHECK1-NEXT: [[A9:%.*]] = getelementptr inbounds [[STRUCT_S1]], %struct.S1* [[TMP0]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[CALL:%.*]] = call i32 @_Z3baziRd(i32 [[CONV8]], double* nonnull align 8 dereferenceable(8) [[A9]]) #[[ATTR7]]
|
||||
// CHECK1-NEXT: [[CALL:%.*]] = call i32 @_Z3baziRd(i32 [[CONV8]], double* nonnull align 8 dereferenceable(8) [[A9]]) #[[ATTR6]]
|
||||
// CHECK1-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 false, i1 true)
|
||||
// CHECK1-NEXT: ret void
|
||||
// CHECK1: worker.exit:
|
||||
|
@ -420,33 +413,27 @@ void unreachable_call() {
|
|||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@_Z3baziRd
|
||||
// CHECK1-SAME: (i32 [[F1:%.*]], double* nonnull align 8 dereferenceable(8) [[A:%.*]]) #[[ATTR4]] {
|
||||
// CHECK1-SAME: (i32 [[F1:%.*]], double* nonnull align 8 dereferenceable(8) [[A:%.*]]) #[[ATTR3]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[A_ADDR:%.*]] = alloca double*, align 8
|
||||
// CHECK1-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON_0:%.*]], align 8
|
||||
// CHECK1-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 8
|
||||
// CHECK1-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x i8*], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB3:[0-9]+]])
|
||||
// CHECK1-NEXT: [[F:%.*]] = call i8* @__kmpc_alloc_shared(i64 4)
|
||||
// CHECK1-NEXT: [[F_ON_STACK:%.*]] = bitcast i8* [[F]] to i32*
|
||||
// CHECK1-NEXT: store i32 [[F1]], i32* [[F_ON_STACK]], align 4
|
||||
// CHECK1-NEXT: store double* [[A]], double** [[A_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK1-NEXT: store i32* [[F_ON_STACK]], i32** [[TMP1]], align 8
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 1
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = load double*, double** [[A_ADDR]], align 8
|
||||
// CHECK1-NEXT: store double* [[TMP3]], double** [[TMP2]], align 8
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = call i8* @__kmpc_alloc_shared(i64 16)
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = load [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], align 8
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = bitcast i8* [[TMP5]] to %struct.anon.0*
|
||||
// CHECK1-NEXT: store [[STRUCT_ANON_0]] [[TMP6]], %struct.anon.0* [[TMP7]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = load double*, double** [[A_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = bitcast i32* [[F_ON_STACK]] to i8*
|
||||
// CHECK1-NEXT: store i8* [[TMP3]], i8** [[TMP2]], align 8
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 1
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = bitcast double* [[TMP1]] to i8*
|
||||
// CHECK1-NEXT: store i8* [[TMP5]], i8** [[TMP4]], align 8
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK1-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB3]], i32 [[TMP0]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon.0*)* @__omp_outlined__1 to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined__1_wrapper to i8*), i8** [[TMP8]], i64 1)
|
||||
// CHECK1-NEXT: call void @__kmpc_free_shared(i8* [[TMP5]], i64 16)
|
||||
// CHECK1-NEXT: [[TMP9:%.*]] = load i32, i32* [[F_ON_STACK]], align 4
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = bitcast [2 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK1-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB3]], i32 [[TMP0]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i32*, double*)* @__omp_outlined__1 to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined__1_wrapper to i8*), i8** [[TMP6]], i64 2)
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = load i32, i32* [[F_ON_STACK]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_free_shared(i8* [[F]], i64 4)
|
||||
// CHECK1-NEXT: ret i32 [[TMP9]]
|
||||
// CHECK1-NEXT: ret i32 [[TMP7]]
|
||||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z16unreachable_callv_l142
|
||||
|
@ -456,7 +443,7 @@ void unreachable_call() {
|
|||
// CHECK1-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
|
||||
// CHECK1-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
|
||||
// CHECK1: user_code.entry:
|
||||
// CHECK1-NEXT: call void @_Z6asserti(i32 0) #[[ATTR8:[0-9]+]]
|
||||
// CHECK1-NEXT: call void @_Z6asserti(i32 0) #[[ATTR7:[0-9]+]]
|
||||
// CHECK1-NEXT: unreachable
|
||||
// CHECK1: worker.exit:
|
||||
// CHECK1-NEXT: ret void
|
||||
|
@ -500,31 +487,30 @@ void unreachable_call() {
|
|||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@__omp_outlined__1
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.0* noalias [[__CONTEXT:%.*]]) #[[ATTR1]] {
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[F:%.*]], double* nonnull align 8 dereferenceable(8) [[A:%.*]]) #[[ATTR1]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.0*, align 8
|
||||
// CHECK1-NEXT: [[F_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[A_ADDR:%.*]] = alloca double*, align 8
|
||||
// CHECK1-NEXT: [[TMP:%.*]] = alloca double*, align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store %struct.anon.0* [[__CONTEXT]], %struct.anon.0** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load %struct.anon.0*, %struct.anon.0** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_0:%.*]], %struct.anon.0* [[TMP0]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 8
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[TMP0]], i32 0, i32 1
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = load double*, double** [[TMP3]], align 8
|
||||
// CHECK1-NEXT: store double* [[TMP4]], double** [[TMP]], align 8
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = load double*, double** [[TMP]], align 8
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = load double, double* [[TMP5]], align 8
|
||||
// CHECK1-NEXT: [[ADD:%.*]] = fadd double 2.000000e+00, [[TMP6]]
|
||||
// CHECK1-NEXT: store i32* [[F]], i32** [[F_ADDR]], align 8
|
||||
// CHECK1-NEXT: store double* [[A]], double** [[A_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load i32*, i32** [[F_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = load double*, double** [[A_ADDR]], align 8
|
||||
// CHECK1-NEXT: store double* [[TMP1]], double** [[TMP]], align 8
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load double*, double** [[TMP]], align 8
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = load double, double* [[TMP2]], align 8
|
||||
// CHECK1-NEXT: [[ADD:%.*]] = fadd double 2.000000e+00, [[TMP3]]
|
||||
// CHECK1-NEXT: [[CONV:%.*]] = fptosi double [[ADD]] to i32
|
||||
// CHECK1-NEXT: store i32 [[CONV]], i32* [[TMP2]], align 4
|
||||
// CHECK1-NEXT: store i32 [[CONV]], i32* [[TMP0]], align 4
|
||||
// CHECK1-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@__omp_outlined__1_wrapper
|
||||
// CHECK1-SAME: (i16 zeroext [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR6:[0-9]+]] {
|
||||
// CHECK1-SAME: (i16 zeroext [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR5:[0-9]+]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[DOTADDR:%.*]] = alloca i16, align 2
|
||||
// CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca i32, align 4
|
||||
|
@ -536,9 +522,12 @@ void unreachable_call() {
|
|||
// CHECK1-NEXT: call void @__kmpc_get_shared_variables(i8*** [[GLOBAL_ARGS]])
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i8**, i8*** [[GLOBAL_ARGS]], align 8
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = getelementptr inbounds i8*, i8** [[TMP2]], i64 0
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = bitcast i8** [[TMP3]] to %struct.anon.0**
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = load %struct.anon.0*, %struct.anon.0** [[TMP4]], align 8
|
||||
// CHECK1-NEXT: call void @__omp_outlined__1(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]], %struct.anon.0* [[TMP5]]) #[[ATTR2:[0-9]+]]
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = bitcast i8** [[TMP3]] to i32**
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = load i32*, i32** [[TMP4]], align 8
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = getelementptr inbounds i8*, i8** [[TMP2]], i64 1
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = bitcast i8** [[TMP6]] to double**
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = load double*, double** [[TMP7]], align 8
|
||||
// CHECK1-NEXT: call void @__omp_outlined__1(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]], i32* [[TMP5]], double* [[TMP8]]) #[[ATTR2:[0-9]+]]
|
||||
// CHECK1-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -547,8 +536,7 @@ void unreachable_call() {
|
|||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[PTR1_ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[PTR2_ADDR:%.*]] = alloca i32**, align 4
|
||||
// CHECK2-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 4
|
||||
// CHECK2-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 4
|
||||
// CHECK2-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x i8*], align 4
|
||||
// CHECK2-NEXT: store i32* [[PTR1]], i32** [[PTR1_ADDR]], align 4
|
||||
// CHECK2-NEXT: store i32** [[PTR2]], i32*** [[PTR2_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load i32**, i32*** [[PTR2_ADDR]], align 4
|
||||
|
@ -557,19 +545,14 @@ void unreachable_call() {
|
|||
// CHECK2-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
|
||||
// CHECK2: user_code.entry:
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB2:[0-9]+]])
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK2-NEXT: store i32** [[PTR1_ADDR]], i32*** [[TMP3]], align 4
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 1
|
||||
// CHECK2-NEXT: store i32** [[TMP0]], i32*** [[TMP4]], align 4
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = call i8* @__kmpc_alloc_shared(i32 8)
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = load [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], align 4
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = bitcast i8* [[TMP6]] to %struct.anon*
|
||||
// CHECK2-NEXT: store [[STRUCT_ANON]] [[TMP7]], %struct.anon* [[TMP8]], align 4
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = bitcast i32** [[PTR1_ADDR]] to i8*
|
||||
// CHECK2-NEXT: store i8* [[TMP4]], i8** [[TMP3]], align 4
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = bitcast i32** [[TMP0]] to i8*
|
||||
// CHECK2-NEXT: store i8* [[TMP6]], i8** [[TMP5]], align 4
|
||||
// CHECK2-NEXT: [[TMP9:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK2-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP2]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon*)* @__omp_outlined__ to i8*), i8* null, i8** [[TMP9]], i32 1)
|
||||
// CHECK2-NEXT: call void @__kmpc_free_shared(i8* [[TMP6]], i32 8)
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = bitcast [2 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK2-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP2]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i32**, i32**)* @__omp_outlined__ to i8*), i8* null, i8** [[TMP7]], i32 2)
|
||||
// CHECK2-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 true, i1 true)
|
||||
// CHECK2-NEXT: ret void
|
||||
// CHECK2: worker.exit:
|
||||
|
@ -577,23 +560,22 @@ void unreachable_call() {
|
|||
//
|
||||
//
|
||||
// CHECK2-LABEL: define {{[^@]+}}@__omp_outlined__
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32** nonnull align 4 dereferenceable(4) [[PTR1:%.*]], i32** nonnull align 4 dereferenceable(4) [[PTR2:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 4
|
||||
// CHECK2-NEXT: [[PTR1_ADDR:%.*]] = alloca i32**, align 4
|
||||
// CHECK2-NEXT: [[PTR2_ADDR:%.*]] = alloca i32**, align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i32**, i32*** [[TMP1]], align 4
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP0]], i32 0, i32 1
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = load i32**, i32*** [[TMP3]], align 4
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = load i32*, i32** [[TMP4]], align 4
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = load i32, i32* [[TMP5]], align 4
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = load i32*, i32** [[TMP2]], align 4
|
||||
// CHECK2-NEXT: store i32 [[TMP6]], i32* [[TMP7]], align 4
|
||||
// CHECK2-NEXT: store i32** [[PTR1]], i32*** [[PTR1_ADDR]], align 4
|
||||
// CHECK2-NEXT: store i32** [[PTR2]], i32*** [[PTR2_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load i32**, i32*** [[PTR1_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = load i32**, i32*** [[PTR2_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 4
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = load i32*, i32** [[TMP0]], align 4
|
||||
// CHECK2-NEXT: store i32 [[TMP3]], i32* [[TMP4]], align 4
|
||||
// CHECK2-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -705,7 +687,7 @@ void unreachable_call() {
|
|||
// CHECK2-NEXT: [[ADD19:%.*]] = add nsw i32 [[CONV18]], 1
|
||||
// CHECK2-NEXT: [[CONV20:%.*]] = trunc i32 [[ADD19]] to i8
|
||||
// CHECK2-NEXT: store i8 [[CONV20]], i8* [[Y]], align 8
|
||||
// CHECK2-NEXT: [[CALL:%.*]] = call nonnull align 8 dereferenceable(8) i64* @_ZN2TTIxcEixEi(%struct.TT* nonnull align 8 dereferenceable(16) [[TMP7]], i32 0) #[[ATTR7:[0-9]+]]
|
||||
// CHECK2-NEXT: [[CALL:%.*]] = call nonnull align 8 dereferenceable(8) i64* @_ZN2TTIxcEixEi(%struct.TT* nonnull align 8 dereferenceable(16) [[TMP7]], i32 0) #[[ATTR6:[0-9]+]]
|
||||
// CHECK2-NEXT: [[TMP17:%.*]] = load i64, i64* [[CALL]], align 8
|
||||
// CHECK2-NEXT: [[ADD21:%.*]] = add nsw i64 [[TMP17]], 1
|
||||
// CHECK2-NEXT: store i64 [[ADD21]], i64* [[CALL]], align 8
|
||||
|
@ -716,7 +698,7 @@ void unreachable_call() {
|
|||
//
|
||||
//
|
||||
// CHECK2-LABEL: define {{[^@]+}}@_ZN2TTIxcEixEi
|
||||
// CHECK2-SAME: (%struct.TT* nonnull align 8 dereferenceable(16) [[THIS:%.*]], i32 [[I:%.*]]) #[[ATTR4:[0-9]+]] comdat align 2 {
|
||||
// CHECK2-SAME: (%struct.TT* nonnull align 8 dereferenceable(16) [[THIS:%.*]], i32 [[I:%.*]]) #[[ATTR3:[0-9]+]] comdat align 2 {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[THIS_ADDR:%.*]] = alloca %struct.TT*, align 4
|
||||
// CHECK2-NEXT: [[I_ADDR:%.*]] = alloca i32, align 4
|
||||
|
@ -807,7 +789,7 @@ void unreachable_call() {
|
|||
// CHECK2-NEXT: [[TMP8:%.*]] = load double, double* [[A6]], align 8
|
||||
// CHECK2-NEXT: [[CONV7:%.*]] = fptosi double [[TMP8]] to i32
|
||||
// CHECK2-NEXT: [[A8:%.*]] = getelementptr inbounds [[STRUCT_S1]], %struct.S1* [[TMP0]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[CALL:%.*]] = call i32 @_Z3baziRd(i32 [[CONV7]], double* nonnull align 8 dereferenceable(8) [[A8]]) #[[ATTR7]]
|
||||
// CHECK2-NEXT: [[CALL:%.*]] = call i32 @_Z3baziRd(i32 [[CONV7]], double* nonnull align 8 dereferenceable(8) [[A8]]) #[[ATTR6]]
|
||||
// CHECK2-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 false, i1 true)
|
||||
// CHECK2-NEXT: ret void
|
||||
// CHECK2: worker.exit:
|
||||
|
@ -815,33 +797,27 @@ void unreachable_call() {
|
|||
//
|
||||
//
|
||||
// CHECK2-LABEL: define {{[^@]+}}@_Z3baziRd
|
||||
// CHECK2-SAME: (i32 [[F1:%.*]], double* nonnull align 8 dereferenceable(8) [[A:%.*]]) #[[ATTR4]] {
|
||||
// CHECK2-SAME: (i32 [[F1:%.*]], double* nonnull align 8 dereferenceable(8) [[A:%.*]]) #[[ATTR3]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[A_ADDR:%.*]] = alloca double*, align 4
|
||||
// CHECK2-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON_0:%.*]], align 4
|
||||
// CHECK2-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 4
|
||||
// CHECK2-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x i8*], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB3:[0-9]+]])
|
||||
// CHECK2-NEXT: [[F:%.*]] = call i8* @__kmpc_alloc_shared(i32 4)
|
||||
// CHECK2-NEXT: [[F_ON_STACK:%.*]] = bitcast i8* [[F]] to i32*
|
||||
// CHECK2-NEXT: store i32 [[F1]], i32* [[F_ON_STACK]], align 4
|
||||
// CHECK2-NEXT: store double* [[A]], double** [[A_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK2-NEXT: store i32* [[F_ON_STACK]], i32** [[TMP1]], align 4
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 1
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = load double*, double** [[A_ADDR]], align 4
|
||||
// CHECK2-NEXT: store double* [[TMP3]], double** [[TMP2]], align 4
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = call i8* @__kmpc_alloc_shared(i32 8)
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = load [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], align 4
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = bitcast i8* [[TMP5]] to %struct.anon.0*
|
||||
// CHECK2-NEXT: store [[STRUCT_ANON_0]] [[TMP6]], %struct.anon.0* [[TMP7]], align 4
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = load double*, double** [[A_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = bitcast i32* [[F_ON_STACK]] to i8*
|
||||
// CHECK2-NEXT: store i8* [[TMP3]], i8** [[TMP2]], align 4
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = bitcast double* [[TMP1]] to i8*
|
||||
// CHECK2-NEXT: store i8* [[TMP5]], i8** [[TMP4]], align 4
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK2-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB3]], i32 [[TMP0]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon.0*)* @__omp_outlined__1 to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined__1_wrapper to i8*), i8** [[TMP8]], i32 1)
|
||||
// CHECK2-NEXT: call void @__kmpc_free_shared(i8* [[TMP5]], i32 8)
|
||||
// CHECK2-NEXT: [[TMP9:%.*]] = load i32, i32* [[F_ON_STACK]], align 4
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = bitcast [2 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK2-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB3]], i32 [[TMP0]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i32*, double*)* @__omp_outlined__1 to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined__1_wrapper to i8*), i8** [[TMP6]], i32 2)
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = load i32, i32* [[F_ON_STACK]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_free_shared(i8* [[F]], i32 4)
|
||||
// CHECK2-NEXT: ret i32 [[TMP9]]
|
||||
// CHECK2-NEXT: ret i32 [[TMP7]]
|
||||
//
|
||||
//
|
||||
// CHECK2-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z16unreachable_callv_l142
|
||||
|
@ -851,7 +827,7 @@ void unreachable_call() {
|
|||
// CHECK2-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
|
||||
// CHECK2-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
|
||||
// CHECK2: user_code.entry:
|
||||
// CHECK2-NEXT: call void @_Z6asserti(i32 0) #[[ATTR8:[0-9]+]]
|
||||
// CHECK2-NEXT: call void @_Z6asserti(i32 0) #[[ATTR7:[0-9]+]]
|
||||
// CHECK2-NEXT: unreachable
|
||||
// CHECK2: worker.exit:
|
||||
// CHECK2-NEXT: ret void
|
||||
|
@ -894,31 +870,30 @@ void unreachable_call() {
|
|||
//
|
||||
//
|
||||
// CHECK2-LABEL: define {{[^@]+}}@__omp_outlined__1
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.0* noalias [[__CONTEXT:%.*]]) #[[ATTR1]] {
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[F:%.*]], double* nonnull align 8 dereferenceable(8) [[A:%.*]]) #[[ATTR1]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.0*, align 4
|
||||
// CHECK2-NEXT: [[F_ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[A_ADDR:%.*]] = alloca double*, align 4
|
||||
// CHECK2-NEXT: [[TMP:%.*]] = alloca double*, align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: store %struct.anon.0* [[__CONTEXT]], %struct.anon.0** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load %struct.anon.0*, %struct.anon.0** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_0:%.*]], %struct.anon.0* [[TMP0]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 4
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[TMP0]], i32 0, i32 1
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = load double*, double** [[TMP3]], align 4
|
||||
// CHECK2-NEXT: store double* [[TMP4]], double** [[TMP]], align 4
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = load double*, double** [[TMP]], align 4
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = load double, double* [[TMP5]], align 8
|
||||
// CHECK2-NEXT: [[ADD:%.*]] = fadd double 2.000000e+00, [[TMP6]]
|
||||
// CHECK2-NEXT: store i32* [[F]], i32** [[F_ADDR]], align 4
|
||||
// CHECK2-NEXT: store double* [[A]], double** [[A_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load i32*, i32** [[F_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = load double*, double** [[A_ADDR]], align 4
|
||||
// CHECK2-NEXT: store double* [[TMP1]], double** [[TMP]], align 4
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load double*, double** [[TMP]], align 4
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = load double, double* [[TMP2]], align 8
|
||||
// CHECK2-NEXT: [[ADD:%.*]] = fadd double 2.000000e+00, [[TMP3]]
|
||||
// CHECK2-NEXT: [[CONV:%.*]] = fptosi double [[ADD]] to i32
|
||||
// CHECK2-NEXT: store i32 [[CONV]], i32* [[TMP2]], align 4
|
||||
// CHECK2-NEXT: store i32 [[CONV]], i32* [[TMP0]], align 4
|
||||
// CHECK2-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK2-LABEL: define {{[^@]+}}@__omp_outlined__1_wrapper
|
||||
// CHECK2-SAME: (i16 zeroext [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR6:[0-9]+]] {
|
||||
// CHECK2-SAME: (i16 zeroext [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR5:[0-9]+]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[DOTADDR:%.*]] = alloca i16, align 2
|
||||
// CHECK2-NEXT: [[DOTADDR1:%.*]] = alloca i32, align 4
|
||||
|
@ -930,9 +905,12 @@ void unreachable_call() {
|
|||
// CHECK2-NEXT: call void @__kmpc_get_shared_variables(i8*** [[GLOBAL_ARGS]])
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i8**, i8*** [[GLOBAL_ARGS]], align 4
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = getelementptr inbounds i8*, i8** [[TMP2]], i32 0
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = bitcast i8** [[TMP3]] to %struct.anon.0**
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = load %struct.anon.0*, %struct.anon.0** [[TMP4]], align 4
|
||||
// CHECK2-NEXT: call void @__omp_outlined__1(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]], %struct.anon.0* [[TMP5]]) #[[ATTR2:[0-9]+]]
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = bitcast i8** [[TMP3]] to i32**
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = load i32*, i32** [[TMP4]], align 4
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = getelementptr inbounds i8*, i8** [[TMP2]], i32 1
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = bitcast i8** [[TMP6]] to double**
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = load double*, double** [[TMP7]], align 4
|
||||
// CHECK2-NEXT: call void @__omp_outlined__1(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]], i32* [[TMP5]], double* [[TMP8]]) #[[ATTR2:[0-9]+]]
|
||||
// CHECK2-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -941,8 +919,7 @@ void unreachable_call() {
|
|||
// CHECK3-NEXT: entry:
|
||||
// CHECK3-NEXT: [[PTR1_ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK3-NEXT: [[PTR2_ADDR:%.*]] = alloca i32**, align 4
|
||||
// CHECK3-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 4
|
||||
// CHECK3-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 4
|
||||
// CHECK3-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x i8*], align 4
|
||||
// CHECK3-NEXT: store i32* [[PTR1]], i32** [[PTR1_ADDR]], align 4
|
||||
// CHECK3-NEXT: store i32** [[PTR2]], i32*** [[PTR2_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = load i32**, i32*** [[PTR2_ADDR]], align 4
|
||||
|
@ -951,19 +928,14 @@ void unreachable_call() {
|
|||
// CHECK3-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
|
||||
// CHECK3: user_code.entry:
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB2:[0-9]+]])
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK3-NEXT: store i32** [[PTR1_ADDR]], i32*** [[TMP3]], align 4
|
||||
// CHECK3-NEXT: [[TMP4:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 1
|
||||
// CHECK3-NEXT: store i32** [[TMP0]], i32*** [[TMP4]], align 4
|
||||
// CHECK3-NEXT: [[TMP5:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK3-NEXT: [[TMP6:%.*]] = call i8* @__kmpc_alloc_shared(i32 8)
|
||||
// CHECK3-NEXT: [[TMP7:%.*]] = load [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], align 4
|
||||
// CHECK3-NEXT: [[TMP8:%.*]] = bitcast i8* [[TMP6]] to %struct.anon*
|
||||
// CHECK3-NEXT: store [[STRUCT_ANON]] [[TMP7]], %struct.anon* [[TMP8]], align 4
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK3-NEXT: [[TMP4:%.*]] = bitcast i32** [[PTR1_ADDR]] to i8*
|
||||
// CHECK3-NEXT: store i8* [[TMP4]], i8** [[TMP3]], align 4
|
||||
// CHECK3-NEXT: [[TMP5:%.*]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
|
||||
// CHECK3-NEXT: [[TMP6:%.*]] = bitcast i32** [[TMP0]] to i8*
|
||||
// CHECK3-NEXT: store i8* [[TMP6]], i8** [[TMP5]], align 4
|
||||
// CHECK3-NEXT: [[TMP9:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK3-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP2]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon*)* @__omp_outlined__ to i8*), i8* null, i8** [[TMP9]], i32 1)
|
||||
// CHECK3-NEXT: call void @__kmpc_free_shared(i8* [[TMP6]], i32 8)
|
||||
// CHECK3-NEXT: [[TMP7:%.*]] = bitcast [2 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK3-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP2]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i32**, i32**)* @__omp_outlined__ to i8*), i8* null, i8** [[TMP7]], i32 2)
|
||||
// CHECK3-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 true, i1 true)
|
||||
// CHECK3-NEXT: ret void
|
||||
// CHECK3: worker.exit:
|
||||
|
@ -971,23 +943,22 @@ void unreachable_call() {
|
|||
//
|
||||
//
|
||||
// CHECK3-LABEL: define {{[^@]+}}@__omp_outlined__
|
||||
// CHECK3-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK3-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32** nonnull align 4 dereferenceable(4) [[PTR1:%.*]], i32** nonnull align 4 dereferenceable(4) [[PTR2:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK3-NEXT: entry:
|
||||
// CHECK3-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK3-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK3-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 4
|
||||
// CHECK3-NEXT: [[PTR1_ADDR:%.*]] = alloca i32**, align 4
|
||||
// CHECK3-NEXT: [[PTR2_ADDR:%.*]] = alloca i32**, align 4
|
||||
// CHECK3-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK3-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK3-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = load i32**, i32*** [[TMP1]], align 4
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP0]], i32 0, i32 1
|
||||
// CHECK3-NEXT: [[TMP4:%.*]] = load i32**, i32*** [[TMP3]], align 4
|
||||
// CHECK3-NEXT: [[TMP5:%.*]] = load i32*, i32** [[TMP4]], align 4
|
||||
// CHECK3-NEXT: [[TMP6:%.*]] = load i32, i32* [[TMP5]], align 4
|
||||
// CHECK3-NEXT: [[TMP7:%.*]] = load i32*, i32** [[TMP2]], align 4
|
||||
// CHECK3-NEXT: store i32 [[TMP6]], i32* [[TMP7]], align 4
|
||||
// CHECK3-NEXT: store i32** [[PTR1]], i32*** [[PTR1_ADDR]], align 4
|
||||
// CHECK3-NEXT: store i32** [[PTR2]], i32*** [[PTR2_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = load i32**, i32*** [[PTR1_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP1:%.*]] = load i32**, i32*** [[PTR2_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 4
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK3-NEXT: [[TMP4:%.*]] = load i32*, i32** [[TMP0]], align 4
|
||||
// CHECK3-NEXT: store i32 [[TMP3]], i32* [[TMP4]], align 4
|
||||
// CHECK3-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -1099,7 +1070,7 @@ void unreachable_call() {
|
|||
// CHECK3-NEXT: [[ADD19:%.*]] = add nsw i32 [[CONV18]], 1
|
||||
// CHECK3-NEXT: [[CONV20:%.*]] = trunc i32 [[ADD19]] to i8
|
||||
// CHECK3-NEXT: store i8 [[CONV20]], i8* [[Y]], align 8
|
||||
// CHECK3-NEXT: [[CALL:%.*]] = call nonnull align 8 dereferenceable(8) i64* @_ZN2TTIxcEixEi(%struct.TT* nonnull align 8 dereferenceable(16) [[TMP7]], i32 0) #[[ATTR7:[0-9]+]]
|
||||
// CHECK3-NEXT: [[CALL:%.*]] = call nonnull align 8 dereferenceable(8) i64* @_ZN2TTIxcEixEi(%struct.TT* nonnull align 8 dereferenceable(16) [[TMP7]], i32 0) #[[ATTR6:[0-9]+]]
|
||||
// CHECK3-NEXT: [[TMP17:%.*]] = load i64, i64* [[CALL]], align 8
|
||||
// CHECK3-NEXT: [[ADD21:%.*]] = add nsw i64 [[TMP17]], 1
|
||||
// CHECK3-NEXT: store i64 [[ADD21]], i64* [[CALL]], align 8
|
||||
|
@ -1110,7 +1081,7 @@ void unreachable_call() {
|
|||
//
|
||||
//
|
||||
// CHECK3-LABEL: define {{[^@]+}}@_ZN2TTIxcEixEi
|
||||
// CHECK3-SAME: (%struct.TT* nonnull align 8 dereferenceable(16) [[THIS:%.*]], i32 [[I:%.*]]) #[[ATTR4:[0-9]+]] comdat align 2 {
|
||||
// CHECK3-SAME: (%struct.TT* nonnull align 8 dereferenceable(16) [[THIS:%.*]], i32 [[I:%.*]]) #[[ATTR3:[0-9]+]] comdat align 2 {
|
||||
// CHECK3-NEXT: entry:
|
||||
// CHECK3-NEXT: [[THIS_ADDR:%.*]] = alloca %struct.TT*, align 4
|
||||
// CHECK3-NEXT: [[I_ADDR:%.*]] = alloca i32, align 4
|
||||
|
@ -1201,7 +1172,7 @@ void unreachable_call() {
|
|||
// CHECK3-NEXT: [[TMP8:%.*]] = load double, double* [[A6]], align 8
|
||||
// CHECK3-NEXT: [[CONV7:%.*]] = fptosi double [[TMP8]] to i32
|
||||
// CHECK3-NEXT: [[A8:%.*]] = getelementptr inbounds [[STRUCT_S1]], %struct.S1* [[TMP0]], i32 0, i32 0
|
||||
// CHECK3-NEXT: [[CALL:%.*]] = call i32 @_Z3baziRd(i32 [[CONV7]], double* nonnull align 8 dereferenceable(8) [[A8]]) #[[ATTR7]]
|
||||
// CHECK3-NEXT: [[CALL:%.*]] = call i32 @_Z3baziRd(i32 [[CONV7]], double* nonnull align 8 dereferenceable(8) [[A8]]) #[[ATTR6]]
|
||||
// CHECK3-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 false, i1 true)
|
||||
// CHECK3-NEXT: ret void
|
||||
// CHECK3: worker.exit:
|
||||
|
@ -1209,33 +1180,27 @@ void unreachable_call() {
|
|||
//
|
||||
//
|
||||
// CHECK3-LABEL: define {{[^@]+}}@_Z3baziRd
|
||||
// CHECK3-SAME: (i32 [[F1:%.*]], double* nonnull align 8 dereferenceable(8) [[A:%.*]]) #[[ATTR4]] {
|
||||
// CHECK3-SAME: (i32 [[F1:%.*]], double* nonnull align 8 dereferenceable(8) [[A:%.*]]) #[[ATTR3]] {
|
||||
// CHECK3-NEXT: entry:
|
||||
// CHECK3-NEXT: [[A_ADDR:%.*]] = alloca double*, align 4
|
||||
// CHECK3-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON_0:%.*]], align 4
|
||||
// CHECK3-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 4
|
||||
// CHECK3-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x i8*], align 4
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB3:[0-9]+]])
|
||||
// CHECK3-NEXT: [[F:%.*]] = call i8* @__kmpc_alloc_shared(i32 4)
|
||||
// CHECK3-NEXT: [[F_ON_STACK:%.*]] = bitcast i8* [[F]] to i32*
|
||||
// CHECK3-NEXT: store i32 [[F1]], i32* [[F_ON_STACK]], align 4
|
||||
// CHECK3-NEXT: store double* [[A]], double** [[A_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK3-NEXT: store i32* [[F_ON_STACK]], i32** [[TMP1]], align 4
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 1
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = load double*, double** [[A_ADDR]], align 4
|
||||
// CHECK3-NEXT: store double* [[TMP3]], double** [[TMP2]], align 4
|
||||
// CHECK3-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK3-NEXT: [[TMP5:%.*]] = call i8* @__kmpc_alloc_shared(i32 8)
|
||||
// CHECK3-NEXT: [[TMP6:%.*]] = load [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], align 4
|
||||
// CHECK3-NEXT: [[TMP7:%.*]] = bitcast i8* [[TMP5]] to %struct.anon.0*
|
||||
// CHECK3-NEXT: store [[STRUCT_ANON_0]] [[TMP6]], %struct.anon.0* [[TMP7]], align 4
|
||||
// CHECK3-NEXT: [[TMP1:%.*]] = load double*, double** [[A_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = bitcast i32* [[F_ON_STACK]] to i8*
|
||||
// CHECK3-NEXT: store i8* [[TMP3]], i8** [[TMP2]], align 4
|
||||
// CHECK3-NEXT: [[TMP4:%.*]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
|
||||
// CHECK3-NEXT: [[TMP5:%.*]] = bitcast double* [[TMP1]] to i8*
|
||||
// CHECK3-NEXT: store i8* [[TMP5]], i8** [[TMP4]], align 4
|
||||
// CHECK3-NEXT: [[TMP8:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK3-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB3]], i32 [[TMP0]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon.0*)* @__omp_outlined__1 to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined__1_wrapper to i8*), i8** [[TMP8]], i32 1)
|
||||
// CHECK3-NEXT: call void @__kmpc_free_shared(i8* [[TMP5]], i32 8)
|
||||
// CHECK3-NEXT: [[TMP9:%.*]] = load i32, i32* [[F_ON_STACK]], align 4
|
||||
// CHECK3-NEXT: [[TMP6:%.*]] = bitcast [2 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK3-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB3]], i32 [[TMP0]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i32*, double*)* @__omp_outlined__1 to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined__1_wrapper to i8*), i8** [[TMP6]], i32 2)
|
||||
// CHECK3-NEXT: [[TMP7:%.*]] = load i32, i32* [[F_ON_STACK]], align 4
|
||||
// CHECK3-NEXT: call void @__kmpc_free_shared(i8* [[F]], i32 4)
|
||||
// CHECK3-NEXT: ret i32 [[TMP9]]
|
||||
// CHECK3-NEXT: ret i32 [[TMP7]]
|
||||
//
|
||||
//
|
||||
// CHECK3-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z16unreachable_callv_l142
|
||||
|
@ -1245,7 +1210,7 @@ void unreachable_call() {
|
|||
// CHECK3-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
|
||||
// CHECK3-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
|
||||
// CHECK3: user_code.entry:
|
||||
// CHECK3-NEXT: call void @_Z6asserti(i32 0) #[[ATTR8:[0-9]+]]
|
||||
// CHECK3-NEXT: call void @_Z6asserti(i32 0) #[[ATTR7:[0-9]+]]
|
||||
// CHECK3-NEXT: unreachable
|
||||
// CHECK3: worker.exit:
|
||||
// CHECK3-NEXT: ret void
|
||||
|
@ -1288,31 +1253,30 @@ void unreachable_call() {
|
|||
//
|
||||
//
|
||||
// CHECK3-LABEL: define {{[^@]+}}@__omp_outlined__1
|
||||
// CHECK3-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.0* noalias [[__CONTEXT:%.*]]) #[[ATTR1]] {
|
||||
// CHECK3-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[F:%.*]], double* nonnull align 8 dereferenceable(8) [[A:%.*]]) #[[ATTR1]] {
|
||||
// CHECK3-NEXT: entry:
|
||||
// CHECK3-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK3-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK3-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.0*, align 4
|
||||
// CHECK3-NEXT: [[F_ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK3-NEXT: [[A_ADDR:%.*]] = alloca double*, align 4
|
||||
// CHECK3-NEXT: [[TMP:%.*]] = alloca double*, align 4
|
||||
// CHECK3-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK3-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK3-NEXT: store %struct.anon.0* [[__CONTEXT]], %struct.anon.0** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = load %struct.anon.0*, %struct.anon.0** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_0:%.*]], %struct.anon.0* [[TMP0]], i32 0, i32 0
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 4
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[TMP0]], i32 0, i32 1
|
||||
// CHECK3-NEXT: [[TMP4:%.*]] = load double*, double** [[TMP3]], align 4
|
||||
// CHECK3-NEXT: store double* [[TMP4]], double** [[TMP]], align 4
|
||||
// CHECK3-NEXT: [[TMP5:%.*]] = load double*, double** [[TMP]], align 4
|
||||
// CHECK3-NEXT: [[TMP6:%.*]] = load double, double* [[TMP5]], align 8
|
||||
// CHECK3-NEXT: [[ADD:%.*]] = fadd double 2.000000e+00, [[TMP6]]
|
||||
// CHECK3-NEXT: store i32* [[F]], i32** [[F_ADDR]], align 4
|
||||
// CHECK3-NEXT: store double* [[A]], double** [[A_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = load i32*, i32** [[F_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP1:%.*]] = load double*, double** [[A_ADDR]], align 4
|
||||
// CHECK3-NEXT: store double* [[TMP1]], double** [[TMP]], align 4
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = load double*, double** [[TMP]], align 4
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = load double, double* [[TMP2]], align 8
|
||||
// CHECK3-NEXT: [[ADD:%.*]] = fadd double 2.000000e+00, [[TMP3]]
|
||||
// CHECK3-NEXT: [[CONV:%.*]] = fptosi double [[ADD]] to i32
|
||||
// CHECK3-NEXT: store i32 [[CONV]], i32* [[TMP2]], align 4
|
||||
// CHECK3-NEXT: store i32 [[CONV]], i32* [[TMP0]], align 4
|
||||
// CHECK3-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK3-LABEL: define {{[^@]+}}@__omp_outlined__1_wrapper
|
||||
// CHECK3-SAME: (i16 zeroext [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR6:[0-9]+]] {
|
||||
// CHECK3-SAME: (i16 zeroext [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR5:[0-9]+]] {
|
||||
// CHECK3-NEXT: entry:
|
||||
// CHECK3-NEXT: [[DOTADDR:%.*]] = alloca i16, align 2
|
||||
// CHECK3-NEXT: [[DOTADDR1:%.*]] = alloca i32, align 4
|
||||
|
@ -1324,8 +1288,11 @@ void unreachable_call() {
|
|||
// CHECK3-NEXT: call void @__kmpc_get_shared_variables(i8*** [[GLOBAL_ARGS]])
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = load i8**, i8*** [[GLOBAL_ARGS]], align 4
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = getelementptr inbounds i8*, i8** [[TMP2]], i32 0
|
||||
// CHECK3-NEXT: [[TMP4:%.*]] = bitcast i8** [[TMP3]] to %struct.anon.0**
|
||||
// CHECK3-NEXT: [[TMP5:%.*]] = load %struct.anon.0*, %struct.anon.0** [[TMP4]], align 4
|
||||
// CHECK3-NEXT: call void @__omp_outlined__1(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]], %struct.anon.0* [[TMP5]]) #[[ATTR2:[0-9]+]]
|
||||
// CHECK3-NEXT: [[TMP4:%.*]] = bitcast i8** [[TMP3]] to i32**
|
||||
// CHECK3-NEXT: [[TMP5:%.*]] = load i32*, i32** [[TMP4]], align 4
|
||||
// CHECK3-NEXT: [[TMP6:%.*]] = getelementptr inbounds i8*, i8** [[TMP2]], i32 1
|
||||
// CHECK3-NEXT: [[TMP7:%.*]] = bitcast i8** [[TMP6]] to double**
|
||||
// CHECK3-NEXT: [[TMP8:%.*]] = load double*, double** [[TMP7]], align 4
|
||||
// CHECK3-NEXT: call void @__omp_outlined__1(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]], i32* [[TMP5]], double* [[TMP8]]) #[[ATTR2:[0-9]+]]
|
||||
// CHECK3-NEXT: ret void
|
||||
//
|
||||
|
|
|
@ -55,7 +55,6 @@ int bar(int n){
|
|||
// CHECK1-SAME: (i16* nonnull align 2 dereferenceable(2) [[AA:%.*]]) #[[ATTR0:[0-9]+]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 8
|
||||
// CHECK1-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 8
|
||||
// CHECK1-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 8
|
||||
// CHECK1-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load i16*, i16** [[AA_ADDR]], align 8
|
||||
|
@ -64,17 +63,11 @@ int bar(int n){
|
|||
// CHECK1-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
|
||||
// CHECK1: user_code.entry:
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB2:[0-9]+]])
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK1-NEXT: store i16* [[TMP0]], i16** [[TMP3]], align 8
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = call i8* @__kmpc_alloc_shared(i64 8)
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = load [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], align 8
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = bitcast i8* [[TMP5]] to %struct.anon*
|
||||
// CHECK1-NEXT: store [[STRUCT_ANON]] [[TMP6]], %struct.anon* [[TMP7]], align 8
|
||||
// CHECK1-NEXT: store i8* [[TMP5]], i8** [[TMP4]], align 8
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK1-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP2]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon*)* @__omp_outlined__ to i8*), i8* null, i8** [[TMP8]], i64 1)
|
||||
// CHECK1-NEXT: call void @__kmpc_free_shared(i8* [[TMP5]], i64 8)
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = bitcast i16* [[TMP0]] to i8*
|
||||
// CHECK1-NEXT: store i8* [[TMP4]], i8** [[TMP3]], align 8
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK1-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP2]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i16*)* @__omp_outlined__ to i8*), i8* null, i8** [[TMP5]], i64 1)
|
||||
// CHECK1-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 true, i1 true)
|
||||
// CHECK1-NEXT: ret void
|
||||
// CHECK1: worker.exit:
|
||||
|
@ -82,22 +75,20 @@ int bar(int n){
|
|||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@__omp_outlined__
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i16* nonnull align 2 dereferenceable(2) [[AA:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK1-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i16*, i16** [[TMP1]], align 8
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = load i16, i16* [[TMP2]], align 2
|
||||
// CHECK1-NEXT: [[CONV:%.*]] = sext i16 [[TMP3]] to i32
|
||||
// CHECK1-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load i16*, i16** [[AA_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = load i16, i16* [[TMP0]], align 2
|
||||
// CHECK1-NEXT: [[CONV:%.*]] = sext i16 [[TMP1]] to i32
|
||||
// CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 [[CONV]], 1
|
||||
// CHECK1-NEXT: [[CONV1:%.*]] = trunc i32 [[ADD]] to i16
|
||||
// CHECK1-NEXT: store i16 [[CONV1]], i16* [[TMP2]], align 2
|
||||
// CHECK1-NEXT: store i16 [[CONV1]], i16* [[TMP0]], align 2
|
||||
// CHECK1-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -107,8 +98,7 @@ int bar(int n){
|
|||
// CHECK1-NEXT: [[A_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 8
|
||||
// CHECK1-NEXT: [[B_ADDR:%.*]] = alloca [10 x i32]*, align 8
|
||||
// CHECK1-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON_0:%.*]], align 8
|
||||
// CHECK1-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 8
|
||||
// CHECK1-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [3 x i8*], align 8
|
||||
// CHECK1-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 8
|
||||
// CHECK1-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 8
|
||||
// CHECK1-NEXT: store [10 x i32]* [[B]], [10 x i32]** [[B_ADDR]], align 8
|
||||
|
@ -120,21 +110,17 @@ int bar(int n){
|
|||
// CHECK1-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
|
||||
// CHECK1: user_code.entry:
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB2]])
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK1-NEXT: store i32* [[TMP0]], i32** [[TMP5]], align 8
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 1
|
||||
// CHECK1-NEXT: store i16* [[TMP1]], i16** [[TMP6]], align 8
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 2
|
||||
// CHECK1-NEXT: store [10 x i32]* [[TMP2]], [10 x i32]** [[TMP7]], align 8
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
|
||||
// CHECK1-NEXT: [[TMP9:%.*]] = call i8* @__kmpc_alloc_shared(i64 24)
|
||||
// CHECK1-NEXT: [[TMP10:%.*]] = load [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], align 8
|
||||
// CHECK1-NEXT: [[TMP11:%.*]] = bitcast i8* [[TMP9]] to %struct.anon.0*
|
||||
// CHECK1-NEXT: store [[STRUCT_ANON_0]] [[TMP10]], %struct.anon.0* [[TMP11]], align 8
|
||||
// CHECK1-NEXT: store i8* [[TMP9]], i8** [[TMP8]], align 8
|
||||
// CHECK1-NEXT: [[TMP12:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK1-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP4]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon.0*)* @__omp_outlined__1 to i8*), i8* null, i8** [[TMP12]], i64 1)
|
||||
// CHECK1-NEXT: call void @__kmpc_free_shared(i8* [[TMP9]], i64 24)
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = bitcast i32* [[TMP0]] to i8*
|
||||
// CHECK1-NEXT: store i8* [[TMP6]], i8** [[TMP5]], align 8
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 1
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = bitcast i16* [[TMP1]] to i8*
|
||||
// CHECK1-NEXT: store i8* [[TMP8]], i8** [[TMP7]], align 8
|
||||
// CHECK1-NEXT: [[TMP9:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 2
|
||||
// CHECK1-NEXT: [[TMP10:%.*]] = bitcast [10 x i32]* [[TMP2]] to i8*
|
||||
// CHECK1-NEXT: store i8* [[TMP10]], i8** [[TMP9]], align 8
|
||||
// CHECK1-NEXT: [[TMP11:%.*]] = bitcast [3 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK1-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP4]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i32*, i16*, [10 x i32]*)* @__omp_outlined__1 to i8*), i8* null, i8** [[TMP11]], i64 3)
|
||||
// CHECK1-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 true, i1 true)
|
||||
// CHECK1-NEXT: ret void
|
||||
// CHECK1: worker.exit:
|
||||
|
@ -142,32 +128,32 @@ int bar(int n){
|
|||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@__omp_outlined__1
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.0* noalias [[__CONTEXT:%.*]]) #[[ATTR1]] {
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[A:%.*]], i16* nonnull align 2 dereferenceable(2) [[AA:%.*]], [10 x i32]* nonnull align 4 dereferenceable(40) [[B:%.*]]) #[[ATTR1]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.0*, align 8
|
||||
// CHECK1-NEXT: [[A_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 8
|
||||
// CHECK1-NEXT: [[B_ADDR:%.*]] = alloca [10 x i32]*, align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store %struct.anon.0* [[__CONTEXT]], %struct.anon.0** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load %struct.anon.0*, %struct.anon.0** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_0:%.*]], %struct.anon.0* [[TMP0]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 8
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[TMP0]], i32 0, i32 1
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = load i16*, i16** [[TMP3]], align 8
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[TMP0]], i32 0, i32 2
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = load [10 x i32]*, [10 x i32]** [[TMP5]], align 8
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP7]], 1
|
||||
// CHECK1-NEXT: store i32 [[ADD]], i32* [[TMP2]], align 4
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = load i16, i16* [[TMP4]], align 2
|
||||
// CHECK1-NEXT: [[CONV:%.*]] = sext i16 [[TMP8]] to i32
|
||||
// CHECK1-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 8
|
||||
// CHECK1-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 8
|
||||
// CHECK1-NEXT: store [10 x i32]* [[B]], [10 x i32]** [[B_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load i32*, i32** [[A_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = load i16*, i16** [[AA_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load [10 x i32]*, [10 x i32]** [[B_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP3]], 1
|
||||
// CHECK1-NEXT: store i32 [[ADD]], i32* [[TMP0]], align 4
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = load i16, i16* [[TMP1]], align 2
|
||||
// CHECK1-NEXT: [[CONV:%.*]] = sext i16 [[TMP4]] to i32
|
||||
// CHECK1-NEXT: [[ADD1:%.*]] = add nsw i32 [[CONV]], 1
|
||||
// CHECK1-NEXT: [[CONV2:%.*]] = trunc i32 [[ADD1]] to i16
|
||||
// CHECK1-NEXT: store i16 [[CONV2]], i16* [[TMP4]], align 2
|
||||
// CHECK1-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [10 x i32], [10 x i32]* [[TMP6]], i64 0, i64 2
|
||||
// CHECK1-NEXT: [[TMP9:%.*]] = load i32, i32* [[ARRAYIDX]], align 4
|
||||
// CHECK1-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP9]], 1
|
||||
// CHECK1-NEXT: store i16 [[CONV2]], i16* [[TMP1]], align 2
|
||||
// CHECK1-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [10 x i32], [10 x i32]* [[TMP2]], i64 0, i64 2
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = load i32, i32* [[ARRAYIDX]], align 4
|
||||
// CHECK1-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP5]], 1
|
||||
// CHECK1-NEXT: store i32 [[ADD3]], i32* [[ARRAYIDX]], align 4
|
||||
// CHECK1-NEXT: ret void
|
||||
//
|
||||
|
@ -176,7 +162,6 @@ int bar(int n){
|
|||
// CHECK2-SAME: (i16* nonnull align 2 dereferenceable(2) [[AA:%.*]]) #[[ATTR0:[0-9]+]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 4
|
||||
// CHECK2-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 4
|
||||
// CHECK2-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 4
|
||||
// CHECK2-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load i16*, i16** [[AA_ADDR]], align 4
|
||||
|
@ -185,17 +170,11 @@ int bar(int n){
|
|||
// CHECK2-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
|
||||
// CHECK2: user_code.entry:
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB2:[0-9]+]])
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK2-NEXT: store i16* [[TMP0]], i16** [[TMP3]], align 4
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = call i8* @__kmpc_alloc_shared(i32 4)
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = load [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], align 4
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = bitcast i8* [[TMP5]] to %struct.anon*
|
||||
// CHECK2-NEXT: store [[STRUCT_ANON]] [[TMP6]], %struct.anon* [[TMP7]], align 4
|
||||
// CHECK2-NEXT: store i8* [[TMP5]], i8** [[TMP4]], align 4
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK2-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP2]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon*)* @__omp_outlined__ to i8*), i8* null, i8** [[TMP8]], i32 1)
|
||||
// CHECK2-NEXT: call void @__kmpc_free_shared(i8* [[TMP5]], i32 4)
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = bitcast i16* [[TMP0]] to i8*
|
||||
// CHECK2-NEXT: store i8* [[TMP4]], i8** [[TMP3]], align 4
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK2-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP2]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i16*)* @__omp_outlined__ to i8*), i8* null, i8** [[TMP5]], i32 1)
|
||||
// CHECK2-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 true, i1 true)
|
||||
// CHECK2-NEXT: ret void
|
||||
// CHECK2: worker.exit:
|
||||
|
@ -203,22 +182,20 @@ int bar(int n){
|
|||
//
|
||||
//
|
||||
// CHECK2-LABEL: define {{[^@]+}}@__omp_outlined__
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i16* nonnull align 2 dereferenceable(2) [[AA:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 4
|
||||
// CHECK2-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i16*, i16** [[TMP1]], align 4
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = load i16, i16* [[TMP2]], align 2
|
||||
// CHECK2-NEXT: [[CONV:%.*]] = sext i16 [[TMP3]] to i32
|
||||
// CHECK2-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load i16*, i16** [[AA_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = load i16, i16* [[TMP0]], align 2
|
||||
// CHECK2-NEXT: [[CONV:%.*]] = sext i16 [[TMP1]] to i32
|
||||
// CHECK2-NEXT: [[ADD:%.*]] = add nsw i32 [[CONV]], 1
|
||||
// CHECK2-NEXT: [[CONV1:%.*]] = trunc i32 [[ADD]] to i16
|
||||
// CHECK2-NEXT: store i16 [[CONV1]], i16* [[TMP2]], align 2
|
||||
// CHECK2-NEXT: store i16 [[CONV1]], i16* [[TMP0]], align 2
|
||||
// CHECK2-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -228,8 +205,7 @@ int bar(int n){
|
|||
// CHECK2-NEXT: [[A_ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 4
|
||||
// CHECK2-NEXT: [[B_ADDR:%.*]] = alloca [10 x i32]*, align 4
|
||||
// CHECK2-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON_0:%.*]], align 4
|
||||
// CHECK2-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 4
|
||||
// CHECK2-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [3 x i8*], align 4
|
||||
// CHECK2-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 4
|
||||
// CHECK2-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 4
|
||||
// CHECK2-NEXT: store [10 x i32]* [[B]], [10 x i32]** [[B_ADDR]], align 4
|
||||
|
@ -241,21 +217,17 @@ int bar(int n){
|
|||
// CHECK2-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
|
||||
// CHECK2: user_code.entry:
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB2]])
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK2-NEXT: store i32* [[TMP0]], i32** [[TMP5]], align 4
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 1
|
||||
// CHECK2-NEXT: store i16* [[TMP1]], i16** [[TMP6]], align 4
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 2
|
||||
// CHECK2-NEXT: store [10 x i32]* [[TMP2]], [10 x i32]** [[TMP7]], align 4
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP9:%.*]] = call i8* @__kmpc_alloc_shared(i32 12)
|
||||
// CHECK2-NEXT: [[TMP10:%.*]] = load [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], align 4
|
||||
// CHECK2-NEXT: [[TMP11:%.*]] = bitcast i8* [[TMP9]] to %struct.anon.0*
|
||||
// CHECK2-NEXT: store [[STRUCT_ANON_0]] [[TMP10]], %struct.anon.0* [[TMP11]], align 4
|
||||
// CHECK2-NEXT: store i8* [[TMP9]], i8** [[TMP8]], align 4
|
||||
// CHECK2-NEXT: [[TMP12:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK2-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP4]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon.0*)* @__omp_outlined__1 to i8*), i8* null, i8** [[TMP12]], i32 1)
|
||||
// CHECK2-NEXT: call void @__kmpc_free_shared(i8* [[TMP9]], i32 12)
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = bitcast i32* [[TMP0]] to i8*
|
||||
// CHECK2-NEXT: store i8* [[TMP6]], i8** [[TMP5]], align 4
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = bitcast i16* [[TMP1]] to i8*
|
||||
// CHECK2-NEXT: store i8* [[TMP8]], i8** [[TMP7]], align 4
|
||||
// CHECK2-NEXT: [[TMP9:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 2
|
||||
// CHECK2-NEXT: [[TMP10:%.*]] = bitcast [10 x i32]* [[TMP2]] to i8*
|
||||
// CHECK2-NEXT: store i8* [[TMP10]], i8** [[TMP9]], align 4
|
||||
// CHECK2-NEXT: [[TMP11:%.*]] = bitcast [3 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK2-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP4]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i32*, i16*, [10 x i32]*)* @__omp_outlined__1 to i8*), i8* null, i8** [[TMP11]], i32 3)
|
||||
// CHECK2-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 true, i1 true)
|
||||
// CHECK2-NEXT: ret void
|
||||
// CHECK2: worker.exit:
|
||||
|
@ -263,32 +235,32 @@ int bar(int n){
|
|||
//
|
||||
//
|
||||
// CHECK2-LABEL: define {{[^@]+}}@__omp_outlined__1
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.0* noalias [[__CONTEXT:%.*]]) #[[ATTR1]] {
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[A:%.*]], i16* nonnull align 2 dereferenceable(2) [[AA:%.*]], [10 x i32]* nonnull align 4 dereferenceable(40) [[B:%.*]]) #[[ATTR1]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.0*, align 4
|
||||
// CHECK2-NEXT: [[A_ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 4
|
||||
// CHECK2-NEXT: [[B_ADDR:%.*]] = alloca [10 x i32]*, align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: store %struct.anon.0* [[__CONTEXT]], %struct.anon.0** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load %struct.anon.0*, %struct.anon.0** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_0:%.*]], %struct.anon.0* [[TMP0]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 4
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[TMP0]], i32 0, i32 1
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = load i16*, i16** [[TMP3]], align 4
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[TMP0]], i32 0, i32 2
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = load [10 x i32]*, [10 x i32]** [[TMP5]], align 4
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK2-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP7]], 1
|
||||
// CHECK2-NEXT: store i32 [[ADD]], i32* [[TMP2]], align 4
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = load i16, i16* [[TMP4]], align 2
|
||||
// CHECK2-NEXT: [[CONV:%.*]] = sext i16 [[TMP8]] to i32
|
||||
// CHECK2-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 4
|
||||
// CHECK2-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 4
|
||||
// CHECK2-NEXT: store [10 x i32]* [[B]], [10 x i32]** [[B_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load i32*, i32** [[A_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = load i16*, i16** [[AA_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load [10 x i32]*, [10 x i32]** [[B_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK2-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP3]], 1
|
||||
// CHECK2-NEXT: store i32 [[ADD]], i32* [[TMP0]], align 4
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = load i16, i16* [[TMP1]], align 2
|
||||
// CHECK2-NEXT: [[CONV:%.*]] = sext i16 [[TMP4]] to i32
|
||||
// CHECK2-NEXT: [[ADD1:%.*]] = add nsw i32 [[CONV]], 1
|
||||
// CHECK2-NEXT: [[CONV2:%.*]] = trunc i32 [[ADD1]] to i16
|
||||
// CHECK2-NEXT: store i16 [[CONV2]], i16* [[TMP4]], align 2
|
||||
// CHECK2-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [10 x i32], [10 x i32]* [[TMP6]], i32 0, i32 2
|
||||
// CHECK2-NEXT: [[TMP9:%.*]] = load i32, i32* [[ARRAYIDX]], align 4
|
||||
// CHECK2-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP9]], 1
|
||||
// CHECK2-NEXT: store i16 [[CONV2]], i16* [[TMP1]], align 2
|
||||
// CHECK2-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [10 x i32], [10 x i32]* [[TMP2]], i32 0, i32 2
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = load i32, i32* [[ARRAYIDX]], align 4
|
||||
// CHECK2-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP5]], 1
|
||||
// CHECK2-NEXT: store i32 [[ADD3]], i32* [[ARRAYIDX]], align 4
|
||||
// CHECK2-NEXT: ret void
|
||||
//
|
||||
|
@ -297,7 +269,6 @@ int bar(int n){
|
|||
// CHECK3-SAME: (i16* nonnull align 2 dereferenceable(2) [[AA:%.*]]) #[[ATTR0:[0-9]+]] {
|
||||
// CHECK3-NEXT: entry:
|
||||
// CHECK3-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 4
|
||||
// CHECK3-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 4
|
||||
// CHECK3-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 4
|
||||
// CHECK3-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = load i16*, i16** [[AA_ADDR]], align 4
|
||||
|
@ -306,17 +277,11 @@ int bar(int n){
|
|||
// CHECK3-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
|
||||
// CHECK3: user_code.entry:
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB2:[0-9]+]])
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK3-NEXT: store i16* [[TMP0]], i16** [[TMP3]], align 4
|
||||
// CHECK3-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK3-NEXT: [[TMP5:%.*]] = call i8* @__kmpc_alloc_shared(i32 4)
|
||||
// CHECK3-NEXT: [[TMP6:%.*]] = load [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], align 4
|
||||
// CHECK3-NEXT: [[TMP7:%.*]] = bitcast i8* [[TMP5]] to %struct.anon*
|
||||
// CHECK3-NEXT: store [[STRUCT_ANON]] [[TMP6]], %struct.anon* [[TMP7]], align 4
|
||||
// CHECK3-NEXT: store i8* [[TMP5]], i8** [[TMP4]], align 4
|
||||
// CHECK3-NEXT: [[TMP8:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK3-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP2]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon*)* @__omp_outlined__ to i8*), i8* null, i8** [[TMP8]], i32 1)
|
||||
// CHECK3-NEXT: call void @__kmpc_free_shared(i8* [[TMP5]], i32 4)
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK3-NEXT: [[TMP4:%.*]] = bitcast i16* [[TMP0]] to i8*
|
||||
// CHECK3-NEXT: store i8* [[TMP4]], i8** [[TMP3]], align 4
|
||||
// CHECK3-NEXT: [[TMP5:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK3-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP2]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i16*)* @__omp_outlined__ to i8*), i8* null, i8** [[TMP5]], i32 1)
|
||||
// CHECK3-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 true, i1 true)
|
||||
// CHECK3-NEXT: ret void
|
||||
// CHECK3: worker.exit:
|
||||
|
@ -324,22 +289,20 @@ int bar(int n){
|
|||
//
|
||||
//
|
||||
// CHECK3-LABEL: define {{[^@]+}}@__omp_outlined__
|
||||
// CHECK3-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK3-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i16* nonnull align 2 dereferenceable(2) [[AA:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK3-NEXT: entry:
|
||||
// CHECK3-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK3-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK3-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 4
|
||||
// CHECK3-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 4
|
||||
// CHECK3-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK3-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK3-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = load i16*, i16** [[TMP1]], align 4
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = load i16, i16* [[TMP2]], align 2
|
||||
// CHECK3-NEXT: [[CONV:%.*]] = sext i16 [[TMP3]] to i32
|
||||
// CHECK3-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = load i16*, i16** [[AA_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP1:%.*]] = load i16, i16* [[TMP0]], align 2
|
||||
// CHECK3-NEXT: [[CONV:%.*]] = sext i16 [[TMP1]] to i32
|
||||
// CHECK3-NEXT: [[ADD:%.*]] = add nsw i32 [[CONV]], 1
|
||||
// CHECK3-NEXT: [[CONV1:%.*]] = trunc i32 [[ADD]] to i16
|
||||
// CHECK3-NEXT: store i16 [[CONV1]], i16* [[TMP2]], align 2
|
||||
// CHECK3-NEXT: store i16 [[CONV1]], i16* [[TMP0]], align 2
|
||||
// CHECK3-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -349,8 +312,7 @@ int bar(int n){
|
|||
// CHECK3-NEXT: [[A_ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK3-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 4
|
||||
// CHECK3-NEXT: [[B_ADDR:%.*]] = alloca [10 x i32]*, align 4
|
||||
// CHECK3-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON_0:%.*]], align 4
|
||||
// CHECK3-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 4
|
||||
// CHECK3-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [3 x i8*], align 4
|
||||
// CHECK3-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 4
|
||||
// CHECK3-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 4
|
||||
// CHECK3-NEXT: store [10 x i32]* [[B]], [10 x i32]** [[B_ADDR]], align 4
|
||||
|
@ -362,21 +324,17 @@ int bar(int n){
|
|||
// CHECK3-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
|
||||
// CHECK3: user_code.entry:
|
||||
// CHECK3-NEXT: [[TMP4:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB2]])
|
||||
// CHECK3-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK3-NEXT: store i32* [[TMP0]], i32** [[TMP5]], align 4
|
||||
// CHECK3-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 1
|
||||
// CHECK3-NEXT: store i16* [[TMP1]], i16** [[TMP6]], align 4
|
||||
// CHECK3-NEXT: [[TMP7:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 2
|
||||
// CHECK3-NEXT: store [10 x i32]* [[TMP2]], [10 x i32]** [[TMP7]], align 4
|
||||
// CHECK3-NEXT: [[TMP8:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK3-NEXT: [[TMP9:%.*]] = call i8* @__kmpc_alloc_shared(i32 12)
|
||||
// CHECK3-NEXT: [[TMP10:%.*]] = load [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], align 4
|
||||
// CHECK3-NEXT: [[TMP11:%.*]] = bitcast i8* [[TMP9]] to %struct.anon.0*
|
||||
// CHECK3-NEXT: store [[STRUCT_ANON_0]] [[TMP10]], %struct.anon.0* [[TMP11]], align 4
|
||||
// CHECK3-NEXT: store i8* [[TMP9]], i8** [[TMP8]], align 4
|
||||
// CHECK3-NEXT: [[TMP12:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK3-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP4]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon.0*)* @__omp_outlined__1 to i8*), i8* null, i8** [[TMP12]], i32 1)
|
||||
// CHECK3-NEXT: call void @__kmpc_free_shared(i8* [[TMP9]], i32 12)
|
||||
// CHECK3-NEXT: [[TMP5:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK3-NEXT: [[TMP6:%.*]] = bitcast i32* [[TMP0]] to i8*
|
||||
// CHECK3-NEXT: store i8* [[TMP6]], i8** [[TMP5]], align 4
|
||||
// CHECK3-NEXT: [[TMP7:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
|
||||
// CHECK3-NEXT: [[TMP8:%.*]] = bitcast i16* [[TMP1]] to i8*
|
||||
// CHECK3-NEXT: store i8* [[TMP8]], i8** [[TMP7]], align 4
|
||||
// CHECK3-NEXT: [[TMP9:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 2
|
||||
// CHECK3-NEXT: [[TMP10:%.*]] = bitcast [10 x i32]* [[TMP2]] to i8*
|
||||
// CHECK3-NEXT: store i8* [[TMP10]], i8** [[TMP9]], align 4
|
||||
// CHECK3-NEXT: [[TMP11:%.*]] = bitcast [3 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK3-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP4]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i32*, i16*, [10 x i32]*)* @__omp_outlined__1 to i8*), i8* null, i8** [[TMP11]], i32 3)
|
||||
// CHECK3-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 true, i1 true)
|
||||
// CHECK3-NEXT: ret void
|
||||
// CHECK3: worker.exit:
|
||||
|
@ -384,32 +342,32 @@ int bar(int n){
|
|||
//
|
||||
//
|
||||
// CHECK3-LABEL: define {{[^@]+}}@__omp_outlined__1
|
||||
// CHECK3-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.0* noalias [[__CONTEXT:%.*]]) #[[ATTR1]] {
|
||||
// CHECK3-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[A:%.*]], i16* nonnull align 2 dereferenceable(2) [[AA:%.*]], [10 x i32]* nonnull align 4 dereferenceable(40) [[B:%.*]]) #[[ATTR1]] {
|
||||
// CHECK3-NEXT: entry:
|
||||
// CHECK3-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK3-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK3-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.0*, align 4
|
||||
// CHECK3-NEXT: [[A_ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK3-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 4
|
||||
// CHECK3-NEXT: [[B_ADDR:%.*]] = alloca [10 x i32]*, align 4
|
||||
// CHECK3-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK3-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK3-NEXT: store %struct.anon.0* [[__CONTEXT]], %struct.anon.0** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = load %struct.anon.0*, %struct.anon.0** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_0:%.*]], %struct.anon.0* [[TMP0]], i32 0, i32 0
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 4
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[TMP0]], i32 0, i32 1
|
||||
// CHECK3-NEXT: [[TMP4:%.*]] = load i16*, i16** [[TMP3]], align 4
|
||||
// CHECK3-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[TMP0]], i32 0, i32 2
|
||||
// CHECK3-NEXT: [[TMP6:%.*]] = load [10 x i32]*, [10 x i32]** [[TMP5]], align 4
|
||||
// CHECK3-NEXT: [[TMP7:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK3-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP7]], 1
|
||||
// CHECK3-NEXT: store i32 [[ADD]], i32* [[TMP2]], align 4
|
||||
// CHECK3-NEXT: [[TMP8:%.*]] = load i16, i16* [[TMP4]], align 2
|
||||
// CHECK3-NEXT: [[CONV:%.*]] = sext i16 [[TMP8]] to i32
|
||||
// CHECK3-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 4
|
||||
// CHECK3-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 4
|
||||
// CHECK3-NEXT: store [10 x i32]* [[B]], [10 x i32]** [[B_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = load i32*, i32** [[A_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP1:%.*]] = load i16*, i16** [[AA_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = load [10 x i32]*, [10 x i32]** [[B_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK3-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP3]], 1
|
||||
// CHECK3-NEXT: store i32 [[ADD]], i32* [[TMP0]], align 4
|
||||
// CHECK3-NEXT: [[TMP4:%.*]] = load i16, i16* [[TMP1]], align 2
|
||||
// CHECK3-NEXT: [[CONV:%.*]] = sext i16 [[TMP4]] to i32
|
||||
// CHECK3-NEXT: [[ADD1:%.*]] = add nsw i32 [[CONV]], 1
|
||||
// CHECK3-NEXT: [[CONV2:%.*]] = trunc i32 [[ADD1]] to i16
|
||||
// CHECK3-NEXT: store i16 [[CONV2]], i16* [[TMP4]], align 2
|
||||
// CHECK3-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [10 x i32], [10 x i32]* [[TMP6]], i32 0, i32 2
|
||||
// CHECK3-NEXT: [[TMP9:%.*]] = load i32, i32* [[ARRAYIDX]], align 4
|
||||
// CHECK3-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP9]], 1
|
||||
// CHECK3-NEXT: store i16 [[CONV2]], i16* [[TMP1]], align 2
|
||||
// CHECK3-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [10 x i32], [10 x i32]* [[TMP2]], i32 0, i32 2
|
||||
// CHECK3-NEXT: [[TMP5:%.*]] = load i32, i32* [[ARRAYIDX]], align 4
|
||||
// CHECK3-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP5]], 1
|
||||
// CHECK3-NEXT: store i32 [[ADD3]], i32* [[ARRAYIDX]], align 4
|
||||
// CHECK3-NEXT: ret void
|
||||
//
|
||||
|
@ -418,7 +376,6 @@ int bar(int n){
|
|||
// CHECK4-SAME: (i16* nonnull align 2 dereferenceable(2) [[AA:%.*]]) #[[ATTR0:[0-9]+]] {
|
||||
// CHECK4-NEXT: entry:
|
||||
// CHECK4-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 8
|
||||
// CHECK4-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 8
|
||||
// CHECK4-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 8
|
||||
// CHECK4-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 8
|
||||
// CHECK4-NEXT: [[TMP0:%.*]] = load i16*, i16** [[AA_ADDR]], align 8
|
||||
|
@ -427,17 +384,11 @@ int bar(int n){
|
|||
// CHECK4-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
|
||||
// CHECK4: user_code.entry:
|
||||
// CHECK4-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB2:[0-9]+]])
|
||||
// CHECK4-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK4-NEXT: store i16* [[TMP0]], i16** [[TMP3]], align 8
|
||||
// CHECK4-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
|
||||
// CHECK4-NEXT: [[TMP5:%.*]] = call i8* @__kmpc_alloc_shared(i64 8)
|
||||
// CHECK4-NEXT: [[TMP6:%.*]] = load [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], align 8
|
||||
// CHECK4-NEXT: [[TMP7:%.*]] = bitcast i8* [[TMP5]] to %struct.anon*
|
||||
// CHECK4-NEXT: store [[STRUCT_ANON]] [[TMP6]], %struct.anon* [[TMP7]], align 8
|
||||
// CHECK4-NEXT: store i8* [[TMP5]], i8** [[TMP4]], align 8
|
||||
// CHECK4-NEXT: [[TMP8:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK4-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP2]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon*)* @__omp_outlined__ to i8*), i8* null, i8** [[TMP8]], i64 1)
|
||||
// CHECK4-NEXT: call void @__kmpc_free_shared(i8* [[TMP5]], i64 8)
|
||||
// CHECK4-NEXT: [[TMP3:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
|
||||
// CHECK4-NEXT: [[TMP4:%.*]] = bitcast i16* [[TMP0]] to i8*
|
||||
// CHECK4-NEXT: store i8* [[TMP4]], i8** [[TMP3]], align 8
|
||||
// CHECK4-NEXT: [[TMP5:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK4-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP2]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i16*)* @__omp_outlined__ to i8*), i8* null, i8** [[TMP5]], i64 1)
|
||||
// CHECK4-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 true, i1 true)
|
||||
// CHECK4-NEXT: ret void
|
||||
// CHECK4: worker.exit:
|
||||
|
@ -445,22 +396,20 @@ int bar(int n){
|
|||
//
|
||||
//
|
||||
// CHECK4-LABEL: define {{[^@]+}}@__omp_outlined__
|
||||
// CHECK4-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK4-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i16* nonnull align 2 dereferenceable(2) [[AA:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK4-NEXT: entry:
|
||||
// CHECK4-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK4-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK4-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK4-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 8
|
||||
// CHECK4-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK4-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK4-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK4-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK4-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK4-NEXT: [[TMP2:%.*]] = load i16*, i16** [[TMP1]], align 8
|
||||
// CHECK4-NEXT: [[TMP3:%.*]] = load i16, i16* [[TMP2]], align 2
|
||||
// CHECK4-NEXT: [[CONV:%.*]] = sext i16 [[TMP3]] to i32
|
||||
// CHECK4-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 8
|
||||
// CHECK4-NEXT: [[TMP0:%.*]] = load i16*, i16** [[AA_ADDR]], align 8
|
||||
// CHECK4-NEXT: [[TMP1:%.*]] = load i16, i16* [[TMP0]], align 2
|
||||
// CHECK4-NEXT: [[CONV:%.*]] = sext i16 [[TMP1]] to i32
|
||||
// CHECK4-NEXT: [[ADD:%.*]] = add nsw i32 [[CONV]], 1
|
||||
// CHECK4-NEXT: [[CONV1:%.*]] = trunc i32 [[ADD]] to i16
|
||||
// CHECK4-NEXT: store i16 [[CONV1]], i16* [[TMP2]], align 2
|
||||
// CHECK4-NEXT: store i16 [[CONV1]], i16* [[TMP0]], align 2
|
||||
// CHECK4-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -470,8 +419,7 @@ int bar(int n){
|
|||
// CHECK4-NEXT: [[A_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK4-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 8
|
||||
// CHECK4-NEXT: [[B_ADDR:%.*]] = alloca [10 x i32]*, align 8
|
||||
// CHECK4-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON_0:%.*]], align 8
|
||||
// CHECK4-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 8
|
||||
// CHECK4-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [3 x i8*], align 8
|
||||
// CHECK4-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 8
|
||||
// CHECK4-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 8
|
||||
// CHECK4-NEXT: store [10 x i32]* [[B]], [10 x i32]** [[B_ADDR]], align 8
|
||||
|
@ -483,21 +431,17 @@ int bar(int n){
|
|||
// CHECK4-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
|
||||
// CHECK4: user_code.entry:
|
||||
// CHECK4-NEXT: [[TMP4:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB2]])
|
||||
// CHECK4-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK4-NEXT: store i32* [[TMP0]], i32** [[TMP5]], align 8
|
||||
// CHECK4-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 1
|
||||
// CHECK4-NEXT: store i16* [[TMP1]], i16** [[TMP6]], align 8
|
||||
// CHECK4-NEXT: [[TMP7:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 2
|
||||
// CHECK4-NEXT: store [10 x i32]* [[TMP2]], [10 x i32]** [[TMP7]], align 8
|
||||
// CHECK4-NEXT: [[TMP8:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
|
||||
// CHECK4-NEXT: [[TMP9:%.*]] = call i8* @__kmpc_alloc_shared(i64 24)
|
||||
// CHECK4-NEXT: [[TMP10:%.*]] = load [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], align 8
|
||||
// CHECK4-NEXT: [[TMP11:%.*]] = bitcast i8* [[TMP9]] to %struct.anon.0*
|
||||
// CHECK4-NEXT: store [[STRUCT_ANON_0]] [[TMP10]], %struct.anon.0* [[TMP11]], align 8
|
||||
// CHECK4-NEXT: store i8* [[TMP9]], i8** [[TMP8]], align 8
|
||||
// CHECK4-NEXT: [[TMP12:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK4-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP4]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon.0*)* @__omp_outlined__1 to i8*), i8* null, i8** [[TMP12]], i64 1)
|
||||
// CHECK4-NEXT: call void @__kmpc_free_shared(i8* [[TMP9]], i64 24)
|
||||
// CHECK4-NEXT: [[TMP5:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
|
||||
// CHECK4-NEXT: [[TMP6:%.*]] = bitcast i32* [[TMP0]] to i8*
|
||||
// CHECK4-NEXT: store i8* [[TMP6]], i8** [[TMP5]], align 8
|
||||
// CHECK4-NEXT: [[TMP7:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 1
|
||||
// CHECK4-NEXT: [[TMP8:%.*]] = bitcast i16* [[TMP1]] to i8*
|
||||
// CHECK4-NEXT: store i8* [[TMP8]], i8** [[TMP7]], align 8
|
||||
// CHECK4-NEXT: [[TMP9:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 2
|
||||
// CHECK4-NEXT: [[TMP10:%.*]] = bitcast [10 x i32]* [[TMP2]] to i8*
|
||||
// CHECK4-NEXT: store i8* [[TMP10]], i8** [[TMP9]], align 8
|
||||
// CHECK4-NEXT: [[TMP11:%.*]] = bitcast [3 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK4-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP4]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i32*, i16*, [10 x i32]*)* @__omp_outlined__1 to i8*), i8* null, i8** [[TMP11]], i64 3)
|
||||
// CHECK4-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 true, i1 true)
|
||||
// CHECK4-NEXT: ret void
|
||||
// CHECK4: worker.exit:
|
||||
|
@ -505,32 +449,32 @@ int bar(int n){
|
|||
//
|
||||
//
|
||||
// CHECK4-LABEL: define {{[^@]+}}@__omp_outlined__1
|
||||
// CHECK4-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.0* noalias [[__CONTEXT:%.*]]) #[[ATTR1]] {
|
||||
// CHECK4-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[A:%.*]], i16* nonnull align 2 dereferenceable(2) [[AA:%.*]], [10 x i32]* nonnull align 4 dereferenceable(40) [[B:%.*]]) #[[ATTR1]] {
|
||||
// CHECK4-NEXT: entry:
|
||||
// CHECK4-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK4-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK4-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.0*, align 8
|
||||
// CHECK4-NEXT: [[A_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK4-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 8
|
||||
// CHECK4-NEXT: [[B_ADDR:%.*]] = alloca [10 x i32]*, align 8
|
||||
// CHECK4-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK4-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK4-NEXT: store %struct.anon.0* [[__CONTEXT]], %struct.anon.0** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK4-NEXT: [[TMP0:%.*]] = load %struct.anon.0*, %struct.anon.0** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK4-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_0:%.*]], %struct.anon.0* [[TMP0]], i32 0, i32 0
|
||||
// CHECK4-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 8
|
||||
// CHECK4-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[TMP0]], i32 0, i32 1
|
||||
// CHECK4-NEXT: [[TMP4:%.*]] = load i16*, i16** [[TMP3]], align 8
|
||||
// CHECK4-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[TMP0]], i32 0, i32 2
|
||||
// CHECK4-NEXT: [[TMP6:%.*]] = load [10 x i32]*, [10 x i32]** [[TMP5]], align 8
|
||||
// CHECK4-NEXT: [[TMP7:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK4-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP7]], 1
|
||||
// CHECK4-NEXT: store i32 [[ADD]], i32* [[TMP2]], align 4
|
||||
// CHECK4-NEXT: [[TMP8:%.*]] = load i16, i16* [[TMP4]], align 2
|
||||
// CHECK4-NEXT: [[CONV:%.*]] = sext i16 [[TMP8]] to i32
|
||||
// CHECK4-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 8
|
||||
// CHECK4-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 8
|
||||
// CHECK4-NEXT: store [10 x i32]* [[B]], [10 x i32]** [[B_ADDR]], align 8
|
||||
// CHECK4-NEXT: [[TMP0:%.*]] = load i32*, i32** [[A_ADDR]], align 8
|
||||
// CHECK4-NEXT: [[TMP1:%.*]] = load i16*, i16** [[AA_ADDR]], align 8
|
||||
// CHECK4-NEXT: [[TMP2:%.*]] = load [10 x i32]*, [10 x i32]** [[B_ADDR]], align 8
|
||||
// CHECK4-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK4-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP3]], 1
|
||||
// CHECK4-NEXT: store i32 [[ADD]], i32* [[TMP0]], align 4
|
||||
// CHECK4-NEXT: [[TMP4:%.*]] = load i16, i16* [[TMP1]], align 2
|
||||
// CHECK4-NEXT: [[CONV:%.*]] = sext i16 [[TMP4]] to i32
|
||||
// CHECK4-NEXT: [[ADD1:%.*]] = add nsw i32 [[CONV]], 1
|
||||
// CHECK4-NEXT: [[CONV2:%.*]] = trunc i32 [[ADD1]] to i16
|
||||
// CHECK4-NEXT: store i16 [[CONV2]], i16* [[TMP4]], align 2
|
||||
// CHECK4-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [10 x i32], [10 x i32]* [[TMP6]], i64 0, i64 2
|
||||
// CHECK4-NEXT: [[TMP9:%.*]] = load i32, i32* [[ARRAYIDX]], align 4
|
||||
// CHECK4-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP9]], 1
|
||||
// CHECK4-NEXT: store i16 [[CONV2]], i16* [[TMP1]], align 2
|
||||
// CHECK4-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [10 x i32], [10 x i32]* [[TMP2]], i64 0, i64 2
|
||||
// CHECK4-NEXT: [[TMP5:%.*]] = load i32, i32* [[ARRAYIDX]], align 4
|
||||
// CHECK4-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP5]], 1
|
||||
// CHECK4-NEXT: store i32 [[ADD3]], i32* [[ARRAYIDX]], align 4
|
||||
// CHECK4-NEXT: ret void
|
||||
//
|
||||
|
@ -539,7 +483,6 @@ int bar(int n){
|
|||
// CHECK5-SAME: (i16* nonnull align 2 dereferenceable(2) [[AA:%.*]]) #[[ATTR0:[0-9]+]] {
|
||||
// CHECK5-NEXT: entry:
|
||||
// CHECK5-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 4
|
||||
// CHECK5-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 4
|
||||
// CHECK5-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 4
|
||||
// CHECK5-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 4
|
||||
// CHECK5-NEXT: [[TMP0:%.*]] = load i16*, i16** [[AA_ADDR]], align 4
|
||||
|
@ -548,17 +491,11 @@ int bar(int n){
|
|||
// CHECK5-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
|
||||
// CHECK5: user_code.entry:
|
||||
// CHECK5-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB2:[0-9]+]])
|
||||
// CHECK5-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK5-NEXT: store i16* [[TMP0]], i16** [[TMP3]], align 4
|
||||
// CHECK5-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK5-NEXT: [[TMP5:%.*]] = call i8* @__kmpc_alloc_shared(i32 4)
|
||||
// CHECK5-NEXT: [[TMP6:%.*]] = load [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], align 4
|
||||
// CHECK5-NEXT: [[TMP7:%.*]] = bitcast i8* [[TMP5]] to %struct.anon*
|
||||
// CHECK5-NEXT: store [[STRUCT_ANON]] [[TMP6]], %struct.anon* [[TMP7]], align 4
|
||||
// CHECK5-NEXT: store i8* [[TMP5]], i8** [[TMP4]], align 4
|
||||
// CHECK5-NEXT: [[TMP8:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK5-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP2]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon*)* @__omp_outlined__ to i8*), i8* null, i8** [[TMP8]], i32 1)
|
||||
// CHECK5-NEXT: call void @__kmpc_free_shared(i8* [[TMP5]], i32 4)
|
||||
// CHECK5-NEXT: [[TMP3:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK5-NEXT: [[TMP4:%.*]] = bitcast i16* [[TMP0]] to i8*
|
||||
// CHECK5-NEXT: store i8* [[TMP4]], i8** [[TMP3]], align 4
|
||||
// CHECK5-NEXT: [[TMP5:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK5-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP2]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i16*)* @__omp_outlined__ to i8*), i8* null, i8** [[TMP5]], i32 1)
|
||||
// CHECK5-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 true, i1 true)
|
||||
// CHECK5-NEXT: ret void
|
||||
// CHECK5: worker.exit:
|
||||
|
@ -566,22 +503,20 @@ int bar(int n){
|
|||
//
|
||||
//
|
||||
// CHECK5-LABEL: define {{[^@]+}}@__omp_outlined__
|
||||
// CHECK5-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK5-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i16* nonnull align 2 dereferenceable(2) [[AA:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK5-NEXT: entry:
|
||||
// CHECK5-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK5-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK5-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 4
|
||||
// CHECK5-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 4
|
||||
// CHECK5-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK5-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK5-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK5-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK5-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK5-NEXT: [[TMP2:%.*]] = load i16*, i16** [[TMP1]], align 4
|
||||
// CHECK5-NEXT: [[TMP3:%.*]] = load i16, i16* [[TMP2]], align 2
|
||||
// CHECK5-NEXT: [[CONV:%.*]] = sext i16 [[TMP3]] to i32
|
||||
// CHECK5-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 4
|
||||
// CHECK5-NEXT: [[TMP0:%.*]] = load i16*, i16** [[AA_ADDR]], align 4
|
||||
// CHECK5-NEXT: [[TMP1:%.*]] = load i16, i16* [[TMP0]], align 2
|
||||
// CHECK5-NEXT: [[CONV:%.*]] = sext i16 [[TMP1]] to i32
|
||||
// CHECK5-NEXT: [[ADD:%.*]] = add nsw i32 [[CONV]], 1
|
||||
// CHECK5-NEXT: [[CONV1:%.*]] = trunc i32 [[ADD]] to i16
|
||||
// CHECK5-NEXT: store i16 [[CONV1]], i16* [[TMP2]], align 2
|
||||
// CHECK5-NEXT: store i16 [[CONV1]], i16* [[TMP0]], align 2
|
||||
// CHECK5-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -591,8 +526,7 @@ int bar(int n){
|
|||
// CHECK5-NEXT: [[A_ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK5-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 4
|
||||
// CHECK5-NEXT: [[B_ADDR:%.*]] = alloca [10 x i32]*, align 4
|
||||
// CHECK5-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON_0:%.*]], align 4
|
||||
// CHECK5-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 4
|
||||
// CHECK5-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [3 x i8*], align 4
|
||||
// CHECK5-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 4
|
||||
// CHECK5-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 4
|
||||
// CHECK5-NEXT: store [10 x i32]* [[B]], [10 x i32]** [[B_ADDR]], align 4
|
||||
|
@ -604,21 +538,17 @@ int bar(int n){
|
|||
// CHECK5-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
|
||||
// CHECK5: user_code.entry:
|
||||
// CHECK5-NEXT: [[TMP4:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB2]])
|
||||
// CHECK5-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK5-NEXT: store i32* [[TMP0]], i32** [[TMP5]], align 4
|
||||
// CHECK5-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 1
|
||||
// CHECK5-NEXT: store i16* [[TMP1]], i16** [[TMP6]], align 4
|
||||
// CHECK5-NEXT: [[TMP7:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 2
|
||||
// CHECK5-NEXT: store [10 x i32]* [[TMP2]], [10 x i32]** [[TMP7]], align 4
|
||||
// CHECK5-NEXT: [[TMP8:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK5-NEXT: [[TMP9:%.*]] = call i8* @__kmpc_alloc_shared(i32 12)
|
||||
// CHECK5-NEXT: [[TMP10:%.*]] = load [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], align 4
|
||||
// CHECK5-NEXT: [[TMP11:%.*]] = bitcast i8* [[TMP9]] to %struct.anon.0*
|
||||
// CHECK5-NEXT: store [[STRUCT_ANON_0]] [[TMP10]], %struct.anon.0* [[TMP11]], align 4
|
||||
// CHECK5-NEXT: store i8* [[TMP9]], i8** [[TMP8]], align 4
|
||||
// CHECK5-NEXT: [[TMP12:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK5-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP4]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon.0*)* @__omp_outlined__1 to i8*), i8* null, i8** [[TMP12]], i32 1)
|
||||
// CHECK5-NEXT: call void @__kmpc_free_shared(i8* [[TMP9]], i32 12)
|
||||
// CHECK5-NEXT: [[TMP5:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK5-NEXT: [[TMP6:%.*]] = bitcast i32* [[TMP0]] to i8*
|
||||
// CHECK5-NEXT: store i8* [[TMP6]], i8** [[TMP5]], align 4
|
||||
// CHECK5-NEXT: [[TMP7:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
|
||||
// CHECK5-NEXT: [[TMP8:%.*]] = bitcast i16* [[TMP1]] to i8*
|
||||
// CHECK5-NEXT: store i8* [[TMP8]], i8** [[TMP7]], align 4
|
||||
// CHECK5-NEXT: [[TMP9:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 2
|
||||
// CHECK5-NEXT: [[TMP10:%.*]] = bitcast [10 x i32]* [[TMP2]] to i8*
|
||||
// CHECK5-NEXT: store i8* [[TMP10]], i8** [[TMP9]], align 4
|
||||
// CHECK5-NEXT: [[TMP11:%.*]] = bitcast [3 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK5-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP4]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i32*, i16*, [10 x i32]*)* @__omp_outlined__1 to i8*), i8* null, i8** [[TMP11]], i32 3)
|
||||
// CHECK5-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 true, i1 true)
|
||||
// CHECK5-NEXT: ret void
|
||||
// CHECK5: worker.exit:
|
||||
|
@ -626,32 +556,32 @@ int bar(int n){
|
|||
//
|
||||
//
|
||||
// CHECK5-LABEL: define {{[^@]+}}@__omp_outlined__1
|
||||
// CHECK5-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.0* noalias [[__CONTEXT:%.*]]) #[[ATTR1]] {
|
||||
// CHECK5-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[A:%.*]], i16* nonnull align 2 dereferenceable(2) [[AA:%.*]], [10 x i32]* nonnull align 4 dereferenceable(40) [[B:%.*]]) #[[ATTR1]] {
|
||||
// CHECK5-NEXT: entry:
|
||||
// CHECK5-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK5-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK5-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.0*, align 4
|
||||
// CHECK5-NEXT: [[A_ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK5-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 4
|
||||
// CHECK5-NEXT: [[B_ADDR:%.*]] = alloca [10 x i32]*, align 4
|
||||
// CHECK5-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK5-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK5-NEXT: store %struct.anon.0* [[__CONTEXT]], %struct.anon.0** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK5-NEXT: [[TMP0:%.*]] = load %struct.anon.0*, %struct.anon.0** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK5-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_0:%.*]], %struct.anon.0* [[TMP0]], i32 0, i32 0
|
||||
// CHECK5-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 4
|
||||
// CHECK5-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[TMP0]], i32 0, i32 1
|
||||
// CHECK5-NEXT: [[TMP4:%.*]] = load i16*, i16** [[TMP3]], align 4
|
||||
// CHECK5-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[TMP0]], i32 0, i32 2
|
||||
// CHECK5-NEXT: [[TMP6:%.*]] = load [10 x i32]*, [10 x i32]** [[TMP5]], align 4
|
||||
// CHECK5-NEXT: [[TMP7:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK5-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP7]], 1
|
||||
// CHECK5-NEXT: store i32 [[ADD]], i32* [[TMP2]], align 4
|
||||
// CHECK5-NEXT: [[TMP8:%.*]] = load i16, i16* [[TMP4]], align 2
|
||||
// CHECK5-NEXT: [[CONV:%.*]] = sext i16 [[TMP8]] to i32
|
||||
// CHECK5-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 4
|
||||
// CHECK5-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 4
|
||||
// CHECK5-NEXT: store [10 x i32]* [[B]], [10 x i32]** [[B_ADDR]], align 4
|
||||
// CHECK5-NEXT: [[TMP0:%.*]] = load i32*, i32** [[A_ADDR]], align 4
|
||||
// CHECK5-NEXT: [[TMP1:%.*]] = load i16*, i16** [[AA_ADDR]], align 4
|
||||
// CHECK5-NEXT: [[TMP2:%.*]] = load [10 x i32]*, [10 x i32]** [[B_ADDR]], align 4
|
||||
// CHECK5-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK5-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP3]], 1
|
||||
// CHECK5-NEXT: store i32 [[ADD]], i32* [[TMP0]], align 4
|
||||
// CHECK5-NEXT: [[TMP4:%.*]] = load i16, i16* [[TMP1]], align 2
|
||||
// CHECK5-NEXT: [[CONV:%.*]] = sext i16 [[TMP4]] to i32
|
||||
// CHECK5-NEXT: [[ADD1:%.*]] = add nsw i32 [[CONV]], 1
|
||||
// CHECK5-NEXT: [[CONV2:%.*]] = trunc i32 [[ADD1]] to i16
|
||||
// CHECK5-NEXT: store i16 [[CONV2]], i16* [[TMP4]], align 2
|
||||
// CHECK5-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [10 x i32], [10 x i32]* [[TMP6]], i32 0, i32 2
|
||||
// CHECK5-NEXT: [[TMP9:%.*]] = load i32, i32* [[ARRAYIDX]], align 4
|
||||
// CHECK5-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP9]], 1
|
||||
// CHECK5-NEXT: store i16 [[CONV2]], i16* [[TMP1]], align 2
|
||||
// CHECK5-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [10 x i32], [10 x i32]* [[TMP2]], i32 0, i32 2
|
||||
// CHECK5-NEXT: [[TMP5:%.*]] = load i32, i32* [[ARRAYIDX]], align 4
|
||||
// CHECK5-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP5]], 1
|
||||
// CHECK5-NEXT: store i32 [[ADD3]], i32* [[ARRAYIDX]], align 4
|
||||
// CHECK5-NEXT: ret void
|
||||
//
|
||||
|
@ -660,7 +590,6 @@ int bar(int n){
|
|||
// CHECK6-SAME: (i16* nonnull align 2 dereferenceable(2) [[AA:%.*]]) #[[ATTR0:[0-9]+]] {
|
||||
// CHECK6-NEXT: entry:
|
||||
// CHECK6-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 4
|
||||
// CHECK6-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 4
|
||||
// CHECK6-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 4
|
||||
// CHECK6-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 4
|
||||
// CHECK6-NEXT: [[TMP0:%.*]] = load i16*, i16** [[AA_ADDR]], align 4
|
||||
|
@ -669,17 +598,11 @@ int bar(int n){
|
|||
// CHECK6-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
|
||||
// CHECK6: user_code.entry:
|
||||
// CHECK6-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB2:[0-9]+]])
|
||||
// CHECK6-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK6-NEXT: store i16* [[TMP0]], i16** [[TMP3]], align 4
|
||||
// CHECK6-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK6-NEXT: [[TMP5:%.*]] = call i8* @__kmpc_alloc_shared(i32 4)
|
||||
// CHECK6-NEXT: [[TMP6:%.*]] = load [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], align 4
|
||||
// CHECK6-NEXT: [[TMP7:%.*]] = bitcast i8* [[TMP5]] to %struct.anon*
|
||||
// CHECK6-NEXT: store [[STRUCT_ANON]] [[TMP6]], %struct.anon* [[TMP7]], align 4
|
||||
// CHECK6-NEXT: store i8* [[TMP5]], i8** [[TMP4]], align 4
|
||||
// CHECK6-NEXT: [[TMP8:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK6-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP2]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon*)* @__omp_outlined__ to i8*), i8* null, i8** [[TMP8]], i32 1)
|
||||
// CHECK6-NEXT: call void @__kmpc_free_shared(i8* [[TMP5]], i32 4)
|
||||
// CHECK6-NEXT: [[TMP3:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK6-NEXT: [[TMP4:%.*]] = bitcast i16* [[TMP0]] to i8*
|
||||
// CHECK6-NEXT: store i8* [[TMP4]], i8** [[TMP3]], align 4
|
||||
// CHECK6-NEXT: [[TMP5:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK6-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP2]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i16*)* @__omp_outlined__ to i8*), i8* null, i8** [[TMP5]], i32 1)
|
||||
// CHECK6-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 true, i1 true)
|
||||
// CHECK6-NEXT: ret void
|
||||
// CHECK6: worker.exit:
|
||||
|
@ -687,22 +610,20 @@ int bar(int n){
|
|||
//
|
||||
//
|
||||
// CHECK6-LABEL: define {{[^@]+}}@__omp_outlined__
|
||||
// CHECK6-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK6-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i16* nonnull align 2 dereferenceable(2) [[AA:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK6-NEXT: entry:
|
||||
// CHECK6-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK6-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK6-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 4
|
||||
// CHECK6-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 4
|
||||
// CHECK6-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK6-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK6-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK6-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK6-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK6-NEXT: [[TMP2:%.*]] = load i16*, i16** [[TMP1]], align 4
|
||||
// CHECK6-NEXT: [[TMP3:%.*]] = load i16, i16* [[TMP2]], align 2
|
||||
// CHECK6-NEXT: [[CONV:%.*]] = sext i16 [[TMP3]] to i32
|
||||
// CHECK6-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 4
|
||||
// CHECK6-NEXT: [[TMP0:%.*]] = load i16*, i16** [[AA_ADDR]], align 4
|
||||
// CHECK6-NEXT: [[TMP1:%.*]] = load i16, i16* [[TMP0]], align 2
|
||||
// CHECK6-NEXT: [[CONV:%.*]] = sext i16 [[TMP1]] to i32
|
||||
// CHECK6-NEXT: [[ADD:%.*]] = add nsw i32 [[CONV]], 1
|
||||
// CHECK6-NEXT: [[CONV1:%.*]] = trunc i32 [[ADD]] to i16
|
||||
// CHECK6-NEXT: store i16 [[CONV1]], i16* [[TMP2]], align 2
|
||||
// CHECK6-NEXT: store i16 [[CONV1]], i16* [[TMP0]], align 2
|
||||
// CHECK6-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -712,8 +633,7 @@ int bar(int n){
|
|||
// CHECK6-NEXT: [[A_ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK6-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 4
|
||||
// CHECK6-NEXT: [[B_ADDR:%.*]] = alloca [10 x i32]*, align 4
|
||||
// CHECK6-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON_0:%.*]], align 4
|
||||
// CHECK6-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 4
|
||||
// CHECK6-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [3 x i8*], align 4
|
||||
// CHECK6-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 4
|
||||
// CHECK6-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 4
|
||||
// CHECK6-NEXT: store [10 x i32]* [[B]], [10 x i32]** [[B_ADDR]], align 4
|
||||
|
@ -725,21 +645,17 @@ int bar(int n){
|
|||
// CHECK6-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
|
||||
// CHECK6: user_code.entry:
|
||||
// CHECK6-NEXT: [[TMP4:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB2]])
|
||||
// CHECK6-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK6-NEXT: store i32* [[TMP0]], i32** [[TMP5]], align 4
|
||||
// CHECK6-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 1
|
||||
// CHECK6-NEXT: store i16* [[TMP1]], i16** [[TMP6]], align 4
|
||||
// CHECK6-NEXT: [[TMP7:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 2
|
||||
// CHECK6-NEXT: store [10 x i32]* [[TMP2]], [10 x i32]** [[TMP7]], align 4
|
||||
// CHECK6-NEXT: [[TMP8:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK6-NEXT: [[TMP9:%.*]] = call i8* @__kmpc_alloc_shared(i32 12)
|
||||
// CHECK6-NEXT: [[TMP10:%.*]] = load [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], align 4
|
||||
// CHECK6-NEXT: [[TMP11:%.*]] = bitcast i8* [[TMP9]] to %struct.anon.0*
|
||||
// CHECK6-NEXT: store [[STRUCT_ANON_0]] [[TMP10]], %struct.anon.0* [[TMP11]], align 4
|
||||
// CHECK6-NEXT: store i8* [[TMP9]], i8** [[TMP8]], align 4
|
||||
// CHECK6-NEXT: [[TMP12:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK6-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP4]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon.0*)* @__omp_outlined__1 to i8*), i8* null, i8** [[TMP12]], i32 1)
|
||||
// CHECK6-NEXT: call void @__kmpc_free_shared(i8* [[TMP9]], i32 12)
|
||||
// CHECK6-NEXT: [[TMP5:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK6-NEXT: [[TMP6:%.*]] = bitcast i32* [[TMP0]] to i8*
|
||||
// CHECK6-NEXT: store i8* [[TMP6]], i8** [[TMP5]], align 4
|
||||
// CHECK6-NEXT: [[TMP7:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
|
||||
// CHECK6-NEXT: [[TMP8:%.*]] = bitcast i16* [[TMP1]] to i8*
|
||||
// CHECK6-NEXT: store i8* [[TMP8]], i8** [[TMP7]], align 4
|
||||
// CHECK6-NEXT: [[TMP9:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 2
|
||||
// CHECK6-NEXT: [[TMP10:%.*]] = bitcast [10 x i32]* [[TMP2]] to i8*
|
||||
// CHECK6-NEXT: store i8* [[TMP10]], i8** [[TMP9]], align 4
|
||||
// CHECK6-NEXT: [[TMP11:%.*]] = bitcast [3 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK6-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP4]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i32*, i16*, [10 x i32]*)* @__omp_outlined__1 to i8*), i8* null, i8** [[TMP11]], i32 3)
|
||||
// CHECK6-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 true, i1 true)
|
||||
// CHECK6-NEXT: ret void
|
||||
// CHECK6: worker.exit:
|
||||
|
@ -747,32 +663,32 @@ int bar(int n){
|
|||
//
|
||||
//
|
||||
// CHECK6-LABEL: define {{[^@]+}}@__omp_outlined__1
|
||||
// CHECK6-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.0* noalias [[__CONTEXT:%.*]]) #[[ATTR1]] {
|
||||
// CHECK6-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[A:%.*]], i16* nonnull align 2 dereferenceable(2) [[AA:%.*]], [10 x i32]* nonnull align 4 dereferenceable(40) [[B:%.*]]) #[[ATTR1]] {
|
||||
// CHECK6-NEXT: entry:
|
||||
// CHECK6-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK6-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK6-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.0*, align 4
|
||||
// CHECK6-NEXT: [[A_ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK6-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 4
|
||||
// CHECK6-NEXT: [[B_ADDR:%.*]] = alloca [10 x i32]*, align 4
|
||||
// CHECK6-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK6-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK6-NEXT: store %struct.anon.0* [[__CONTEXT]], %struct.anon.0** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK6-NEXT: [[TMP0:%.*]] = load %struct.anon.0*, %struct.anon.0** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK6-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_0:%.*]], %struct.anon.0* [[TMP0]], i32 0, i32 0
|
||||
// CHECK6-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 4
|
||||
// CHECK6-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[TMP0]], i32 0, i32 1
|
||||
// CHECK6-NEXT: [[TMP4:%.*]] = load i16*, i16** [[TMP3]], align 4
|
||||
// CHECK6-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[TMP0]], i32 0, i32 2
|
||||
// CHECK6-NEXT: [[TMP6:%.*]] = load [10 x i32]*, [10 x i32]** [[TMP5]], align 4
|
||||
// CHECK6-NEXT: [[TMP7:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK6-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP7]], 1
|
||||
// CHECK6-NEXT: store i32 [[ADD]], i32* [[TMP2]], align 4
|
||||
// CHECK6-NEXT: [[TMP8:%.*]] = load i16, i16* [[TMP4]], align 2
|
||||
// CHECK6-NEXT: [[CONV:%.*]] = sext i16 [[TMP8]] to i32
|
||||
// CHECK6-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 4
|
||||
// CHECK6-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 4
|
||||
// CHECK6-NEXT: store [10 x i32]* [[B]], [10 x i32]** [[B_ADDR]], align 4
|
||||
// CHECK6-NEXT: [[TMP0:%.*]] = load i32*, i32** [[A_ADDR]], align 4
|
||||
// CHECK6-NEXT: [[TMP1:%.*]] = load i16*, i16** [[AA_ADDR]], align 4
|
||||
// CHECK6-NEXT: [[TMP2:%.*]] = load [10 x i32]*, [10 x i32]** [[B_ADDR]], align 4
|
||||
// CHECK6-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK6-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP3]], 1
|
||||
// CHECK6-NEXT: store i32 [[ADD]], i32* [[TMP0]], align 4
|
||||
// CHECK6-NEXT: [[TMP4:%.*]] = load i16, i16* [[TMP1]], align 2
|
||||
// CHECK6-NEXT: [[CONV:%.*]] = sext i16 [[TMP4]] to i32
|
||||
// CHECK6-NEXT: [[ADD1:%.*]] = add nsw i32 [[CONV]], 1
|
||||
// CHECK6-NEXT: [[CONV2:%.*]] = trunc i32 [[ADD1]] to i16
|
||||
// CHECK6-NEXT: store i16 [[CONV2]], i16* [[TMP4]], align 2
|
||||
// CHECK6-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [10 x i32], [10 x i32]* [[TMP6]], i32 0, i32 2
|
||||
// CHECK6-NEXT: [[TMP9:%.*]] = load i32, i32* [[ARRAYIDX]], align 4
|
||||
// CHECK6-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP9]], 1
|
||||
// CHECK6-NEXT: store i16 [[CONV2]], i16* [[TMP1]], align 2
|
||||
// CHECK6-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [10 x i32], [10 x i32]* [[TMP2]], i32 0, i32 2
|
||||
// CHECK6-NEXT: [[TMP5:%.*]] = load i32, i32* [[ARRAYIDX]], align 4
|
||||
// CHECK6-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP5]], 1
|
||||
// CHECK6-NEXT: store i32 [[ADD3]], i32* [[ARRAYIDX]], align 4
|
||||
// CHECK6-NEXT: ret void
|
||||
//
|
||||
|
|
|
@ -50,7 +50,6 @@ int bar(int n){
|
|||
// CHECK1-SAME: (i16* nonnull align 2 dereferenceable(2) [[AA:%.*]]) #[[ATTR0:[0-9]+]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 8
|
||||
// CHECK1-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 8
|
||||
// CHECK1-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 8
|
||||
// CHECK1-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load i16*, i16** [[AA_ADDR]], align 8
|
||||
|
@ -59,17 +58,11 @@ int bar(int n){
|
|||
// CHECK1-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
|
||||
// CHECK1: user_code.entry:
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB2:[0-9]+]])
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK1-NEXT: store i16* [[TMP0]], i16** [[TMP3]], align 8
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = call i8* @__kmpc_alloc_shared(i64 8)
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = load [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], align 8
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = bitcast i8* [[TMP5]] to %struct.anon*
|
||||
// CHECK1-NEXT: store [[STRUCT_ANON]] [[TMP6]], %struct.anon* [[TMP7]], align 8
|
||||
// CHECK1-NEXT: store i8* [[TMP5]], i8** [[TMP4]], align 8
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK1-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP2]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon*)* @__omp_outlined__ to i8*), i8* null, i8** [[TMP8]], i64 1)
|
||||
// CHECK1-NEXT: call void @__kmpc_free_shared(i8* [[TMP5]], i64 8)
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = bitcast i16* [[TMP0]] to i8*
|
||||
// CHECK1-NEXT: store i8* [[TMP4]], i8** [[TMP3]], align 8
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK1-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP2]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i16*)* @__omp_outlined__ to i8*), i8* null, i8** [[TMP5]], i64 1)
|
||||
// CHECK1-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 true, i1 true)
|
||||
// CHECK1-NEXT: ret void
|
||||
// CHECK1: worker.exit:
|
||||
|
@ -77,22 +70,20 @@ int bar(int n){
|
|||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@__omp_outlined__
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i16* nonnull align 2 dereferenceable(2) [[AA:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK1-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i16*, i16** [[TMP1]], align 8
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = load i16, i16* [[TMP2]], align 2
|
||||
// CHECK1-NEXT: [[CONV:%.*]] = sext i16 [[TMP3]] to i32
|
||||
// CHECK1-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load i16*, i16** [[AA_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = load i16, i16* [[TMP0]], align 2
|
||||
// CHECK1-NEXT: [[CONV:%.*]] = sext i16 [[TMP1]] to i32
|
||||
// CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 [[CONV]], 1
|
||||
// CHECK1-NEXT: [[CONV1:%.*]] = trunc i32 [[ADD]] to i16
|
||||
// CHECK1-NEXT: store i16 [[CONV1]], i16* [[TMP2]], align 2
|
||||
// CHECK1-NEXT: store i16 [[CONV1]], i16* [[TMP0]], align 2
|
||||
// CHECK1-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -103,8 +94,7 @@ int bar(int n){
|
|||
// CHECK1-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 8
|
||||
// CHECK1-NEXT: [[B_ADDR:%.*]] = alloca [10 x i32]*, align 8
|
||||
// CHECK1-NEXT: [[DOTCAPTURE_EXPR__ADDR:%.*]] = alloca i64, align 8
|
||||
// CHECK1-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON_0:%.*]], align 8
|
||||
// CHECK1-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 8
|
||||
// CHECK1-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [3 x i8*], align 8
|
||||
// CHECK1-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 8
|
||||
// CHECK1-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 8
|
||||
// CHECK1-NEXT: store [10 x i32]* [[B]], [10 x i32]** [[B_ADDR]], align 8
|
||||
|
@ -119,21 +109,17 @@ int bar(int n){
|
|||
// CHECK1: user_code.entry:
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB2]])
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = load i32, i32* [[CONV]], align 8
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK1-NEXT: store i32* [[TMP0]], i32** [[TMP6]], align 8
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 1
|
||||
// CHECK1-NEXT: store i16* [[TMP1]], i16** [[TMP7]], align 8
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 2
|
||||
// CHECK1-NEXT: store [10 x i32]* [[TMP2]], [10 x i32]** [[TMP8]], align 8
|
||||
// CHECK1-NEXT: [[TMP9:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
|
||||
// CHECK1-NEXT: [[TMP10:%.*]] = call i8* @__kmpc_alloc_shared(i64 24)
|
||||
// CHECK1-NEXT: [[TMP11:%.*]] = load [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], align 8
|
||||
// CHECK1-NEXT: [[TMP12:%.*]] = bitcast i8* [[TMP10]] to %struct.anon.0*
|
||||
// CHECK1-NEXT: store [[STRUCT_ANON_0]] [[TMP11]], %struct.anon.0* [[TMP12]], align 8
|
||||
// CHECK1-NEXT: store i8* [[TMP10]], i8** [[TMP9]], align 8
|
||||
// CHECK1-NEXT: [[TMP13:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK1-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP4]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon.0*)* @__omp_outlined__1 to i8*), i8* null, i8** [[TMP13]], i64 1)
|
||||
// CHECK1-NEXT: call void @__kmpc_free_shared(i8* [[TMP10]], i64 24)
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = bitcast i32* [[TMP0]] to i8*
|
||||
// CHECK1-NEXT: store i8* [[TMP7]], i8** [[TMP6]], align 8
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 1
|
||||
// CHECK1-NEXT: [[TMP9:%.*]] = bitcast i16* [[TMP1]] to i8*
|
||||
// CHECK1-NEXT: store i8* [[TMP9]], i8** [[TMP8]], align 8
|
||||
// CHECK1-NEXT: [[TMP10:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 2
|
||||
// CHECK1-NEXT: [[TMP11:%.*]] = bitcast [10 x i32]* [[TMP2]] to i8*
|
||||
// CHECK1-NEXT: store i8* [[TMP11]], i8** [[TMP10]], align 8
|
||||
// CHECK1-NEXT: [[TMP12:%.*]] = bitcast [3 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK1-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP4]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i32*, i16*, [10 x i32]*)* @__omp_outlined__1 to i8*), i8* null, i8** [[TMP12]], i64 3)
|
||||
// CHECK1-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 true, i1 true)
|
||||
// CHECK1-NEXT: ret void
|
||||
// CHECK1: worker.exit:
|
||||
|
@ -141,32 +127,32 @@ int bar(int n){
|
|||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@__omp_outlined__1
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.0* noalias [[__CONTEXT:%.*]]) #[[ATTR1]] {
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[A:%.*]], i16* nonnull align 2 dereferenceable(2) [[AA:%.*]], [10 x i32]* nonnull align 4 dereferenceable(40) [[B:%.*]]) #[[ATTR1]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.0*, align 8
|
||||
// CHECK1-NEXT: [[A_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 8
|
||||
// CHECK1-NEXT: [[B_ADDR:%.*]] = alloca [10 x i32]*, align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store %struct.anon.0* [[__CONTEXT]], %struct.anon.0** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load %struct.anon.0*, %struct.anon.0** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_0:%.*]], %struct.anon.0* [[TMP0]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 8
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[TMP0]], i32 0, i32 1
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = load i16*, i16** [[TMP3]], align 8
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[TMP0]], i32 0, i32 2
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = load [10 x i32]*, [10 x i32]** [[TMP5]], align 8
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP7]], 1
|
||||
// CHECK1-NEXT: store i32 [[ADD]], i32* [[TMP2]], align 4
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = load i16, i16* [[TMP4]], align 2
|
||||
// CHECK1-NEXT: [[CONV:%.*]] = sext i16 [[TMP8]] to i32
|
||||
// CHECK1-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 8
|
||||
// CHECK1-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 8
|
||||
// CHECK1-NEXT: store [10 x i32]* [[B]], [10 x i32]** [[B_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load i32*, i32** [[A_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = load i16*, i16** [[AA_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load [10 x i32]*, [10 x i32]** [[B_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP3]], 1
|
||||
// CHECK1-NEXT: store i32 [[ADD]], i32* [[TMP0]], align 4
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = load i16, i16* [[TMP1]], align 2
|
||||
// CHECK1-NEXT: [[CONV:%.*]] = sext i16 [[TMP4]] to i32
|
||||
// CHECK1-NEXT: [[ADD1:%.*]] = add nsw i32 [[CONV]], 1
|
||||
// CHECK1-NEXT: [[CONV2:%.*]] = trunc i32 [[ADD1]] to i16
|
||||
// CHECK1-NEXT: store i16 [[CONV2]], i16* [[TMP4]], align 2
|
||||
// CHECK1-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [10 x i32], [10 x i32]* [[TMP6]], i64 0, i64 2
|
||||
// CHECK1-NEXT: [[TMP9:%.*]] = load i32, i32* [[ARRAYIDX]], align 4
|
||||
// CHECK1-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP9]], 1
|
||||
// CHECK1-NEXT: store i16 [[CONV2]], i16* [[TMP1]], align 2
|
||||
// CHECK1-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [10 x i32], [10 x i32]* [[TMP2]], i64 0, i64 2
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = load i32, i32* [[ARRAYIDX]], align 4
|
||||
// CHECK1-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP5]], 1
|
||||
// CHECK1-NEXT: store i32 [[ADD3]], i32* [[ARRAYIDX]], align 4
|
||||
// CHECK1-NEXT: ret void
|
||||
//
|
||||
|
@ -175,7 +161,6 @@ int bar(int n){
|
|||
// CHECK2-SAME: (i16* nonnull align 2 dereferenceable(2) [[AA:%.*]]) #[[ATTR0:[0-9]+]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 4
|
||||
// CHECK2-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 4
|
||||
// CHECK2-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 4
|
||||
// CHECK2-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load i16*, i16** [[AA_ADDR]], align 4
|
||||
|
@ -184,17 +169,11 @@ int bar(int n){
|
|||
// CHECK2-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
|
||||
// CHECK2: user_code.entry:
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB2:[0-9]+]])
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK2-NEXT: store i16* [[TMP0]], i16** [[TMP3]], align 4
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = call i8* @__kmpc_alloc_shared(i32 4)
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = load [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], align 4
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = bitcast i8* [[TMP5]] to %struct.anon*
|
||||
// CHECK2-NEXT: store [[STRUCT_ANON]] [[TMP6]], %struct.anon* [[TMP7]], align 4
|
||||
// CHECK2-NEXT: store i8* [[TMP5]], i8** [[TMP4]], align 4
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK2-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP2]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon*)* @__omp_outlined__ to i8*), i8* null, i8** [[TMP8]], i32 1)
|
||||
// CHECK2-NEXT: call void @__kmpc_free_shared(i8* [[TMP5]], i32 4)
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = bitcast i16* [[TMP0]] to i8*
|
||||
// CHECK2-NEXT: store i8* [[TMP4]], i8** [[TMP3]], align 4
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK2-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP2]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i16*)* @__omp_outlined__ to i8*), i8* null, i8** [[TMP5]], i32 1)
|
||||
// CHECK2-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 true, i1 true)
|
||||
// CHECK2-NEXT: ret void
|
||||
// CHECK2: worker.exit:
|
||||
|
@ -202,22 +181,20 @@ int bar(int n){
|
|||
//
|
||||
//
|
||||
// CHECK2-LABEL: define {{[^@]+}}@__omp_outlined__
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i16* nonnull align 2 dereferenceable(2) [[AA:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 4
|
||||
// CHECK2-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i16*, i16** [[TMP1]], align 4
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = load i16, i16* [[TMP2]], align 2
|
||||
// CHECK2-NEXT: [[CONV:%.*]] = sext i16 [[TMP3]] to i32
|
||||
// CHECK2-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load i16*, i16** [[AA_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = load i16, i16* [[TMP0]], align 2
|
||||
// CHECK2-NEXT: [[CONV:%.*]] = sext i16 [[TMP1]] to i32
|
||||
// CHECK2-NEXT: [[ADD:%.*]] = add nsw i32 [[CONV]], 1
|
||||
// CHECK2-NEXT: [[CONV1:%.*]] = trunc i32 [[ADD]] to i16
|
||||
// CHECK2-NEXT: store i16 [[CONV1]], i16* [[TMP2]], align 2
|
||||
// CHECK2-NEXT: store i16 [[CONV1]], i16* [[TMP0]], align 2
|
||||
// CHECK2-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -228,8 +205,7 @@ int bar(int n){
|
|||
// CHECK2-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 4
|
||||
// CHECK2-NEXT: [[B_ADDR:%.*]] = alloca [10 x i32]*, align 4
|
||||
// CHECK2-NEXT: [[DOTCAPTURE_EXPR__ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON_0:%.*]], align 4
|
||||
// CHECK2-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 4
|
||||
// CHECK2-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [3 x i8*], align 4
|
||||
// CHECK2-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 4
|
||||
// CHECK2-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 4
|
||||
// CHECK2-NEXT: store [10 x i32]* [[B]], [10 x i32]** [[B_ADDR]], align 4
|
||||
|
@ -243,21 +219,17 @@ int bar(int n){
|
|||
// CHECK2: user_code.entry:
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB2]])
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = load i32, i32* [[DOTCAPTURE_EXPR__ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK2-NEXT: store i32* [[TMP0]], i32** [[TMP6]], align 4
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 1
|
||||
// CHECK2-NEXT: store i16* [[TMP1]], i16** [[TMP7]], align 4
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 2
|
||||
// CHECK2-NEXT: store [10 x i32]* [[TMP2]], [10 x i32]** [[TMP8]], align 4
|
||||
// CHECK2-NEXT: [[TMP9:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP10:%.*]] = call i8* @__kmpc_alloc_shared(i32 12)
|
||||
// CHECK2-NEXT: [[TMP11:%.*]] = load [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], align 4
|
||||
// CHECK2-NEXT: [[TMP12:%.*]] = bitcast i8* [[TMP10]] to %struct.anon.0*
|
||||
// CHECK2-NEXT: store [[STRUCT_ANON_0]] [[TMP11]], %struct.anon.0* [[TMP12]], align 4
|
||||
// CHECK2-NEXT: store i8* [[TMP10]], i8** [[TMP9]], align 4
|
||||
// CHECK2-NEXT: [[TMP13:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK2-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP4]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon.0*)* @__omp_outlined__1 to i8*), i8* null, i8** [[TMP13]], i32 1)
|
||||
// CHECK2-NEXT: call void @__kmpc_free_shared(i8* [[TMP10]], i32 12)
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = bitcast i32* [[TMP0]] to i8*
|
||||
// CHECK2-NEXT: store i8* [[TMP7]], i8** [[TMP6]], align 4
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
|
||||
// CHECK2-NEXT: [[TMP9:%.*]] = bitcast i16* [[TMP1]] to i8*
|
||||
// CHECK2-NEXT: store i8* [[TMP9]], i8** [[TMP8]], align 4
|
||||
// CHECK2-NEXT: [[TMP10:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 2
|
||||
// CHECK2-NEXT: [[TMP11:%.*]] = bitcast [10 x i32]* [[TMP2]] to i8*
|
||||
// CHECK2-NEXT: store i8* [[TMP11]], i8** [[TMP10]], align 4
|
||||
// CHECK2-NEXT: [[TMP12:%.*]] = bitcast [3 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK2-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP4]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i32*, i16*, [10 x i32]*)* @__omp_outlined__1 to i8*), i8* null, i8** [[TMP12]], i32 3)
|
||||
// CHECK2-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 true, i1 true)
|
||||
// CHECK2-NEXT: ret void
|
||||
// CHECK2: worker.exit:
|
||||
|
@ -265,32 +237,32 @@ int bar(int n){
|
|||
//
|
||||
//
|
||||
// CHECK2-LABEL: define {{[^@]+}}@__omp_outlined__1
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.0* noalias [[__CONTEXT:%.*]]) #[[ATTR1]] {
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[A:%.*]], i16* nonnull align 2 dereferenceable(2) [[AA:%.*]], [10 x i32]* nonnull align 4 dereferenceable(40) [[B:%.*]]) #[[ATTR1]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.0*, align 4
|
||||
// CHECK2-NEXT: [[A_ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 4
|
||||
// CHECK2-NEXT: [[B_ADDR:%.*]] = alloca [10 x i32]*, align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: store %struct.anon.0* [[__CONTEXT]], %struct.anon.0** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load %struct.anon.0*, %struct.anon.0** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_0:%.*]], %struct.anon.0* [[TMP0]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 4
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[TMP0]], i32 0, i32 1
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = load i16*, i16** [[TMP3]], align 4
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[TMP0]], i32 0, i32 2
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = load [10 x i32]*, [10 x i32]** [[TMP5]], align 4
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK2-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP7]], 1
|
||||
// CHECK2-NEXT: store i32 [[ADD]], i32* [[TMP2]], align 4
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = load i16, i16* [[TMP4]], align 2
|
||||
// CHECK2-NEXT: [[CONV:%.*]] = sext i16 [[TMP8]] to i32
|
||||
// CHECK2-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 4
|
||||
// CHECK2-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 4
|
||||
// CHECK2-NEXT: store [10 x i32]* [[B]], [10 x i32]** [[B_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load i32*, i32** [[A_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = load i16*, i16** [[AA_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load [10 x i32]*, [10 x i32]** [[B_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK2-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP3]], 1
|
||||
// CHECK2-NEXT: store i32 [[ADD]], i32* [[TMP0]], align 4
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = load i16, i16* [[TMP1]], align 2
|
||||
// CHECK2-NEXT: [[CONV:%.*]] = sext i16 [[TMP4]] to i32
|
||||
// CHECK2-NEXT: [[ADD1:%.*]] = add nsw i32 [[CONV]], 1
|
||||
// CHECK2-NEXT: [[CONV2:%.*]] = trunc i32 [[ADD1]] to i16
|
||||
// CHECK2-NEXT: store i16 [[CONV2]], i16* [[TMP4]], align 2
|
||||
// CHECK2-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [10 x i32], [10 x i32]* [[TMP6]], i32 0, i32 2
|
||||
// CHECK2-NEXT: [[TMP9:%.*]] = load i32, i32* [[ARRAYIDX]], align 4
|
||||
// CHECK2-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP9]], 1
|
||||
// CHECK2-NEXT: store i16 [[CONV2]], i16* [[TMP1]], align 2
|
||||
// CHECK2-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [10 x i32], [10 x i32]* [[TMP2]], i32 0, i32 2
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = load i32, i32* [[ARRAYIDX]], align 4
|
||||
// CHECK2-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP5]], 1
|
||||
// CHECK2-NEXT: store i32 [[ADD3]], i32* [[ARRAYIDX]], align 4
|
||||
// CHECK2-NEXT: ret void
|
||||
//
|
||||
|
@ -299,7 +271,6 @@ int bar(int n){
|
|||
// CHECK3-SAME: (i16* nonnull align 2 dereferenceable(2) [[AA:%.*]]) #[[ATTR0:[0-9]+]] {
|
||||
// CHECK3-NEXT: entry:
|
||||
// CHECK3-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 4
|
||||
// CHECK3-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 4
|
||||
// CHECK3-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 4
|
||||
// CHECK3-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = load i16*, i16** [[AA_ADDR]], align 4
|
||||
|
@ -308,17 +279,11 @@ int bar(int n){
|
|||
// CHECK3-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
|
||||
// CHECK3: user_code.entry:
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB2:[0-9]+]])
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK3-NEXT: store i16* [[TMP0]], i16** [[TMP3]], align 4
|
||||
// CHECK3-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK3-NEXT: [[TMP5:%.*]] = call i8* @__kmpc_alloc_shared(i32 4)
|
||||
// CHECK3-NEXT: [[TMP6:%.*]] = load [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], align 4
|
||||
// CHECK3-NEXT: [[TMP7:%.*]] = bitcast i8* [[TMP5]] to %struct.anon*
|
||||
// CHECK3-NEXT: store [[STRUCT_ANON]] [[TMP6]], %struct.anon* [[TMP7]], align 4
|
||||
// CHECK3-NEXT: store i8* [[TMP5]], i8** [[TMP4]], align 4
|
||||
// CHECK3-NEXT: [[TMP8:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK3-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP2]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon*)* @__omp_outlined__ to i8*), i8* null, i8** [[TMP8]], i32 1)
|
||||
// CHECK3-NEXT: call void @__kmpc_free_shared(i8* [[TMP5]], i32 4)
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK3-NEXT: [[TMP4:%.*]] = bitcast i16* [[TMP0]] to i8*
|
||||
// CHECK3-NEXT: store i8* [[TMP4]], i8** [[TMP3]], align 4
|
||||
// CHECK3-NEXT: [[TMP5:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK3-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP2]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i16*)* @__omp_outlined__ to i8*), i8* null, i8** [[TMP5]], i32 1)
|
||||
// CHECK3-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 true, i1 true)
|
||||
// CHECK3-NEXT: ret void
|
||||
// CHECK3: worker.exit:
|
||||
|
@ -326,22 +291,20 @@ int bar(int n){
|
|||
//
|
||||
//
|
||||
// CHECK3-LABEL: define {{[^@]+}}@__omp_outlined__
|
||||
// CHECK3-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK3-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i16* nonnull align 2 dereferenceable(2) [[AA:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK3-NEXT: entry:
|
||||
// CHECK3-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK3-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK3-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 4
|
||||
// CHECK3-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 4
|
||||
// CHECK3-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK3-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK3-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = load i16*, i16** [[TMP1]], align 4
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = load i16, i16* [[TMP2]], align 2
|
||||
// CHECK3-NEXT: [[CONV:%.*]] = sext i16 [[TMP3]] to i32
|
||||
// CHECK3-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = load i16*, i16** [[AA_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP1:%.*]] = load i16, i16* [[TMP0]], align 2
|
||||
// CHECK3-NEXT: [[CONV:%.*]] = sext i16 [[TMP1]] to i32
|
||||
// CHECK3-NEXT: [[ADD:%.*]] = add nsw i32 [[CONV]], 1
|
||||
// CHECK3-NEXT: [[CONV1:%.*]] = trunc i32 [[ADD]] to i16
|
||||
// CHECK3-NEXT: store i16 [[CONV1]], i16* [[TMP2]], align 2
|
||||
// CHECK3-NEXT: store i16 [[CONV1]], i16* [[TMP0]], align 2
|
||||
// CHECK3-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -352,8 +315,7 @@ int bar(int n){
|
|||
// CHECK3-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 4
|
||||
// CHECK3-NEXT: [[B_ADDR:%.*]] = alloca [10 x i32]*, align 4
|
||||
// CHECK3-NEXT: [[DOTCAPTURE_EXPR__ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK3-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON_0:%.*]], align 4
|
||||
// CHECK3-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 4
|
||||
// CHECK3-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [3 x i8*], align 4
|
||||
// CHECK3-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 4
|
||||
// CHECK3-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 4
|
||||
// CHECK3-NEXT: store [10 x i32]* [[B]], [10 x i32]** [[B_ADDR]], align 4
|
||||
|
@ -367,21 +329,17 @@ int bar(int n){
|
|||
// CHECK3: user_code.entry:
|
||||
// CHECK3-NEXT: [[TMP4:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB2]])
|
||||
// CHECK3-NEXT: [[TMP5:%.*]] = load i32, i32* [[DOTCAPTURE_EXPR__ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK3-NEXT: store i32* [[TMP0]], i32** [[TMP6]], align 4
|
||||
// CHECK3-NEXT: [[TMP7:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 1
|
||||
// CHECK3-NEXT: store i16* [[TMP1]], i16** [[TMP7]], align 4
|
||||
// CHECK3-NEXT: [[TMP8:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 2
|
||||
// CHECK3-NEXT: store [10 x i32]* [[TMP2]], [10 x i32]** [[TMP8]], align 4
|
||||
// CHECK3-NEXT: [[TMP9:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK3-NEXT: [[TMP10:%.*]] = call i8* @__kmpc_alloc_shared(i32 12)
|
||||
// CHECK3-NEXT: [[TMP11:%.*]] = load [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], align 4
|
||||
// CHECK3-NEXT: [[TMP12:%.*]] = bitcast i8* [[TMP10]] to %struct.anon.0*
|
||||
// CHECK3-NEXT: store [[STRUCT_ANON_0]] [[TMP11]], %struct.anon.0* [[TMP12]], align 4
|
||||
// CHECK3-NEXT: store i8* [[TMP10]], i8** [[TMP9]], align 4
|
||||
// CHECK3-NEXT: [[TMP13:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK3-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP4]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon.0*)* @__omp_outlined__1 to i8*), i8* null, i8** [[TMP13]], i32 1)
|
||||
// CHECK3-NEXT: call void @__kmpc_free_shared(i8* [[TMP10]], i32 12)
|
||||
// CHECK3-NEXT: [[TMP6:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK3-NEXT: [[TMP7:%.*]] = bitcast i32* [[TMP0]] to i8*
|
||||
// CHECK3-NEXT: store i8* [[TMP7]], i8** [[TMP6]], align 4
|
||||
// CHECK3-NEXT: [[TMP8:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
|
||||
// CHECK3-NEXT: [[TMP9:%.*]] = bitcast i16* [[TMP1]] to i8*
|
||||
// CHECK3-NEXT: store i8* [[TMP9]], i8** [[TMP8]], align 4
|
||||
// CHECK3-NEXT: [[TMP10:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 2
|
||||
// CHECK3-NEXT: [[TMP11:%.*]] = bitcast [10 x i32]* [[TMP2]] to i8*
|
||||
// CHECK3-NEXT: store i8* [[TMP11]], i8** [[TMP10]], align 4
|
||||
// CHECK3-NEXT: [[TMP12:%.*]] = bitcast [3 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK3-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP4]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i32*, i16*, [10 x i32]*)* @__omp_outlined__1 to i8*), i8* null, i8** [[TMP12]], i32 3)
|
||||
// CHECK3-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 true, i1 true)
|
||||
// CHECK3-NEXT: ret void
|
||||
// CHECK3: worker.exit:
|
||||
|
@ -389,32 +347,32 @@ int bar(int n){
|
|||
//
|
||||
//
|
||||
// CHECK3-LABEL: define {{[^@]+}}@__omp_outlined__1
|
||||
// CHECK3-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.0* noalias [[__CONTEXT:%.*]]) #[[ATTR1]] {
|
||||
// CHECK3-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[A:%.*]], i16* nonnull align 2 dereferenceable(2) [[AA:%.*]], [10 x i32]* nonnull align 4 dereferenceable(40) [[B:%.*]]) #[[ATTR1]] {
|
||||
// CHECK3-NEXT: entry:
|
||||
// CHECK3-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK3-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK3-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.0*, align 4
|
||||
// CHECK3-NEXT: [[A_ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK3-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 4
|
||||
// CHECK3-NEXT: [[B_ADDR:%.*]] = alloca [10 x i32]*, align 4
|
||||
// CHECK3-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK3-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK3-NEXT: store %struct.anon.0* [[__CONTEXT]], %struct.anon.0** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = load %struct.anon.0*, %struct.anon.0** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_0:%.*]], %struct.anon.0* [[TMP0]], i32 0, i32 0
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 4
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[TMP0]], i32 0, i32 1
|
||||
// CHECK3-NEXT: [[TMP4:%.*]] = load i16*, i16** [[TMP3]], align 4
|
||||
// CHECK3-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[TMP0]], i32 0, i32 2
|
||||
// CHECK3-NEXT: [[TMP6:%.*]] = load [10 x i32]*, [10 x i32]** [[TMP5]], align 4
|
||||
// CHECK3-NEXT: [[TMP7:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK3-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP7]], 1
|
||||
// CHECK3-NEXT: store i32 [[ADD]], i32* [[TMP2]], align 4
|
||||
// CHECK3-NEXT: [[TMP8:%.*]] = load i16, i16* [[TMP4]], align 2
|
||||
// CHECK3-NEXT: [[CONV:%.*]] = sext i16 [[TMP8]] to i32
|
||||
// CHECK3-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 4
|
||||
// CHECK3-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 4
|
||||
// CHECK3-NEXT: store [10 x i32]* [[B]], [10 x i32]** [[B_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = load i32*, i32** [[A_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP1:%.*]] = load i16*, i16** [[AA_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = load [10 x i32]*, [10 x i32]** [[B_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK3-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP3]], 1
|
||||
// CHECK3-NEXT: store i32 [[ADD]], i32* [[TMP0]], align 4
|
||||
// CHECK3-NEXT: [[TMP4:%.*]] = load i16, i16* [[TMP1]], align 2
|
||||
// CHECK3-NEXT: [[CONV:%.*]] = sext i16 [[TMP4]] to i32
|
||||
// CHECK3-NEXT: [[ADD1:%.*]] = add nsw i32 [[CONV]], 1
|
||||
// CHECK3-NEXT: [[CONV2:%.*]] = trunc i32 [[ADD1]] to i16
|
||||
// CHECK3-NEXT: store i16 [[CONV2]], i16* [[TMP4]], align 2
|
||||
// CHECK3-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [10 x i32], [10 x i32]* [[TMP6]], i32 0, i32 2
|
||||
// CHECK3-NEXT: [[TMP9:%.*]] = load i32, i32* [[ARRAYIDX]], align 4
|
||||
// CHECK3-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP9]], 1
|
||||
// CHECK3-NEXT: store i16 [[CONV2]], i16* [[TMP1]], align 2
|
||||
// CHECK3-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [10 x i32], [10 x i32]* [[TMP2]], i32 0, i32 2
|
||||
// CHECK3-NEXT: [[TMP5:%.*]] = load i32, i32* [[ARRAYIDX]], align 4
|
||||
// CHECK3-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP5]], 1
|
||||
// CHECK3-NEXT: store i32 [[ADD3]], i32* [[ARRAYIDX]], align 4
|
||||
// CHECK3-NEXT: ret void
|
||||
//
|
||||
|
@ -423,7 +381,6 @@ int bar(int n){
|
|||
// CHECK4-SAME: (i16* nonnull align 2 dereferenceable(2) [[AA:%.*]]) #[[ATTR0:[0-9]+]] {
|
||||
// CHECK4-NEXT: entry:
|
||||
// CHECK4-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 8
|
||||
// CHECK4-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 8
|
||||
// CHECK4-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 8
|
||||
// CHECK4-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 8
|
||||
// CHECK4-NEXT: [[TMP0:%.*]] = load i16*, i16** [[AA_ADDR]], align 8
|
||||
|
@ -432,17 +389,11 @@ int bar(int n){
|
|||
// CHECK4-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
|
||||
// CHECK4: user_code.entry:
|
||||
// CHECK4-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB2:[0-9]+]])
|
||||
// CHECK4-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK4-NEXT: store i16* [[TMP0]], i16** [[TMP3]], align 8
|
||||
// CHECK4-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
|
||||
// CHECK4-NEXT: [[TMP5:%.*]] = call i8* @__kmpc_alloc_shared(i64 8)
|
||||
// CHECK4-NEXT: [[TMP6:%.*]] = load [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], align 8
|
||||
// CHECK4-NEXT: [[TMP7:%.*]] = bitcast i8* [[TMP5]] to %struct.anon*
|
||||
// CHECK4-NEXT: store [[STRUCT_ANON]] [[TMP6]], %struct.anon* [[TMP7]], align 8
|
||||
// CHECK4-NEXT: store i8* [[TMP5]], i8** [[TMP4]], align 8
|
||||
// CHECK4-NEXT: [[TMP8:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK4-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP2]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon*)* @__omp_outlined__ to i8*), i8* null, i8** [[TMP8]], i64 1)
|
||||
// CHECK4-NEXT: call void @__kmpc_free_shared(i8* [[TMP5]], i64 8)
|
||||
// CHECK4-NEXT: [[TMP3:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
|
||||
// CHECK4-NEXT: [[TMP4:%.*]] = bitcast i16* [[TMP0]] to i8*
|
||||
// CHECK4-NEXT: store i8* [[TMP4]], i8** [[TMP3]], align 8
|
||||
// CHECK4-NEXT: [[TMP5:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK4-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP2]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i16*)* @__omp_outlined__ to i8*), i8* null, i8** [[TMP5]], i64 1)
|
||||
// CHECK4-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 true, i1 true)
|
||||
// CHECK4-NEXT: ret void
|
||||
// CHECK4: worker.exit:
|
||||
|
@ -450,22 +401,20 @@ int bar(int n){
|
|||
//
|
||||
//
|
||||
// CHECK4-LABEL: define {{[^@]+}}@__omp_outlined__
|
||||
// CHECK4-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK4-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i16* nonnull align 2 dereferenceable(2) [[AA:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK4-NEXT: entry:
|
||||
// CHECK4-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK4-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK4-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK4-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 8
|
||||
// CHECK4-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK4-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK4-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK4-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK4-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK4-NEXT: [[TMP2:%.*]] = load i16*, i16** [[TMP1]], align 8
|
||||
// CHECK4-NEXT: [[TMP3:%.*]] = load i16, i16* [[TMP2]], align 2
|
||||
// CHECK4-NEXT: [[CONV:%.*]] = sext i16 [[TMP3]] to i32
|
||||
// CHECK4-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 8
|
||||
// CHECK4-NEXT: [[TMP0:%.*]] = load i16*, i16** [[AA_ADDR]], align 8
|
||||
// CHECK4-NEXT: [[TMP1:%.*]] = load i16, i16* [[TMP0]], align 2
|
||||
// CHECK4-NEXT: [[CONV:%.*]] = sext i16 [[TMP1]] to i32
|
||||
// CHECK4-NEXT: [[ADD:%.*]] = add nsw i32 [[CONV]], 1
|
||||
// CHECK4-NEXT: [[CONV1:%.*]] = trunc i32 [[ADD]] to i16
|
||||
// CHECK4-NEXT: store i16 [[CONV1]], i16* [[TMP2]], align 2
|
||||
// CHECK4-NEXT: store i16 [[CONV1]], i16* [[TMP0]], align 2
|
||||
// CHECK4-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -476,8 +425,7 @@ int bar(int n){
|
|||
// CHECK4-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 8
|
||||
// CHECK4-NEXT: [[B_ADDR:%.*]] = alloca [10 x i32]*, align 8
|
||||
// CHECK4-NEXT: [[DOTCAPTURE_EXPR__ADDR:%.*]] = alloca i64, align 8
|
||||
// CHECK4-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON_0:%.*]], align 8
|
||||
// CHECK4-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 8
|
||||
// CHECK4-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [3 x i8*], align 8
|
||||
// CHECK4-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 8
|
||||
// CHECK4-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 8
|
||||
// CHECK4-NEXT: store [10 x i32]* [[B]], [10 x i32]** [[B_ADDR]], align 8
|
||||
|
@ -492,21 +440,17 @@ int bar(int n){
|
|||
// CHECK4: user_code.entry:
|
||||
// CHECK4-NEXT: [[TMP4:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB2]])
|
||||
// CHECK4-NEXT: [[TMP5:%.*]] = load i32, i32* [[CONV]], align 8
|
||||
// CHECK4-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK4-NEXT: store i32* [[TMP0]], i32** [[TMP6]], align 8
|
||||
// CHECK4-NEXT: [[TMP7:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 1
|
||||
// CHECK4-NEXT: store i16* [[TMP1]], i16** [[TMP7]], align 8
|
||||
// CHECK4-NEXT: [[TMP8:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 2
|
||||
// CHECK4-NEXT: store [10 x i32]* [[TMP2]], [10 x i32]** [[TMP8]], align 8
|
||||
// CHECK4-NEXT: [[TMP9:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
|
||||
// CHECK4-NEXT: [[TMP10:%.*]] = call i8* @__kmpc_alloc_shared(i64 24)
|
||||
// CHECK4-NEXT: [[TMP11:%.*]] = load [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], align 8
|
||||
// CHECK4-NEXT: [[TMP12:%.*]] = bitcast i8* [[TMP10]] to %struct.anon.0*
|
||||
// CHECK4-NEXT: store [[STRUCT_ANON_0]] [[TMP11]], %struct.anon.0* [[TMP12]], align 8
|
||||
// CHECK4-NEXT: store i8* [[TMP10]], i8** [[TMP9]], align 8
|
||||
// CHECK4-NEXT: [[TMP13:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK4-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP4]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon.0*)* @__omp_outlined__1 to i8*), i8* null, i8** [[TMP13]], i64 1)
|
||||
// CHECK4-NEXT: call void @__kmpc_free_shared(i8* [[TMP10]], i64 24)
|
||||
// CHECK4-NEXT: [[TMP6:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
|
||||
// CHECK4-NEXT: [[TMP7:%.*]] = bitcast i32* [[TMP0]] to i8*
|
||||
// CHECK4-NEXT: store i8* [[TMP7]], i8** [[TMP6]], align 8
|
||||
// CHECK4-NEXT: [[TMP8:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 1
|
||||
// CHECK4-NEXT: [[TMP9:%.*]] = bitcast i16* [[TMP1]] to i8*
|
||||
// CHECK4-NEXT: store i8* [[TMP9]], i8** [[TMP8]], align 8
|
||||
// CHECK4-NEXT: [[TMP10:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 2
|
||||
// CHECK4-NEXT: [[TMP11:%.*]] = bitcast [10 x i32]* [[TMP2]] to i8*
|
||||
// CHECK4-NEXT: store i8* [[TMP11]], i8** [[TMP10]], align 8
|
||||
// CHECK4-NEXT: [[TMP12:%.*]] = bitcast [3 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK4-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP4]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i32*, i16*, [10 x i32]*)* @__omp_outlined__1 to i8*), i8* null, i8** [[TMP12]], i64 3)
|
||||
// CHECK4-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 true, i1 true)
|
||||
// CHECK4-NEXT: ret void
|
||||
// CHECK4: worker.exit:
|
||||
|
@ -514,32 +458,32 @@ int bar(int n){
|
|||
//
|
||||
//
|
||||
// CHECK4-LABEL: define {{[^@]+}}@__omp_outlined__1
|
||||
// CHECK4-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.0* noalias [[__CONTEXT:%.*]]) #[[ATTR1]] {
|
||||
// CHECK4-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[A:%.*]], i16* nonnull align 2 dereferenceable(2) [[AA:%.*]], [10 x i32]* nonnull align 4 dereferenceable(40) [[B:%.*]]) #[[ATTR1]] {
|
||||
// CHECK4-NEXT: entry:
|
||||
// CHECK4-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK4-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK4-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.0*, align 8
|
||||
// CHECK4-NEXT: [[A_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK4-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 8
|
||||
// CHECK4-NEXT: [[B_ADDR:%.*]] = alloca [10 x i32]*, align 8
|
||||
// CHECK4-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK4-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK4-NEXT: store %struct.anon.0* [[__CONTEXT]], %struct.anon.0** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK4-NEXT: [[TMP0:%.*]] = load %struct.anon.0*, %struct.anon.0** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK4-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_0:%.*]], %struct.anon.0* [[TMP0]], i32 0, i32 0
|
||||
// CHECK4-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 8
|
||||
// CHECK4-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[TMP0]], i32 0, i32 1
|
||||
// CHECK4-NEXT: [[TMP4:%.*]] = load i16*, i16** [[TMP3]], align 8
|
||||
// CHECK4-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[TMP0]], i32 0, i32 2
|
||||
// CHECK4-NEXT: [[TMP6:%.*]] = load [10 x i32]*, [10 x i32]** [[TMP5]], align 8
|
||||
// CHECK4-NEXT: [[TMP7:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK4-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP7]], 1
|
||||
// CHECK4-NEXT: store i32 [[ADD]], i32* [[TMP2]], align 4
|
||||
// CHECK4-NEXT: [[TMP8:%.*]] = load i16, i16* [[TMP4]], align 2
|
||||
// CHECK4-NEXT: [[CONV:%.*]] = sext i16 [[TMP8]] to i32
|
||||
// CHECK4-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 8
|
||||
// CHECK4-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 8
|
||||
// CHECK4-NEXT: store [10 x i32]* [[B]], [10 x i32]** [[B_ADDR]], align 8
|
||||
// CHECK4-NEXT: [[TMP0:%.*]] = load i32*, i32** [[A_ADDR]], align 8
|
||||
// CHECK4-NEXT: [[TMP1:%.*]] = load i16*, i16** [[AA_ADDR]], align 8
|
||||
// CHECK4-NEXT: [[TMP2:%.*]] = load [10 x i32]*, [10 x i32]** [[B_ADDR]], align 8
|
||||
// CHECK4-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK4-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP3]], 1
|
||||
// CHECK4-NEXT: store i32 [[ADD]], i32* [[TMP0]], align 4
|
||||
// CHECK4-NEXT: [[TMP4:%.*]] = load i16, i16* [[TMP1]], align 2
|
||||
// CHECK4-NEXT: [[CONV:%.*]] = sext i16 [[TMP4]] to i32
|
||||
// CHECK4-NEXT: [[ADD1:%.*]] = add nsw i32 [[CONV]], 1
|
||||
// CHECK4-NEXT: [[CONV2:%.*]] = trunc i32 [[ADD1]] to i16
|
||||
// CHECK4-NEXT: store i16 [[CONV2]], i16* [[TMP4]], align 2
|
||||
// CHECK4-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [10 x i32], [10 x i32]* [[TMP6]], i64 0, i64 2
|
||||
// CHECK4-NEXT: [[TMP9:%.*]] = load i32, i32* [[ARRAYIDX]], align 4
|
||||
// CHECK4-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP9]], 1
|
||||
// CHECK4-NEXT: store i16 [[CONV2]], i16* [[TMP1]], align 2
|
||||
// CHECK4-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [10 x i32], [10 x i32]* [[TMP2]], i64 0, i64 2
|
||||
// CHECK4-NEXT: [[TMP5:%.*]] = load i32, i32* [[ARRAYIDX]], align 4
|
||||
// CHECK4-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP5]], 1
|
||||
// CHECK4-NEXT: store i32 [[ADD3]], i32* [[ARRAYIDX]], align 4
|
||||
// CHECK4-NEXT: ret void
|
||||
//
|
||||
|
@ -548,7 +492,6 @@ int bar(int n){
|
|||
// CHECK5-SAME: (i16* nonnull align 2 dereferenceable(2) [[AA:%.*]]) #[[ATTR0:[0-9]+]] {
|
||||
// CHECK5-NEXT: entry:
|
||||
// CHECK5-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 4
|
||||
// CHECK5-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 4
|
||||
// CHECK5-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 4
|
||||
// CHECK5-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 4
|
||||
// CHECK5-NEXT: [[TMP0:%.*]] = load i16*, i16** [[AA_ADDR]], align 4
|
||||
|
@ -557,17 +500,11 @@ int bar(int n){
|
|||
// CHECK5-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
|
||||
// CHECK5: user_code.entry:
|
||||
// CHECK5-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB2:[0-9]+]])
|
||||
// CHECK5-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK5-NEXT: store i16* [[TMP0]], i16** [[TMP3]], align 4
|
||||
// CHECK5-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK5-NEXT: [[TMP5:%.*]] = call i8* @__kmpc_alloc_shared(i32 4)
|
||||
// CHECK5-NEXT: [[TMP6:%.*]] = load [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], align 4
|
||||
// CHECK5-NEXT: [[TMP7:%.*]] = bitcast i8* [[TMP5]] to %struct.anon*
|
||||
// CHECK5-NEXT: store [[STRUCT_ANON]] [[TMP6]], %struct.anon* [[TMP7]], align 4
|
||||
// CHECK5-NEXT: store i8* [[TMP5]], i8** [[TMP4]], align 4
|
||||
// CHECK5-NEXT: [[TMP8:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK5-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP2]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon*)* @__omp_outlined__ to i8*), i8* null, i8** [[TMP8]], i32 1)
|
||||
// CHECK5-NEXT: call void @__kmpc_free_shared(i8* [[TMP5]], i32 4)
|
||||
// CHECK5-NEXT: [[TMP3:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK5-NEXT: [[TMP4:%.*]] = bitcast i16* [[TMP0]] to i8*
|
||||
// CHECK5-NEXT: store i8* [[TMP4]], i8** [[TMP3]], align 4
|
||||
// CHECK5-NEXT: [[TMP5:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK5-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP2]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i16*)* @__omp_outlined__ to i8*), i8* null, i8** [[TMP5]], i32 1)
|
||||
// CHECK5-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 true, i1 true)
|
||||
// CHECK5-NEXT: ret void
|
||||
// CHECK5: worker.exit:
|
||||
|
@ -575,22 +512,20 @@ int bar(int n){
|
|||
//
|
||||
//
|
||||
// CHECK5-LABEL: define {{[^@]+}}@__omp_outlined__
|
||||
// CHECK5-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK5-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i16* nonnull align 2 dereferenceable(2) [[AA:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK5-NEXT: entry:
|
||||
// CHECK5-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK5-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK5-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 4
|
||||
// CHECK5-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 4
|
||||
// CHECK5-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK5-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK5-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK5-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK5-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK5-NEXT: [[TMP2:%.*]] = load i16*, i16** [[TMP1]], align 4
|
||||
// CHECK5-NEXT: [[TMP3:%.*]] = load i16, i16* [[TMP2]], align 2
|
||||
// CHECK5-NEXT: [[CONV:%.*]] = sext i16 [[TMP3]] to i32
|
||||
// CHECK5-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 4
|
||||
// CHECK5-NEXT: [[TMP0:%.*]] = load i16*, i16** [[AA_ADDR]], align 4
|
||||
// CHECK5-NEXT: [[TMP1:%.*]] = load i16, i16* [[TMP0]], align 2
|
||||
// CHECK5-NEXT: [[CONV:%.*]] = sext i16 [[TMP1]] to i32
|
||||
// CHECK5-NEXT: [[ADD:%.*]] = add nsw i32 [[CONV]], 1
|
||||
// CHECK5-NEXT: [[CONV1:%.*]] = trunc i32 [[ADD]] to i16
|
||||
// CHECK5-NEXT: store i16 [[CONV1]], i16* [[TMP2]], align 2
|
||||
// CHECK5-NEXT: store i16 [[CONV1]], i16* [[TMP0]], align 2
|
||||
// CHECK5-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -601,8 +536,7 @@ int bar(int n){
|
|||
// CHECK5-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 4
|
||||
// CHECK5-NEXT: [[B_ADDR:%.*]] = alloca [10 x i32]*, align 4
|
||||
// CHECK5-NEXT: [[DOTCAPTURE_EXPR__ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK5-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON_0:%.*]], align 4
|
||||
// CHECK5-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 4
|
||||
// CHECK5-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [3 x i8*], align 4
|
||||
// CHECK5-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 4
|
||||
// CHECK5-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 4
|
||||
// CHECK5-NEXT: store [10 x i32]* [[B]], [10 x i32]** [[B_ADDR]], align 4
|
||||
|
@ -616,21 +550,17 @@ int bar(int n){
|
|||
// CHECK5: user_code.entry:
|
||||
// CHECK5-NEXT: [[TMP4:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB2]])
|
||||
// CHECK5-NEXT: [[TMP5:%.*]] = load i32, i32* [[DOTCAPTURE_EXPR__ADDR]], align 4
|
||||
// CHECK5-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK5-NEXT: store i32* [[TMP0]], i32** [[TMP6]], align 4
|
||||
// CHECK5-NEXT: [[TMP7:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 1
|
||||
// CHECK5-NEXT: store i16* [[TMP1]], i16** [[TMP7]], align 4
|
||||
// CHECK5-NEXT: [[TMP8:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 2
|
||||
// CHECK5-NEXT: store [10 x i32]* [[TMP2]], [10 x i32]** [[TMP8]], align 4
|
||||
// CHECK5-NEXT: [[TMP9:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK5-NEXT: [[TMP10:%.*]] = call i8* @__kmpc_alloc_shared(i32 12)
|
||||
// CHECK5-NEXT: [[TMP11:%.*]] = load [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], align 4
|
||||
// CHECK5-NEXT: [[TMP12:%.*]] = bitcast i8* [[TMP10]] to %struct.anon.0*
|
||||
// CHECK5-NEXT: store [[STRUCT_ANON_0]] [[TMP11]], %struct.anon.0* [[TMP12]], align 4
|
||||
// CHECK5-NEXT: store i8* [[TMP10]], i8** [[TMP9]], align 4
|
||||
// CHECK5-NEXT: [[TMP13:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK5-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP4]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon.0*)* @__omp_outlined__1 to i8*), i8* null, i8** [[TMP13]], i32 1)
|
||||
// CHECK5-NEXT: call void @__kmpc_free_shared(i8* [[TMP10]], i32 12)
|
||||
// CHECK5-NEXT: [[TMP6:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK5-NEXT: [[TMP7:%.*]] = bitcast i32* [[TMP0]] to i8*
|
||||
// CHECK5-NEXT: store i8* [[TMP7]], i8** [[TMP6]], align 4
|
||||
// CHECK5-NEXT: [[TMP8:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
|
||||
// CHECK5-NEXT: [[TMP9:%.*]] = bitcast i16* [[TMP1]] to i8*
|
||||
// CHECK5-NEXT: store i8* [[TMP9]], i8** [[TMP8]], align 4
|
||||
// CHECK5-NEXT: [[TMP10:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 2
|
||||
// CHECK5-NEXT: [[TMP11:%.*]] = bitcast [10 x i32]* [[TMP2]] to i8*
|
||||
// CHECK5-NEXT: store i8* [[TMP11]], i8** [[TMP10]], align 4
|
||||
// CHECK5-NEXT: [[TMP12:%.*]] = bitcast [3 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK5-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP4]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i32*, i16*, [10 x i32]*)* @__omp_outlined__1 to i8*), i8* null, i8** [[TMP12]], i32 3)
|
||||
// CHECK5-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 true, i1 true)
|
||||
// CHECK5-NEXT: ret void
|
||||
// CHECK5: worker.exit:
|
||||
|
@ -638,32 +568,32 @@ int bar(int n){
|
|||
//
|
||||
//
|
||||
// CHECK5-LABEL: define {{[^@]+}}@__omp_outlined__1
|
||||
// CHECK5-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.0* noalias [[__CONTEXT:%.*]]) #[[ATTR1]] {
|
||||
// CHECK5-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[A:%.*]], i16* nonnull align 2 dereferenceable(2) [[AA:%.*]], [10 x i32]* nonnull align 4 dereferenceable(40) [[B:%.*]]) #[[ATTR1]] {
|
||||
// CHECK5-NEXT: entry:
|
||||
// CHECK5-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK5-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK5-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.0*, align 4
|
||||
// CHECK5-NEXT: [[A_ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK5-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 4
|
||||
// CHECK5-NEXT: [[B_ADDR:%.*]] = alloca [10 x i32]*, align 4
|
||||
// CHECK5-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK5-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK5-NEXT: store %struct.anon.0* [[__CONTEXT]], %struct.anon.0** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK5-NEXT: [[TMP0:%.*]] = load %struct.anon.0*, %struct.anon.0** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK5-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_0:%.*]], %struct.anon.0* [[TMP0]], i32 0, i32 0
|
||||
// CHECK5-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 4
|
||||
// CHECK5-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[TMP0]], i32 0, i32 1
|
||||
// CHECK5-NEXT: [[TMP4:%.*]] = load i16*, i16** [[TMP3]], align 4
|
||||
// CHECK5-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[TMP0]], i32 0, i32 2
|
||||
// CHECK5-NEXT: [[TMP6:%.*]] = load [10 x i32]*, [10 x i32]** [[TMP5]], align 4
|
||||
// CHECK5-NEXT: [[TMP7:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK5-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP7]], 1
|
||||
// CHECK5-NEXT: store i32 [[ADD]], i32* [[TMP2]], align 4
|
||||
// CHECK5-NEXT: [[TMP8:%.*]] = load i16, i16* [[TMP4]], align 2
|
||||
// CHECK5-NEXT: [[CONV:%.*]] = sext i16 [[TMP8]] to i32
|
||||
// CHECK5-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 4
|
||||
// CHECK5-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 4
|
||||
// CHECK5-NEXT: store [10 x i32]* [[B]], [10 x i32]** [[B_ADDR]], align 4
|
||||
// CHECK5-NEXT: [[TMP0:%.*]] = load i32*, i32** [[A_ADDR]], align 4
|
||||
// CHECK5-NEXT: [[TMP1:%.*]] = load i16*, i16** [[AA_ADDR]], align 4
|
||||
// CHECK5-NEXT: [[TMP2:%.*]] = load [10 x i32]*, [10 x i32]** [[B_ADDR]], align 4
|
||||
// CHECK5-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK5-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP3]], 1
|
||||
// CHECK5-NEXT: store i32 [[ADD]], i32* [[TMP0]], align 4
|
||||
// CHECK5-NEXT: [[TMP4:%.*]] = load i16, i16* [[TMP1]], align 2
|
||||
// CHECK5-NEXT: [[CONV:%.*]] = sext i16 [[TMP4]] to i32
|
||||
// CHECK5-NEXT: [[ADD1:%.*]] = add nsw i32 [[CONV]], 1
|
||||
// CHECK5-NEXT: [[CONV2:%.*]] = trunc i32 [[ADD1]] to i16
|
||||
// CHECK5-NEXT: store i16 [[CONV2]], i16* [[TMP4]], align 2
|
||||
// CHECK5-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [10 x i32], [10 x i32]* [[TMP6]], i32 0, i32 2
|
||||
// CHECK5-NEXT: [[TMP9:%.*]] = load i32, i32* [[ARRAYIDX]], align 4
|
||||
// CHECK5-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP9]], 1
|
||||
// CHECK5-NEXT: store i16 [[CONV2]], i16* [[TMP1]], align 2
|
||||
// CHECK5-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [10 x i32], [10 x i32]* [[TMP2]], i32 0, i32 2
|
||||
// CHECK5-NEXT: [[TMP5:%.*]] = load i32, i32* [[ARRAYIDX]], align 4
|
||||
// CHECK5-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP5]], 1
|
||||
// CHECK5-NEXT: store i32 [[ADD3]], i32* [[ARRAYIDX]], align 4
|
||||
// CHECK5-NEXT: ret void
|
||||
//
|
||||
|
@ -672,7 +602,6 @@ int bar(int n){
|
|||
// CHECK6-SAME: (i16* nonnull align 2 dereferenceable(2) [[AA:%.*]]) #[[ATTR0:[0-9]+]] {
|
||||
// CHECK6-NEXT: entry:
|
||||
// CHECK6-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 4
|
||||
// CHECK6-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 4
|
||||
// CHECK6-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 4
|
||||
// CHECK6-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 4
|
||||
// CHECK6-NEXT: [[TMP0:%.*]] = load i16*, i16** [[AA_ADDR]], align 4
|
||||
|
@ -681,17 +610,11 @@ int bar(int n){
|
|||
// CHECK6-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
|
||||
// CHECK6: user_code.entry:
|
||||
// CHECK6-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB2:[0-9]+]])
|
||||
// CHECK6-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK6-NEXT: store i16* [[TMP0]], i16** [[TMP3]], align 4
|
||||
// CHECK6-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK6-NEXT: [[TMP5:%.*]] = call i8* @__kmpc_alloc_shared(i32 4)
|
||||
// CHECK6-NEXT: [[TMP6:%.*]] = load [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], align 4
|
||||
// CHECK6-NEXT: [[TMP7:%.*]] = bitcast i8* [[TMP5]] to %struct.anon*
|
||||
// CHECK6-NEXT: store [[STRUCT_ANON]] [[TMP6]], %struct.anon* [[TMP7]], align 4
|
||||
// CHECK6-NEXT: store i8* [[TMP5]], i8** [[TMP4]], align 4
|
||||
// CHECK6-NEXT: [[TMP8:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK6-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP2]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon*)* @__omp_outlined__ to i8*), i8* null, i8** [[TMP8]], i32 1)
|
||||
// CHECK6-NEXT: call void @__kmpc_free_shared(i8* [[TMP5]], i32 4)
|
||||
// CHECK6-NEXT: [[TMP3:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK6-NEXT: [[TMP4:%.*]] = bitcast i16* [[TMP0]] to i8*
|
||||
// CHECK6-NEXT: store i8* [[TMP4]], i8** [[TMP3]], align 4
|
||||
// CHECK6-NEXT: [[TMP5:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK6-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP2]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i16*)* @__omp_outlined__ to i8*), i8* null, i8** [[TMP5]], i32 1)
|
||||
// CHECK6-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 true, i1 true)
|
||||
// CHECK6-NEXT: ret void
|
||||
// CHECK6: worker.exit:
|
||||
|
@ -699,22 +622,20 @@ int bar(int n){
|
|||
//
|
||||
//
|
||||
// CHECK6-LABEL: define {{[^@]+}}@__omp_outlined__
|
||||
// CHECK6-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK6-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i16* nonnull align 2 dereferenceable(2) [[AA:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK6-NEXT: entry:
|
||||
// CHECK6-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK6-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK6-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 4
|
||||
// CHECK6-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 4
|
||||
// CHECK6-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK6-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK6-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK6-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK6-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK6-NEXT: [[TMP2:%.*]] = load i16*, i16** [[TMP1]], align 4
|
||||
// CHECK6-NEXT: [[TMP3:%.*]] = load i16, i16* [[TMP2]], align 2
|
||||
// CHECK6-NEXT: [[CONV:%.*]] = sext i16 [[TMP3]] to i32
|
||||
// CHECK6-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 4
|
||||
// CHECK6-NEXT: [[TMP0:%.*]] = load i16*, i16** [[AA_ADDR]], align 4
|
||||
// CHECK6-NEXT: [[TMP1:%.*]] = load i16, i16* [[TMP0]], align 2
|
||||
// CHECK6-NEXT: [[CONV:%.*]] = sext i16 [[TMP1]] to i32
|
||||
// CHECK6-NEXT: [[ADD:%.*]] = add nsw i32 [[CONV]], 1
|
||||
// CHECK6-NEXT: [[CONV1:%.*]] = trunc i32 [[ADD]] to i16
|
||||
// CHECK6-NEXT: store i16 [[CONV1]], i16* [[TMP2]], align 2
|
||||
// CHECK6-NEXT: store i16 [[CONV1]], i16* [[TMP0]], align 2
|
||||
// CHECK6-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -725,8 +646,7 @@ int bar(int n){
|
|||
// CHECK6-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 4
|
||||
// CHECK6-NEXT: [[B_ADDR:%.*]] = alloca [10 x i32]*, align 4
|
||||
// CHECK6-NEXT: [[DOTCAPTURE_EXPR__ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK6-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON_0:%.*]], align 4
|
||||
// CHECK6-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 4
|
||||
// CHECK6-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [3 x i8*], align 4
|
||||
// CHECK6-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 4
|
||||
// CHECK6-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 4
|
||||
// CHECK6-NEXT: store [10 x i32]* [[B]], [10 x i32]** [[B_ADDR]], align 4
|
||||
|
@ -740,21 +660,17 @@ int bar(int n){
|
|||
// CHECK6: user_code.entry:
|
||||
// CHECK6-NEXT: [[TMP4:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB2]])
|
||||
// CHECK6-NEXT: [[TMP5:%.*]] = load i32, i32* [[DOTCAPTURE_EXPR__ADDR]], align 4
|
||||
// CHECK6-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK6-NEXT: store i32* [[TMP0]], i32** [[TMP6]], align 4
|
||||
// CHECK6-NEXT: [[TMP7:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 1
|
||||
// CHECK6-NEXT: store i16* [[TMP1]], i16** [[TMP7]], align 4
|
||||
// CHECK6-NEXT: [[TMP8:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 2
|
||||
// CHECK6-NEXT: store [10 x i32]* [[TMP2]], [10 x i32]** [[TMP8]], align 4
|
||||
// CHECK6-NEXT: [[TMP9:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK6-NEXT: [[TMP10:%.*]] = call i8* @__kmpc_alloc_shared(i32 12)
|
||||
// CHECK6-NEXT: [[TMP11:%.*]] = load [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], align 4
|
||||
// CHECK6-NEXT: [[TMP12:%.*]] = bitcast i8* [[TMP10]] to %struct.anon.0*
|
||||
// CHECK6-NEXT: store [[STRUCT_ANON_0]] [[TMP11]], %struct.anon.0* [[TMP12]], align 4
|
||||
// CHECK6-NEXT: store i8* [[TMP10]], i8** [[TMP9]], align 4
|
||||
// CHECK6-NEXT: [[TMP13:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK6-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP4]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon.0*)* @__omp_outlined__1 to i8*), i8* null, i8** [[TMP13]], i32 1)
|
||||
// CHECK6-NEXT: call void @__kmpc_free_shared(i8* [[TMP10]], i32 12)
|
||||
// CHECK6-NEXT: [[TMP6:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK6-NEXT: [[TMP7:%.*]] = bitcast i32* [[TMP0]] to i8*
|
||||
// CHECK6-NEXT: store i8* [[TMP7]], i8** [[TMP6]], align 4
|
||||
// CHECK6-NEXT: [[TMP8:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
|
||||
// CHECK6-NEXT: [[TMP9:%.*]] = bitcast i16* [[TMP1]] to i8*
|
||||
// CHECK6-NEXT: store i8* [[TMP9]], i8** [[TMP8]], align 4
|
||||
// CHECK6-NEXT: [[TMP10:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 2
|
||||
// CHECK6-NEXT: [[TMP11:%.*]] = bitcast [10 x i32]* [[TMP2]] to i8*
|
||||
// CHECK6-NEXT: store i8* [[TMP11]], i8** [[TMP10]], align 4
|
||||
// CHECK6-NEXT: [[TMP12:%.*]] = bitcast [3 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK6-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP4]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i32*, i16*, [10 x i32]*)* @__omp_outlined__1 to i8*), i8* null, i8** [[TMP12]], i32 3)
|
||||
// CHECK6-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 true, i1 true)
|
||||
// CHECK6-NEXT: ret void
|
||||
// CHECK6: worker.exit:
|
||||
|
@ -762,32 +678,32 @@ int bar(int n){
|
|||
//
|
||||
//
|
||||
// CHECK6-LABEL: define {{[^@]+}}@__omp_outlined__1
|
||||
// CHECK6-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.0* noalias [[__CONTEXT:%.*]]) #[[ATTR1]] {
|
||||
// CHECK6-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[A:%.*]], i16* nonnull align 2 dereferenceable(2) [[AA:%.*]], [10 x i32]* nonnull align 4 dereferenceable(40) [[B:%.*]]) #[[ATTR1]] {
|
||||
// CHECK6-NEXT: entry:
|
||||
// CHECK6-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK6-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK6-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.0*, align 4
|
||||
// CHECK6-NEXT: [[A_ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK6-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 4
|
||||
// CHECK6-NEXT: [[B_ADDR:%.*]] = alloca [10 x i32]*, align 4
|
||||
// CHECK6-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK6-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK6-NEXT: store %struct.anon.0* [[__CONTEXT]], %struct.anon.0** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK6-NEXT: [[TMP0:%.*]] = load %struct.anon.0*, %struct.anon.0** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK6-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_0:%.*]], %struct.anon.0* [[TMP0]], i32 0, i32 0
|
||||
// CHECK6-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 4
|
||||
// CHECK6-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[TMP0]], i32 0, i32 1
|
||||
// CHECK6-NEXT: [[TMP4:%.*]] = load i16*, i16** [[TMP3]], align 4
|
||||
// CHECK6-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[TMP0]], i32 0, i32 2
|
||||
// CHECK6-NEXT: [[TMP6:%.*]] = load [10 x i32]*, [10 x i32]** [[TMP5]], align 4
|
||||
// CHECK6-NEXT: [[TMP7:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK6-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP7]], 1
|
||||
// CHECK6-NEXT: store i32 [[ADD]], i32* [[TMP2]], align 4
|
||||
// CHECK6-NEXT: [[TMP8:%.*]] = load i16, i16* [[TMP4]], align 2
|
||||
// CHECK6-NEXT: [[CONV:%.*]] = sext i16 [[TMP8]] to i32
|
||||
// CHECK6-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 4
|
||||
// CHECK6-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 4
|
||||
// CHECK6-NEXT: store [10 x i32]* [[B]], [10 x i32]** [[B_ADDR]], align 4
|
||||
// CHECK6-NEXT: [[TMP0:%.*]] = load i32*, i32** [[A_ADDR]], align 4
|
||||
// CHECK6-NEXT: [[TMP1:%.*]] = load i16*, i16** [[AA_ADDR]], align 4
|
||||
// CHECK6-NEXT: [[TMP2:%.*]] = load [10 x i32]*, [10 x i32]** [[B_ADDR]], align 4
|
||||
// CHECK6-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK6-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP3]], 1
|
||||
// CHECK6-NEXT: store i32 [[ADD]], i32* [[TMP0]], align 4
|
||||
// CHECK6-NEXT: [[TMP4:%.*]] = load i16, i16* [[TMP1]], align 2
|
||||
// CHECK6-NEXT: [[CONV:%.*]] = sext i16 [[TMP4]] to i32
|
||||
// CHECK6-NEXT: [[ADD1:%.*]] = add nsw i32 [[CONV]], 1
|
||||
// CHECK6-NEXT: [[CONV2:%.*]] = trunc i32 [[ADD1]] to i16
|
||||
// CHECK6-NEXT: store i16 [[CONV2]], i16* [[TMP4]], align 2
|
||||
// CHECK6-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [10 x i32], [10 x i32]* [[TMP6]], i32 0, i32 2
|
||||
// CHECK6-NEXT: [[TMP9:%.*]] = load i32, i32* [[ARRAYIDX]], align 4
|
||||
// CHECK6-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP9]], 1
|
||||
// CHECK6-NEXT: store i16 [[CONV2]], i16* [[TMP1]], align 2
|
||||
// CHECK6-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [10 x i32], [10 x i32]* [[TMP2]], i32 0, i32 2
|
||||
// CHECK6-NEXT: [[TMP5:%.*]] = load i32, i32* [[ARRAYIDX]], align 4
|
||||
// CHECK6-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP5]], 1
|
||||
// CHECK6-NEXT: store i32 [[ADD3]], i32* [[ARRAYIDX]], align 4
|
||||
// CHECK6-NEXT: ret void
|
||||
//
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -53,7 +53,7 @@ int bar(int n){
|
|||
// CHECK1-SAME: (i64 [[A:%.*]]) #[[ATTR0:[0-9]+]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[A_ADDR:%.*]] = alloca i64, align 8
|
||||
// CHECK1-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 1
|
||||
// CHECK1-NEXT: [[A_CASTED:%.*]] = alloca i64, align 8
|
||||
// CHECK1-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: store i32 0, i32* [[DOTZERO_ADDR]], align 4
|
||||
|
@ -64,11 +64,12 @@ int bar(int n){
|
|||
// CHECK1-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
|
||||
// CHECK1: user_code.entry:
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = load i8, i8* [[CONV]], align 8
|
||||
// CHECK1-NEXT: store i8 [[TMP3]], i8* [[TMP2]], align 1
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i8, i8* [[CONV]], align 8
|
||||
// CHECK1-NEXT: [[CONV1:%.*]] = bitcast i64* [[A_CASTED]] to i8*
|
||||
// CHECK1-NEXT: store i8 [[TMP2]], i8* [[CONV1]], align 1
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = load i64, i64* [[A_CASTED]], align 8
|
||||
// CHECK1-NEXT: store i32 [[TMP1]], i32* [[DOTTHREADID_TEMP_]], align 4
|
||||
// CHECK1-NEXT: call void @__omp_outlined__(i32* [[DOTTHREADID_TEMP_]], i32* [[DOTZERO_ADDR]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]]) #[[ATTR1:[0-9]+]]
|
||||
// CHECK1-NEXT: call void @__omp_outlined__(i32* [[DOTTHREADID_TEMP_]], i32* [[DOTZERO_ADDR]], i64 [[TMP3]]) #[[ATTR1:[0-9]+]]
|
||||
// CHECK1-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 false, i1 true)
|
||||
// CHECK1-NEXT: ret void
|
||||
// CHECK1: worker.exit:
|
||||
|
@ -76,20 +77,16 @@ int bar(int n){
|
|||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@__omp_outlined__
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i64 [[A:%.*]]) #[[ATTR0]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK1-NEXT: [[A:%.*]] = alloca i8, align 1
|
||||
// CHECK1-NEXT: [[A_ADDR:%.*]] = alloca i64, align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i8, i8* [[TMP1]], align 1
|
||||
// CHECK1-NEXT: store i8 [[TMP2]], i8* [[A]], align 1
|
||||
// CHECK1-NEXT: store i8 49, i8* [[A]], align 1
|
||||
// CHECK1-NEXT: store i64 [[A]], i64* [[A_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[CONV:%.*]] = bitcast i64* [[A_ADDR]] to i8*
|
||||
// CHECK1-NEXT: store i8 49, i8* [[CONV]], align 8
|
||||
// CHECK1-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -97,7 +94,7 @@ int bar(int n){
|
|||
// CHECK1-SAME: (i64 [[AA:%.*]]) #[[ATTR0]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[AA_ADDR:%.*]] = alloca i64, align 8
|
||||
// CHECK1-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON_0:%.*]], align 2
|
||||
// CHECK1-NEXT: [[AA_CASTED:%.*]] = alloca i64, align 8
|
||||
// CHECK1-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: store i32 0, i32* [[DOTZERO_ADDR]], align 4
|
||||
|
@ -108,11 +105,12 @@ int bar(int n){
|
|||
// CHECK1-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
|
||||
// CHECK1: user_code.entry:
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = load i16, i16* [[CONV]], align 8
|
||||
// CHECK1-NEXT: store i16 [[TMP3]], i16* [[TMP2]], align 2
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i16, i16* [[CONV]], align 8
|
||||
// CHECK1-NEXT: [[CONV1:%.*]] = bitcast i64* [[AA_CASTED]] to i16*
|
||||
// CHECK1-NEXT: store i16 [[TMP2]], i16* [[CONV1]], align 2
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = load i64, i64* [[AA_CASTED]], align 8
|
||||
// CHECK1-NEXT: store i32 [[TMP1]], i32* [[DOTTHREADID_TEMP_]], align 4
|
||||
// CHECK1-NEXT: call void @__omp_outlined__1(i32* [[DOTTHREADID_TEMP_]], i32* [[DOTZERO_ADDR]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]]) #[[ATTR1]]
|
||||
// CHECK1-NEXT: call void @__omp_outlined__1(i32* [[DOTTHREADID_TEMP_]], i32* [[DOTZERO_ADDR]], i64 [[TMP3]]) #[[ATTR1]]
|
||||
// CHECK1-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 false, i1 true)
|
||||
// CHECK1-NEXT: ret void
|
||||
// CHECK1: worker.exit:
|
||||
|
@ -120,20 +118,16 @@ int bar(int n){
|
|||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@__omp_outlined__1
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.0* noalias [[__CONTEXT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i64 [[AA:%.*]]) #[[ATTR0]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.0*, align 8
|
||||
// CHECK1-NEXT: [[AA:%.*]] = alloca i16, align 2
|
||||
// CHECK1-NEXT: [[AA_ADDR:%.*]] = alloca i64, align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store %struct.anon.0* [[__CONTEXT]], %struct.anon.0** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load %struct.anon.0*, %struct.anon.0** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_0:%.*]], %struct.anon.0* [[TMP0]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i16, i16* [[TMP1]], align 2
|
||||
// CHECK1-NEXT: store i16 [[TMP2]], i16* [[AA]], align 2
|
||||
// CHECK1-NEXT: store i16 1, i16* [[AA]], align 2
|
||||
// CHECK1-NEXT: store i64 [[AA]], i64* [[AA_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[CONV:%.*]] = bitcast i64* [[AA_ADDR]] to i16*
|
||||
// CHECK1-NEXT: store i16 1, i16* [[CONV]], align 8
|
||||
// CHECK1-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -141,7 +135,7 @@ int bar(int n){
|
|||
// CHECK1-SAME: (i64 [[AA:%.*]]) #[[ATTR0]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[AA_ADDR:%.*]] = alloca i64, align 8
|
||||
// CHECK1-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON_1:%.*]], align 2
|
||||
// CHECK1-NEXT: [[AA_CASTED:%.*]] = alloca i64, align 8
|
||||
// CHECK1-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: store i32 0, i32* [[DOTZERO_ADDR]], align 4
|
||||
|
@ -152,11 +146,12 @@ int bar(int n){
|
|||
// CHECK1-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
|
||||
// CHECK1: user_code.entry:
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB2:[0-9]+]])
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[STRUCT_ANON_1]], %struct.anon.1* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = load i16, i16* [[CONV]], align 8
|
||||
// CHECK1-NEXT: store i16 [[TMP3]], i16* [[TMP2]], align 2
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i16, i16* [[CONV]], align 8
|
||||
// CHECK1-NEXT: [[CONV1:%.*]] = bitcast i64* [[AA_CASTED]] to i16*
|
||||
// CHECK1-NEXT: store i16 [[TMP2]], i16* [[CONV1]], align 2
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = load i64, i64* [[AA_CASTED]], align 8
|
||||
// CHECK1-NEXT: store i32 [[TMP1]], i32* [[DOTTHREADID_TEMP_]], align 4
|
||||
// CHECK1-NEXT: call void @__omp_outlined__2(i32* [[DOTTHREADID_TEMP_]], i32* [[DOTZERO_ADDR]], %struct.anon.1* [[OMP_OUTLINED_ARG_AGG_]]) #[[ATTR1]]
|
||||
// CHECK1-NEXT: call void @__omp_outlined__2(i32* [[DOTTHREADID_TEMP_]], i32* [[DOTZERO_ADDR]], i64 [[TMP3]]) #[[ATTR1]]
|
||||
// CHECK1-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 true, i1 true)
|
||||
// CHECK1-NEXT: ret void
|
||||
// CHECK1: worker.exit:
|
||||
|
@ -164,80 +159,58 @@ int bar(int n){
|
|||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@__omp_outlined__2
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.1* noalias [[__CONTEXT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i64 [[AA:%.*]]) #[[ATTR0]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.1*, align 8
|
||||
// CHECK1-NEXT: [[AA:%.*]] = alloca i16, align 2
|
||||
// CHECK1-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON_2:%.*]], align 8
|
||||
// CHECK1-NEXT: [[AA_ADDR:%.*]] = alloca i64, align 8
|
||||
// CHECK1-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store %struct.anon.1* [[__CONTEXT]], %struct.anon.1** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load %struct.anon.1*, %struct.anon.1** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_1:%.*]], %struct.anon.1* [[TMP0]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i16, i16* [[TMP1]], align 2
|
||||
// CHECK1-NEXT: store i16 [[TMP2]], i16* [[AA]], align 2
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON_2]], %struct.anon.2* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK1-NEXT: store i16* [[AA]], i16** [[TMP3]], align 8
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = call i8* @__kmpc_alloc_shared(i64 8)
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = load [[STRUCT_ANON_2]], %struct.anon.2* [[OMP_OUTLINED_ARG_AGG_]], align 8
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = bitcast i8* [[TMP5]] to %struct.anon.2*
|
||||
// CHECK1-NEXT: store [[STRUCT_ANON_2]] [[TMP6]], %struct.anon.2* [[TMP7]], align 8
|
||||
// CHECK1-NEXT: store i8* [[TMP5]], i8** [[TMP4]], align 8
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP9:%.*]] = load i32, i32* [[TMP8]], align 4
|
||||
// CHECK1-NEXT: [[TMP10:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK1-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP9]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon.2*)* @__omp_outlined__3 to i8*), i8* null, i8** [[TMP10]], i64 1)
|
||||
// CHECK1-NEXT: call void @__kmpc_free_shared(i8* [[TMP5]], i64 8)
|
||||
// CHECK1-NEXT: store i64 [[AA]], i64* [[AA_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[CONV:%.*]] = bitcast i64* [[AA_ADDR]] to i16*
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = bitcast i16* [[CONV]] to i8*
|
||||
// CHECK1-NEXT: store i8* [[TMP1]], i8** [[TMP0]], align 8
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK1-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP3]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i16*)* @__omp_outlined__3 to i8*), i8* null, i8** [[TMP4]], i64 1)
|
||||
// CHECK1-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@__omp_outlined__3
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.2* noalias [[__CONTEXT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i16* nonnull align 2 dereferenceable(2) [[AA:%.*]]) #[[ATTR0]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.2*, align 8
|
||||
// CHECK1-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON_3:%.*]], align 8
|
||||
// CHECK1-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 8
|
||||
// CHECK1-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store %struct.anon.2* [[__CONTEXT]], %struct.anon.2** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load %struct.anon.2*, %struct.anon.2** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_2:%.*]], %struct.anon.2* [[TMP0]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i16*, i16** [[TMP1]], align 8
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON_3]], %struct.anon.3* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK1-NEXT: store i16* [[TMP2]], i16** [[TMP3]], align 8
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = call i8* @__kmpc_alloc_shared(i64 8)
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = load [[STRUCT_ANON_3]], %struct.anon.3* [[OMP_OUTLINED_ARG_AGG_]], align 8
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = bitcast i8* [[TMP5]] to %struct.anon.3*
|
||||
// CHECK1-NEXT: store [[STRUCT_ANON_3]] [[TMP6]], %struct.anon.3* [[TMP7]], align 8
|
||||
// CHECK1-NEXT: store i8* [[TMP5]], i8** [[TMP4]], align 8
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP9:%.*]] = load i32, i32* [[TMP8]], align 4
|
||||
// CHECK1-NEXT: [[TMP10:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK1-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP9]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon.3*)* @__omp_outlined__4 to i8*), i8* null, i8** [[TMP10]], i64 1)
|
||||
// CHECK1-NEXT: call void @__kmpc_free_shared(i8* [[TMP5]], i64 8)
|
||||
// CHECK1-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load i16*, i16** [[AA_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = bitcast i16* [[TMP0]] to i8*
|
||||
// CHECK1-NEXT: store i8* [[TMP2]], i8** [[TMP1]], align 8
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = load i32, i32* [[TMP3]], align 4
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK1-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP4]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i16*)* @__omp_outlined__4 to i8*), i8* null, i8** [[TMP5]], i64 1)
|
||||
// CHECK1-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@__omp_outlined__4
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.3* noalias [[__CONTEXT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i16* nonnull align 2 dereferenceable(2) [[AA:%.*]]) #[[ATTR0]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.3*, align 8
|
||||
// CHECK1-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store %struct.anon.3* [[__CONTEXT]], %struct.anon.3** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load %struct.anon.3*, %struct.anon.3** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_3:%.*]], %struct.anon.3* [[TMP0]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i16*, i16** [[TMP1]], align 8
|
||||
// CHECK1-NEXT: store i16 1, i16* [[TMP2]], align 2
|
||||
// CHECK1-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load i16*, i16** [[AA_ADDR]], align 8
|
||||
// CHECK1-NEXT: store i16 1, i16* [[TMP0]], align 2
|
||||
// CHECK1-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -245,7 +218,7 @@ int bar(int n){
|
|||
// CHECK2-SAME: (i32 [[A:%.*]]) #[[ATTR0:[0-9]+]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 1
|
||||
// CHECK2-NEXT: [[A_CASTED:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: store i32 0, i32* [[DOTZERO_ADDR]], align 4
|
||||
|
@ -256,11 +229,12 @@ int bar(int n){
|
|||
// CHECK2-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
|
||||
// CHECK2: user_code.entry:
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = load i8, i8* [[CONV]], align 4
|
||||
// CHECK2-NEXT: store i8 [[TMP3]], i8* [[TMP2]], align 1
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i8, i8* [[CONV]], align 4
|
||||
// CHECK2-NEXT: [[CONV1:%.*]] = bitcast i32* [[A_CASTED]] to i8*
|
||||
// CHECK2-NEXT: store i8 [[TMP2]], i8* [[CONV1]], align 1
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = load i32, i32* [[A_CASTED]], align 4
|
||||
// CHECK2-NEXT: store i32 [[TMP1]], i32* [[DOTTHREADID_TEMP_]], align 4
|
||||
// CHECK2-NEXT: call void @__omp_outlined__(i32* [[DOTTHREADID_TEMP_]], i32* [[DOTZERO_ADDR]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]]) #[[ATTR1:[0-9]+]]
|
||||
// CHECK2-NEXT: call void @__omp_outlined__(i32* [[DOTTHREADID_TEMP_]], i32* [[DOTZERO_ADDR]], i32 [[TMP3]]) #[[ATTR1:[0-9]+]]
|
||||
// CHECK2-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 false, i1 true)
|
||||
// CHECK2-NEXT: ret void
|
||||
// CHECK2: worker.exit:
|
||||
|
@ -268,20 +242,16 @@ int bar(int n){
|
|||
//
|
||||
//
|
||||
// CHECK2-LABEL: define {{[^@]+}}@__omp_outlined__
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32 [[A:%.*]]) #[[ATTR0]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 4
|
||||
// CHECK2-NEXT: [[A:%.*]] = alloca i8, align 1
|
||||
// CHECK2-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i8, i8* [[TMP1]], align 1
|
||||
// CHECK2-NEXT: store i8 [[TMP2]], i8* [[A]], align 1
|
||||
// CHECK2-NEXT: store i8 49, i8* [[A]], align 1
|
||||
// CHECK2-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[CONV:%.*]] = bitcast i32* [[A_ADDR]] to i8*
|
||||
// CHECK2-NEXT: store i8 49, i8* [[CONV]], align 4
|
||||
// CHECK2-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -289,7 +259,7 @@ int bar(int n){
|
|||
// CHECK2-SAME: (i32 [[AA:%.*]]) #[[ATTR0]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[AA_ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON_0:%.*]], align 2
|
||||
// CHECK2-NEXT: [[AA_CASTED:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: store i32 0, i32* [[DOTZERO_ADDR]], align 4
|
||||
|
@ -300,11 +270,12 @@ int bar(int n){
|
|||
// CHECK2-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
|
||||
// CHECK2: user_code.entry:
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = load i16, i16* [[CONV]], align 4
|
||||
// CHECK2-NEXT: store i16 [[TMP3]], i16* [[TMP2]], align 2
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i16, i16* [[CONV]], align 4
|
||||
// CHECK2-NEXT: [[CONV1:%.*]] = bitcast i32* [[AA_CASTED]] to i16*
|
||||
// CHECK2-NEXT: store i16 [[TMP2]], i16* [[CONV1]], align 2
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = load i32, i32* [[AA_CASTED]], align 4
|
||||
// CHECK2-NEXT: store i32 [[TMP1]], i32* [[DOTTHREADID_TEMP_]], align 4
|
||||
// CHECK2-NEXT: call void @__omp_outlined__1(i32* [[DOTTHREADID_TEMP_]], i32* [[DOTZERO_ADDR]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]]) #[[ATTR1]]
|
||||
// CHECK2-NEXT: call void @__omp_outlined__1(i32* [[DOTTHREADID_TEMP_]], i32* [[DOTZERO_ADDR]], i32 [[TMP3]]) #[[ATTR1]]
|
||||
// CHECK2-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 false, i1 true)
|
||||
// CHECK2-NEXT: ret void
|
||||
// CHECK2: worker.exit:
|
||||
|
@ -312,20 +283,16 @@ int bar(int n){
|
|||
//
|
||||
//
|
||||
// CHECK2-LABEL: define {{[^@]+}}@__omp_outlined__1
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.0* noalias [[__CONTEXT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32 [[AA:%.*]]) #[[ATTR0]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.0*, align 4
|
||||
// CHECK2-NEXT: [[AA:%.*]] = alloca i16, align 2
|
||||
// CHECK2-NEXT: [[AA_ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: store %struct.anon.0* [[__CONTEXT]], %struct.anon.0** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load %struct.anon.0*, %struct.anon.0** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_0:%.*]], %struct.anon.0* [[TMP0]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i16, i16* [[TMP1]], align 2
|
||||
// CHECK2-NEXT: store i16 [[TMP2]], i16* [[AA]], align 2
|
||||
// CHECK2-NEXT: store i16 1, i16* [[AA]], align 2
|
||||
// CHECK2-NEXT: store i32 [[AA]], i32* [[AA_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[CONV:%.*]] = bitcast i32* [[AA_ADDR]] to i16*
|
||||
// CHECK2-NEXT: store i16 1, i16* [[CONV]], align 4
|
||||
// CHECK2-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -333,7 +300,7 @@ int bar(int n){
|
|||
// CHECK2-SAME: (i32 [[AA:%.*]]) #[[ATTR0]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[AA_ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON_1:%.*]], align 2
|
||||
// CHECK2-NEXT: [[AA_CASTED:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: store i32 0, i32* [[DOTZERO_ADDR]], align 4
|
||||
|
@ -344,11 +311,12 @@ int bar(int n){
|
|||
// CHECK2-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
|
||||
// CHECK2: user_code.entry:
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB2:[0-9]+]])
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[STRUCT_ANON_1]], %struct.anon.1* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = load i16, i16* [[CONV]], align 4
|
||||
// CHECK2-NEXT: store i16 [[TMP3]], i16* [[TMP2]], align 2
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i16, i16* [[CONV]], align 4
|
||||
// CHECK2-NEXT: [[CONV1:%.*]] = bitcast i32* [[AA_CASTED]] to i16*
|
||||
// CHECK2-NEXT: store i16 [[TMP2]], i16* [[CONV1]], align 2
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = load i32, i32* [[AA_CASTED]], align 4
|
||||
// CHECK2-NEXT: store i32 [[TMP1]], i32* [[DOTTHREADID_TEMP_]], align 4
|
||||
// CHECK2-NEXT: call void @__omp_outlined__2(i32* [[DOTTHREADID_TEMP_]], i32* [[DOTZERO_ADDR]], %struct.anon.1* [[OMP_OUTLINED_ARG_AGG_]]) #[[ATTR1]]
|
||||
// CHECK2-NEXT: call void @__omp_outlined__2(i32* [[DOTTHREADID_TEMP_]], i32* [[DOTZERO_ADDR]], i32 [[TMP3]]) #[[ATTR1]]
|
||||
// CHECK2-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 true, i1 true)
|
||||
// CHECK2-NEXT: ret void
|
||||
// CHECK2: worker.exit:
|
||||
|
@ -356,80 +324,58 @@ int bar(int n){
|
|||
//
|
||||
//
|
||||
// CHECK2-LABEL: define {{[^@]+}}@__omp_outlined__2
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.1* noalias [[__CONTEXT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32 [[AA:%.*]]) #[[ATTR0]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.1*, align 4
|
||||
// CHECK2-NEXT: [[AA:%.*]] = alloca i16, align 2
|
||||
// CHECK2-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON_2:%.*]], align 4
|
||||
// CHECK2-NEXT: [[AA_ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: store %struct.anon.1* [[__CONTEXT]], %struct.anon.1** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load %struct.anon.1*, %struct.anon.1** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_1:%.*]], %struct.anon.1* [[TMP0]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i16, i16* [[TMP1]], align 2
|
||||
// CHECK2-NEXT: store i16 [[TMP2]], i16* [[AA]], align 2
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON_2]], %struct.anon.2* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK2-NEXT: store i16* [[AA]], i16** [[TMP3]], align 4
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = call i8* @__kmpc_alloc_shared(i32 4)
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = load [[STRUCT_ANON_2]], %struct.anon.2* [[OMP_OUTLINED_ARG_AGG_]], align 4
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = bitcast i8* [[TMP5]] to %struct.anon.2*
|
||||
// CHECK2-NEXT: store [[STRUCT_ANON_2]] [[TMP6]], %struct.anon.2* [[TMP7]], align 4
|
||||
// CHECK2-NEXT: store i8* [[TMP5]], i8** [[TMP4]], align 4
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP9:%.*]] = load i32, i32* [[TMP8]], align 4
|
||||
// CHECK2-NEXT: [[TMP10:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK2-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP9]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon.2*)* @__omp_outlined__3 to i8*), i8* null, i8** [[TMP10]], i32 1)
|
||||
// CHECK2-NEXT: call void @__kmpc_free_shared(i8* [[TMP5]], i32 4)
|
||||
// CHECK2-NEXT: store i32 [[AA]], i32* [[AA_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[CONV:%.*]] = bitcast i32* [[AA_ADDR]] to i16*
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = bitcast i16* [[CONV]] to i8*
|
||||
// CHECK2-NEXT: store i8* [[TMP1]], i8** [[TMP0]], align 4
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK2-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP3]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i16*)* @__omp_outlined__3 to i8*), i8* null, i8** [[TMP4]], i32 1)
|
||||
// CHECK2-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK2-LABEL: define {{[^@]+}}@__omp_outlined__3
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.2* noalias [[__CONTEXT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i16* nonnull align 2 dereferenceable(2) [[AA:%.*]]) #[[ATTR0]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.2*, align 4
|
||||
// CHECK2-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON_3:%.*]], align 4
|
||||
// CHECK2-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 4
|
||||
// CHECK2-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: store %struct.anon.2* [[__CONTEXT]], %struct.anon.2** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load %struct.anon.2*, %struct.anon.2** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_2:%.*]], %struct.anon.2* [[TMP0]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i16*, i16** [[TMP1]], align 4
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON_3]], %struct.anon.3* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK2-NEXT: store i16* [[TMP2]], i16** [[TMP3]], align 4
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = call i8* @__kmpc_alloc_shared(i32 4)
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = load [[STRUCT_ANON_3]], %struct.anon.3* [[OMP_OUTLINED_ARG_AGG_]], align 4
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = bitcast i8* [[TMP5]] to %struct.anon.3*
|
||||
// CHECK2-NEXT: store [[STRUCT_ANON_3]] [[TMP6]], %struct.anon.3* [[TMP7]], align 4
|
||||
// CHECK2-NEXT: store i8* [[TMP5]], i8** [[TMP4]], align 4
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP9:%.*]] = load i32, i32* [[TMP8]], align 4
|
||||
// CHECK2-NEXT: [[TMP10:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK2-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP9]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon.3*)* @__omp_outlined__4 to i8*), i8* null, i8** [[TMP10]], i32 1)
|
||||
// CHECK2-NEXT: call void @__kmpc_free_shared(i8* [[TMP5]], i32 4)
|
||||
// CHECK2-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load i16*, i16** [[AA_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = bitcast i16* [[TMP0]] to i8*
|
||||
// CHECK2-NEXT: store i8* [[TMP2]], i8** [[TMP1]], align 4
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = load i32, i32* [[TMP3]], align 4
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK2-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP4]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i16*)* @__omp_outlined__4 to i8*), i8* null, i8** [[TMP5]], i32 1)
|
||||
// CHECK2-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK2-LABEL: define {{[^@]+}}@__omp_outlined__4
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.3* noalias [[__CONTEXT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i16* nonnull align 2 dereferenceable(2) [[AA:%.*]]) #[[ATTR0]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.3*, align 4
|
||||
// CHECK2-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: store %struct.anon.3* [[__CONTEXT]], %struct.anon.3** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load %struct.anon.3*, %struct.anon.3** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_3:%.*]], %struct.anon.3* [[TMP0]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i16*, i16** [[TMP1]], align 4
|
||||
// CHECK2-NEXT: store i16 1, i16* [[TMP2]], align 2
|
||||
// CHECK2-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load i16*, i16** [[AA_ADDR]], align 4
|
||||
// CHECK2-NEXT: store i16 1, i16* [[TMP0]], align 2
|
||||
// CHECK2-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -437,7 +383,7 @@ int bar(int n){
|
|||
// CHECK3-SAME: (i32 [[A:%.*]]) #[[ATTR0:[0-9]+]] {
|
||||
// CHECK3-NEXT: entry:
|
||||
// CHECK3-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK3-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 1
|
||||
// CHECK3-NEXT: [[A_CASTED:%.*]] = alloca i32, align 4
|
||||
// CHECK3-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK3-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
|
||||
// CHECK3-NEXT: store i32 0, i32* [[DOTZERO_ADDR]], align 4
|
||||
|
@ -448,11 +394,12 @@ int bar(int n){
|
|||
// CHECK3-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
|
||||
// CHECK3: user_code.entry:
|
||||
// CHECK3-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = load i8, i8* [[CONV]], align 4
|
||||
// CHECK3-NEXT: store i8 [[TMP3]], i8* [[TMP2]], align 1
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = load i8, i8* [[CONV]], align 4
|
||||
// CHECK3-NEXT: [[CONV1:%.*]] = bitcast i32* [[A_CASTED]] to i8*
|
||||
// CHECK3-NEXT: store i8 [[TMP2]], i8* [[CONV1]], align 1
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = load i32, i32* [[A_CASTED]], align 4
|
||||
// CHECK3-NEXT: store i32 [[TMP1]], i32* [[DOTTHREADID_TEMP_]], align 4
|
||||
// CHECK3-NEXT: call void @__omp_outlined__(i32* [[DOTTHREADID_TEMP_]], i32* [[DOTZERO_ADDR]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]]) #[[ATTR1:[0-9]+]]
|
||||
// CHECK3-NEXT: call void @__omp_outlined__(i32* [[DOTTHREADID_TEMP_]], i32* [[DOTZERO_ADDR]], i32 [[TMP3]]) #[[ATTR1:[0-9]+]]
|
||||
// CHECK3-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 false, i1 true)
|
||||
// CHECK3-NEXT: ret void
|
||||
// CHECK3: worker.exit:
|
||||
|
@ -460,20 +407,16 @@ int bar(int n){
|
|||
//
|
||||
//
|
||||
// CHECK3-LABEL: define {{[^@]+}}@__omp_outlined__
|
||||
// CHECK3-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK3-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32 [[A:%.*]]) #[[ATTR0]] {
|
||||
// CHECK3-NEXT: entry:
|
||||
// CHECK3-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK3-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK3-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 4
|
||||
// CHECK3-NEXT: [[A:%.*]] = alloca i8, align 1
|
||||
// CHECK3-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK3-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK3-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK3-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = load i8, i8* [[TMP1]], align 1
|
||||
// CHECK3-NEXT: store i8 [[TMP2]], i8* [[A]], align 1
|
||||
// CHECK3-NEXT: store i8 49, i8* [[A]], align 1
|
||||
// CHECK3-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[CONV:%.*]] = bitcast i32* [[A_ADDR]] to i8*
|
||||
// CHECK3-NEXT: store i8 49, i8* [[CONV]], align 4
|
||||
// CHECK3-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -481,7 +424,7 @@ int bar(int n){
|
|||
// CHECK3-SAME: (i32 [[AA:%.*]]) #[[ATTR0]] {
|
||||
// CHECK3-NEXT: entry:
|
||||
// CHECK3-NEXT: [[AA_ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK3-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON_0:%.*]], align 2
|
||||
// CHECK3-NEXT: [[AA_CASTED:%.*]] = alloca i32, align 4
|
||||
// CHECK3-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK3-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
|
||||
// CHECK3-NEXT: store i32 0, i32* [[DOTZERO_ADDR]], align 4
|
||||
|
@ -492,11 +435,12 @@ int bar(int n){
|
|||
// CHECK3-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
|
||||
// CHECK3: user_code.entry:
|
||||
// CHECK3-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = load i16, i16* [[CONV]], align 4
|
||||
// CHECK3-NEXT: store i16 [[TMP3]], i16* [[TMP2]], align 2
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = load i16, i16* [[CONV]], align 4
|
||||
// CHECK3-NEXT: [[CONV1:%.*]] = bitcast i32* [[AA_CASTED]] to i16*
|
||||
// CHECK3-NEXT: store i16 [[TMP2]], i16* [[CONV1]], align 2
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = load i32, i32* [[AA_CASTED]], align 4
|
||||
// CHECK3-NEXT: store i32 [[TMP1]], i32* [[DOTTHREADID_TEMP_]], align 4
|
||||
// CHECK3-NEXT: call void @__omp_outlined__1(i32* [[DOTTHREADID_TEMP_]], i32* [[DOTZERO_ADDR]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]]) #[[ATTR1]]
|
||||
// CHECK3-NEXT: call void @__omp_outlined__1(i32* [[DOTTHREADID_TEMP_]], i32* [[DOTZERO_ADDR]], i32 [[TMP3]]) #[[ATTR1]]
|
||||
// CHECK3-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 false, i1 true)
|
||||
// CHECK3-NEXT: ret void
|
||||
// CHECK3: worker.exit:
|
||||
|
@ -504,20 +448,16 @@ int bar(int n){
|
|||
//
|
||||
//
|
||||
// CHECK3-LABEL: define {{[^@]+}}@__omp_outlined__1
|
||||
// CHECK3-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.0* noalias [[__CONTEXT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK3-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32 [[AA:%.*]]) #[[ATTR0]] {
|
||||
// CHECK3-NEXT: entry:
|
||||
// CHECK3-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK3-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK3-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.0*, align 4
|
||||
// CHECK3-NEXT: [[AA:%.*]] = alloca i16, align 2
|
||||
// CHECK3-NEXT: [[AA_ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK3-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK3-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK3-NEXT: store %struct.anon.0* [[__CONTEXT]], %struct.anon.0** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = load %struct.anon.0*, %struct.anon.0** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_0:%.*]], %struct.anon.0* [[TMP0]], i32 0, i32 0
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = load i16, i16* [[TMP1]], align 2
|
||||
// CHECK3-NEXT: store i16 [[TMP2]], i16* [[AA]], align 2
|
||||
// CHECK3-NEXT: store i16 1, i16* [[AA]], align 2
|
||||
// CHECK3-NEXT: store i32 [[AA]], i32* [[AA_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[CONV:%.*]] = bitcast i32* [[AA_ADDR]] to i16*
|
||||
// CHECK3-NEXT: store i16 1, i16* [[CONV]], align 4
|
||||
// CHECK3-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -525,7 +465,7 @@ int bar(int n){
|
|||
// CHECK3-SAME: (i32 [[AA:%.*]]) #[[ATTR0]] {
|
||||
// CHECK3-NEXT: entry:
|
||||
// CHECK3-NEXT: [[AA_ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK3-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON_1:%.*]], align 2
|
||||
// CHECK3-NEXT: [[AA_CASTED:%.*]] = alloca i32, align 4
|
||||
// CHECK3-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK3-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
|
||||
// CHECK3-NEXT: store i32 0, i32* [[DOTZERO_ADDR]], align 4
|
||||
|
@ -536,11 +476,12 @@ int bar(int n){
|
|||
// CHECK3-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
|
||||
// CHECK3: user_code.entry:
|
||||
// CHECK3-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB2:[0-9]+]])
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[STRUCT_ANON_1]], %struct.anon.1* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = load i16, i16* [[CONV]], align 4
|
||||
// CHECK3-NEXT: store i16 [[TMP3]], i16* [[TMP2]], align 2
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = load i16, i16* [[CONV]], align 4
|
||||
// CHECK3-NEXT: [[CONV1:%.*]] = bitcast i32* [[AA_CASTED]] to i16*
|
||||
// CHECK3-NEXT: store i16 [[TMP2]], i16* [[CONV1]], align 2
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = load i32, i32* [[AA_CASTED]], align 4
|
||||
// CHECK3-NEXT: store i32 [[TMP1]], i32* [[DOTTHREADID_TEMP_]], align 4
|
||||
// CHECK3-NEXT: call void @__omp_outlined__2(i32* [[DOTTHREADID_TEMP_]], i32* [[DOTZERO_ADDR]], %struct.anon.1* [[OMP_OUTLINED_ARG_AGG_]]) #[[ATTR1]]
|
||||
// CHECK3-NEXT: call void @__omp_outlined__2(i32* [[DOTTHREADID_TEMP_]], i32* [[DOTZERO_ADDR]], i32 [[TMP3]]) #[[ATTR1]]
|
||||
// CHECK3-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 true, i1 true)
|
||||
// CHECK3-NEXT: ret void
|
||||
// CHECK3: worker.exit:
|
||||
|
@ -548,79 +489,57 @@ int bar(int n){
|
|||
//
|
||||
//
|
||||
// CHECK3-LABEL: define {{[^@]+}}@__omp_outlined__2
|
||||
// CHECK3-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.1* noalias [[__CONTEXT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK3-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32 [[AA:%.*]]) #[[ATTR0]] {
|
||||
// CHECK3-NEXT: entry:
|
||||
// CHECK3-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK3-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK3-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.1*, align 4
|
||||
// CHECK3-NEXT: [[AA:%.*]] = alloca i16, align 2
|
||||
// CHECK3-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON_2:%.*]], align 4
|
||||
// CHECK3-NEXT: [[AA_ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK3-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 4
|
||||
// CHECK3-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK3-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK3-NEXT: store %struct.anon.1* [[__CONTEXT]], %struct.anon.1** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = load %struct.anon.1*, %struct.anon.1** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_1:%.*]], %struct.anon.1* [[TMP0]], i32 0, i32 0
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = load i16, i16* [[TMP1]], align 2
|
||||
// CHECK3-NEXT: store i16 [[TMP2]], i16* [[AA]], align 2
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON_2]], %struct.anon.2* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK3-NEXT: store i16* [[AA]], i16** [[TMP3]], align 4
|
||||
// CHECK3-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK3-NEXT: [[TMP5:%.*]] = call i8* @__kmpc_alloc_shared(i32 4)
|
||||
// CHECK3-NEXT: [[TMP6:%.*]] = load [[STRUCT_ANON_2]], %struct.anon.2* [[OMP_OUTLINED_ARG_AGG_]], align 4
|
||||
// CHECK3-NEXT: [[TMP7:%.*]] = bitcast i8* [[TMP5]] to %struct.anon.2*
|
||||
// CHECK3-NEXT: store [[STRUCT_ANON_2]] [[TMP6]], %struct.anon.2* [[TMP7]], align 4
|
||||
// CHECK3-NEXT: store i8* [[TMP5]], i8** [[TMP4]], align 4
|
||||
// CHECK3-NEXT: [[TMP8:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP9:%.*]] = load i32, i32* [[TMP8]], align 4
|
||||
// CHECK3-NEXT: [[TMP10:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK3-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP9]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon.2*)* @__omp_outlined__3 to i8*), i8* null, i8** [[TMP10]], i32 1)
|
||||
// CHECK3-NEXT: call void @__kmpc_free_shared(i8* [[TMP5]], i32 4)
|
||||
// CHECK3-NEXT: store i32 [[AA]], i32* [[AA_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[CONV:%.*]] = bitcast i32* [[AA_ADDR]] to i16*
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK3-NEXT: [[TMP1:%.*]] = bitcast i16* [[CONV]] to i8*
|
||||
// CHECK3-NEXT: store i8* [[TMP1]], i8** [[TMP0]], align 4
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK3-NEXT: [[TMP4:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK3-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP3]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i16*)* @__omp_outlined__3 to i8*), i8* null, i8** [[TMP4]], i32 1)
|
||||
// CHECK3-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK3-LABEL: define {{[^@]+}}@__omp_outlined__3
|
||||
// CHECK3-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.2* noalias [[__CONTEXT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK3-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i16* nonnull align 2 dereferenceable(2) [[AA:%.*]]) #[[ATTR0]] {
|
||||
// CHECK3-NEXT: entry:
|
||||
// CHECK3-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK3-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK3-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.2*, align 4
|
||||
// CHECK3-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON_3:%.*]], align 4
|
||||
// CHECK3-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 4
|
||||
// CHECK3-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 4
|
||||
// CHECK3-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK3-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK3-NEXT: store %struct.anon.2* [[__CONTEXT]], %struct.anon.2** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = load %struct.anon.2*, %struct.anon.2** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_2:%.*]], %struct.anon.2* [[TMP0]], i32 0, i32 0
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = load i16*, i16** [[TMP1]], align 4
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON_3]], %struct.anon.3* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK3-NEXT: store i16* [[TMP2]], i16** [[TMP3]], align 4
|
||||
// CHECK3-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK3-NEXT: [[TMP5:%.*]] = call i8* @__kmpc_alloc_shared(i32 4)
|
||||
// CHECK3-NEXT: [[TMP6:%.*]] = load [[STRUCT_ANON_3]], %struct.anon.3* [[OMP_OUTLINED_ARG_AGG_]], align 4
|
||||
// CHECK3-NEXT: [[TMP7:%.*]] = bitcast i8* [[TMP5]] to %struct.anon.3*
|
||||
// CHECK3-NEXT: store [[STRUCT_ANON_3]] [[TMP6]], %struct.anon.3* [[TMP7]], align 4
|
||||
// CHECK3-NEXT: store i8* [[TMP5]], i8** [[TMP4]], align 4
|
||||
// CHECK3-NEXT: [[TMP8:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP9:%.*]] = load i32, i32* [[TMP8]], align 4
|
||||
// CHECK3-NEXT: [[TMP10:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK3-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP9]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon.3*)* @__omp_outlined__4 to i8*), i8* null, i8** [[TMP10]], i32 1)
|
||||
// CHECK3-NEXT: call void @__kmpc_free_shared(i8* [[TMP5]], i32 4)
|
||||
// CHECK3-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = load i16*, i16** [[AA_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP1:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = bitcast i16* [[TMP0]] to i8*
|
||||
// CHECK3-NEXT: store i8* [[TMP2]], i8** [[TMP1]], align 4
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP4:%.*]] = load i32, i32* [[TMP3]], align 4
|
||||
// CHECK3-NEXT: [[TMP5:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK3-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB2]], i32 [[TMP4]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i16*)* @__omp_outlined__4 to i8*), i8* null, i8** [[TMP5]], i32 1)
|
||||
// CHECK3-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK3-LABEL: define {{[^@]+}}@__omp_outlined__4
|
||||
// CHECK3-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.3* noalias [[__CONTEXT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK3-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i16* nonnull align 2 dereferenceable(2) [[AA:%.*]]) #[[ATTR0]] {
|
||||
// CHECK3-NEXT: entry:
|
||||
// CHECK3-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK3-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK3-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.3*, align 4
|
||||
// CHECK3-NEXT: [[AA_ADDR:%.*]] = alloca i16*, align 4
|
||||
// CHECK3-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK3-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK3-NEXT: store %struct.anon.3* [[__CONTEXT]], %struct.anon.3** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = load %struct.anon.3*, %struct.anon.3** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_3:%.*]], %struct.anon.3* [[TMP0]], i32 0, i32 0
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = load i16*, i16** [[TMP1]], align 4
|
||||
// CHECK3-NEXT: store i16 1, i16* [[TMP2]], align 2
|
||||
// CHECK3-NEXT: store i16* [[AA]], i16** [[AA_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = load i16*, i16** [[AA_ADDR]], align 4
|
||||
// CHECK3-NEXT: store i16 1, i16* [[TMP0]], align 2
|
||||
// CHECK3-NEXT: ret void
|
||||
//
|
||||
|
|
|
@ -577,7 +577,6 @@ int bar(int n){
|
|||
// CHECK1-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z9ftemplateIcET_i_l16
|
||||
// CHECK1-SAME: () #[[ATTR0:[0-9]+]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 1
|
||||
// CHECK1-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: store i32 0, i32* [[DOTZERO_ADDR]], align 4
|
||||
|
@ -587,7 +586,7 @@ int bar(int n){
|
|||
// CHECK1: user_code.entry:
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
|
||||
// CHECK1-NEXT: store i32 [[TMP1]], i32* [[DOTTHREADID_TEMP_]], align 4
|
||||
// CHECK1-NEXT: call void @__omp_outlined__(i32* [[DOTTHREADID_TEMP_]], i32* [[DOTZERO_ADDR]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]]) #[[ATTR1:[0-9]+]]
|
||||
// CHECK1-NEXT: call void @__omp_outlined__(i32* [[DOTTHREADID_TEMP_]], i32* [[DOTZERO_ADDR]]) #[[ATTR1:[0-9]+]]
|
||||
// CHECK1-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 false, i1 true)
|
||||
// CHECK1-NEXT: ret void
|
||||
// CHECK1: worker.exit:
|
||||
|
@ -595,98 +594,86 @@ int bar(int n){
|
|||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@__omp_outlined__
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]]) #[[ATTR0]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK1-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[TMP:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON_0:%.*]], align 8
|
||||
// CHECK1-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[I:%.*]] = call i8* @__kmpc_alloc_shared(i64 4)
|
||||
// CHECK1-NEXT: [[I_ON_STACK:%.*]] = bitcast i8* [[I]] to i32*
|
||||
// CHECK1-NEXT: store i32 0, i32* [[DOTOMP_LB]], align 4
|
||||
// CHECK1-NEXT: store i32 9, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK1-NEXT: store i32 1, i32* [[DOTOMP_STRIDE]], align 4
|
||||
// CHECK1-NEXT: store i32 0, i32* [[DOTOMP_IS_LAST]], align 4
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i32, i32* [[TMP1]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 [[TMP2]], i32 92, i32* [[DOTOMP_IS_LAST]], i32* [[DOTOMP_LB]], i32* [[DOTOMP_UB]], i32* [[DOTOMP_STRIDE]], i32 1, i32 1)
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK1-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP3]], 9
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 [[TMP1]], i32 92, i32* [[DOTOMP_IS_LAST]], i32* [[DOTOMP_LB]], i32* [[DOTOMP_UB]], i32* [[DOTOMP_STRIDE]], i32 1, i32 1)
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK1-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
|
||||
// CHECK1-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
|
||||
// CHECK1: cond.true:
|
||||
// CHECK1-NEXT: br label [[COND_END:%.*]]
|
||||
// CHECK1: cond.false:
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK1-NEXT: br label [[COND_END]]
|
||||
// CHECK1: cond.end:
|
||||
// CHECK1-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP4]], [[COND_FALSE]] ]
|
||||
// CHECK1-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
|
||||
// CHECK1-NEXT: store i32 [[COND]], i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = load i32, i32* [[DOTOMP_LB]], align 4
|
||||
// CHECK1-NEXT: store i32 [[TMP5]], i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = load i32, i32* [[DOTOMP_LB]], align 4
|
||||
// CHECK1-NEXT: store i32 [[TMP4]], i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK1-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
|
||||
// CHECK1: omp.inner.for.cond:
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK1-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP6]], [[TMP7]]
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK1-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP5]], [[TMP6]]
|
||||
// CHECK1-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
|
||||
// CHECK1: omp.inner.for.body:
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK1-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP8]], 1
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK1-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP7]], 1
|
||||
// CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
|
||||
// CHECK1-NEXT: store i32 [[ADD]], i32* [[I_ON_STACK]], align 4
|
||||
// CHECK1-NEXT: [[TMP9:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK1-NEXT: store i32* [[I_ON_STACK]], i32** [[TMP9]], align 8
|
||||
// CHECK1-NEXT: [[TMP10:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
|
||||
// CHECK1-NEXT: [[TMP11:%.*]] = call i8* @__kmpc_alloc_shared(i64 8)
|
||||
// CHECK1-NEXT: [[TMP12:%.*]] = load [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], align 8
|
||||
// CHECK1-NEXT: [[TMP13:%.*]] = bitcast i8* [[TMP11]] to %struct.anon.0*
|
||||
// CHECK1-NEXT: store [[STRUCT_ANON_0]] [[TMP12]], %struct.anon.0* [[TMP13]], align 8
|
||||
// CHECK1-NEXT: store i8* [[TMP11]], i8** [[TMP10]], align 8
|
||||
// CHECK1-NEXT: [[TMP14:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK1-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon.0*)* @__omp_outlined__1 to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined__1_wrapper to i8*), i8** [[TMP14]], i64 1)
|
||||
// CHECK1-NEXT: call void @__kmpc_free_shared(i8* [[TMP11]], i64 8)
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
|
||||
// CHECK1-NEXT: [[TMP9:%.*]] = bitcast i32* [[I_ON_STACK]] to i8*
|
||||
// CHECK1-NEXT: store i8* [[TMP9]], i8** [[TMP8]], align 8
|
||||
// CHECK1-NEXT: [[TMP10:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK1-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i32*)* @__omp_outlined__1 to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined__1_wrapper to i8*), i8** [[TMP10]], i64 1)
|
||||
// CHECK1-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
|
||||
// CHECK1: omp.body.continue:
|
||||
// CHECK1-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
|
||||
// CHECK1: omp.inner.for.inc:
|
||||
// CHECK1-NEXT: [[TMP15:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK1-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP15]], 1
|
||||
// CHECK1-NEXT: [[TMP11:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK1-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP11]], 1
|
||||
// CHECK1-NEXT: store i32 [[ADD2]], i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK1-NEXT: br label [[OMP_INNER_FOR_COND]]
|
||||
// CHECK1: omp.inner.for.end:
|
||||
// CHECK1-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
|
||||
// CHECK1: omp.loop.exit:
|
||||
// CHECK1-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB2]], i32 [[TMP2]])
|
||||
// CHECK1-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB2]], i32 [[TMP1]])
|
||||
// CHECK1-NEXT: call void @__kmpc_free_shared(i8* [[I]], i64 4)
|
||||
// CHECK1-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@__omp_outlined__1
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.0* noalias [[__CONTEXT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[I:%.*]]) #[[ATTR0]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.0*, align 8
|
||||
// CHECK1-NEXT: [[I_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store %struct.anon.0* [[__CONTEXT]], %struct.anon.0** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load %struct.anon.0*, %struct.anon.0** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_0:%.*]], %struct.anon.0* [[TMP0]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 8
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK1-NEXT: [[INC:%.*]] = add nsw i32 [[TMP3]], 1
|
||||
// CHECK1-NEXT: store i32 [[INC]], i32* [[TMP2]], align 4
|
||||
// CHECK1-NEXT: store i32* [[I]], i32** [[I_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load i32*, i32** [[I_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK1-NEXT: [[INC:%.*]] = add nsw i32 [[TMP1]], 1
|
||||
// CHECK1-NEXT: store i32 [[INC]], i32* [[TMP0]], align 4
|
||||
// CHECK1-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -703,16 +690,15 @@ int bar(int n){
|
|||
// CHECK1-NEXT: call void @__kmpc_get_shared_variables(i8*** [[GLOBAL_ARGS]])
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i8**, i8*** [[GLOBAL_ARGS]], align 8
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = getelementptr inbounds i8*, i8** [[TMP2]], i64 0
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = bitcast i8** [[TMP3]] to %struct.anon.0**
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = load %struct.anon.0*, %struct.anon.0** [[TMP4]], align 8
|
||||
// CHECK1-NEXT: call void @__omp_outlined__1(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]], %struct.anon.0* [[TMP5]]) #[[ATTR1]]
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = bitcast i8** [[TMP3]] to i32**
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = load i32*, i32** [[TMP4]], align 8
|
||||
// CHECK1-NEXT: call void @__omp_outlined__1(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]], i32* [[TMP5]]) #[[ATTR1]]
|
||||
// CHECK1-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK2-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z9ftemplateIcET_i_l16
|
||||
// CHECK2-SAME: () #[[ATTR0:[0-9]+]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 1
|
||||
// CHECK2-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: store i32 0, i32* [[DOTZERO_ADDR]], align 4
|
||||
|
@ -722,7 +708,7 @@ int bar(int n){
|
|||
// CHECK2: user_code.entry:
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
|
||||
// CHECK2-NEXT: store i32 [[TMP1]], i32* [[DOTTHREADID_TEMP_]], align 4
|
||||
// CHECK2-NEXT: call void @__omp_outlined__(i32* [[DOTTHREADID_TEMP_]], i32* [[DOTZERO_ADDR]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]]) #[[ATTR1:[0-9]+]]
|
||||
// CHECK2-NEXT: call void @__omp_outlined__(i32* [[DOTTHREADID_TEMP_]], i32* [[DOTZERO_ADDR]]) #[[ATTR1:[0-9]+]]
|
||||
// CHECK2-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 false, i1 true)
|
||||
// CHECK2-NEXT: ret void
|
||||
// CHECK2: worker.exit:
|
||||
|
@ -730,98 +716,86 @@ int bar(int n){
|
|||
//
|
||||
//
|
||||
// CHECK2-LABEL: define {{[^@]+}}@__omp_outlined__
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]]) #[[ATTR0]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 4
|
||||
// CHECK2-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[TMP:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON_0:%.*]], align 4
|
||||
// CHECK2-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[I:%.*]] = call i8* @__kmpc_alloc_shared(i32 4)
|
||||
// CHECK2-NEXT: [[I_ON_STACK:%.*]] = bitcast i8* [[I]] to i32*
|
||||
// CHECK2-NEXT: store i32 0, i32* [[DOTOMP_LB]], align 4
|
||||
// CHECK2-NEXT: store i32 9, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK2-NEXT: store i32 1, i32* [[DOTOMP_STRIDE]], align 4
|
||||
// CHECK2-NEXT: store i32 0, i32* [[DOTOMP_IS_LAST]], align 4
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i32, i32* [[TMP1]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 [[TMP2]], i32 92, i32* [[DOTOMP_IS_LAST]], i32* [[DOTOMP_LB]], i32* [[DOTOMP_UB]], i32* [[DOTOMP_STRIDE]], i32 1, i32 1)
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK2-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP3]], 9
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 [[TMP1]], i32 92, i32* [[DOTOMP_IS_LAST]], i32* [[DOTOMP_LB]], i32* [[DOTOMP_UB]], i32* [[DOTOMP_STRIDE]], i32 1, i32 1)
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK2-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
|
||||
// CHECK2-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
|
||||
// CHECK2: cond.true:
|
||||
// CHECK2-NEXT: br label [[COND_END:%.*]]
|
||||
// CHECK2: cond.false:
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK2-NEXT: br label [[COND_END]]
|
||||
// CHECK2: cond.end:
|
||||
// CHECK2-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP4]], [[COND_FALSE]] ]
|
||||
// CHECK2-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
|
||||
// CHECK2-NEXT: store i32 [[COND]], i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = load i32, i32* [[DOTOMP_LB]], align 4
|
||||
// CHECK2-NEXT: store i32 [[TMP5]], i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = load i32, i32* [[DOTOMP_LB]], align 4
|
||||
// CHECK2-NEXT: store i32 [[TMP4]], i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK2-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
|
||||
// CHECK2: omp.inner.for.cond:
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK2-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP6]], [[TMP7]]
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK2-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP5]], [[TMP6]]
|
||||
// CHECK2-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
|
||||
// CHECK2: omp.inner.for.body:
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK2-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP8]], 1
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK2-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP7]], 1
|
||||
// CHECK2-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
|
||||
// CHECK2-NEXT: store i32 [[ADD]], i32* [[I_ON_STACK]], align 4
|
||||
// CHECK2-NEXT: [[TMP9:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK2-NEXT: store i32* [[I_ON_STACK]], i32** [[TMP9]], align 4
|
||||
// CHECK2-NEXT: [[TMP10:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP11:%.*]] = call i8* @__kmpc_alloc_shared(i32 4)
|
||||
// CHECK2-NEXT: [[TMP12:%.*]] = load [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], align 4
|
||||
// CHECK2-NEXT: [[TMP13:%.*]] = bitcast i8* [[TMP11]] to %struct.anon.0*
|
||||
// CHECK2-NEXT: store [[STRUCT_ANON_0]] [[TMP12]], %struct.anon.0* [[TMP13]], align 4
|
||||
// CHECK2-NEXT: store i8* [[TMP11]], i8** [[TMP10]], align 4
|
||||
// CHECK2-NEXT: [[TMP14:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK2-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon.0*)* @__omp_outlined__1 to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined__1_wrapper to i8*), i8** [[TMP14]], i32 1)
|
||||
// CHECK2-NEXT: call void @__kmpc_free_shared(i8* [[TMP11]], i32 4)
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP9:%.*]] = bitcast i32* [[I_ON_STACK]] to i8*
|
||||
// CHECK2-NEXT: store i8* [[TMP9]], i8** [[TMP8]], align 4
|
||||
// CHECK2-NEXT: [[TMP10:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK2-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i32*)* @__omp_outlined__1 to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined__1_wrapper to i8*), i8** [[TMP10]], i32 1)
|
||||
// CHECK2-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
|
||||
// CHECK2: omp.body.continue:
|
||||
// CHECK2-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
|
||||
// CHECK2: omp.inner.for.inc:
|
||||
// CHECK2-NEXT: [[TMP15:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK2-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP15]], 1
|
||||
// CHECK2-NEXT: [[TMP11:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK2-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP11]], 1
|
||||
// CHECK2-NEXT: store i32 [[ADD2]], i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK2-NEXT: br label [[OMP_INNER_FOR_COND]]
|
||||
// CHECK2: omp.inner.for.end:
|
||||
// CHECK2-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
|
||||
// CHECK2: omp.loop.exit:
|
||||
// CHECK2-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB2]], i32 [[TMP2]])
|
||||
// CHECK2-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB2]], i32 [[TMP1]])
|
||||
// CHECK2-NEXT: call void @__kmpc_free_shared(i8* [[I]], i32 4)
|
||||
// CHECK2-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK2-LABEL: define {{[^@]+}}@__omp_outlined__1
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.0* noalias [[__CONTEXT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[I:%.*]]) #[[ATTR0]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.0*, align 4
|
||||
// CHECK2-NEXT: [[I_ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: store %struct.anon.0* [[__CONTEXT]], %struct.anon.0** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load %struct.anon.0*, %struct.anon.0** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_0:%.*]], %struct.anon.0* [[TMP0]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 4
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK2-NEXT: [[INC:%.*]] = add nsw i32 [[TMP3]], 1
|
||||
// CHECK2-NEXT: store i32 [[INC]], i32* [[TMP2]], align 4
|
||||
// CHECK2-NEXT: store i32* [[I]], i32** [[I_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load i32*, i32** [[I_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK2-NEXT: [[INC:%.*]] = add nsw i32 [[TMP1]], 1
|
||||
// CHECK2-NEXT: store i32 [[INC]], i32* [[TMP0]], align 4
|
||||
// CHECK2-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -838,16 +812,15 @@ int bar(int n){
|
|||
// CHECK2-NEXT: call void @__kmpc_get_shared_variables(i8*** [[GLOBAL_ARGS]])
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i8**, i8*** [[GLOBAL_ARGS]], align 4
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = getelementptr inbounds i8*, i8** [[TMP2]], i32 0
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = bitcast i8** [[TMP3]] to %struct.anon.0**
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = load %struct.anon.0*, %struct.anon.0** [[TMP4]], align 4
|
||||
// CHECK2-NEXT: call void @__omp_outlined__1(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]], %struct.anon.0* [[TMP5]]) #[[ATTR1]]
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = bitcast i8** [[TMP3]] to i32**
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = load i32*, i32** [[TMP4]], align 4
|
||||
// CHECK2-NEXT: call void @__omp_outlined__1(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]], i32* [[TMP5]]) #[[ATTR1]]
|
||||
// CHECK2-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK3-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z9ftemplateIcET_i_l16
|
||||
// CHECK3-SAME: () #[[ATTR0:[0-9]+]] {
|
||||
// CHECK3-NEXT: entry:
|
||||
// CHECK3-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 1
|
||||
// CHECK3-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK3-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
|
||||
// CHECK3-NEXT: store i32 0, i32* [[DOTZERO_ADDR]], align 4
|
||||
|
@ -857,7 +830,7 @@ int bar(int n){
|
|||
// CHECK3: user_code.entry:
|
||||
// CHECK3-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
|
||||
// CHECK3-NEXT: store i32 [[TMP1]], i32* [[DOTTHREADID_TEMP_]], align 4
|
||||
// CHECK3-NEXT: call void @__omp_outlined__(i32* [[DOTTHREADID_TEMP_]], i32* [[DOTZERO_ADDR]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]]) #[[ATTR1:[0-9]+]]
|
||||
// CHECK3-NEXT: call void @__omp_outlined__(i32* [[DOTTHREADID_TEMP_]], i32* [[DOTZERO_ADDR]]) #[[ATTR1:[0-9]+]]
|
||||
// CHECK3-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 false, i1 true)
|
||||
// CHECK3-NEXT: ret void
|
||||
// CHECK3: worker.exit:
|
||||
|
@ -865,98 +838,86 @@ int bar(int n){
|
|||
//
|
||||
//
|
||||
// CHECK3-LABEL: define {{[^@]+}}@__omp_outlined__
|
||||
// CHECK3-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK3-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]]) #[[ATTR0]] {
|
||||
// CHECK3-NEXT: entry:
|
||||
// CHECK3-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK3-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK3-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 4
|
||||
// CHECK3-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
|
||||
// CHECK3-NEXT: [[TMP:%.*]] = alloca i32, align 4
|
||||
// CHECK3-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
|
||||
// CHECK3-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
|
||||
// CHECK3-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
|
||||
// CHECK3-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
|
||||
// CHECK3-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON_0:%.*]], align 4
|
||||
// CHECK3-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [1 x i8*], align 4
|
||||
// CHECK3-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK3-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK3-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[I:%.*]] = call i8* @__kmpc_alloc_shared(i32 4)
|
||||
// CHECK3-NEXT: [[I_ON_STACK:%.*]] = bitcast i8* [[I]] to i32*
|
||||
// CHECK3-NEXT: store i32 0, i32* [[DOTOMP_LB]], align 4
|
||||
// CHECK3-NEXT: store i32 9, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK3-NEXT: store i32 1, i32* [[DOTOMP_STRIDE]], align 4
|
||||
// CHECK3-NEXT: store i32 0, i32* [[DOTOMP_IS_LAST]], align 4
|
||||
// CHECK3-NEXT: [[TMP1:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = load i32, i32* [[TMP1]], align 4
|
||||
// CHECK3-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 [[TMP2]], i32 92, i32* [[DOTOMP_IS_LAST]], i32* [[DOTOMP_LB]], i32* [[DOTOMP_UB]], i32* [[DOTOMP_STRIDE]], i32 1, i32 1)
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK3-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP3]], 9
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK3-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 [[TMP1]], i32 92, i32* [[DOTOMP_IS_LAST]], i32* [[DOTOMP_LB]], i32* [[DOTOMP_UB]], i32* [[DOTOMP_STRIDE]], i32 1, i32 1)
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK3-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
|
||||
// CHECK3-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
|
||||
// CHECK3: cond.true:
|
||||
// CHECK3-NEXT: br label [[COND_END:%.*]]
|
||||
// CHECK3: cond.false:
|
||||
// CHECK3-NEXT: [[TMP4:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK3-NEXT: br label [[COND_END]]
|
||||
// CHECK3: cond.end:
|
||||
// CHECK3-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP4]], [[COND_FALSE]] ]
|
||||
// CHECK3-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
|
||||
// CHECK3-NEXT: store i32 [[COND]], i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK3-NEXT: [[TMP5:%.*]] = load i32, i32* [[DOTOMP_LB]], align 4
|
||||
// CHECK3-NEXT: store i32 [[TMP5]], i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK3-NEXT: [[TMP4:%.*]] = load i32, i32* [[DOTOMP_LB]], align 4
|
||||
// CHECK3-NEXT: store i32 [[TMP4]], i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK3-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
|
||||
// CHECK3: omp.inner.for.cond:
|
||||
// CHECK3-NEXT: [[TMP6:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK3-NEXT: [[TMP7:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK3-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP6]], [[TMP7]]
|
||||
// CHECK3-NEXT: [[TMP5:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK3-NEXT: [[TMP6:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK3-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP5]], [[TMP6]]
|
||||
// CHECK3-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
|
||||
// CHECK3: omp.inner.for.body:
|
||||
// CHECK3-NEXT: [[TMP8:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK3-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP8]], 1
|
||||
// CHECK3-NEXT: [[TMP7:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK3-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP7]], 1
|
||||
// CHECK3-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
|
||||
// CHECK3-NEXT: store i32 [[ADD]], i32* [[I_ON_STACK]], align 4
|
||||
// CHECK3-NEXT: [[TMP9:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK3-NEXT: store i32* [[I_ON_STACK]], i32** [[TMP9]], align 4
|
||||
// CHECK3-NEXT: [[TMP10:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK3-NEXT: [[TMP11:%.*]] = call i8* @__kmpc_alloc_shared(i32 4)
|
||||
// CHECK3-NEXT: [[TMP12:%.*]] = load [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], align 4
|
||||
// CHECK3-NEXT: [[TMP13:%.*]] = bitcast i8* [[TMP11]] to %struct.anon.0*
|
||||
// CHECK3-NEXT: store [[STRUCT_ANON_0]] [[TMP12]], %struct.anon.0* [[TMP13]], align 4
|
||||
// CHECK3-NEXT: store i8* [[TMP11]], i8** [[TMP10]], align 4
|
||||
// CHECK3-NEXT: [[TMP14:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK3-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, %struct.anon.0*)* @__omp_outlined__1 to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined__1_wrapper to i8*), i8** [[TMP14]], i32 1)
|
||||
// CHECK3-NEXT: call void @__kmpc_free_shared(i8* [[TMP11]], i32 4)
|
||||
// CHECK3-NEXT: [[TMP8:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
|
||||
// CHECK3-NEXT: [[TMP9:%.*]] = bitcast i32* [[I_ON_STACK]] to i8*
|
||||
// CHECK3-NEXT: store i8* [[TMP9]], i8** [[TMP8]], align 4
|
||||
// CHECK3-NEXT: [[TMP10:%.*]] = bitcast [1 x i8*]* [[CAPTURED_VARS_ADDRS]] to i8**
|
||||
// CHECK3-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, i8* bitcast (void (i32*, i32*, i32*)* @__omp_outlined__1 to i8*), i8* bitcast (void (i16, i32)* @__omp_outlined__1_wrapper to i8*), i8** [[TMP10]], i32 1)
|
||||
// CHECK3-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
|
||||
// CHECK3: omp.body.continue:
|
||||
// CHECK3-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
|
||||
// CHECK3: omp.inner.for.inc:
|
||||
// CHECK3-NEXT: [[TMP15:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK3-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP15]], 1
|
||||
// CHECK3-NEXT: [[TMP11:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK3-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP11]], 1
|
||||
// CHECK3-NEXT: store i32 [[ADD2]], i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK3-NEXT: br label [[OMP_INNER_FOR_COND]]
|
||||
// CHECK3: omp.inner.for.end:
|
||||
// CHECK3-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
|
||||
// CHECK3: omp.loop.exit:
|
||||
// CHECK3-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB2]], i32 [[TMP2]])
|
||||
// CHECK3-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB2]], i32 [[TMP1]])
|
||||
// CHECK3-NEXT: call void @__kmpc_free_shared(i8* [[I]], i32 4)
|
||||
// CHECK3-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK3-LABEL: define {{[^@]+}}@__omp_outlined__1
|
||||
// CHECK3-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.0* noalias [[__CONTEXT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK3-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[I:%.*]]) #[[ATTR0]] {
|
||||
// CHECK3-NEXT: entry:
|
||||
// CHECK3-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK3-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK3-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.0*, align 4
|
||||
// CHECK3-NEXT: [[I_ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK3-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK3-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK3-NEXT: store %struct.anon.0* [[__CONTEXT]], %struct.anon.0** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = load %struct.anon.0*, %struct.anon.0** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_0:%.*]], %struct.anon.0* [[TMP0]], i32 0, i32 0
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 4
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK3-NEXT: [[INC:%.*]] = add nsw i32 [[TMP3]], 1
|
||||
// CHECK3-NEXT: store i32 [[INC]], i32* [[TMP2]], align 4
|
||||
// CHECK3-NEXT: store i32* [[I]], i32** [[I_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = load i32*, i32** [[I_ADDR]], align 4
|
||||
// CHECK3-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK3-NEXT: [[INC:%.*]] = add nsw i32 [[TMP1]], 1
|
||||
// CHECK3-NEXT: store i32 [[INC]], i32* [[TMP0]], align 4
|
||||
// CHECK3-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -973,8 +934,8 @@ int bar(int n){
|
|||
// CHECK3-NEXT: call void @__kmpc_get_shared_variables(i8*** [[GLOBAL_ARGS]])
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = load i8**, i8*** [[GLOBAL_ARGS]], align 4
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = getelementptr inbounds i8*, i8** [[TMP2]], i32 0
|
||||
// CHECK3-NEXT: [[TMP4:%.*]] = bitcast i8** [[TMP3]] to %struct.anon.0**
|
||||
// CHECK3-NEXT: [[TMP5:%.*]] = load %struct.anon.0*, %struct.anon.0** [[TMP4]], align 4
|
||||
// CHECK3-NEXT: call void @__omp_outlined__1(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]], %struct.anon.0* [[TMP5]]) #[[ATTR1]]
|
||||
// CHECK3-NEXT: [[TMP4:%.*]] = bitcast i8** [[TMP3]] to i32**
|
||||
// CHECK3-NEXT: [[TMP5:%.*]] = load i32*, i32** [[TMP4]], align 4
|
||||
// CHECK3-NEXT: call void @__omp_outlined__1(i32* [[DOTADDR1]], i32* [[DOTZERO_ADDR]], i32* [[TMP5]]) #[[ATTR1]]
|
||||
// CHECK3-NEXT: ret void
|
||||
//
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -894,7 +894,6 @@ int main (int argc, char **argv) {
|
|||
// CHECK1-SAME: (i64 [[ARGC:%.*]]) #[[ATTR0:[0-9]+]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[ARGC_ADDR:%.*]] = alloca i64, align 8
|
||||
// CHECK1-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 8
|
||||
// CHECK1-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: store i32 0, i32* [[DOTZERO_ADDR]], align 4
|
||||
|
@ -909,10 +908,8 @@ int main (int argc, char **argv) {
|
|||
// CHECK1-NEXT: [[ARGC_ON_STACK:%.*]] = bitcast i8* [[ARGC1]] to i32*
|
||||
// CHECK1-NEXT: store i32 [[TMP1]], i32* [[ARGC_ON_STACK]], align 4
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK1-NEXT: store i32* [[ARGC_ON_STACK]], i32** [[TMP3]], align 8
|
||||
// CHECK1-NEXT: store i32 [[TMP2]], i32* [[DOTTHREADID_TEMP_]], align 4
|
||||
// CHECK1-NEXT: call void @__omp_outlined__(i32* [[DOTTHREADID_TEMP_]], i32* [[DOTZERO_ADDR]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]]) #[[ATTR1:[0-9]+]]
|
||||
// CHECK1-NEXT: call void @__omp_outlined__(i32* [[DOTTHREADID_TEMP_]], i32* [[DOTZERO_ADDR]], i32* [[ARGC_ON_STACK]]) #[[ATTR1:[0-9]+]]
|
||||
// CHECK1-NEXT: call void @__kmpc_free_shared(i8* [[ARGC1]], i64 4)
|
||||
// CHECK1-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 false, i1 true)
|
||||
// CHECK1-NEXT: ret void
|
||||
|
@ -921,18 +918,16 @@ int main (int argc, char **argv) {
|
|||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@__omp_outlined__
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[ARGC:%.*]]) #[[ATTR0]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK1-NEXT: [[ARGC_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 8
|
||||
// CHECK1-NEXT: store i32 0, i32* [[TMP2]], align 4
|
||||
// CHECK1-NEXT: store i32* [[ARGC]], i32** [[ARGC_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load i32*, i32** [[ARGC_ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32 0, i32* [[TMP0]], align 4
|
||||
// CHECK1-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -940,7 +935,6 @@ int main (int argc, char **argv) {
|
|||
// CHECK1-SAME: (i8** [[ARGC:%.*]]) #[[ATTR0]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[ARGC_ADDR:%.*]] = alloca i8**, align 8
|
||||
// CHECK1-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON_0:%.*]], align 8
|
||||
// CHECK1-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: store i32 0, i32* [[DOTZERO_ADDR]], align 4
|
||||
|
@ -954,10 +948,8 @@ int main (int argc, char **argv) {
|
|||
// CHECK1-NEXT: [[ARGC_ON_STACK:%.*]] = bitcast i8* [[ARGC1]] to i8***
|
||||
// CHECK1-NEXT: store i8** [[TMP1]], i8*** [[ARGC_ON_STACK]], align 8
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK1-NEXT: store i8*** [[ARGC_ON_STACK]], i8**** [[TMP3]], align 8
|
||||
// CHECK1-NEXT: store i32 [[TMP2]], i32* [[DOTTHREADID_TEMP_]], align 4
|
||||
// CHECK1-NEXT: call void @__omp_outlined__1(i32* [[DOTTHREADID_TEMP_]], i32* [[DOTZERO_ADDR]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]]) #[[ATTR1]]
|
||||
// CHECK1-NEXT: call void @__omp_outlined__1(i32* [[DOTTHREADID_TEMP_]], i32* [[DOTZERO_ADDR]], i8*** [[ARGC_ON_STACK]]) #[[ATTR1]]
|
||||
// CHECK1-NEXT: call void @__kmpc_free_shared(i8* [[ARGC1]], i64 8)
|
||||
// CHECK1-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 false, i1 true)
|
||||
// CHECK1-NEXT: ret void
|
||||
|
@ -966,18 +958,16 @@ int main (int argc, char **argv) {
|
|||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@__omp_outlined__1
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.0* noalias [[__CONTEXT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i8*** nonnull align 8 dereferenceable(8) [[ARGC:%.*]]) #[[ATTR0]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.0*, align 8
|
||||
// CHECK1-NEXT: [[ARGC_ADDR:%.*]] = alloca i8***, align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store %struct.anon.0* [[__CONTEXT]], %struct.anon.0** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load %struct.anon.0*, %struct.anon.0** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_0:%.*]], %struct.anon.0* [[TMP0]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i8***, i8**** [[TMP1]], align 8
|
||||
// CHECK1-NEXT: store i8** null, i8*** [[TMP2]], align 8
|
||||
// CHECK1-NEXT: store i8*** [[ARGC]], i8**** [[ARGC_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load i8***, i8**** [[ARGC_ADDR]], align 8
|
||||
// CHECK1-NEXT: store i8** null, i8*** [[TMP0]], align 8
|
||||
// CHECK1-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -985,7 +975,6 @@ int main (int argc, char **argv) {
|
|||
// CHECK2-SAME: (i32 [[ARGC:%.*]]) #[[ATTR0:[0-9]+]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[ARGC_ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 4
|
||||
// CHECK2-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: store i32 0, i32* [[DOTZERO_ADDR]], align 4
|
||||
|
@ -999,10 +988,8 @@ int main (int argc, char **argv) {
|
|||
// CHECK2-NEXT: [[ARGC_ON_STACK:%.*]] = bitcast i8* [[ARGC1]] to i32*
|
||||
// CHECK2-NEXT: store i32 [[TMP1]], i32* [[ARGC_ON_STACK]], align 4
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK2-NEXT: store i32* [[ARGC_ON_STACK]], i32** [[TMP3]], align 4
|
||||
// CHECK2-NEXT: store i32 [[TMP2]], i32* [[DOTTHREADID_TEMP_]], align 4
|
||||
// CHECK2-NEXT: call void @__omp_outlined__(i32* [[DOTTHREADID_TEMP_]], i32* [[DOTZERO_ADDR]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]]) #[[ATTR1:[0-9]+]]
|
||||
// CHECK2-NEXT: call void @__omp_outlined__(i32* [[DOTTHREADID_TEMP_]], i32* [[DOTZERO_ADDR]], i32* [[ARGC_ON_STACK]]) #[[ATTR1:[0-9]+]]
|
||||
// CHECK2-NEXT: call void @__kmpc_free_shared(i8* [[ARGC1]], i32 4)
|
||||
// CHECK2-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 false, i1 true)
|
||||
// CHECK2-NEXT: ret void
|
||||
|
@ -1011,18 +998,16 @@ int main (int argc, char **argv) {
|
|||
//
|
||||
//
|
||||
// CHECK2-LABEL: define {{[^@]+}}@__omp_outlined__
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[ARGC:%.*]]) #[[ATTR0]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 4
|
||||
// CHECK2-NEXT: [[ARGC_ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 4
|
||||
// CHECK2-NEXT: store i32 0, i32* [[TMP2]], align 4
|
||||
// CHECK2-NEXT: store i32* [[ARGC]], i32** [[ARGC_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load i32*, i32** [[ARGC_ADDR]], align 4
|
||||
// CHECK2-NEXT: store i32 0, i32* [[TMP0]], align 4
|
||||
// CHECK2-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -1030,7 +1015,6 @@ int main (int argc, char **argv) {
|
|||
// CHECK2-SAME: (i8** [[ARGC:%.*]]) #[[ATTR0]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[ARGC_ADDR:%.*]] = alloca i8**, align 4
|
||||
// CHECK2-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON_0:%.*]], align 4
|
||||
// CHECK2-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: store i32 0, i32* [[DOTZERO_ADDR]], align 4
|
||||
|
@ -1044,10 +1028,8 @@ int main (int argc, char **argv) {
|
|||
// CHECK2-NEXT: [[ARGC_ON_STACK:%.*]] = bitcast i8* [[ARGC1]] to i8***
|
||||
// CHECK2-NEXT: store i8** [[TMP1]], i8*** [[ARGC_ON_STACK]], align 4
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK2-NEXT: store i8*** [[ARGC_ON_STACK]], i8**** [[TMP3]], align 4
|
||||
// CHECK2-NEXT: store i32 [[TMP2]], i32* [[DOTTHREADID_TEMP_]], align 4
|
||||
// CHECK2-NEXT: call void @__omp_outlined__1(i32* [[DOTTHREADID_TEMP_]], i32* [[DOTZERO_ADDR]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]]) #[[ATTR1]]
|
||||
// CHECK2-NEXT: call void @__omp_outlined__1(i32* [[DOTTHREADID_TEMP_]], i32* [[DOTZERO_ADDR]], i8*** [[ARGC_ON_STACK]]) #[[ATTR1]]
|
||||
// CHECK2-NEXT: call void @__kmpc_free_shared(i8* [[ARGC1]], i32 4)
|
||||
// CHECK2-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 false, i1 true)
|
||||
// CHECK2-NEXT: ret void
|
||||
|
@ -1056,18 +1038,16 @@ int main (int argc, char **argv) {
|
|||
//
|
||||
//
|
||||
// CHECK2-LABEL: define {{[^@]+}}@__omp_outlined__1
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.0* noalias [[__CONTEXT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i8*** nonnull align 4 dereferenceable(4) [[ARGC:%.*]]) #[[ATTR0]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK2-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.0*, align 4
|
||||
// CHECK2-NEXT: [[ARGC_ADDR:%.*]] = alloca i8***, align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK2-NEXT: store %struct.anon.0* [[__CONTEXT]], %struct.anon.0** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load %struct.anon.0*, %struct.anon.0** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_0:%.*]], %struct.anon.0* [[TMP0]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i8***, i8**** [[TMP1]], align 4
|
||||
// CHECK2-NEXT: store i8** null, i8*** [[TMP2]], align 4
|
||||
// CHECK2-NEXT: store i8*** [[ARGC]], i8**** [[ARGC_ADDR]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load i8***, i8**** [[ARGC_ADDR]], align 4
|
||||
// CHECK2-NEXT: store i8** null, i8*** [[TMP0]], align 4
|
||||
// CHECK2-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -1077,7 +1057,6 @@ int main (int argc, char **argv) {
|
|||
// CHECK3-NEXT: [[A_ADDR:%.*]] = alloca i64, align 8
|
||||
// CHECK3-NEXT: [[B_ADDR:%.*]] = alloca i64, align 8
|
||||
// CHECK3-NEXT: [[ARGC_ADDR:%.*]] = alloca i64, align 8
|
||||
// CHECK3-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 8
|
||||
// CHECK3-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK3-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
|
||||
// CHECK3-NEXT: store i32 0, i32* [[DOTZERO_ADDR]], align 4
|
||||
|
@ -1096,10 +1075,8 @@ int main (int argc, char **argv) {
|
|||
// CHECK3-NEXT: [[ARGC_ON_STACK:%.*]] = bitcast i8* [[ARGC3]] to i32*
|
||||
// CHECK3-NEXT: store i32 [[TMP1]], i32* [[ARGC_ON_STACK]], align 4
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK3-NEXT: store i32* [[ARGC_ON_STACK]], i32** [[TMP3]], align 8
|
||||
// CHECK3-NEXT: store i32 [[TMP2]], i32* [[DOTTHREADID_TEMP_]], align 4
|
||||
// CHECK3-NEXT: call void @__omp_outlined__(i32* [[DOTTHREADID_TEMP_]], i32* [[DOTZERO_ADDR]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]]) #[[ATTR1:[0-9]+]]
|
||||
// CHECK3-NEXT: call void @__omp_outlined__(i32* [[DOTTHREADID_TEMP_]], i32* [[DOTZERO_ADDR]], i32* [[ARGC_ON_STACK]]) #[[ATTR1:[0-9]+]]
|
||||
// CHECK3-NEXT: call void @__kmpc_free_shared(i8* [[ARGC3]], i64 4)
|
||||
// CHECK3-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 false, i1 true)
|
||||
// CHECK3-NEXT: ret void
|
||||
|
@ -1108,18 +1085,16 @@ int main (int argc, char **argv) {
|
|||
//
|
||||
//
|
||||
// CHECK3-LABEL: define {{[^@]+}}@__omp_outlined__
|
||||
// CHECK3-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK3-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[ARGC:%.*]]) #[[ATTR0]] {
|
||||
// CHECK3-NEXT: entry:
|
||||
// CHECK3-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK3-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK3-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK3-NEXT: [[ARGC_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK3-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK3-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK3-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK3-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 8
|
||||
// CHECK3-NEXT: store i32 0, i32* [[TMP2]], align 4
|
||||
// CHECK3-NEXT: store i32* [[ARGC]], i32** [[ARGC_ADDR]], align 8
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = load i32*, i32** [[ARGC_ADDR]], align 8
|
||||
// CHECK3-NEXT: store i32 0, i32* [[TMP0]], align 4
|
||||
// CHECK3-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -1129,7 +1104,6 @@ int main (int argc, char **argv) {
|
|||
// CHECK3-NEXT: [[A_ADDR:%.*]] = alloca i64, align 8
|
||||
// CHECK3-NEXT: [[B_ADDR:%.*]] = alloca i64, align 8
|
||||
// CHECK3-NEXT: [[ARGC_ADDR:%.*]] = alloca i8**, align 8
|
||||
// CHECK3-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON_0:%.*]], align 8
|
||||
// CHECK3-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK3-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
|
||||
// CHECK3-NEXT: store i32 0, i32* [[DOTZERO_ADDR]], align 4
|
||||
|
@ -1147,10 +1121,8 @@ int main (int argc, char **argv) {
|
|||
// CHECK3-NEXT: [[ARGC_ON_STACK:%.*]] = bitcast i8* [[ARGC2]] to i8***
|
||||
// CHECK3-NEXT: store i8** [[TMP1]], i8*** [[ARGC_ON_STACK]], align 8
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK3-NEXT: store i8*** [[ARGC_ON_STACK]], i8**** [[TMP3]], align 8
|
||||
// CHECK3-NEXT: store i32 [[TMP2]], i32* [[DOTTHREADID_TEMP_]], align 4
|
||||
// CHECK3-NEXT: call void @__omp_outlined__1(i32* [[DOTTHREADID_TEMP_]], i32* [[DOTZERO_ADDR]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]]) #[[ATTR1]]
|
||||
// CHECK3-NEXT: call void @__omp_outlined__1(i32* [[DOTTHREADID_TEMP_]], i32* [[DOTZERO_ADDR]], i8*** [[ARGC_ON_STACK]]) #[[ATTR1]]
|
||||
// CHECK3-NEXT: call void @__kmpc_free_shared(i8* [[ARGC2]], i64 8)
|
||||
// CHECK3-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 false, i1 true)
|
||||
// CHECK3-NEXT: ret void
|
||||
|
@ -1159,18 +1131,16 @@ int main (int argc, char **argv) {
|
|||
//
|
||||
//
|
||||
// CHECK3-LABEL: define {{[^@]+}}@__omp_outlined__1
|
||||
// CHECK3-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.0* noalias [[__CONTEXT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK3-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i8*** nonnull align 8 dereferenceable(8) [[ARGC:%.*]]) #[[ATTR0]] {
|
||||
// CHECK3-NEXT: entry:
|
||||
// CHECK3-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK3-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK3-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.0*, align 8
|
||||
// CHECK3-NEXT: [[ARGC_ADDR:%.*]] = alloca i8***, align 8
|
||||
// CHECK3-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK3-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK3-NEXT: store %struct.anon.0* [[__CONTEXT]], %struct.anon.0** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = load %struct.anon.0*, %struct.anon.0** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK3-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_0:%.*]], %struct.anon.0* [[TMP0]], i32 0, i32 0
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = load i8***, i8**** [[TMP1]], align 8
|
||||
// CHECK3-NEXT: store i8** null, i8*** [[TMP2]], align 8
|
||||
// CHECK3-NEXT: store i8*** [[ARGC]], i8**** [[ARGC_ADDR]], align 8
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = load i8***, i8**** [[ARGC_ADDR]], align 8
|
||||
// CHECK3-NEXT: store i8** null, i8*** [[TMP0]], align 8
|
||||
// CHECK3-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -1180,7 +1150,6 @@ int main (int argc, char **argv) {
|
|||
// CHECK4-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK4-NEXT: [[B_ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK4-NEXT: [[ARGC_ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK4-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 4
|
||||
// CHECK4-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK4-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
|
||||
// CHECK4-NEXT: store i32 0, i32* [[DOTZERO_ADDR]], align 4
|
||||
|
@ -1196,10 +1165,8 @@ int main (int argc, char **argv) {
|
|||
// CHECK4-NEXT: [[ARGC_ON_STACK:%.*]] = bitcast i8* [[ARGC1]] to i32*
|
||||
// CHECK4-NEXT: store i32 [[TMP1]], i32* [[ARGC_ON_STACK]], align 4
|
||||
// CHECK4-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
|
||||
// CHECK4-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK4-NEXT: store i32* [[ARGC_ON_STACK]], i32** [[TMP3]], align 4
|
||||
// CHECK4-NEXT: store i32 [[TMP2]], i32* [[DOTTHREADID_TEMP_]], align 4
|
||||
// CHECK4-NEXT: call void @__omp_outlined__(i32* [[DOTTHREADID_TEMP_]], i32* [[DOTZERO_ADDR]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]]) #[[ATTR1:[0-9]+]]
|
||||
// CHECK4-NEXT: call void @__omp_outlined__(i32* [[DOTTHREADID_TEMP_]], i32* [[DOTZERO_ADDR]], i32* [[ARGC_ON_STACK]]) #[[ATTR1:[0-9]+]]
|
||||
// CHECK4-NEXT: call void @__kmpc_free_shared(i8* [[ARGC1]], i32 4)
|
||||
// CHECK4-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 false, i1 true)
|
||||
// CHECK4-NEXT: ret void
|
||||
|
@ -1208,18 +1175,16 @@ int main (int argc, char **argv) {
|
|||
//
|
||||
//
|
||||
// CHECK4-LABEL: define {{[^@]+}}@__omp_outlined__
|
||||
// CHECK4-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK4-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[ARGC:%.*]]) #[[ATTR0]] {
|
||||
// CHECK4-NEXT: entry:
|
||||
// CHECK4-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK4-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK4-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 4
|
||||
// CHECK4-NEXT: [[ARGC_ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK4-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK4-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK4-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK4-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK4-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK4-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 4
|
||||
// CHECK4-NEXT: store i32 0, i32* [[TMP2]], align 4
|
||||
// CHECK4-NEXT: store i32* [[ARGC]], i32** [[ARGC_ADDR]], align 4
|
||||
// CHECK4-NEXT: [[TMP0:%.*]] = load i32*, i32** [[ARGC_ADDR]], align 4
|
||||
// CHECK4-NEXT: store i32 0, i32* [[TMP0]], align 4
|
||||
// CHECK4-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -1229,7 +1194,6 @@ int main (int argc, char **argv) {
|
|||
// CHECK4-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK4-NEXT: [[B_ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK4-NEXT: [[ARGC_ADDR:%.*]] = alloca i8**, align 4
|
||||
// CHECK4-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON_0:%.*]], align 4
|
||||
// CHECK4-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK4-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
|
||||
// CHECK4-NEXT: store i32 0, i32* [[DOTZERO_ADDR]], align 4
|
||||
|
@ -1245,10 +1209,8 @@ int main (int argc, char **argv) {
|
|||
// CHECK4-NEXT: [[ARGC_ON_STACK:%.*]] = bitcast i8* [[ARGC1]] to i8***
|
||||
// CHECK4-NEXT: store i8** [[TMP1]], i8*** [[ARGC_ON_STACK]], align 4
|
||||
// CHECK4-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
|
||||
// CHECK4-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK4-NEXT: store i8*** [[ARGC_ON_STACK]], i8**** [[TMP3]], align 4
|
||||
// CHECK4-NEXT: store i32 [[TMP2]], i32* [[DOTTHREADID_TEMP_]], align 4
|
||||
// CHECK4-NEXT: call void @__omp_outlined__1(i32* [[DOTTHREADID_TEMP_]], i32* [[DOTZERO_ADDR]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]]) #[[ATTR1]]
|
||||
// CHECK4-NEXT: call void @__omp_outlined__1(i32* [[DOTTHREADID_TEMP_]], i32* [[DOTZERO_ADDR]], i8*** [[ARGC_ON_STACK]]) #[[ATTR1]]
|
||||
// CHECK4-NEXT: call void @__kmpc_free_shared(i8* [[ARGC1]], i32 4)
|
||||
// CHECK4-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i1 false, i1 true)
|
||||
// CHECK4-NEXT: ret void
|
||||
|
@ -1257,17 +1219,15 @@ int main (int argc, char **argv) {
|
|||
//
|
||||
//
|
||||
// CHECK4-LABEL: define {{[^@]+}}@__omp_outlined__1
|
||||
// CHECK4-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.0* noalias [[__CONTEXT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK4-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i8*** nonnull align 4 dereferenceable(4) [[ARGC:%.*]]) #[[ATTR0]] {
|
||||
// CHECK4-NEXT: entry:
|
||||
// CHECK4-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK4-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 4
|
||||
// CHECK4-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.0*, align 4
|
||||
// CHECK4-NEXT: [[ARGC_ADDR:%.*]] = alloca i8***, align 4
|
||||
// CHECK4-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 4
|
||||
// CHECK4-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 4
|
||||
// CHECK4-NEXT: store %struct.anon.0* [[__CONTEXT]], %struct.anon.0** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK4-NEXT: [[TMP0:%.*]] = load %struct.anon.0*, %struct.anon.0** [[__CONTEXT_ADDR]], align 4
|
||||
// CHECK4-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_0:%.*]], %struct.anon.0* [[TMP0]], i32 0, i32 0
|
||||
// CHECK4-NEXT: [[TMP2:%.*]] = load i8***, i8**** [[TMP1]], align 4
|
||||
// CHECK4-NEXT: store i8** null, i8*** [[TMP2]], align 4
|
||||
// CHECK4-NEXT: store i8*** [[ARGC]], i8**** [[ARGC_ADDR]], align 4
|
||||
// CHECK4-NEXT: [[TMP0:%.*]] = load i8***, i8**** [[ARGC_ADDR]], align 4
|
||||
// CHECK4-NEXT: store i8** null, i8*** [[TMP0]], align 4
|
||||
// CHECK4-NEXT: ret void
|
||||
//
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -49,38 +49,34 @@ int main() {
|
|||
// CHECK1-SAME: () #[[ATTR0:[0-9]+]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 1
|
||||
// CHECK1-NEXT: store i32 0, i32* [[RETVAL]], align 4
|
||||
// CHECK1-NEXT: call void @"?main@Test@@SAXXZ"()
|
||||
// CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon*)* @.omp_outlined. to void (i32*, i32*, ...)*), %struct.anon* [[OMP_OUTLINED_ARG_AGG_]])
|
||||
// CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 0, void (i32*, i32*, ...)* bitcast (void (i32*, i32*)* @.omp_outlined. to void (i32*, i32*, ...)*))
|
||||
// CHECK1-NEXT: ret i32 0
|
||||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@.omp_outlined.
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR2:[0-9]+]] personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) {
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]]) #[[ATTR2:[0-9]+]] personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[T:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: invoke void @"?foo@@YAXXZ"()
|
||||
// CHECK1-NEXT: to label [[INVOKE_CONT:%.*]] unwind label [[CATCH_DISPATCH:%.*]]
|
||||
// CHECK1: catch.dispatch:
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = catchswitch within none [label %catch] unwind label [[TERMINATE:%.*]]
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = catchswitch within none [label %catch] unwind label [[TERMINATE:%.*]]
|
||||
// CHECK1: catch:
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = catchpad within [[TMP1]] [%rtti.TypeDescriptor2* @"??_R0H@8", i32 0, i32* %t]
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = load i32, i32* [[TMP3]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_critical(%struct.ident_t* @[[GLOB1]], i32 [[TMP4]], [8 x i32]* @.gomp_critical_user_.var) [ "funclet"(token [[TMP2]]) ]
|
||||
// CHECK1-NEXT: invoke void @"?bar@@YAXXZ"() [ "funclet"(token [[TMP2]]) ]
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = catchpad within [[TMP0]] [%rtti.TypeDescriptor2* @"??_R0H@8", i32 0, i32* %t]
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_critical(%struct.ident_t* @[[GLOB1]], i32 [[TMP3]], [8 x i32]* @.gomp_critical_user_.var) [ "funclet"(token [[TMP1]]) ]
|
||||
// CHECK1-NEXT: invoke void @"?bar@@YAXXZ"() [ "funclet"(token [[TMP1]]) ]
|
||||
// CHECK1-NEXT: to label [[INVOKE_CONT1:%.*]] unwind label [[EHCLEANUP:%.*]]
|
||||
// CHECK1: invoke.cont1:
|
||||
// CHECK1-NEXT: call void @__kmpc_end_critical(%struct.ident_t* @[[GLOB1]], i32 [[TMP4]], [8 x i32]* @.gomp_critical_user_.var) [ "funclet"(token [[TMP2]]) ]
|
||||
// CHECK1-NEXT: catchret from [[TMP2]] to label [[CATCHRET_DEST:%.*]]
|
||||
// CHECK1-NEXT: call void @__kmpc_end_critical(%struct.ident_t* @[[GLOB1]], i32 [[TMP3]], [8 x i32]* @.gomp_critical_user_.var) [ "funclet"(token [[TMP1]]) ]
|
||||
// CHECK1-NEXT: catchret from [[TMP1]] to label [[CATCHRET_DEST:%.*]]
|
||||
// CHECK1: catchret.dest:
|
||||
// CHECK1-NEXT: br label [[TRY_CONT:%.*]]
|
||||
// CHECK1: try.cont:
|
||||
|
@ -88,55 +84,53 @@ int main() {
|
|||
// CHECK1: invoke.cont:
|
||||
// CHECK1-NEXT: br label [[TRY_CONT]]
|
||||
// CHECK1: ehcleanup:
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = cleanuppad within [[TMP2]] []
|
||||
// CHECK1-NEXT: call void @__kmpc_end_critical(%struct.ident_t* @[[GLOB1]], i32 [[TMP4]], [8 x i32]* @.gomp_critical_user_.var) [ "funclet"(token [[TMP5]]) ]
|
||||
// CHECK1-NEXT: cleanupret from [[TMP5]] unwind label [[TERMINATE2:%.*]]
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = cleanuppad within [[TMP1]] []
|
||||
// CHECK1-NEXT: call void @__kmpc_end_critical(%struct.ident_t* @[[GLOB1]], i32 [[TMP3]], [8 x i32]* @.gomp_critical_user_.var) [ "funclet"(token [[TMP4]]) ]
|
||||
// CHECK1-NEXT: cleanupret from [[TMP4]] unwind label [[TERMINATE2:%.*]]
|
||||
// CHECK1: terminate:
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = cleanuppad within none []
|
||||
// CHECK1-NEXT: call void @"?terminate@@YAXXZ"() #[[ATTR7:[0-9]+]] [ "funclet"(token [[TMP6]]) ]
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = cleanuppad within none []
|
||||
// CHECK1-NEXT: call void @"?terminate@@YAXXZ"() #[[ATTR7:[0-9]+]] [ "funclet"(token [[TMP5]]) ]
|
||||
// CHECK1-NEXT: unreachable
|
||||
// CHECK1: terminate2:
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = cleanuppad within [[TMP2]] []
|
||||
// CHECK1-NEXT: call void @"?terminate@@YAXXZ"() #[[ATTR7]] [ "funclet"(token [[TMP7]]) ]
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = cleanuppad within [[TMP1]] []
|
||||
// CHECK1-NEXT: call void @"?terminate@@YAXXZ"() #[[ATTR7]] [ "funclet"(token [[TMP6]]) ]
|
||||
// CHECK1-NEXT: unreachable
|
||||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@.omp_outlined..1
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.0* noalias [[__CONTEXT:%.*]]) #[[ATTR2]] {
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[J:%.*]]) #[[ATTR2]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.0*, align 8
|
||||
// CHECK1-NEXT: [[J_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[LOCAL_J:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[DOTOMP_COPYPRIVATE_DID_IT:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[DOTOMP_COPYPRIVATE_CPR_LIST:%.*]] = alloca [1 x i8*], align 8
|
||||
// CHECK1-NEXT: store %struct.anon.0* [[__CONTEXT]], %struct.anon.0** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32* [[J]], i32** [[J_ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load %struct.anon.0*, %struct.anon.0** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_0:%.*]], %struct.anon.0* [[TMP0]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load i32*, i32** [[J_ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32 3, i32* [[LOCAL_J]], align 4
|
||||
// CHECK1-NEXT: store i32 0, i32* [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = load i32, i32* [[TMP3]], align 4
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = call i32 @__kmpc_single(%struct.ident_t* @[[GLOB1]], i32 [[TMP4]])
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = icmp ne i32 [[TMP5]], 0
|
||||
// CHECK1-NEXT: br i1 [[TMP6]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i32, i32* [[TMP1]], align 4
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = call i32 @__kmpc_single(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]])
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = icmp ne i32 [[TMP3]], 0
|
||||
// CHECK1-NEXT: br i1 [[TMP4]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
|
||||
// CHECK1: omp_if.then:
|
||||
// CHECK1-NEXT: store i32 4, i32* [[LOCAL_J]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_end_single(%struct.ident_t* @[[GLOB1]], i32 [[TMP4]])
|
||||
// CHECK1-NEXT: call void @__kmpc_end_single(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]])
|
||||
// CHECK1-NEXT: store i32 1, i32* [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
|
||||
// CHECK1-NEXT: br label [[OMP_IF_END]]
|
||||
// CHECK1: omp_if.end:
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 0
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = bitcast i32* [[LOCAL_J]] to i8*
|
||||
// CHECK1-NEXT: store i8* [[TMP8]], i8** [[TMP7]], align 8
|
||||
// CHECK1-NEXT: [[TMP9:%.*]] = bitcast [1 x i8*]* [[DOTOMP_COPYPRIVATE_CPR_LIST]] to i8*
|
||||
// CHECK1-NEXT: [[TMP10:%.*]] = load i32, i32* [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_copyprivate(%struct.ident_t* @[[GLOB1]], i32 [[TMP4]], i64 8, i8* [[TMP9]], void (i8*, i8*)* @.omp.copyprivate.copy_func, i32 [[TMP10]])
|
||||
// CHECK1-NEXT: [[TMP11:%.*]] = load i32, i32* [[LOCAL_J]], align 4
|
||||
// CHECK1-NEXT: store i32 [[TMP11]], i32* [[TMP2]], align 4
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 0
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = bitcast i32* [[LOCAL_J]] to i8*
|
||||
// CHECK1-NEXT: store i8* [[TMP6]], i8** [[TMP5]], align 8
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = bitcast [1 x i8*]* [[DOTOMP_COPYPRIVATE_CPR_LIST]] to i8*
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = load i32, i32* [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_copyprivate(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]], i64 8, i8* [[TMP7]], void (i8*, i8*)* @.omp.copyprivate.copy_func, i32 [[TMP8]])
|
||||
// CHECK1-NEXT: [[TMP9:%.*]] = load i32, i32* [[LOCAL_J]], align 4
|
||||
// CHECK1-NEXT: store i32 [[TMP9]], i32* [[TMP0]], align 4
|
||||
// CHECK1-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -161,3 +155,4 @@ int main() {
|
|||
// CHECK1-NEXT: store i32 [[TMP12]], i32* [[TMP8]], align 4
|
||||
// CHECK1-NEXT: ret void
|
||||
//
|
||||
//
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -38,143 +38,128 @@ int main() {
|
|||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[A:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 8
|
||||
// CHECK1-NEXT: store i32 0, i32* [[RETVAL]], align 4
|
||||
// CHECK1-NEXT: store i32 0, i32* [[A]], align 4
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK1-NEXT: store i32* [[A]], i32** [[TMP0]], align 8
|
||||
// CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon*)* @.omp_outlined. to void (i32*, i32*, ...)*), %struct.anon* [[OMP_OUTLINED_ARG_AGG_]])
|
||||
// CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @.omp_outlined. to void (i32*, i32*, ...)*), i32* [[A]])
|
||||
// CHECK1-NEXT: ret i32 0
|
||||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@.omp_outlined.
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK1-NEXT: [[A_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[TMP:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[A:%.*]] = alloca [[STRUCT_LASPRIVATE_CONDITIONAL:%.*]], align 4
|
||||
// CHECK1-NEXT: [[A1:%.*]] = alloca [[STRUCT_LASPRIVATE_CONDITIONAL:%.*]], align 4
|
||||
// CHECK1-NEXT: [[I:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON_0:%.*]], align 8
|
||||
// CHECK1-NEXT: [[OMP_OUTLINED_ARG_AGG_7:%.*]] = alloca [[STRUCT_ANON_1:%.*]], align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 8
|
||||
// CHECK1-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load i32*, i32** [[A_ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32 0, i32* [[DOTOMP_LB]], align 4
|
||||
// CHECK1-NEXT: store i32 9, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK1-NEXT: store i32 1, i32* [[DOTOMP_STRIDE]], align 4
|
||||
// CHECK1-NEXT: store i32 0, i32* [[DOTOMP_IS_LAST]], align 4
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_LASPRIVATE_CONDITIONAL]], %struct.lasprivate.conditional* [[A]], i32 0, i32 1
|
||||
// CHECK1-NEXT: store i8 0, i8* [[TMP3]], align 4
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = getelementptr inbounds [[STRUCT_LASPRIVATE_CONDITIONAL]], %struct.lasprivate.conditional* [[A]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = load i32, i32* [[TMP5]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 [[TMP6]], i32 34, i32* [[DOTOMP_IS_LAST]], i32* [[DOTOMP_LB]], i32* [[DOTOMP_UB]], i32* [[DOTOMP_STRIDE]], i32 1, i32 1)
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK1-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP7]], 9
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_LASPRIVATE_CONDITIONAL]], %struct.lasprivate.conditional* [[A1]], i32 0, i32 1
|
||||
// CHECK1-NEXT: store i8 0, i8* [[TMP1]], align 4
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[STRUCT_LASPRIVATE_CONDITIONAL]], %struct.lasprivate.conditional* [[A1]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = load i32, i32* [[TMP3]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 [[TMP4]], i32 34, i32* [[DOTOMP_IS_LAST]], i32* [[DOTOMP_LB]], i32* [[DOTOMP_UB]], i32* [[DOTOMP_STRIDE]], i32 1, i32 1)
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK1-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP5]], 9
|
||||
// CHECK1-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
|
||||
// CHECK1: cond.true:
|
||||
// CHECK1-NEXT: br label [[COND_END:%.*]]
|
||||
// CHECK1: cond.false:
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK1-NEXT: br label [[COND_END]]
|
||||
// CHECK1: cond.end:
|
||||
// CHECK1-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP8]], [[COND_FALSE]] ]
|
||||
// CHECK1-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP6]], [[COND_FALSE]] ]
|
||||
// CHECK1-NEXT: store i32 [[COND]], i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK1-NEXT: [[TMP9:%.*]] = load i32, i32* [[DOTOMP_LB]], align 4
|
||||
// CHECK1-NEXT: store i32 [[TMP9]], i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = load i32, i32* [[DOTOMP_LB]], align 4
|
||||
// CHECK1-NEXT: store i32 [[TMP7]], i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK1-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
|
||||
// CHECK1: omp.inner.for.cond:
|
||||
// CHECK1-NEXT: [[TMP10:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK1-NEXT: [[TMP11:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK1-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP10]], [[TMP11]]
|
||||
// CHECK1-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK1-NEXT: [[TMP9:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK1-NEXT: [[CMP2:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
|
||||
// CHECK1-NEXT: br i1 [[CMP2]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
|
||||
// CHECK1: omp.inner.for.body:
|
||||
// CHECK1-NEXT: [[TMP12:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK1-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP12]], 1
|
||||
// CHECK1-NEXT: [[TMP10:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK1-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
|
||||
// CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
|
||||
// CHECK1-NEXT: store i32 [[ADD]], i32* [[I]], align 4
|
||||
// CHECK1-NEXT: [[TMP13:%.*]] = load i32, i32* [[I]], align 4
|
||||
// CHECK1-NEXT: [[CMP2:%.*]] = icmp slt i32 [[TMP13]], 5
|
||||
// CHECK1-NEXT: br i1 [[CMP2]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
|
||||
// CHECK1-NEXT: [[TMP11:%.*]] = load i32, i32* [[I]], align 4
|
||||
// CHECK1-NEXT: [[CMP3:%.*]] = icmp slt i32 [[TMP11]], 5
|
||||
// CHECK1-NEXT: br i1 [[CMP3]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
|
||||
// CHECK1: if.then:
|
||||
// CHECK1-NEXT: store i32 0, i32* [[TMP4]], align 4
|
||||
// CHECK1-NEXT: [[TMP14:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_critical(%struct.ident_t* @[[GLOB2]], i32 [[TMP6]], [8 x i32]* @.gomp_critical_user_{{pl_cond[.].+[.|,]}}var)
|
||||
// CHECK1-NEXT: [[TMP15:%.*]] = load i32, i32* @.{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK1-NEXT: [[TMP16:%.*]] = icmp sle i32 [[TMP15]], [[TMP14]]
|
||||
// CHECK1-NEXT: br i1 [[TMP16]], label [[LP_COND_THEN:%.*]], label [[LP_COND_EXIT:%.*]]
|
||||
// CHECK1-NEXT: store i32 0, i32* [[TMP2]], align 4
|
||||
// CHECK1-NEXT: [[TMP12:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_critical(%struct.ident_t* @[[GLOB2]], i32 [[TMP4]], [8 x i32]* @.gomp_critical_user_{{pl_cond[.].+[.|,]}}var)
|
||||
// CHECK1-NEXT: [[TMP13:%.*]] = load i32, i32* @.{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK1-NEXT: [[TMP14:%.*]] = icmp sle i32 [[TMP13]], [[TMP12]]
|
||||
// CHECK1-NEXT: br i1 [[TMP14]], label [[LP_COND_THEN:%.*]], label [[LP_COND_EXIT:%.*]]
|
||||
// CHECK1: lp_cond_then:
|
||||
// CHECK1-NEXT: store i32 [[TMP14]], i32* @.{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK1-NEXT: [[TMP17:%.*]] = load i32, i32* [[TMP4]], align 4
|
||||
// CHECK1-NEXT: store i32 [[TMP17]], i32* @{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK1-NEXT: store i32 [[TMP12]], i32* @.{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK1-NEXT: [[TMP15:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK1-NEXT: store i32 [[TMP15]], i32* @{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK1-NEXT: br label [[LP_COND_EXIT]]
|
||||
// CHECK1: lp_cond_exit:
|
||||
// CHECK1-NEXT: call void @__kmpc_end_critical(%struct.ident_t* @[[GLOB2]], i32 [[TMP6]], [8 x i32]* @.gomp_critical_user_{{pl_cond[.].+[.|,]}}var)
|
||||
// CHECK1-NEXT: call void @__kmpc_push_num_threads(%struct.ident_t* @[[GLOB2]], i32 [[TMP6]], i32 10)
|
||||
// CHECK1-NEXT: [[TMP18:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK1-NEXT: store i32* [[TMP4]], i32** [[TMP18]], align 8
|
||||
// CHECK1-NEXT: [[TMP19:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 1
|
||||
// CHECK1-NEXT: store i32* [[I]], i32** [[TMP19]], align 8
|
||||
// CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB2]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon.0*)* @.omp_outlined..1 to void (i32*, i32*, ...)*), %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]])
|
||||
// CHECK1-NEXT: [[TMP20:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_critical(%struct.ident_t* @[[GLOB2]], i32 [[TMP6]], [8 x i32]* @.gomp_critical_user_{{pl_cond[.].+[.|,]}}var)
|
||||
// CHECK1-NEXT: [[TMP21:%.*]] = load i32, i32* @.{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK1-NEXT: [[TMP22:%.*]] = icmp sle i32 [[TMP21]], [[TMP20]]
|
||||
// CHECK1-NEXT: br i1 [[TMP22]], label [[LP_COND_THEN3:%.*]], label [[LP_COND_EXIT4:%.*]]
|
||||
// CHECK1: lp_cond_then3:
|
||||
// CHECK1-NEXT: store i32 [[TMP20]], i32* @.{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK1-NEXT: [[TMP23:%.*]] = load i32, i32* [[TMP4]], align 4
|
||||
// CHECK1-NEXT: store i32 [[TMP23]], i32* @{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK1-NEXT: br label [[LP_COND_EXIT4]]
|
||||
// CHECK1: lp_cond_exit4:
|
||||
// CHECK1-NEXT: call void @__kmpc_end_critical(%struct.ident_t* @[[GLOB2]], i32 [[TMP6]], [8 x i32]* @.gomp_critical_user_{{pl_cond[.].+[.|,]}}var)
|
||||
// CHECK1-NEXT: [[TMP24:%.*]] = load i32, i32* [[I]], align 4
|
||||
// CHECK1-NEXT: [[TMP25:%.*]] = atomicrmw add i32* [[TMP4]], i32 [[TMP24]] monotonic, align 4
|
||||
// CHECK1-NEXT: [[TMP26:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_critical(%struct.ident_t* @[[GLOB2]], i32 [[TMP6]], [8 x i32]* @.gomp_critical_user_{{pl_cond[.].+[.|,]}}var)
|
||||
// CHECK1-NEXT: [[TMP27:%.*]] = load i32, i32* @.{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK1-NEXT: [[TMP28:%.*]] = icmp sle i32 [[TMP27]], [[TMP26]]
|
||||
// CHECK1-NEXT: br i1 [[TMP28]], label [[LP_COND_THEN5:%.*]], label [[LP_COND_EXIT6:%.*]]
|
||||
// CHECK1: lp_cond_then5:
|
||||
// CHECK1-NEXT: store i32 [[TMP26]], i32* @.{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK1-NEXT: [[TMP29:%.*]] = load i32, i32* [[TMP4]], align 4
|
||||
// CHECK1-NEXT: store i32 [[TMP29]], i32* @{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK1-NEXT: br label [[LP_COND_EXIT6]]
|
||||
// CHECK1: lp_cond_exit6:
|
||||
// CHECK1-NEXT: call void @__kmpc_end_critical(%struct.ident_t* @[[GLOB2]], i32 [[TMP6]], [8 x i32]* @.gomp_critical_user_{{pl_cond[.].+[.|,]}}var)
|
||||
// CHECK1-NEXT: call void @__kmpc_push_num_threads(%struct.ident_t* @[[GLOB2]], i32 [[TMP6]], i32 10)
|
||||
// CHECK1-NEXT: [[TMP30:%.*]] = getelementptr inbounds [[STRUCT_ANON_1]], %struct.anon.1* [[OMP_OUTLINED_ARG_AGG_7]], i32 0, i32 0
|
||||
// CHECK1-NEXT: store i32* [[TMP4]], i32** [[TMP30]], align 8
|
||||
// CHECK1-NEXT: [[TMP31:%.*]] = getelementptr inbounds [[STRUCT_ANON_1]], %struct.anon.1* [[OMP_OUTLINED_ARG_AGG_7]], i32 0, i32 1
|
||||
// CHECK1-NEXT: store i32* [[I]], i32** [[TMP31]], align 8
|
||||
// CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB2]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon.1*)* @.omp_outlined..2 to void (i32*, i32*, ...)*), %struct.anon.1* [[OMP_OUTLINED_ARG_AGG_7]])
|
||||
// CHECK1-NEXT: [[TMP32:%.*]] = getelementptr inbounds [[STRUCT_LASPRIVATE_CONDITIONAL]], %struct.lasprivate.conditional* [[A]], i32 0, i32 1
|
||||
// CHECK1-NEXT: [[TMP33:%.*]] = load i8, i8* [[TMP32]], align 4
|
||||
// CHECK1-NEXT: [[TMP34:%.*]] = icmp ne i8 [[TMP33]], 0
|
||||
// CHECK1-NEXT: br i1 [[TMP34]], label [[LPC_THEN:%.*]], label [[LPC_DONE:%.*]]
|
||||
// CHECK1-NEXT: call void @__kmpc_end_critical(%struct.ident_t* @[[GLOB2]], i32 [[TMP4]], [8 x i32]* @.gomp_critical_user_{{pl_cond[.].+[.|,]}}var)
|
||||
// CHECK1-NEXT: call void @__kmpc_push_num_threads(%struct.ident_t* @[[GLOB2]], i32 [[TMP4]], i32 10)
|
||||
// CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB2]], i32 2, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i32*)* @.omp_outlined..1 to void (i32*, i32*, ...)*), i32* [[TMP2]], i32* [[I]])
|
||||
// CHECK1-NEXT: [[TMP16:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_critical(%struct.ident_t* @[[GLOB2]], i32 [[TMP4]], [8 x i32]* @.gomp_critical_user_{{pl_cond[.].+[.|,]}}var)
|
||||
// CHECK1-NEXT: [[TMP17:%.*]] = load i32, i32* @.{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK1-NEXT: [[TMP18:%.*]] = icmp sle i32 [[TMP17]], [[TMP16]]
|
||||
// CHECK1-NEXT: br i1 [[TMP18]], label [[LP_COND_THEN4:%.*]], label [[LP_COND_EXIT5:%.*]]
|
||||
// CHECK1: lp_cond_then4:
|
||||
// CHECK1-NEXT: store i32 [[TMP16]], i32* @.{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK1-NEXT: [[TMP19:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK1-NEXT: store i32 [[TMP19]], i32* @{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK1-NEXT: br label [[LP_COND_EXIT5]]
|
||||
// CHECK1: lp_cond_exit5:
|
||||
// CHECK1-NEXT: call void @__kmpc_end_critical(%struct.ident_t* @[[GLOB2]], i32 [[TMP4]], [8 x i32]* @.gomp_critical_user_{{pl_cond[.].+[.|,]}}var)
|
||||
// CHECK1-NEXT: [[TMP20:%.*]] = load i32, i32* [[I]], align 4
|
||||
// CHECK1-NEXT: [[TMP21:%.*]] = atomicrmw add i32* [[TMP2]], i32 [[TMP20]] monotonic, align 4
|
||||
// CHECK1-NEXT: [[TMP22:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_critical(%struct.ident_t* @[[GLOB2]], i32 [[TMP4]], [8 x i32]* @.gomp_critical_user_{{pl_cond[.].+[.|,]}}var)
|
||||
// CHECK1-NEXT: [[TMP23:%.*]] = load i32, i32* @.{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK1-NEXT: [[TMP24:%.*]] = icmp sle i32 [[TMP23]], [[TMP22]]
|
||||
// CHECK1-NEXT: br i1 [[TMP24]], label [[LP_COND_THEN6:%.*]], label [[LP_COND_EXIT7:%.*]]
|
||||
// CHECK1: lp_cond_then6:
|
||||
// CHECK1-NEXT: store i32 [[TMP22]], i32* @.{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK1-NEXT: [[TMP25:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK1-NEXT: store i32 [[TMP25]], i32* @{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK1-NEXT: br label [[LP_COND_EXIT7]]
|
||||
// CHECK1: lp_cond_exit7:
|
||||
// CHECK1-NEXT: call void @__kmpc_end_critical(%struct.ident_t* @[[GLOB2]], i32 [[TMP4]], [8 x i32]* @.gomp_critical_user_{{pl_cond[.].+[.|,]}}var)
|
||||
// CHECK1-NEXT: call void @__kmpc_push_num_threads(%struct.ident_t* @[[GLOB2]], i32 [[TMP4]], i32 10)
|
||||
// CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB2]], i32 2, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i32*)* @.omp_outlined..2 to void (i32*, i32*, ...)*), i32* [[TMP2]], i32* [[I]])
|
||||
// CHECK1-NEXT: [[TMP26:%.*]] = getelementptr inbounds [[STRUCT_LASPRIVATE_CONDITIONAL]], %struct.lasprivate.conditional* [[A1]], i32 0, i32 1
|
||||
// CHECK1-NEXT: [[TMP27:%.*]] = load i8, i8* [[TMP26]], align 4
|
||||
// CHECK1-NEXT: [[TMP28:%.*]] = icmp ne i8 [[TMP27]], 0
|
||||
// CHECK1-NEXT: br i1 [[TMP28]], label [[LPC_THEN:%.*]], label [[LPC_DONE:%.*]]
|
||||
// CHECK1: lpc.then:
|
||||
// CHECK1-NEXT: [[TMP35:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_critical(%struct.ident_t* @[[GLOB2]], i32 [[TMP6]], [8 x i32]* @.gomp_critical_user_{{pl_cond[.].+[.|,]}}var)
|
||||
// CHECK1-NEXT: [[TMP36:%.*]] = load i32, i32* @.{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK1-NEXT: [[TMP37:%.*]] = icmp sle i32 [[TMP36]], [[TMP35]]
|
||||
// CHECK1-NEXT: br i1 [[TMP37]], label [[LP_COND_THEN8:%.*]], label [[LP_COND_EXIT9:%.*]]
|
||||
// CHECK1-NEXT: [[TMP29:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_critical(%struct.ident_t* @[[GLOB2]], i32 [[TMP4]], [8 x i32]* @.gomp_critical_user_{{pl_cond[.].+[.|,]}}var)
|
||||
// CHECK1-NEXT: [[TMP30:%.*]] = load i32, i32* @.{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK1-NEXT: [[TMP31:%.*]] = icmp sle i32 [[TMP30]], [[TMP29]]
|
||||
// CHECK1-NEXT: br i1 [[TMP31]], label [[LP_COND_THEN8:%.*]], label [[LP_COND_EXIT9:%.*]]
|
||||
// CHECK1: lp_cond_then8:
|
||||
// CHECK1-NEXT: store i32 [[TMP35]], i32* @.{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK1-NEXT: [[TMP38:%.*]] = load i32, i32* [[TMP4]], align 4
|
||||
// CHECK1-NEXT: store i32 [[TMP38]], i32* @{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK1-NEXT: store i32 [[TMP29]], i32* @.{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK1-NEXT: [[TMP32:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK1-NEXT: store i32 [[TMP32]], i32* @{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK1-NEXT: br label [[LP_COND_EXIT9]]
|
||||
// CHECK1: lp_cond_exit9:
|
||||
// CHECK1-NEXT: call void @__kmpc_end_critical(%struct.ident_t* @[[GLOB2]], i32 [[TMP6]], [8 x i32]* @.gomp_critical_user_{{pl_cond[.].+[.|,]}}var)
|
||||
// CHECK1-NEXT: call void @__kmpc_end_critical(%struct.ident_t* @[[GLOB2]], i32 [[TMP4]], [8 x i32]* @.gomp_critical_user_{{pl_cond[.].+[.|,]}}var)
|
||||
// CHECK1-NEXT: br label [[LPC_DONE]]
|
||||
// CHECK1: lpc.done:
|
||||
// CHECK1-NEXT: br label [[IF_END]]
|
||||
|
@ -183,70 +168,69 @@ int main() {
|
|||
// CHECK1: omp.body.continue:
|
||||
// CHECK1-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
|
||||
// CHECK1: omp.inner.for.inc:
|
||||
// CHECK1-NEXT: [[TMP39:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK1-NEXT: [[ADD10:%.*]] = add nsw i32 [[TMP39]], 1
|
||||
// CHECK1-NEXT: [[TMP33:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK1-NEXT: [[ADD10:%.*]] = add nsw i32 [[TMP33]], 1
|
||||
// CHECK1-NEXT: store i32 [[ADD10]], i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK1-NEXT: br label [[OMP_INNER_FOR_COND]]
|
||||
// CHECK1: omp.inner.for.end:
|
||||
// CHECK1-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
|
||||
// CHECK1: omp.loop.exit:
|
||||
// CHECK1-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB1]], i32 [[TMP6]])
|
||||
// CHECK1-NEXT: [[TMP40:%.*]] = load i32, i32* [[DOTOMP_IS_LAST]], align 4
|
||||
// CHECK1-NEXT: [[TMP41:%.*]] = icmp ne i32 [[TMP40]], 0
|
||||
// CHECK1-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB4:[0-9]+]], i32 [[TMP6]])
|
||||
// CHECK1-NEXT: br i1 [[TMP41]], label [[DOTOMP_LASTPRIVATE_THEN:%.*]], label [[DOTOMP_LASTPRIVATE_DONE:%.*]]
|
||||
// CHECK1-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB1]], i32 [[TMP4]])
|
||||
// CHECK1-NEXT: [[TMP34:%.*]] = load i32, i32* [[DOTOMP_IS_LAST]], align 4
|
||||
// CHECK1-NEXT: [[TMP35:%.*]] = icmp ne i32 [[TMP34]], 0
|
||||
// CHECK1-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB4:[0-9]+]], i32 [[TMP4]])
|
||||
// CHECK1-NEXT: br i1 [[TMP35]], label [[DOTOMP_LASTPRIVATE_THEN:%.*]], label [[DOTOMP_LASTPRIVATE_DONE:%.*]]
|
||||
// CHECK1: .omp.lastprivate.then:
|
||||
// CHECK1-NEXT: [[TMP42:%.*]] = load i32, i32* @{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK1-NEXT: store i32 [[TMP42]], i32* [[TMP4]], align 4
|
||||
// CHECK1-NEXT: [[TMP43:%.*]] = load i32, i32* [[TMP4]], align 4
|
||||
// CHECK1-NEXT: store i32 [[TMP43]], i32* [[TMP2]], align 4
|
||||
// CHECK1-NEXT: [[TMP36:%.*]] = load i32, i32* @{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK1-NEXT: store i32 [[TMP36]], i32* [[TMP2]], align 4
|
||||
// CHECK1-NEXT: [[TMP37:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK1-NEXT: store i32 [[TMP37]], i32* [[TMP0]], align 4
|
||||
// CHECK1-NEXT: br label [[DOTOMP_LASTPRIVATE_DONE]]
|
||||
// CHECK1: .omp.lastprivate.done:
|
||||
// CHECK1-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@.omp_outlined..1
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.0* noalias [[__CONTEXT:%.*]]) #[[ATTR1]] {
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[A:%.*]], i32* nonnull align 4 dereferenceable(4) [[I:%.*]]) #[[ATTR1]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.0*, align 8
|
||||
// CHECK1-NEXT: [[A:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[A_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[I_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[A1:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[DOTOMP_REDUCTION_RED_LIST:%.*]] = alloca [1 x i8*], align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store %struct.anon.0* [[__CONTEXT]], %struct.anon.0** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load %struct.anon.0*, %struct.anon.0** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_0:%.*]], %struct.anon.0* [[TMP0]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 8
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[TMP0]], i32 0, i32 1
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = load i32*, i32** [[TMP3]], align 8
|
||||
// CHECK1-NEXT: store i32 0, i32* [[A]], align 4
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = load i32, i32* [[TMP4]], align 4
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = load i32, i32* [[A]], align 4
|
||||
// CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP6]], [[TMP5]]
|
||||
// CHECK1-NEXT: store i32 [[ADD]], i32* [[A]], align 4
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[DOTOMP_REDUCTION_RED_LIST]], i64 0, i64 0
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = bitcast i32* [[A]] to i8*
|
||||
// CHECK1-NEXT: store i8* [[TMP8]], i8** [[TMP7]], align 8
|
||||
// CHECK1-NEXT: [[TMP9:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP10:%.*]] = load i32, i32* [[TMP9]], align 4
|
||||
// CHECK1-NEXT: [[TMP11:%.*]] = bitcast [1 x i8*]* [[DOTOMP_REDUCTION_RED_LIST]] to i8*
|
||||
// CHECK1-NEXT: [[TMP12:%.*]] = call i32 @__kmpc_reduce_nowait(%struct.ident_t* @[[GLOB3:[0-9]+]], i32 [[TMP10]], i32 1, i64 8, i8* [[TMP11]], void (i8*, i8*)* @.omp.reduction.reduction_func, [8 x i32]* @.gomp_critical_user_.reduction.var)
|
||||
// CHECK1-NEXT: switch i32 [[TMP12]], label [[DOTOMP_REDUCTION_DEFAULT:%.*]] [
|
||||
// CHECK1-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32* [[I]], i32** [[I_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load i32*, i32** [[A_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = load i32*, i32** [[I_ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32 0, i32* [[A1]], align 4
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i32, i32* [[TMP1]], align 4
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = load i32, i32* [[A1]], align 4
|
||||
// CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP3]], [[TMP2]]
|
||||
// CHECK1-NEXT: store i32 [[ADD]], i32* [[A1]], align 4
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[DOTOMP_REDUCTION_RED_LIST]], i64 0, i64 0
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = bitcast i32* [[A1]] to i8*
|
||||
// CHECK1-NEXT: store i8* [[TMP5]], i8** [[TMP4]], align 8
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = load i32, i32* [[TMP6]], align 4
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = bitcast [1 x i8*]* [[DOTOMP_REDUCTION_RED_LIST]] to i8*
|
||||
// CHECK1-NEXT: [[TMP9:%.*]] = call i32 @__kmpc_reduce_nowait(%struct.ident_t* @[[GLOB3:[0-9]+]], i32 [[TMP7]], i32 1, i64 8, i8* [[TMP8]], void (i8*, i8*)* @.omp.reduction.reduction_func, [8 x i32]* @.gomp_critical_user_.reduction.var)
|
||||
// CHECK1-NEXT: switch i32 [[TMP9]], label [[DOTOMP_REDUCTION_DEFAULT:%.*]] [
|
||||
// CHECK1-NEXT: i32 1, label [[DOTOMP_REDUCTION_CASE1:%.*]]
|
||||
// CHECK1-NEXT: i32 2, label [[DOTOMP_REDUCTION_CASE2:%.*]]
|
||||
// CHECK1-NEXT: ]
|
||||
// CHECK1: .omp.reduction.case1:
|
||||
// CHECK1-NEXT: [[TMP13:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK1-NEXT: [[TMP14:%.*]] = load i32, i32* [[A]], align 4
|
||||
// CHECK1-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP13]], [[TMP14]]
|
||||
// CHECK1-NEXT: store i32 [[ADD1]], i32* [[TMP2]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_end_reduce_nowait(%struct.ident_t* @[[GLOB3]], i32 [[TMP10]], [8 x i32]* @.gomp_critical_user_.reduction.var)
|
||||
// CHECK1-NEXT: [[TMP10:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK1-NEXT: [[TMP11:%.*]] = load i32, i32* [[A1]], align 4
|
||||
// CHECK1-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP10]], [[TMP11]]
|
||||
// CHECK1-NEXT: store i32 [[ADD2]], i32* [[TMP0]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_end_reduce_nowait(%struct.ident_t* @[[GLOB3]], i32 [[TMP7]], [8 x i32]* @.gomp_critical_user_.reduction.var)
|
||||
// CHECK1-NEXT: br label [[DOTOMP_REDUCTION_DEFAULT]]
|
||||
// CHECK1: .omp.reduction.case2:
|
||||
// CHECK1-NEXT: [[TMP15:%.*]] = load i32, i32* [[A]], align 4
|
||||
// CHECK1-NEXT: [[TMP16:%.*]] = atomicrmw add i32* [[TMP2]], i32 [[TMP15]] monotonic, align 4
|
||||
// CHECK1-NEXT: [[TMP12:%.*]] = load i32, i32* [[A1]], align 4
|
||||
// CHECK1-NEXT: [[TMP13:%.*]] = atomicrmw add i32* [[TMP0]], i32 [[TMP12]] monotonic, align 4
|
||||
// CHECK1-NEXT: br label [[DOTOMP_REDUCTION_DEFAULT]]
|
||||
// CHECK1: .omp.reduction.default:
|
||||
// CHECK1-NEXT: ret void
|
||||
|
@ -277,24 +261,23 @@ int main() {
|
|||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@.omp_outlined..2
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.1* noalias [[__CONTEXT:%.*]]) #[[ATTR1]] {
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[A:%.*]], i32* nonnull align 4 dereferenceable(4) [[I:%.*]]) #[[ATTR1]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.1*, align 8
|
||||
// CHECK1-NEXT: [[A_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[I_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store %struct.anon.1* [[__CONTEXT]], %struct.anon.1** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load %struct.anon.1*, %struct.anon.1** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_1:%.*]], %struct.anon.1* [[TMP0]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 8
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON_1]], %struct.anon.1* [[TMP0]], i32 0, i32 1
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = load i32*, i32** [[TMP3]], align 8
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = load i32, i32* [[TMP4]], align 4
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = atomicrmw add i32* [[TMP2]], i32 [[TMP5]] monotonic, align 4
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = bitcast i32* [[TMP2]] to %struct.lasprivate.conditional*
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = getelementptr inbounds [[STRUCT_LASPRIVATE_CONDITIONAL:%.*]], %struct.lasprivate.conditional* [[TMP7]], i32 0, i32 1
|
||||
// CHECK1-NEXT: store atomic volatile i8 1, i8* [[TMP8]] unordered, align 1
|
||||
// CHECK1-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32* [[I]], i32** [[I_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load i32*, i32** [[A_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = load i32*, i32** [[I_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i32, i32* [[TMP1]], align 4
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = atomicrmw add i32* [[TMP0]], i32 [[TMP2]] monotonic, align 4
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = bitcast i32* [[TMP0]] to %struct.lasprivate.conditional*
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_LASPRIVATE_CONDITIONAL:%.*]], %struct.lasprivate.conditional* [[TMP4]], i32 0, i32 1
|
||||
// CHECK1-NEXT: store atomic volatile i8 1, i8* [[TMP5]] unordered, align 1
|
||||
// CHECK1-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -303,143 +286,128 @@ int main() {
|
|||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[A:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 8
|
||||
// CHECK2-NEXT: store i32 0, i32* [[RETVAL]], align 4
|
||||
// CHECK2-NEXT: store i32 0, i32* [[A]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK2-NEXT: store i32* [[A]], i32** [[TMP0]], align 8
|
||||
// CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon*)* @.omp_outlined. to void (i32*, i32*, ...)*), %struct.anon* [[OMP_OUTLINED_ARG_AGG_]])
|
||||
// CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @.omp_outlined. to void (i32*, i32*, ...)*), i32* [[A]])
|
||||
// CHECK2-NEXT: ret i32 0
|
||||
//
|
||||
//
|
||||
// CHECK2-LABEL: define {{[^@]+}}@.omp_outlined.
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK2-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK2-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK2-NEXT: [[A_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK2-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[TMP:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[A:%.*]] = alloca [[STRUCT_LASPRIVATE_CONDITIONAL:%.*]], align 4
|
||||
// CHECK2-NEXT: [[A1:%.*]] = alloca [[STRUCT_LASPRIVATE_CONDITIONAL:%.*]], align 4
|
||||
// CHECK2-NEXT: [[I:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON_0:%.*]], align 8
|
||||
// CHECK2-NEXT: [[OMP_OUTLINED_ARG_AGG_7:%.*]] = alloca [[STRUCT_ANON_1:%.*]], align 8
|
||||
// CHECK2-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 8
|
||||
// CHECK2-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load i32*, i32** [[A_ADDR]], align 8
|
||||
// CHECK2-NEXT: store i32 0, i32* [[DOTOMP_LB]], align 4
|
||||
// CHECK2-NEXT: store i32 9, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK2-NEXT: store i32 1, i32* [[DOTOMP_STRIDE]], align 4
|
||||
// CHECK2-NEXT: store i32 0, i32* [[DOTOMP_IS_LAST]], align 4
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_LASPRIVATE_CONDITIONAL]], %struct.lasprivate.conditional* [[A]], i32 0, i32 1
|
||||
// CHECK2-NEXT: store i8 0, i8* [[TMP3]], align 4
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = getelementptr inbounds [[STRUCT_LASPRIVATE_CONDITIONAL]], %struct.lasprivate.conditional* [[A]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = load i32, i32* [[TMP5]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 [[TMP6]], i32 34, i32* [[DOTOMP_IS_LAST]], i32* [[DOTOMP_LB]], i32* [[DOTOMP_UB]], i32* [[DOTOMP_STRIDE]], i32 1, i32 1)
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK2-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP7]], 9
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_LASPRIVATE_CONDITIONAL]], %struct.lasprivate.conditional* [[A1]], i32 0, i32 1
|
||||
// CHECK2-NEXT: store i8 0, i8* [[TMP1]], align 4
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[STRUCT_LASPRIVATE_CONDITIONAL]], %struct.lasprivate.conditional* [[A1]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = load i32, i32* [[TMP3]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 [[TMP4]], i32 34, i32* [[DOTOMP_IS_LAST]], i32* [[DOTOMP_LB]], i32* [[DOTOMP_UB]], i32* [[DOTOMP_STRIDE]], i32 1, i32 1)
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK2-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP5]], 9
|
||||
// CHECK2-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
|
||||
// CHECK2: cond.true:
|
||||
// CHECK2-NEXT: br label [[COND_END:%.*]]
|
||||
// CHECK2: cond.false:
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK2-NEXT: br label [[COND_END]]
|
||||
// CHECK2: cond.end:
|
||||
// CHECK2-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP8]], [[COND_FALSE]] ]
|
||||
// CHECK2-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP6]], [[COND_FALSE]] ]
|
||||
// CHECK2-NEXT: store i32 [[COND]], i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK2-NEXT: [[TMP9:%.*]] = load i32, i32* [[DOTOMP_LB]], align 4
|
||||
// CHECK2-NEXT: store i32 [[TMP9]], i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = load i32, i32* [[DOTOMP_LB]], align 4
|
||||
// CHECK2-NEXT: store i32 [[TMP7]], i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK2-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
|
||||
// CHECK2: omp.inner.for.cond:
|
||||
// CHECK2-NEXT: [[TMP10:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK2-NEXT: [[TMP11:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK2-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP10]], [[TMP11]]
|
||||
// CHECK2-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK2-NEXT: [[TMP9:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK2-NEXT: [[CMP2:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
|
||||
// CHECK2-NEXT: br i1 [[CMP2]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
|
||||
// CHECK2: omp.inner.for.body:
|
||||
// CHECK2-NEXT: [[TMP12:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK2-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP12]], 1
|
||||
// CHECK2-NEXT: [[TMP10:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK2-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
|
||||
// CHECK2-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
|
||||
// CHECK2-NEXT: store i32 [[ADD]], i32* [[I]], align 4
|
||||
// CHECK2-NEXT: [[TMP13:%.*]] = load i32, i32* [[I]], align 4
|
||||
// CHECK2-NEXT: [[CMP2:%.*]] = icmp slt i32 [[TMP13]], 5
|
||||
// CHECK2-NEXT: br i1 [[CMP2]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
|
||||
// CHECK2-NEXT: [[TMP11:%.*]] = load i32, i32* [[I]], align 4
|
||||
// CHECK2-NEXT: [[CMP3:%.*]] = icmp slt i32 [[TMP11]], 5
|
||||
// CHECK2-NEXT: br i1 [[CMP3]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
|
||||
// CHECK2: if.then:
|
||||
// CHECK2-NEXT: store i32 0, i32* [[TMP4]], align 4
|
||||
// CHECK2-NEXT: [[TMP14:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_critical(%struct.ident_t* @[[GLOB2]], i32 [[TMP6]], [8 x i32]* @.gomp_critical_user_{{pl_cond[.].+[.|,]}}var)
|
||||
// CHECK2-NEXT: [[TMP15:%.*]] = load i32, i32* @.{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK2-NEXT: [[TMP16:%.*]] = icmp sle i32 [[TMP15]], [[TMP14]]
|
||||
// CHECK2-NEXT: br i1 [[TMP16]], label [[LP_COND_THEN:%.*]], label [[LP_COND_EXIT:%.*]]
|
||||
// CHECK2-NEXT: store i32 0, i32* [[TMP2]], align 4
|
||||
// CHECK2-NEXT: [[TMP12:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_critical(%struct.ident_t* @[[GLOB2]], i32 [[TMP4]], [8 x i32]* @.gomp_critical_user_{{pl_cond[.].+[.|,]}}var)
|
||||
// CHECK2-NEXT: [[TMP13:%.*]] = load i32, i32* @.{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK2-NEXT: [[TMP14:%.*]] = icmp sle i32 [[TMP13]], [[TMP12]]
|
||||
// CHECK2-NEXT: br i1 [[TMP14]], label [[LP_COND_THEN:%.*]], label [[LP_COND_EXIT:%.*]]
|
||||
// CHECK2: lp_cond_then:
|
||||
// CHECK2-NEXT: store i32 [[TMP14]], i32* @.{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK2-NEXT: [[TMP17:%.*]] = load i32, i32* [[TMP4]], align 4
|
||||
// CHECK2-NEXT: store i32 [[TMP17]], i32* @{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK2-NEXT: store i32 [[TMP12]], i32* @.{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK2-NEXT: [[TMP15:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK2-NEXT: store i32 [[TMP15]], i32* @{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK2-NEXT: br label [[LP_COND_EXIT]]
|
||||
// CHECK2: lp_cond_exit:
|
||||
// CHECK2-NEXT: call void @__kmpc_end_critical(%struct.ident_t* @[[GLOB2]], i32 [[TMP6]], [8 x i32]* @.gomp_critical_user_{{pl_cond[.].+[.|,]}}var)
|
||||
// CHECK2-NEXT: call void @__kmpc_push_num_threads(%struct.ident_t* @[[GLOB2]], i32 [[TMP6]], i32 10)
|
||||
// CHECK2-NEXT: [[TMP18:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK2-NEXT: store i32* [[TMP4]], i32** [[TMP18]], align 8
|
||||
// CHECK2-NEXT: [[TMP19:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 1
|
||||
// CHECK2-NEXT: store i32* [[I]], i32** [[TMP19]], align 8
|
||||
// CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB2]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon.0*)* @.omp_outlined..1 to void (i32*, i32*, ...)*), %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]])
|
||||
// CHECK2-NEXT: [[TMP20:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_critical(%struct.ident_t* @[[GLOB2]], i32 [[TMP6]], [8 x i32]* @.gomp_critical_user_{{pl_cond[.].+[.|,]}}var)
|
||||
// CHECK2-NEXT: [[TMP21:%.*]] = load i32, i32* @.{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK2-NEXT: [[TMP22:%.*]] = icmp sle i32 [[TMP21]], [[TMP20]]
|
||||
// CHECK2-NEXT: br i1 [[TMP22]], label [[LP_COND_THEN3:%.*]], label [[LP_COND_EXIT4:%.*]]
|
||||
// CHECK2: lp_cond_then3:
|
||||
// CHECK2-NEXT: store i32 [[TMP20]], i32* @.{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK2-NEXT: [[TMP23:%.*]] = load i32, i32* [[TMP4]], align 4
|
||||
// CHECK2-NEXT: store i32 [[TMP23]], i32* @{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK2-NEXT: br label [[LP_COND_EXIT4]]
|
||||
// CHECK2: lp_cond_exit4:
|
||||
// CHECK2-NEXT: call void @__kmpc_end_critical(%struct.ident_t* @[[GLOB2]], i32 [[TMP6]], [8 x i32]* @.gomp_critical_user_{{pl_cond[.].+[.|,]}}var)
|
||||
// CHECK2-NEXT: [[TMP24:%.*]] = load i32, i32* [[I]], align 4
|
||||
// CHECK2-NEXT: [[TMP25:%.*]] = atomicrmw add i32* [[TMP4]], i32 [[TMP24]] monotonic, align 4
|
||||
// CHECK2-NEXT: [[TMP26:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_critical(%struct.ident_t* @[[GLOB2]], i32 [[TMP6]], [8 x i32]* @.gomp_critical_user_{{pl_cond[.].+[.|,]}}var)
|
||||
// CHECK2-NEXT: [[TMP27:%.*]] = load i32, i32* @.{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK2-NEXT: [[TMP28:%.*]] = icmp sle i32 [[TMP27]], [[TMP26]]
|
||||
// CHECK2-NEXT: br i1 [[TMP28]], label [[LP_COND_THEN5:%.*]], label [[LP_COND_EXIT6:%.*]]
|
||||
// CHECK2: lp_cond_then5:
|
||||
// CHECK2-NEXT: store i32 [[TMP26]], i32* @.{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK2-NEXT: [[TMP29:%.*]] = load i32, i32* [[TMP4]], align 4
|
||||
// CHECK2-NEXT: store i32 [[TMP29]], i32* @{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK2-NEXT: br label [[LP_COND_EXIT6]]
|
||||
// CHECK2: lp_cond_exit6:
|
||||
// CHECK2-NEXT: call void @__kmpc_end_critical(%struct.ident_t* @[[GLOB2]], i32 [[TMP6]], [8 x i32]* @.gomp_critical_user_{{pl_cond[.].+[.|,]}}var)
|
||||
// CHECK2-NEXT: call void @__kmpc_push_num_threads(%struct.ident_t* @[[GLOB2]], i32 [[TMP6]], i32 10)
|
||||
// CHECK2-NEXT: [[TMP30:%.*]] = getelementptr inbounds [[STRUCT_ANON_1]], %struct.anon.1* [[OMP_OUTLINED_ARG_AGG_7]], i32 0, i32 0
|
||||
// CHECK2-NEXT: store i32* [[TMP4]], i32** [[TMP30]], align 8
|
||||
// CHECK2-NEXT: [[TMP31:%.*]] = getelementptr inbounds [[STRUCT_ANON_1]], %struct.anon.1* [[OMP_OUTLINED_ARG_AGG_7]], i32 0, i32 1
|
||||
// CHECK2-NEXT: store i32* [[I]], i32** [[TMP31]], align 8
|
||||
// CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB2]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon.1*)* @.omp_outlined..2 to void (i32*, i32*, ...)*), %struct.anon.1* [[OMP_OUTLINED_ARG_AGG_7]])
|
||||
// CHECK2-NEXT: [[TMP32:%.*]] = getelementptr inbounds [[STRUCT_LASPRIVATE_CONDITIONAL]], %struct.lasprivate.conditional* [[A]], i32 0, i32 1
|
||||
// CHECK2-NEXT: [[TMP33:%.*]] = load i8, i8* [[TMP32]], align 4
|
||||
// CHECK2-NEXT: [[TMP34:%.*]] = icmp ne i8 [[TMP33]], 0
|
||||
// CHECK2-NEXT: br i1 [[TMP34]], label [[LPC_THEN:%.*]], label [[LPC_DONE:%.*]]
|
||||
// CHECK2-NEXT: call void @__kmpc_end_critical(%struct.ident_t* @[[GLOB2]], i32 [[TMP4]], [8 x i32]* @.gomp_critical_user_{{pl_cond[.].+[.|,]}}var)
|
||||
// CHECK2-NEXT: call void @__kmpc_push_num_threads(%struct.ident_t* @[[GLOB2]], i32 [[TMP4]], i32 10)
|
||||
// CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB2]], i32 2, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i32*)* @.omp_outlined..1 to void (i32*, i32*, ...)*), i32* [[TMP2]], i32* [[I]])
|
||||
// CHECK2-NEXT: [[TMP16:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_critical(%struct.ident_t* @[[GLOB2]], i32 [[TMP4]], [8 x i32]* @.gomp_critical_user_{{pl_cond[.].+[.|,]}}var)
|
||||
// CHECK2-NEXT: [[TMP17:%.*]] = load i32, i32* @.{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK2-NEXT: [[TMP18:%.*]] = icmp sle i32 [[TMP17]], [[TMP16]]
|
||||
// CHECK2-NEXT: br i1 [[TMP18]], label [[LP_COND_THEN4:%.*]], label [[LP_COND_EXIT5:%.*]]
|
||||
// CHECK2: lp_cond_then4:
|
||||
// CHECK2-NEXT: store i32 [[TMP16]], i32* @.{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK2-NEXT: [[TMP19:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK2-NEXT: store i32 [[TMP19]], i32* @{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK2-NEXT: br label [[LP_COND_EXIT5]]
|
||||
// CHECK2: lp_cond_exit5:
|
||||
// CHECK2-NEXT: call void @__kmpc_end_critical(%struct.ident_t* @[[GLOB2]], i32 [[TMP4]], [8 x i32]* @.gomp_critical_user_{{pl_cond[.].+[.|,]}}var)
|
||||
// CHECK2-NEXT: [[TMP20:%.*]] = load i32, i32* [[I]], align 4
|
||||
// CHECK2-NEXT: [[TMP21:%.*]] = atomicrmw add i32* [[TMP2]], i32 [[TMP20]] monotonic, align 4
|
||||
// CHECK2-NEXT: [[TMP22:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_critical(%struct.ident_t* @[[GLOB2]], i32 [[TMP4]], [8 x i32]* @.gomp_critical_user_{{pl_cond[.].+[.|,]}}var)
|
||||
// CHECK2-NEXT: [[TMP23:%.*]] = load i32, i32* @.{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK2-NEXT: [[TMP24:%.*]] = icmp sle i32 [[TMP23]], [[TMP22]]
|
||||
// CHECK2-NEXT: br i1 [[TMP24]], label [[LP_COND_THEN6:%.*]], label [[LP_COND_EXIT7:%.*]]
|
||||
// CHECK2: lp_cond_then6:
|
||||
// CHECK2-NEXT: store i32 [[TMP22]], i32* @.{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK2-NEXT: [[TMP25:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK2-NEXT: store i32 [[TMP25]], i32* @{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK2-NEXT: br label [[LP_COND_EXIT7]]
|
||||
// CHECK2: lp_cond_exit7:
|
||||
// CHECK2-NEXT: call void @__kmpc_end_critical(%struct.ident_t* @[[GLOB2]], i32 [[TMP4]], [8 x i32]* @.gomp_critical_user_{{pl_cond[.].+[.|,]}}var)
|
||||
// CHECK2-NEXT: call void @__kmpc_push_num_threads(%struct.ident_t* @[[GLOB2]], i32 [[TMP4]], i32 10)
|
||||
// CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB2]], i32 2, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i32*)* @.omp_outlined..2 to void (i32*, i32*, ...)*), i32* [[TMP2]], i32* [[I]])
|
||||
// CHECK2-NEXT: [[TMP26:%.*]] = getelementptr inbounds [[STRUCT_LASPRIVATE_CONDITIONAL]], %struct.lasprivate.conditional* [[A1]], i32 0, i32 1
|
||||
// CHECK2-NEXT: [[TMP27:%.*]] = load i8, i8* [[TMP26]], align 4
|
||||
// CHECK2-NEXT: [[TMP28:%.*]] = icmp ne i8 [[TMP27]], 0
|
||||
// CHECK2-NEXT: br i1 [[TMP28]], label [[LPC_THEN:%.*]], label [[LPC_DONE:%.*]]
|
||||
// CHECK2: lpc.then:
|
||||
// CHECK2-NEXT: [[TMP35:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_critical(%struct.ident_t* @[[GLOB2]], i32 [[TMP6]], [8 x i32]* @.gomp_critical_user_{{pl_cond[.].+[.|,]}}var)
|
||||
// CHECK2-NEXT: [[TMP36:%.*]] = load i32, i32* @.{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK2-NEXT: [[TMP37:%.*]] = icmp sle i32 [[TMP36]], [[TMP35]]
|
||||
// CHECK2-NEXT: br i1 [[TMP37]], label [[LP_COND_THEN8:%.*]], label [[LP_COND_EXIT9:%.*]]
|
||||
// CHECK2-NEXT: [[TMP29:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_critical(%struct.ident_t* @[[GLOB2]], i32 [[TMP4]], [8 x i32]* @.gomp_critical_user_{{pl_cond[.].+[.|,]}}var)
|
||||
// CHECK2-NEXT: [[TMP30:%.*]] = load i32, i32* @.{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK2-NEXT: [[TMP31:%.*]] = icmp sle i32 [[TMP30]], [[TMP29]]
|
||||
// CHECK2-NEXT: br i1 [[TMP31]], label [[LP_COND_THEN8:%.*]], label [[LP_COND_EXIT9:%.*]]
|
||||
// CHECK2: lp_cond_then8:
|
||||
// CHECK2-NEXT: store i32 [[TMP35]], i32* @.{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK2-NEXT: [[TMP38:%.*]] = load i32, i32* [[TMP4]], align 4
|
||||
// CHECK2-NEXT: store i32 [[TMP38]], i32* @{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK2-NEXT: store i32 [[TMP29]], i32* @.{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK2-NEXT: [[TMP32:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK2-NEXT: store i32 [[TMP32]], i32* @{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK2-NEXT: br label [[LP_COND_EXIT9]]
|
||||
// CHECK2: lp_cond_exit9:
|
||||
// CHECK2-NEXT: call void @__kmpc_end_critical(%struct.ident_t* @[[GLOB2]], i32 [[TMP6]], [8 x i32]* @.gomp_critical_user_{{pl_cond[.].+[.|,]}}var)
|
||||
// CHECK2-NEXT: call void @__kmpc_end_critical(%struct.ident_t* @[[GLOB2]], i32 [[TMP4]], [8 x i32]* @.gomp_critical_user_{{pl_cond[.].+[.|,]}}var)
|
||||
// CHECK2-NEXT: br label [[LPC_DONE]]
|
||||
// CHECK2: lpc.done:
|
||||
// CHECK2-NEXT: br label [[IF_END]]
|
||||
|
@ -448,70 +416,69 @@ int main() {
|
|||
// CHECK2: omp.body.continue:
|
||||
// CHECK2-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
|
||||
// CHECK2: omp.inner.for.inc:
|
||||
// CHECK2-NEXT: [[TMP39:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK2-NEXT: [[ADD10:%.*]] = add nsw i32 [[TMP39]], 1
|
||||
// CHECK2-NEXT: [[TMP33:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK2-NEXT: [[ADD10:%.*]] = add nsw i32 [[TMP33]], 1
|
||||
// CHECK2-NEXT: store i32 [[ADD10]], i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK2-NEXT: br label [[OMP_INNER_FOR_COND]]
|
||||
// CHECK2: omp.inner.for.end:
|
||||
// CHECK2-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
|
||||
// CHECK2: omp.loop.exit:
|
||||
// CHECK2-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB1]], i32 [[TMP6]])
|
||||
// CHECK2-NEXT: [[TMP40:%.*]] = load i32, i32* [[DOTOMP_IS_LAST]], align 4
|
||||
// CHECK2-NEXT: [[TMP41:%.*]] = icmp ne i32 [[TMP40]], 0
|
||||
// CHECK2-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB4:[0-9]+]], i32 [[TMP6]])
|
||||
// CHECK2-NEXT: br i1 [[TMP41]], label [[DOTOMP_LASTPRIVATE_THEN:%.*]], label [[DOTOMP_LASTPRIVATE_DONE:%.*]]
|
||||
// CHECK2-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB1]], i32 [[TMP4]])
|
||||
// CHECK2-NEXT: [[TMP34:%.*]] = load i32, i32* [[DOTOMP_IS_LAST]], align 4
|
||||
// CHECK2-NEXT: [[TMP35:%.*]] = icmp ne i32 [[TMP34]], 0
|
||||
// CHECK2-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB4:[0-9]+]], i32 [[TMP4]])
|
||||
// CHECK2-NEXT: br i1 [[TMP35]], label [[DOTOMP_LASTPRIVATE_THEN:%.*]], label [[DOTOMP_LASTPRIVATE_DONE:%.*]]
|
||||
// CHECK2: .omp.lastprivate.then:
|
||||
// CHECK2-NEXT: [[TMP42:%.*]] = load i32, i32* @{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK2-NEXT: store i32 [[TMP42]], i32* [[TMP4]], align 4
|
||||
// CHECK2-NEXT: [[TMP43:%.*]] = load i32, i32* [[TMP4]], align 4
|
||||
// CHECK2-NEXT: store i32 [[TMP43]], i32* [[TMP2]], align 4
|
||||
// CHECK2-NEXT: [[TMP36:%.*]] = load i32, i32* @{{pl_cond[.].+[.|,]}} align 4
|
||||
// CHECK2-NEXT: store i32 [[TMP36]], i32* [[TMP2]], align 4
|
||||
// CHECK2-NEXT: [[TMP37:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK2-NEXT: store i32 [[TMP37]], i32* [[TMP0]], align 4
|
||||
// CHECK2-NEXT: br label [[DOTOMP_LASTPRIVATE_DONE]]
|
||||
// CHECK2: .omp.lastprivate.done:
|
||||
// CHECK2-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK2-LABEL: define {{[^@]+}}@.omp_outlined..1
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.0* noalias [[__CONTEXT:%.*]]) #[[ATTR1]] {
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[A:%.*]], i32* nonnull align 4 dereferenceable(4) [[I:%.*]]) #[[ATTR1]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK2-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK2-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.0*, align 8
|
||||
// CHECK2-NEXT: [[A:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[A_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK2-NEXT: [[I_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK2-NEXT: [[A1:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[DOTOMP_REDUCTION_RED_LIST:%.*]] = alloca [1 x i8*], align 8
|
||||
// CHECK2-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: store %struct.anon.0* [[__CONTEXT]], %struct.anon.0** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load %struct.anon.0*, %struct.anon.0** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_0:%.*]], %struct.anon.0* [[TMP0]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 8
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[TMP0]], i32 0, i32 1
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = load i32*, i32** [[TMP3]], align 8
|
||||
// CHECK2-NEXT: store i32 0, i32* [[A]], align 4
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = load i32, i32* [[TMP4]], align 4
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = load i32, i32* [[A]], align 4
|
||||
// CHECK2-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP6]], [[TMP5]]
|
||||
// CHECK2-NEXT: store i32 [[ADD]], i32* [[A]], align 4
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[DOTOMP_REDUCTION_RED_LIST]], i64 0, i64 0
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = bitcast i32* [[A]] to i8*
|
||||
// CHECK2-NEXT: store i8* [[TMP8]], i8** [[TMP7]], align 8
|
||||
// CHECK2-NEXT: [[TMP9:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP10:%.*]] = load i32, i32* [[TMP9]], align 4
|
||||
// CHECK2-NEXT: [[TMP11:%.*]] = bitcast [1 x i8*]* [[DOTOMP_REDUCTION_RED_LIST]] to i8*
|
||||
// CHECK2-NEXT: [[TMP12:%.*]] = call i32 @__kmpc_reduce_nowait(%struct.ident_t* @[[GLOB3:[0-9]+]], i32 [[TMP10]], i32 1, i64 8, i8* [[TMP11]], void (i8*, i8*)* @.omp.reduction.reduction_func, [8 x i32]* @.gomp_critical_user_.reduction.var)
|
||||
// CHECK2-NEXT: switch i32 [[TMP12]], label [[DOTOMP_REDUCTION_DEFAULT:%.*]] [
|
||||
// CHECK2-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 8
|
||||
// CHECK2-NEXT: store i32* [[I]], i32** [[I_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load i32*, i32** [[A_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = load i32*, i32** [[I_ADDR]], align 8
|
||||
// CHECK2-NEXT: store i32 0, i32* [[A1]], align 4
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i32, i32* [[TMP1]], align 4
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = load i32, i32* [[A1]], align 4
|
||||
// CHECK2-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP3]], [[TMP2]]
|
||||
// CHECK2-NEXT: store i32 [[ADD]], i32* [[A1]], align 4
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[DOTOMP_REDUCTION_RED_LIST]], i64 0, i64 0
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = bitcast i32* [[A1]] to i8*
|
||||
// CHECK2-NEXT: store i8* [[TMP5]], i8** [[TMP4]], align 8
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = load i32, i32* [[TMP6]], align 4
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = bitcast [1 x i8*]* [[DOTOMP_REDUCTION_RED_LIST]] to i8*
|
||||
// CHECK2-NEXT: [[TMP9:%.*]] = call i32 @__kmpc_reduce_nowait(%struct.ident_t* @[[GLOB3:[0-9]+]], i32 [[TMP7]], i32 1, i64 8, i8* [[TMP8]], void (i8*, i8*)* @.omp.reduction.reduction_func, [8 x i32]* @.gomp_critical_user_.reduction.var)
|
||||
// CHECK2-NEXT: switch i32 [[TMP9]], label [[DOTOMP_REDUCTION_DEFAULT:%.*]] [
|
||||
// CHECK2-NEXT: i32 1, label [[DOTOMP_REDUCTION_CASE1:%.*]]
|
||||
// CHECK2-NEXT: i32 2, label [[DOTOMP_REDUCTION_CASE2:%.*]]
|
||||
// CHECK2-NEXT: ]
|
||||
// CHECK2: .omp.reduction.case1:
|
||||
// CHECK2-NEXT: [[TMP13:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK2-NEXT: [[TMP14:%.*]] = load i32, i32* [[A]], align 4
|
||||
// CHECK2-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP13]], [[TMP14]]
|
||||
// CHECK2-NEXT: store i32 [[ADD1]], i32* [[TMP2]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_end_reduce_nowait(%struct.ident_t* @[[GLOB3]], i32 [[TMP10]], [8 x i32]* @.gomp_critical_user_.reduction.var)
|
||||
// CHECK2-NEXT: [[TMP10:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK2-NEXT: [[TMP11:%.*]] = load i32, i32* [[A1]], align 4
|
||||
// CHECK2-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP10]], [[TMP11]]
|
||||
// CHECK2-NEXT: store i32 [[ADD2]], i32* [[TMP0]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_end_reduce_nowait(%struct.ident_t* @[[GLOB3]], i32 [[TMP7]], [8 x i32]* @.gomp_critical_user_.reduction.var)
|
||||
// CHECK2-NEXT: br label [[DOTOMP_REDUCTION_DEFAULT]]
|
||||
// CHECK2: .omp.reduction.case2:
|
||||
// CHECK2-NEXT: [[TMP15:%.*]] = load i32, i32* [[A]], align 4
|
||||
// CHECK2-NEXT: [[TMP16:%.*]] = atomicrmw add i32* [[TMP2]], i32 [[TMP15]] monotonic, align 4
|
||||
// CHECK2-NEXT: [[TMP12:%.*]] = load i32, i32* [[A1]], align 4
|
||||
// CHECK2-NEXT: [[TMP13:%.*]] = atomicrmw add i32* [[TMP0]], i32 [[TMP12]] monotonic, align 4
|
||||
// CHECK2-NEXT: br label [[DOTOMP_REDUCTION_DEFAULT]]
|
||||
// CHECK2: .omp.reduction.default:
|
||||
// CHECK2-NEXT: ret void
|
||||
|
@ -542,23 +509,23 @@ int main() {
|
|||
//
|
||||
//
|
||||
// CHECK2-LABEL: define {{[^@]+}}@.omp_outlined..2
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.1* noalias [[__CONTEXT:%.*]]) #[[ATTR1]] {
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[A:%.*]], i32* nonnull align 4 dereferenceable(4) [[I:%.*]]) #[[ATTR1]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK2-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK2-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.1*, align 8
|
||||
// CHECK2-NEXT: [[A_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK2-NEXT: [[I_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK2-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: store %struct.anon.1* [[__CONTEXT]], %struct.anon.1** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load %struct.anon.1*, %struct.anon.1** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON_1:%.*]], %struct.anon.1* [[TMP0]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 8
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON_1]], %struct.anon.1* [[TMP0]], i32 0, i32 1
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = load i32*, i32** [[TMP3]], align 8
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = load i32, i32* [[TMP4]], align 4
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = atomicrmw add i32* [[TMP2]], i32 [[TMP5]] monotonic, align 4
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = bitcast i32* [[TMP2]] to %struct.lasprivate.conditional*
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = getelementptr inbounds [[STRUCT_LASPRIVATE_CONDITIONAL:%.*]], %struct.lasprivate.conditional* [[TMP7]], i32 0, i32 1
|
||||
// CHECK2-NEXT: store atomic volatile i8 1, i8* [[TMP8]] unordered, align 1
|
||||
// CHECK2-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 8
|
||||
// CHECK2-NEXT: store i32* [[I]], i32** [[I_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load i32*, i32** [[A_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = load i32*, i32** [[I_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i32, i32* [[TMP1]], align 4
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = atomicrmw add i32* [[TMP0]], i32 [[TMP2]] monotonic, align 4
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = bitcast i32* [[TMP0]] to %struct.lasprivate.conditional*
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_LASPRIVATE_CONDITIONAL:%.*]], %struct.lasprivate.conditional* [[TMP4]], i32 0, i32 1
|
||||
// CHECK2-NEXT: store atomic volatile i8 1, i8* [[TMP5]] unordered, align 1
|
||||
// CHECK2-NEXT: ret void
|
||||
//
|
||||
//
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -25,20 +25,17 @@ void foo(float *c) {
|
|||
// CHECK1-SAME: (float* [[C:%.*]]) #[[ATTR0:[0-9]+]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[C_ADDR:%.*]] = alloca float*, align 8
|
||||
// CHECK1-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 8
|
||||
// CHECK1-NEXT: store float* [[C]], float** [[C_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK1-NEXT: store float** [[C_ADDR]], float*** [[TMP0]], align 8
|
||||
// CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon*)* @.omp_outlined. to void (i32*, i32*, ...)*), %struct.anon* [[OMP_OUTLINED_ARG_AGG_]])
|
||||
// CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, float**)* @.omp_outlined. to void (i32*, i32*, ...)*), float** [[C_ADDR]])
|
||||
// CHECK1-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@.omp_outlined.
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], float** nonnull align 8 dereferenceable(8) [[C:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK1-NEXT: [[C_ADDR:%.*]] = alloca float**, align 8
|
||||
// CHECK1-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[TMP:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
|
||||
|
@ -48,58 +45,56 @@ void foo(float *c) {
|
|||
// CHECK1-NEXT: [[I:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load float**, float*** [[TMP1]], align 8
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = load float*, float** [[TMP2]], align 8
|
||||
// CHECK1-NEXT: call void @llvm.assume(i1 true) [ "align"(float* [[TMP3]], i64 16) ]
|
||||
// CHECK1-NEXT: store float** [[C]], float*** [[C_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load float**, float*** [[C_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = load float*, float** [[TMP0]], align 8
|
||||
// CHECK1-NEXT: call void @llvm.assume(i1 true) [ "align"(float* [[TMP1]], i64 16) ]
|
||||
// CHECK1-NEXT: store i32 0, i32* [[DOTOMP_LB]], align 4
|
||||
// CHECK1-NEXT: store i32 9, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK1-NEXT: store i32 1, i32* [[DOTOMP_STRIDE]], align 4
|
||||
// CHECK1-NEXT: store i32 0, i32* [[DOTOMP_IS_LAST]], align 4
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = load i32, i32* [[TMP4]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 [[TMP5]], i32 34, i32* [[DOTOMP_IS_LAST]], i32* [[DOTOMP_LB]], i32* [[DOTOMP_UB]], i32* [[DOTOMP_STRIDE]], i32 1, i32 1)
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK1-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP6]], 9
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 [[TMP3]], i32 34, i32* [[DOTOMP_IS_LAST]], i32* [[DOTOMP_LB]], i32* [[DOTOMP_UB]], i32* [[DOTOMP_STRIDE]], i32 1, i32 1)
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK1-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP4]], 9
|
||||
// CHECK1-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
|
||||
// CHECK1: cond.true:
|
||||
// CHECK1-NEXT: br label [[COND_END:%.*]]
|
||||
// CHECK1: cond.false:
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK1-NEXT: br label [[COND_END]]
|
||||
// CHECK1: cond.end:
|
||||
// CHECK1-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP7]], [[COND_FALSE]] ]
|
||||
// CHECK1-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP5]], [[COND_FALSE]] ]
|
||||
// CHECK1-NEXT: store i32 [[COND]], i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = load i32, i32* [[DOTOMP_LB]], align 4
|
||||
// CHECK1-NEXT: store i32 [[TMP8]], i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = load i32, i32* [[DOTOMP_LB]], align 4
|
||||
// CHECK1-NEXT: store i32 [[TMP6]], i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK1-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
|
||||
// CHECK1: omp.inner.for.cond:
|
||||
// CHECK1-NEXT: [[TMP9:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4, !llvm.access.group !3
|
||||
// CHECK1-NEXT: [[TMP10:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4, !llvm.access.group !3
|
||||
// CHECK1-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP9]], [[TMP10]]
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK1-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP7]], [[TMP8]]
|
||||
// CHECK1-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
|
||||
// CHECK1: omp.inner.for.body:
|
||||
// CHECK1-NEXT: [[TMP11:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4, !llvm.access.group !3
|
||||
// CHECK1-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP11]], 1
|
||||
// CHECK1-NEXT: [[TMP9:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK1-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP9]], 1
|
||||
// CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
|
||||
// CHECK1-NEXT: store i32 [[ADD]], i32* [[I]], align 4, !llvm.access.group !3
|
||||
// CHECK1-NEXT: store i32 [[ADD]], i32* [[I]], align 4
|
||||
// CHECK1-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
|
||||
// CHECK1: omp.body.continue:
|
||||
// CHECK1-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
|
||||
// CHECK1: omp.inner.for.inc:
|
||||
// CHECK1-NEXT: [[TMP12:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4, !llvm.access.group !3
|
||||
// CHECK1-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP12]], 1
|
||||
// CHECK1-NEXT: store i32 [[ADD2]], i32* [[DOTOMP_IV]], align 4, !llvm.access.group !3
|
||||
// CHECK1-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP4:![0-9]+]]
|
||||
// CHECK1-NEXT: [[TMP10:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK1-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP10]], 1
|
||||
// CHECK1-NEXT: store i32 [[ADD2]], i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK1-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP2:![0-9]+]]
|
||||
// CHECK1: omp.inner.for.end:
|
||||
// CHECK1-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
|
||||
// CHECK1: omp.loop.exit:
|
||||
// CHECK1-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB1]], i32 [[TMP5]])
|
||||
// CHECK1-NEXT: [[TMP13:%.*]] = load i32, i32* [[DOTOMP_IS_LAST]], align 4
|
||||
// CHECK1-NEXT: [[TMP14:%.*]] = icmp ne i32 [[TMP13]], 0
|
||||
// CHECK1-NEXT: br i1 [[TMP14]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
|
||||
// CHECK1-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB1]], i32 [[TMP3]])
|
||||
// CHECK1-NEXT: [[TMP11:%.*]] = load i32, i32* [[DOTOMP_IS_LAST]], align 4
|
||||
// CHECK1-NEXT: [[TMP12:%.*]] = icmp ne i32 [[TMP11]], 0
|
||||
// CHECK1-NEXT: br i1 [[TMP12]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
|
||||
// CHECK1: .omp.final.then:
|
||||
// CHECK1-NEXT: store i32 10, i32* [[I]], align 4
|
||||
// CHECK1-NEXT: br label [[DOTOMP_FINAL_DONE]]
|
||||
|
@ -111,20 +106,17 @@ void foo(float *c) {
|
|||
// CHECK2-SAME: (float* [[C:%.*]]) #[[ATTR0:[0-9]+]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[C_ADDR:%.*]] = alloca float*, align 8
|
||||
// CHECK2-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 8
|
||||
// CHECK2-NEXT: store float* [[C]], float** [[C_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK2-NEXT: store float** [[C_ADDR]], float*** [[TMP0]], align 8
|
||||
// CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon*)* @.omp_outlined. to void (i32*, i32*, ...)*), %struct.anon* [[OMP_OUTLINED_ARG_AGG_]])
|
||||
// CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, float**)* @.omp_outlined. to void (i32*, i32*, ...)*), float** [[C_ADDR]])
|
||||
// CHECK2-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK2-LABEL: define {{[^@]+}}@.omp_outlined.
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], float** nonnull align 8 dereferenceable(8) [[C:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK2-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK2-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK2-NEXT: [[C_ADDR:%.*]] = alloca float**, align 8
|
||||
// CHECK2-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[TMP:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
|
||||
|
@ -134,58 +126,56 @@ void foo(float *c) {
|
|||
// CHECK2-NEXT: [[I:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load float**, float*** [[TMP1]], align 8
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = load float*, float** [[TMP2]], align 8
|
||||
// CHECK2-NEXT: call void @llvm.assume(i1 true) [ "align"(float* [[TMP3]], i64 16) ]
|
||||
// CHECK2-NEXT: store float** [[C]], float*** [[C_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load float**, float*** [[C_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = load float*, float** [[TMP0]], align 8
|
||||
// CHECK2-NEXT: call void @llvm.assume(i1 true) [ "align"(float* [[TMP1]], i64 16) ]
|
||||
// CHECK2-NEXT: store i32 0, i32* [[DOTOMP_LB]], align 4
|
||||
// CHECK2-NEXT: store i32 9, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK2-NEXT: store i32 1, i32* [[DOTOMP_STRIDE]], align 4
|
||||
// CHECK2-NEXT: store i32 0, i32* [[DOTOMP_IS_LAST]], align 4
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = load i32, i32* [[TMP4]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 [[TMP5]], i32 34, i32* [[DOTOMP_IS_LAST]], i32* [[DOTOMP_LB]], i32* [[DOTOMP_UB]], i32* [[DOTOMP_STRIDE]], i32 1, i32 1)
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK2-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP6]], 9
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 [[TMP3]], i32 34, i32* [[DOTOMP_IS_LAST]], i32* [[DOTOMP_LB]], i32* [[DOTOMP_UB]], i32* [[DOTOMP_STRIDE]], i32 1, i32 1)
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK2-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP4]], 9
|
||||
// CHECK2-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
|
||||
// CHECK2: cond.true:
|
||||
// CHECK2-NEXT: br label [[COND_END:%.*]]
|
||||
// CHECK2: cond.false:
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK2-NEXT: br label [[COND_END]]
|
||||
// CHECK2: cond.end:
|
||||
// CHECK2-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP7]], [[COND_FALSE]] ]
|
||||
// CHECK2-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP5]], [[COND_FALSE]] ]
|
||||
// CHECK2-NEXT: store i32 [[COND]], i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = load i32, i32* [[DOTOMP_LB]], align 4
|
||||
// CHECK2-NEXT: store i32 [[TMP8]], i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = load i32, i32* [[DOTOMP_LB]], align 4
|
||||
// CHECK2-NEXT: store i32 [[TMP6]], i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK2-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
|
||||
// CHECK2: omp.inner.for.cond:
|
||||
// CHECK2-NEXT: [[TMP9:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4, !llvm.access.group !3
|
||||
// CHECK2-NEXT: [[TMP10:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4, !llvm.access.group !3
|
||||
// CHECK2-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP9]], [[TMP10]]
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK2-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP7]], [[TMP8]]
|
||||
// CHECK2-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
|
||||
// CHECK2: omp.inner.for.body:
|
||||
// CHECK2-NEXT: [[TMP11:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4, !llvm.access.group !3
|
||||
// CHECK2-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP11]], 1
|
||||
// CHECK2-NEXT: [[TMP9:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK2-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP9]], 1
|
||||
// CHECK2-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
|
||||
// CHECK2-NEXT: store i32 [[ADD]], i32* [[I]], align 4, !llvm.access.group !3
|
||||
// CHECK2-NEXT: store i32 [[ADD]], i32* [[I]], align 4
|
||||
// CHECK2-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
|
||||
// CHECK2: omp.body.continue:
|
||||
// CHECK2-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
|
||||
// CHECK2: omp.inner.for.inc:
|
||||
// CHECK2-NEXT: [[TMP12:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4, !llvm.access.group !3
|
||||
// CHECK2-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP12]], 1
|
||||
// CHECK2-NEXT: store i32 [[ADD2]], i32* [[DOTOMP_IV]], align 4, !llvm.access.group !3
|
||||
// CHECK2-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP4:![0-9]+]]
|
||||
// CHECK2-NEXT: [[TMP10:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK2-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP10]], 1
|
||||
// CHECK2-NEXT: store i32 [[ADD2]], i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK2-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP2:![0-9]+]]
|
||||
// CHECK2: omp.inner.for.end:
|
||||
// CHECK2-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
|
||||
// CHECK2: omp.loop.exit:
|
||||
// CHECK2-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB1]], i32 [[TMP5]])
|
||||
// CHECK2-NEXT: [[TMP13:%.*]] = load i32, i32* [[DOTOMP_IS_LAST]], align 4
|
||||
// CHECK2-NEXT: [[TMP14:%.*]] = icmp ne i32 [[TMP13]], 0
|
||||
// CHECK2-NEXT: br i1 [[TMP14]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
|
||||
// CHECK2-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB1]], i32 [[TMP3]])
|
||||
// CHECK2-NEXT: [[TMP11:%.*]] = load i32, i32* [[DOTOMP_IS_LAST]], align 4
|
||||
// CHECK2-NEXT: [[TMP12:%.*]] = icmp ne i32 [[TMP11]], 0
|
||||
// CHECK2-NEXT: br i1 [[TMP12]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
|
||||
// CHECK2: .omp.final.then:
|
||||
// CHECK2-NEXT: store i32 10, i32* [[I]], align 4
|
||||
// CHECK2-NEXT: br label [[DOTOMP_FINAL_DONE]]
|
||||
|
@ -197,20 +187,17 @@ void foo(float *c) {
|
|||
// CHECK3-SAME: (float* [[C:%.*]]) #[[ATTR0:[0-9]+]] {
|
||||
// CHECK3-NEXT: entry:
|
||||
// CHECK3-NEXT: [[C_ADDR:%.*]] = alloca float*, align 8
|
||||
// CHECK3-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 8
|
||||
// CHECK3-NEXT: store float* [[C]], float** [[C_ADDR]], align 8
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK3-NEXT: store float** [[C_ADDR]], float*** [[TMP0]], align 8
|
||||
// CHECK3-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon*)* @.omp_outlined. to void (i32*, i32*, ...)*), %struct.anon* [[OMP_OUTLINED_ARG_AGG_]])
|
||||
// CHECK3-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, float**)* @.omp_outlined. to void (i32*, i32*, ...)*), float** [[C_ADDR]])
|
||||
// CHECK3-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK3-LABEL: define {{[^@]+}}@.omp_outlined.
|
||||
// CHECK3-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK3-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], float** nonnull align 8 dereferenceable(8) [[C:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK3-NEXT: entry:
|
||||
// CHECK3-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK3-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK3-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK3-NEXT: [[C_ADDR:%.*]] = alloca float**, align 8
|
||||
// CHECK3-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
|
||||
// CHECK3-NEXT: [[TMP:%.*]] = alloca i32, align 4
|
||||
// CHECK3-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
|
||||
|
@ -220,58 +207,56 @@ void foo(float *c) {
|
|||
// CHECK3-NEXT: [[I:%.*]] = alloca i32, align 4
|
||||
// CHECK3-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK3-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK3-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK3-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = load float**, float*** [[TMP1]], align 8
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = load float*, float** [[TMP2]], align 8
|
||||
// CHECK3-NEXT: call void @llvm.assume(i1 true) [ "align"(float* [[TMP3]], i64 16) ]
|
||||
// CHECK3-NEXT: store float** [[C]], float*** [[C_ADDR]], align 8
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = load float**, float*** [[C_ADDR]], align 8
|
||||
// CHECK3-NEXT: [[TMP1:%.*]] = load float*, float** [[TMP0]], align 8
|
||||
// CHECK3-NEXT: call void @llvm.assume(i1 true) [ "align"(float* [[TMP1]], i64 16) ]
|
||||
// CHECK3-NEXT: store i32 0, i32* [[DOTOMP_LB]], align 4
|
||||
// CHECK3-NEXT: store i32 9, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK3-NEXT: store i32 1, i32* [[DOTOMP_STRIDE]], align 4
|
||||
// CHECK3-NEXT: store i32 0, i32* [[DOTOMP_IS_LAST]], align 4
|
||||
// CHECK3-NEXT: [[TMP4:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK3-NEXT: [[TMP5:%.*]] = load i32, i32* [[TMP4]], align 4
|
||||
// CHECK3-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 [[TMP5]], i32 34, i32* [[DOTOMP_IS_LAST]], i32* [[DOTOMP_LB]], i32* [[DOTOMP_UB]], i32* [[DOTOMP_STRIDE]], i32 1, i32 1)
|
||||
// CHECK3-NEXT: [[TMP6:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK3-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP6]], 9
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK3-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 [[TMP3]], i32 34, i32* [[DOTOMP_IS_LAST]], i32* [[DOTOMP_LB]], i32* [[DOTOMP_UB]], i32* [[DOTOMP_STRIDE]], i32 1, i32 1)
|
||||
// CHECK3-NEXT: [[TMP4:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK3-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP4]], 9
|
||||
// CHECK3-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
|
||||
// CHECK3: cond.true:
|
||||
// CHECK3-NEXT: br label [[COND_END:%.*]]
|
||||
// CHECK3: cond.false:
|
||||
// CHECK3-NEXT: [[TMP7:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK3-NEXT: [[TMP5:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK3-NEXT: br label [[COND_END]]
|
||||
// CHECK3: cond.end:
|
||||
// CHECK3-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP7]], [[COND_FALSE]] ]
|
||||
// CHECK3-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP5]], [[COND_FALSE]] ]
|
||||
// CHECK3-NEXT: store i32 [[COND]], i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK3-NEXT: [[TMP8:%.*]] = load i32, i32* [[DOTOMP_LB]], align 4
|
||||
// CHECK3-NEXT: store i32 [[TMP8]], i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK3-NEXT: [[TMP6:%.*]] = load i32, i32* [[DOTOMP_LB]], align 4
|
||||
// CHECK3-NEXT: store i32 [[TMP6]], i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK3-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
|
||||
// CHECK3: omp.inner.for.cond:
|
||||
// CHECK3-NEXT: [[TMP9:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4, !llvm.access.group !3
|
||||
// CHECK3-NEXT: [[TMP10:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4, !llvm.access.group !3
|
||||
// CHECK3-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP9]], [[TMP10]]
|
||||
// CHECK3-NEXT: [[TMP7:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK3-NEXT: [[TMP8:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK3-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP7]], [[TMP8]]
|
||||
// CHECK3-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
|
||||
// CHECK3: omp.inner.for.body:
|
||||
// CHECK3-NEXT: [[TMP11:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4, !llvm.access.group !3
|
||||
// CHECK3-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP11]], 1
|
||||
// CHECK3-NEXT: [[TMP9:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK3-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP9]], 1
|
||||
// CHECK3-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
|
||||
// CHECK3-NEXT: store i32 [[ADD]], i32* [[I]], align 4, !llvm.access.group !3
|
||||
// CHECK3-NEXT: store i32 [[ADD]], i32* [[I]], align 4
|
||||
// CHECK3-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
|
||||
// CHECK3: omp.body.continue:
|
||||
// CHECK3-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
|
||||
// CHECK3: omp.inner.for.inc:
|
||||
// CHECK3-NEXT: [[TMP12:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4, !llvm.access.group !3
|
||||
// CHECK3-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP12]], 1
|
||||
// CHECK3-NEXT: store i32 [[ADD2]], i32* [[DOTOMP_IV]], align 4, !llvm.access.group !3
|
||||
// CHECK3-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP4:![0-9]+]]
|
||||
// CHECK3-NEXT: [[TMP10:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK3-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP10]], 1
|
||||
// CHECK3-NEXT: store i32 [[ADD2]], i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK3-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP2:![0-9]+]]
|
||||
// CHECK3: omp.inner.for.end:
|
||||
// CHECK3-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
|
||||
// CHECK3: omp.loop.exit:
|
||||
// CHECK3-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB1]], i32 [[TMP5]])
|
||||
// CHECK3-NEXT: [[TMP13:%.*]] = load i32, i32* [[DOTOMP_IS_LAST]], align 4
|
||||
// CHECK3-NEXT: [[TMP14:%.*]] = icmp ne i32 [[TMP13]], 0
|
||||
// CHECK3-NEXT: br i1 [[TMP14]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
|
||||
// CHECK3-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB1]], i32 [[TMP3]])
|
||||
// CHECK3-NEXT: [[TMP11:%.*]] = load i32, i32* [[DOTOMP_IS_LAST]], align 4
|
||||
// CHECK3-NEXT: [[TMP12:%.*]] = icmp ne i32 [[TMP11]], 0
|
||||
// CHECK3-NEXT: br i1 [[TMP12]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
|
||||
// CHECK3: .omp.final.then:
|
||||
// CHECK3-NEXT: store i32 10, i32* [[I]], align 4
|
||||
// CHECK3-NEXT: br label [[DOTOMP_FINAL_DONE]]
|
||||
|
@ -283,20 +268,17 @@ void foo(float *c) {
|
|||
// CHECK4-SAME: (float* [[C:%.*]]) #[[ATTR0:[0-9]+]] {
|
||||
// CHECK4-NEXT: entry:
|
||||
// CHECK4-NEXT: [[C_ADDR:%.*]] = alloca float*, align 8
|
||||
// CHECK4-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 8
|
||||
// CHECK4-NEXT: store float* [[C]], float** [[C_ADDR]], align 8
|
||||
// CHECK4-NEXT: [[TMP0:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK4-NEXT: store float** [[C_ADDR]], float*** [[TMP0]], align 8
|
||||
// CHECK4-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon*)* @.omp_outlined. to void (i32*, i32*, ...)*), %struct.anon* [[OMP_OUTLINED_ARG_AGG_]])
|
||||
// CHECK4-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, float**)* @.omp_outlined. to void (i32*, i32*, ...)*), float** [[C_ADDR]])
|
||||
// CHECK4-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK4-LABEL: define {{[^@]+}}@.omp_outlined.
|
||||
// CHECK4-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK4-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], float** nonnull align 8 dereferenceable(8) [[C:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK4-NEXT: entry:
|
||||
// CHECK4-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK4-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK4-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK4-NEXT: [[C_ADDR:%.*]] = alloca float**, align 8
|
||||
// CHECK4-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
|
||||
// CHECK4-NEXT: [[TMP:%.*]] = alloca i32, align 4
|
||||
// CHECK4-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
|
||||
|
@ -306,58 +288,56 @@ void foo(float *c) {
|
|||
// CHECK4-NEXT: [[I:%.*]] = alloca i32, align 4
|
||||
// CHECK4-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK4-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK4-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK4-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK4-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK4-NEXT: [[TMP2:%.*]] = load float**, float*** [[TMP1]], align 8
|
||||
// CHECK4-NEXT: [[TMP3:%.*]] = load float*, float** [[TMP2]], align 8
|
||||
// CHECK4-NEXT: call void @llvm.assume(i1 true) [ "align"(float* [[TMP3]], i64 16) ]
|
||||
// CHECK4-NEXT: store float** [[C]], float*** [[C_ADDR]], align 8
|
||||
// CHECK4-NEXT: [[TMP0:%.*]] = load float**, float*** [[C_ADDR]], align 8
|
||||
// CHECK4-NEXT: [[TMP1:%.*]] = load float*, float** [[TMP0]], align 8
|
||||
// CHECK4-NEXT: call void @llvm.assume(i1 true) [ "align"(float* [[TMP1]], i64 16) ]
|
||||
// CHECK4-NEXT: store i32 0, i32* [[DOTOMP_LB]], align 4
|
||||
// CHECK4-NEXT: store i32 9, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK4-NEXT: store i32 1, i32* [[DOTOMP_STRIDE]], align 4
|
||||
// CHECK4-NEXT: store i32 0, i32* [[DOTOMP_IS_LAST]], align 4
|
||||
// CHECK4-NEXT: [[TMP4:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK4-NEXT: [[TMP5:%.*]] = load i32, i32* [[TMP4]], align 4
|
||||
// CHECK4-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 [[TMP5]], i32 34, i32* [[DOTOMP_IS_LAST]], i32* [[DOTOMP_LB]], i32* [[DOTOMP_UB]], i32* [[DOTOMP_STRIDE]], i32 1, i32 1)
|
||||
// CHECK4-NEXT: [[TMP6:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK4-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP6]], 9
|
||||
// CHECK4-NEXT: [[TMP2:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK4-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK4-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 [[TMP3]], i32 34, i32* [[DOTOMP_IS_LAST]], i32* [[DOTOMP_LB]], i32* [[DOTOMP_UB]], i32* [[DOTOMP_STRIDE]], i32 1, i32 1)
|
||||
// CHECK4-NEXT: [[TMP4:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK4-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP4]], 9
|
||||
// CHECK4-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
|
||||
// CHECK4: cond.true:
|
||||
// CHECK4-NEXT: br label [[COND_END:%.*]]
|
||||
// CHECK4: cond.false:
|
||||
// CHECK4-NEXT: [[TMP7:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK4-NEXT: [[TMP5:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK4-NEXT: br label [[COND_END]]
|
||||
// CHECK4: cond.end:
|
||||
// CHECK4-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP7]], [[COND_FALSE]] ]
|
||||
// CHECK4-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP5]], [[COND_FALSE]] ]
|
||||
// CHECK4-NEXT: store i32 [[COND]], i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK4-NEXT: [[TMP8:%.*]] = load i32, i32* [[DOTOMP_LB]], align 4
|
||||
// CHECK4-NEXT: store i32 [[TMP8]], i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK4-NEXT: [[TMP6:%.*]] = load i32, i32* [[DOTOMP_LB]], align 4
|
||||
// CHECK4-NEXT: store i32 [[TMP6]], i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK4-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
|
||||
// CHECK4: omp.inner.for.cond:
|
||||
// CHECK4-NEXT: [[TMP9:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4, !llvm.access.group !3
|
||||
// CHECK4-NEXT: [[TMP10:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4, !llvm.access.group !3
|
||||
// CHECK4-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP9]], [[TMP10]]
|
||||
// CHECK4-NEXT: [[TMP7:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK4-NEXT: [[TMP8:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
|
||||
// CHECK4-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP7]], [[TMP8]]
|
||||
// CHECK4-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
|
||||
// CHECK4: omp.inner.for.body:
|
||||
// CHECK4-NEXT: [[TMP11:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4, !llvm.access.group !3
|
||||
// CHECK4-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP11]], 1
|
||||
// CHECK4-NEXT: [[TMP9:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK4-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP9]], 1
|
||||
// CHECK4-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
|
||||
// CHECK4-NEXT: store i32 [[ADD]], i32* [[I]], align 4, !llvm.access.group !3
|
||||
// CHECK4-NEXT: store i32 [[ADD]], i32* [[I]], align 4
|
||||
// CHECK4-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
|
||||
// CHECK4: omp.body.continue:
|
||||
// CHECK4-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
|
||||
// CHECK4: omp.inner.for.inc:
|
||||
// CHECK4-NEXT: [[TMP12:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4, !llvm.access.group !3
|
||||
// CHECK4-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP12]], 1
|
||||
// CHECK4-NEXT: store i32 [[ADD2]], i32* [[DOTOMP_IV]], align 4, !llvm.access.group !3
|
||||
// CHECK4-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP4:![0-9]+]]
|
||||
// CHECK4-NEXT: [[TMP10:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK4-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP10]], 1
|
||||
// CHECK4-NEXT: store i32 [[ADD2]], i32* [[DOTOMP_IV]], align 4
|
||||
// CHECK4-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP2:![0-9]+]]
|
||||
// CHECK4: omp.inner.for.end:
|
||||
// CHECK4-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
|
||||
// CHECK4: omp.loop.exit:
|
||||
// CHECK4-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB1]], i32 [[TMP5]])
|
||||
// CHECK4-NEXT: [[TMP13:%.*]] = load i32, i32* [[DOTOMP_IS_LAST]], align 4
|
||||
// CHECK4-NEXT: [[TMP14:%.*]] = icmp ne i32 [[TMP13]], 0
|
||||
// CHECK4-NEXT: br i1 [[TMP14]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
|
||||
// CHECK4-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB1]], i32 [[TMP3]])
|
||||
// CHECK4-NEXT: [[TMP11:%.*]] = load i32, i32* [[DOTOMP_IS_LAST]], align 4
|
||||
// CHECK4-NEXT: [[TMP12:%.*]] = icmp ne i32 [[TMP11]], 0
|
||||
// CHECK4-NEXT: br i1 [[TMP12]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
|
||||
// CHECK4: .omp.final.then:
|
||||
// CHECK4-NEXT: store i32 10, i32* [[I]], align 4
|
||||
// CHECK4-NEXT: br label [[DOTOMP_FINAL_DONE]]
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -15,28 +15,24 @@ void foo() {
|
|||
// CHECK-LABEL: define {{[^@]+}}@_Z3foov
|
||||
// CHECK-SAME: () #[[ATTR0:[0-9]+]] {
|
||||
// CHECK-NEXT: entry:
|
||||
// CHECK-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 1
|
||||
// CHECK-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
|
||||
// CHECK-NEXT: [[DOTBOUND_ZERO_ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK-NEXT: store i32 0, i32* [[DOTBOUND_ZERO_ADDR]], align 4
|
||||
// CHECK-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1:[0-9]+]])
|
||||
// CHECK-NEXT: call void @__kmpc_serialized_parallel(%struct.ident_t* @[[GLOB1]], i32 [[TMP0]])
|
||||
// CHECK-NEXT: store i32 [[TMP0]], i32* [[DOTTHREADID_TEMP_]], align 4, !tbaa [[TBAA3:![0-9]+]]
|
||||
// CHECK-NEXT: call void @.omp_outlined.(i32* [[DOTTHREADID_TEMP_]], i32* [[DOTBOUND_ZERO_ADDR]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]]) #[[ATTR2:[0-9]+]]
|
||||
// CHECK-NEXT: call void @.omp_outlined.(i32* [[DOTTHREADID_TEMP_]], i32* [[DOTBOUND_ZERO_ADDR]]) #[[ATTR2:[0-9]+]]
|
||||
// CHECK-NEXT: call void @__kmpc_end_serialized_parallel(%struct.ident_t* @[[GLOB1]], i32 [[TMP0]])
|
||||
// CHECK-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK: Function Attrs: noinline norecurse nounwind
|
||||
// CHECK-LABEL: define {{[^@]+}}@.omp_outlined.
|
||||
// CHECK-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK-NEXT: entry:
|
||||
// CHECK-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8, !tbaa [[TBAA7:![0-9]+]]
|
||||
// CHECK-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8, !tbaa [[TBAA7]]
|
||||
// CHECK-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8, !tbaa [[TBAA7]]
|
||||
// CHECK-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK-NEXT: ret void
|
||||
//
|
||||
|
|
|
@ -296,42 +296,38 @@ void parallel_master_allocate() {
|
|||
// CHECK1-LABEL: define {{[^@]+}}@_Z15parallel_masterv
|
||||
// CHECK1-SAME: () #[[ATTR2:[0-9]+]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 1
|
||||
// CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon*)* @.omp_outlined. to void (i32*, i32*, ...)*), %struct.anon* [[OMP_OUTLINED_ARG_AGG_]])
|
||||
// CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 0, void (i32*, i32*, ...)* bitcast (void (i32*, i32*)* @.omp_outlined. to void (i32*, i32*, ...)*))
|
||||
// CHECK1-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@.omp_outlined.
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR3:[0-9]+]] personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]]) #[[ATTR3:[0-9]+]] personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK1-NEXT: [[EXN_SLOT:%.*]] = alloca i8*, align 8
|
||||
// CHECK1-NEXT: [[EHSELECTOR_SLOT:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i32, i32* [[TMP1]], align 4
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]])
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = icmp ne i32 [[TMP3]], 0
|
||||
// CHECK1-NEXT: br i1 [[TMP4]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]])
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = icmp ne i32 [[TMP2]], 0
|
||||
// CHECK1-NEXT: br i1 [[TMP3]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
|
||||
// CHECK1: omp_if.then:
|
||||
// CHECK1-NEXT: invoke void @_Z3foov()
|
||||
// CHECK1-NEXT: to label [[INVOKE_CONT:%.*]] unwind label [[LPAD:%.*]]
|
||||
// CHECK1: invoke.cont:
|
||||
// CHECK1-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]])
|
||||
// CHECK1-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]])
|
||||
// CHECK1-NEXT: br label [[OMP_IF_END]]
|
||||
// CHECK1: lpad:
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = landingpad { i8*, i32 }
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = landingpad { i8*, i32 }
|
||||
// CHECK1-NEXT: catch i8* null
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = extractvalue { i8*, i32 } [[TMP5]], 0
|
||||
// CHECK1-NEXT: store i8* [[TMP6]], i8** [[EXN_SLOT]], align 8
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = extractvalue { i8*, i32 } [[TMP5]], 1
|
||||
// CHECK1-NEXT: store i32 [[TMP7]], i32* [[EHSELECTOR_SLOT]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]])
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = extractvalue { i8*, i32 } [[TMP4]], 0
|
||||
// CHECK1-NEXT: store i8* [[TMP5]], i8** [[EXN_SLOT]], align 8
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = extractvalue { i8*, i32 } [[TMP4]], 1
|
||||
// CHECK1-NEXT: store i32 [[TMP6]], i32* [[EHSELECTOR_SLOT]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]])
|
||||
// CHECK1-NEXT: br label [[TERMINATE_HANDLER:%.*]]
|
||||
// CHECK1: omp_if.end:
|
||||
// CHECK1-NEXT: ret void
|
||||
|
@ -358,42 +354,38 @@ void parallel_master_allocate() {
|
|||
// CHECK2-LABEL: define {{[^@]+}}@_Z15parallel_masterv
|
||||
// CHECK2-SAME: () #[[ATTR2:[0-9]+]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 1
|
||||
// CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon*)* @.omp_outlined. to void (i32*, i32*, ...)*), %struct.anon* [[OMP_OUTLINED_ARG_AGG_]])
|
||||
// CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 0, void (i32*, i32*, ...)* bitcast (void (i32*, i32*)* @.omp_outlined. to void (i32*, i32*, ...)*))
|
||||
// CHECK2-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK2-LABEL: define {{[^@]+}}@.omp_outlined.
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR3:[0-9]+]] personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]]) #[[ATTR3:[0-9]+]] personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK2-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK2-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK2-NEXT: [[EXN_SLOT:%.*]] = alloca i8*, align 8
|
||||
// CHECK2-NEXT: [[EHSELECTOR_SLOT:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i32, i32* [[TMP1]], align 4
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]])
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = icmp ne i32 [[TMP3]], 0
|
||||
// CHECK2-NEXT: br i1 [[TMP4]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]])
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = icmp ne i32 [[TMP2]], 0
|
||||
// CHECK2-NEXT: br i1 [[TMP3]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
|
||||
// CHECK2: omp_if.then:
|
||||
// CHECK2-NEXT: invoke void @_Z3foov()
|
||||
// CHECK2-NEXT: to label [[INVOKE_CONT:%.*]] unwind label [[LPAD:%.*]]
|
||||
// CHECK2: invoke.cont:
|
||||
// CHECK2-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]])
|
||||
// CHECK2-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]])
|
||||
// CHECK2-NEXT: br label [[OMP_IF_END]]
|
||||
// CHECK2: lpad:
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = landingpad { i8*, i32 }
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = landingpad { i8*, i32 }
|
||||
// CHECK2-NEXT: catch i8* null
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = extractvalue { i8*, i32 } [[TMP5]], 0
|
||||
// CHECK2-NEXT: store i8* [[TMP6]], i8** [[EXN_SLOT]], align 8
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = extractvalue { i8*, i32 } [[TMP5]], 1
|
||||
// CHECK2-NEXT: store i32 [[TMP7]], i32* [[EHSELECTOR_SLOT]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]])
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = extractvalue { i8*, i32 } [[TMP4]], 0
|
||||
// CHECK2-NEXT: store i8* [[TMP5]], i8** [[EXN_SLOT]], align 8
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = extractvalue { i8*, i32 } [[TMP4]], 1
|
||||
// CHECK2-NEXT: store i32 [[TMP6]], i32* [[EHSELECTOR_SLOT]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]])
|
||||
// CHECK2-NEXT: br label [[TERMINATE_HANDLER:%.*]]
|
||||
// CHECK2: omp_if.end:
|
||||
// CHECK2-NEXT: ret void
|
||||
|
@ -414,32 +406,28 @@ void parallel_master_allocate() {
|
|||
// CHECK5-SAME: () #[[ATTR0:[0-9]+]] {
|
||||
// CHECK5-NEXT: entry:
|
||||
// CHECK5-NEXT: [[A:%.*]] = alloca i32, align 4
|
||||
// CHECK5-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 1
|
||||
// CHECK5-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon*)* @.omp_outlined. to void (i32*, i32*, ...)*), %struct.anon* [[OMP_OUTLINED_ARG_AGG_]])
|
||||
// CHECK5-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 0, void (i32*, i32*, ...)* bitcast (void (i32*, i32*)* @.omp_outlined. to void (i32*, i32*, ...)*))
|
||||
// CHECK5-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK5-LABEL: define {{[^@]+}}@.omp_outlined.
|
||||
// CHECK5-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK5-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK5-NEXT: entry:
|
||||
// CHECK5-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK5-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK5-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK5-NEXT: [[A:%.*]] = alloca i32, align 4
|
||||
// CHECK5-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK5-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK5-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK5-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK5-NEXT: [[TMP1:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK5-NEXT: [[TMP2:%.*]] = load i32, i32* [[TMP1]], align 4
|
||||
// CHECK5-NEXT: [[TMP3:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]])
|
||||
// CHECK5-NEXT: [[TMP4:%.*]] = icmp ne i32 [[TMP3]], 0
|
||||
// CHECK5-NEXT: br i1 [[TMP4]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
|
||||
// CHECK5-NEXT: [[TMP0:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK5-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK5-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]])
|
||||
// CHECK5-NEXT: [[TMP3:%.*]] = icmp ne i32 [[TMP2]], 0
|
||||
// CHECK5-NEXT: br i1 [[TMP3]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
|
||||
// CHECK5: omp_if.then:
|
||||
// CHECK5-NEXT: [[TMP5:%.*]] = load i32, i32* [[A]], align 4
|
||||
// CHECK5-NEXT: [[INC:%.*]] = add nsw i32 [[TMP5]], 1
|
||||
// CHECK5-NEXT: [[TMP4:%.*]] = load i32, i32* [[A]], align 4
|
||||
// CHECK5-NEXT: [[INC:%.*]] = add nsw i32 [[TMP4]], 1
|
||||
// CHECK5-NEXT: store i32 [[INC]], i32* [[A]], align 4
|
||||
// CHECK5-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]])
|
||||
// CHECK5-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]])
|
||||
// CHECK5-NEXT: br label [[OMP_IF_END]]
|
||||
// CHECK5: omp_if.end:
|
||||
// CHECK5-NEXT: ret void
|
||||
|
@ -449,32 +437,28 @@ void parallel_master_allocate() {
|
|||
// CHECK6-SAME: () #[[ATTR0:[0-9]+]] {
|
||||
// CHECK6-NEXT: entry:
|
||||
// CHECK6-NEXT: [[A:%.*]] = alloca i32, align 4
|
||||
// CHECK6-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 1
|
||||
// CHECK6-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon*)* @.omp_outlined. to void (i32*, i32*, ...)*), %struct.anon* [[OMP_OUTLINED_ARG_AGG_]])
|
||||
// CHECK6-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 0, void (i32*, i32*, ...)* bitcast (void (i32*, i32*)* @.omp_outlined. to void (i32*, i32*, ...)*))
|
||||
// CHECK6-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK6-LABEL: define {{[^@]+}}@.omp_outlined.
|
||||
// CHECK6-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK6-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK6-NEXT: entry:
|
||||
// CHECK6-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK6-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK6-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK6-NEXT: [[A:%.*]] = alloca i32, align 4
|
||||
// CHECK6-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK6-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK6-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK6-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK6-NEXT: [[TMP1:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK6-NEXT: [[TMP2:%.*]] = load i32, i32* [[TMP1]], align 4
|
||||
// CHECK6-NEXT: [[TMP3:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]])
|
||||
// CHECK6-NEXT: [[TMP4:%.*]] = icmp ne i32 [[TMP3]], 0
|
||||
// CHECK6-NEXT: br i1 [[TMP4]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
|
||||
// CHECK6-NEXT: [[TMP0:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK6-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK6-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]])
|
||||
// CHECK6-NEXT: [[TMP3:%.*]] = icmp ne i32 [[TMP2]], 0
|
||||
// CHECK6-NEXT: br i1 [[TMP3]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
|
||||
// CHECK6: omp_if.then:
|
||||
// CHECK6-NEXT: [[TMP5:%.*]] = load i32, i32* [[A]], align 4
|
||||
// CHECK6-NEXT: [[INC:%.*]] = add nsw i32 [[TMP5]], 1
|
||||
// CHECK6-NEXT: [[TMP4:%.*]] = load i32, i32* [[A]], align 4
|
||||
// CHECK6-NEXT: [[INC:%.*]] = add nsw i32 [[TMP4]], 1
|
||||
// CHECK6-NEXT: store i32 [[INC]], i32* [[A]], align 4
|
||||
// CHECK6-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]])
|
||||
// CHECK6-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]])
|
||||
// CHECK6-NEXT: br label [[OMP_IF_END]]
|
||||
// CHECK6: omp_if.end:
|
||||
// CHECK6-NEXT: ret void
|
||||
|
@ -484,35 +468,30 @@ void parallel_master_allocate() {
|
|||
// CHECK9-SAME: () #[[ATTR0:[0-9]+]] {
|
||||
// CHECK9-NEXT: entry:
|
||||
// CHECK9-NEXT: [[A:%.*]] = alloca i32, align 4
|
||||
// CHECK9-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 8
|
||||
// CHECK9-NEXT: [[TMP0:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK9-NEXT: store i32* [[A]], i32** [[TMP0]], align 8
|
||||
// CHECK9-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon*)* @.omp_outlined. to void (i32*, i32*, ...)*), %struct.anon* [[OMP_OUTLINED_ARG_AGG_]])
|
||||
// CHECK9-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @.omp_outlined. to void (i32*, i32*, ...)*), i32* [[A]])
|
||||
// CHECK9-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK9-LABEL: define {{[^@]+}}@.omp_outlined.
|
||||
// CHECK9-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK9-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK9-NEXT: entry:
|
||||
// CHECK9-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK9-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK9-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK9-NEXT: [[A_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK9-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK9-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK9-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK9-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK9-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK9-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 8
|
||||
// CHECK9-NEXT: [[TMP3:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK9-NEXT: [[TMP4:%.*]] = load i32, i32* [[TMP3]], align 4
|
||||
// CHECK9-NEXT: [[TMP5:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP4]])
|
||||
// CHECK9-NEXT: [[TMP6:%.*]] = icmp ne i32 [[TMP5]], 0
|
||||
// CHECK9-NEXT: br i1 [[TMP6]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
|
||||
// CHECK9-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 8
|
||||
// CHECK9-NEXT: [[TMP0:%.*]] = load i32*, i32** [[A_ADDR]], align 8
|
||||
// CHECK9-NEXT: [[TMP1:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK9-NEXT: [[TMP2:%.*]] = load i32, i32* [[TMP1]], align 4
|
||||
// CHECK9-NEXT: [[TMP3:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]])
|
||||
// CHECK9-NEXT: [[TMP4:%.*]] = icmp ne i32 [[TMP3]], 0
|
||||
// CHECK9-NEXT: br i1 [[TMP4]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
|
||||
// CHECK9: omp_if.then:
|
||||
// CHECK9-NEXT: [[TMP7:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK9-NEXT: [[INC:%.*]] = add nsw i32 [[TMP7]], 1
|
||||
// CHECK9-NEXT: store i32 [[INC]], i32* [[TMP2]], align 4
|
||||
// CHECK9-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP4]])
|
||||
// CHECK9-NEXT: [[TMP5:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK9-NEXT: [[INC:%.*]] = add nsw i32 [[TMP5]], 1
|
||||
// CHECK9-NEXT: store i32 [[INC]], i32* [[TMP0]], align 4
|
||||
// CHECK9-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]])
|
||||
// CHECK9-NEXT: br label [[OMP_IF_END]]
|
||||
// CHECK9: omp_if.end:
|
||||
// CHECK9-NEXT: ret void
|
||||
|
@ -522,35 +501,30 @@ void parallel_master_allocate() {
|
|||
// CHECK10-SAME: () #[[ATTR0:[0-9]+]] {
|
||||
// CHECK10-NEXT: entry:
|
||||
// CHECK10-NEXT: [[A:%.*]] = alloca i32, align 4
|
||||
// CHECK10-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 8
|
||||
// CHECK10-NEXT: [[TMP0:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK10-NEXT: store i32* [[A]], i32** [[TMP0]], align 8
|
||||
// CHECK10-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon*)* @.omp_outlined. to void (i32*, i32*, ...)*), %struct.anon* [[OMP_OUTLINED_ARG_AGG_]])
|
||||
// CHECK10-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @.omp_outlined. to void (i32*, i32*, ...)*), i32* [[A]])
|
||||
// CHECK10-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK10-LABEL: define {{[^@]+}}@.omp_outlined.
|
||||
// CHECK10-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK10-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK10-NEXT: entry:
|
||||
// CHECK10-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK10-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK10-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK10-NEXT: [[A_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK10-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK10-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK10-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK10-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK10-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK10-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 8
|
||||
// CHECK10-NEXT: [[TMP3:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK10-NEXT: [[TMP4:%.*]] = load i32, i32* [[TMP3]], align 4
|
||||
// CHECK10-NEXT: [[TMP5:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP4]])
|
||||
// CHECK10-NEXT: [[TMP6:%.*]] = icmp ne i32 [[TMP5]], 0
|
||||
// CHECK10-NEXT: br i1 [[TMP6]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
|
||||
// CHECK10-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 8
|
||||
// CHECK10-NEXT: [[TMP0:%.*]] = load i32*, i32** [[A_ADDR]], align 8
|
||||
// CHECK10-NEXT: [[TMP1:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK10-NEXT: [[TMP2:%.*]] = load i32, i32* [[TMP1]], align 4
|
||||
// CHECK10-NEXT: [[TMP3:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]])
|
||||
// CHECK10-NEXT: [[TMP4:%.*]] = icmp ne i32 [[TMP3]], 0
|
||||
// CHECK10-NEXT: br i1 [[TMP4]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
|
||||
// CHECK10: omp_if.then:
|
||||
// CHECK10-NEXT: [[TMP7:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK10-NEXT: [[INC:%.*]] = add nsw i32 [[TMP7]], 1
|
||||
// CHECK10-NEXT: store i32 [[INC]], i32* [[TMP2]], align 4
|
||||
// CHECK10-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP4]])
|
||||
// CHECK10-NEXT: [[TMP5:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK10-NEXT: [[INC:%.*]] = add nsw i32 [[TMP5]], 1
|
||||
// CHECK10-NEXT: store i32 [[INC]], i32* [[TMP0]], align 4
|
||||
// CHECK10-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]])
|
||||
// CHECK10-NEXT: br label [[OMP_IF_END]]
|
||||
// CHECK10: omp_if.end:
|
||||
// CHECK10-NEXT: ret void
|
||||
|
@ -560,38 +534,35 @@ void parallel_master_allocate() {
|
|||
// CHECK13-SAME: () #[[ATTR0:[0-9]+]] {
|
||||
// CHECK13-NEXT: entry:
|
||||
// CHECK13-NEXT: [[A:%.*]] = alloca i32, align 4
|
||||
// CHECK13-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 4
|
||||
// CHECK13-NEXT: [[TMP0:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK13-NEXT: [[TMP1:%.*]] = load i32, i32* [[A]], align 4
|
||||
// CHECK13-NEXT: store i32 [[TMP1]], i32* [[TMP0]], align 4
|
||||
// CHECK13-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon*)* @.omp_outlined. to void (i32*, i32*, ...)*), %struct.anon* [[OMP_OUTLINED_ARG_AGG_]])
|
||||
// CHECK13-NEXT: [[A_CASTED:%.*]] = alloca i64, align 8
|
||||
// CHECK13-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
|
||||
// CHECK13-NEXT: [[CONV:%.*]] = bitcast i64* [[A_CASTED]] to i32*
|
||||
// CHECK13-NEXT: store i32 [[TMP0]], i32* [[CONV]], align 4
|
||||
// CHECK13-NEXT: [[TMP1:%.*]] = load i64, i64* [[A_CASTED]], align 8
|
||||
// CHECK13-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i64)* @.omp_outlined. to void (i32*, i32*, ...)*), i64 [[TMP1]])
|
||||
// CHECK13-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK13-LABEL: define {{[^@]+}}@.omp_outlined.
|
||||
// CHECK13-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK13-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i64 [[A:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK13-NEXT: entry:
|
||||
// CHECK13-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK13-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK13-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK13-NEXT: [[A:%.*]] = alloca i32, align 4
|
||||
// CHECK13-NEXT: [[A_ADDR:%.*]] = alloca i64, align 8
|
||||
// CHECK13-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK13-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK13-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK13-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK13-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK13-NEXT: [[TMP2:%.*]] = load i32, i32* [[TMP1]], align 4
|
||||
// CHECK13-NEXT: store i32 [[TMP2]], i32* [[A]], align 4
|
||||
// CHECK13-NEXT: [[TMP3:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK13-NEXT: [[TMP4:%.*]] = load i32, i32* [[TMP3]], align 4
|
||||
// CHECK13-NEXT: [[TMP5:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP4]])
|
||||
// CHECK13-NEXT: [[TMP6:%.*]] = icmp ne i32 [[TMP5]], 0
|
||||
// CHECK13-NEXT: br i1 [[TMP6]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
|
||||
// CHECK13-NEXT: store i64 [[A]], i64* [[A_ADDR]], align 8
|
||||
// CHECK13-NEXT: [[CONV:%.*]] = bitcast i64* [[A_ADDR]] to i32*
|
||||
// CHECK13-NEXT: [[TMP0:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK13-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK13-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]])
|
||||
// CHECK13-NEXT: [[TMP3:%.*]] = icmp ne i32 [[TMP2]], 0
|
||||
// CHECK13-NEXT: br i1 [[TMP3]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
|
||||
// CHECK13: omp_if.then:
|
||||
// CHECK13-NEXT: [[TMP7:%.*]] = load i32, i32* [[A]], align 4
|
||||
// CHECK13-NEXT: [[INC:%.*]] = add nsw i32 [[TMP7]], 1
|
||||
// CHECK13-NEXT: store i32 [[INC]], i32* [[A]], align 4
|
||||
// CHECK13-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP4]])
|
||||
// CHECK13-NEXT: [[TMP4:%.*]] = load i32, i32* [[CONV]], align 8
|
||||
// CHECK13-NEXT: [[INC:%.*]] = add nsw i32 [[TMP4]], 1
|
||||
// CHECK13-NEXT: store i32 [[INC]], i32* [[CONV]], align 8
|
||||
// CHECK13-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]])
|
||||
// CHECK13-NEXT: br label [[OMP_IF_END]]
|
||||
// CHECK13: omp_if.end:
|
||||
// CHECK13-NEXT: ret void
|
||||
|
@ -601,38 +572,35 @@ void parallel_master_allocate() {
|
|||
// CHECK14-SAME: () #[[ATTR0:[0-9]+]] {
|
||||
// CHECK14-NEXT: entry:
|
||||
// CHECK14-NEXT: [[A:%.*]] = alloca i32, align 4
|
||||
// CHECK14-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 4
|
||||
// CHECK14-NEXT: [[TMP0:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK14-NEXT: [[TMP1:%.*]] = load i32, i32* [[A]], align 4
|
||||
// CHECK14-NEXT: store i32 [[TMP1]], i32* [[TMP0]], align 4
|
||||
// CHECK14-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon*)* @.omp_outlined. to void (i32*, i32*, ...)*), %struct.anon* [[OMP_OUTLINED_ARG_AGG_]])
|
||||
// CHECK14-NEXT: [[A_CASTED:%.*]] = alloca i64, align 8
|
||||
// CHECK14-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
|
||||
// CHECK14-NEXT: [[CONV:%.*]] = bitcast i64* [[A_CASTED]] to i32*
|
||||
// CHECK14-NEXT: store i32 [[TMP0]], i32* [[CONV]], align 4
|
||||
// CHECK14-NEXT: [[TMP1:%.*]] = load i64, i64* [[A_CASTED]], align 8
|
||||
// CHECK14-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i64)* @.omp_outlined. to void (i32*, i32*, ...)*), i64 [[TMP1]])
|
||||
// CHECK14-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK14-LABEL: define {{[^@]+}}@.omp_outlined.
|
||||
// CHECK14-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK14-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i64 [[A:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK14-NEXT: entry:
|
||||
// CHECK14-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK14-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK14-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK14-NEXT: [[A:%.*]] = alloca i32, align 4
|
||||
// CHECK14-NEXT: [[A_ADDR:%.*]] = alloca i64, align 8
|
||||
// CHECK14-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK14-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK14-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK14-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK14-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK14-NEXT: [[TMP2:%.*]] = load i32, i32* [[TMP1]], align 4
|
||||
// CHECK14-NEXT: store i32 [[TMP2]], i32* [[A]], align 4
|
||||
// CHECK14-NEXT: [[TMP3:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK14-NEXT: [[TMP4:%.*]] = load i32, i32* [[TMP3]], align 4
|
||||
// CHECK14-NEXT: [[TMP5:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP4]])
|
||||
// CHECK14-NEXT: [[TMP6:%.*]] = icmp ne i32 [[TMP5]], 0
|
||||
// CHECK14-NEXT: br i1 [[TMP6]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
|
||||
// CHECK14-NEXT: store i64 [[A]], i64* [[A_ADDR]], align 8
|
||||
// CHECK14-NEXT: [[CONV:%.*]] = bitcast i64* [[A_ADDR]] to i32*
|
||||
// CHECK14-NEXT: [[TMP0:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK14-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK14-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]])
|
||||
// CHECK14-NEXT: [[TMP3:%.*]] = icmp ne i32 [[TMP2]], 0
|
||||
// CHECK14-NEXT: br i1 [[TMP3]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
|
||||
// CHECK14: omp_if.then:
|
||||
// CHECK14-NEXT: [[TMP7:%.*]] = load i32, i32* [[A]], align 4
|
||||
// CHECK14-NEXT: [[INC:%.*]] = add nsw i32 [[TMP7]], 1
|
||||
// CHECK14-NEXT: store i32 [[INC]], i32* [[A]], align 4
|
||||
// CHECK14-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP4]])
|
||||
// CHECK14-NEXT: [[TMP4:%.*]] = load i32, i32* [[CONV]], align 8
|
||||
// CHECK14-NEXT: [[INC:%.*]] = add nsw i32 [[TMP4]], 1
|
||||
// CHECK14-NEXT: store i32 [[INC]], i32* [[CONV]], align 8
|
||||
// CHECK14-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]])
|
||||
// CHECK14-NEXT: br label [[OMP_IF_END]]
|
||||
// CHECK14: omp_if.end:
|
||||
// CHECK14-NEXT: ret void
|
||||
|
@ -642,14 +610,13 @@ void parallel_master_allocate() {
|
|||
// CHECK17-SAME: () #[[ATTR0:[0-9]+]] {
|
||||
// CHECK17-NEXT: entry:
|
||||
// CHECK17-NEXT: [[A:%.*]] = alloca [[STRUCT_ST:%.*]], align 4
|
||||
// CHECK17-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 8
|
||||
// CHECK17-NEXT: [[Y_CASTED:%.*]] = alloca i64, align 8
|
||||
// CHECK17-NEXT: call void @_ZN2StC1Ev(%struct.St* nonnull align 4 dereferenceable(8) [[A]])
|
||||
// CHECK17-NEXT: [[TMP0:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK17-NEXT: store %struct.St* [[A]], %struct.St** [[TMP0]], align 8
|
||||
// CHECK17-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 1
|
||||
// CHECK17-NEXT: [[TMP2:%.*]] = load i32, i32* @_ZZ36parallel_master_default_firstprivatevE1y, align 4
|
||||
// CHECK17-NEXT: store i32 [[TMP2]], i32* [[TMP1]], align 8
|
||||
// CHECK17-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon*)* @.omp_outlined. to void (i32*, i32*, ...)*), %struct.anon* [[OMP_OUTLINED_ARG_AGG_]])
|
||||
// CHECK17-NEXT: [[TMP0:%.*]] = load i32, i32* @_ZZ36parallel_master_default_firstprivatevE1y, align 4
|
||||
// CHECK17-NEXT: [[CONV:%.*]] = bitcast i64* [[Y_CASTED]] to i32*
|
||||
// CHECK17-NEXT: store i32 [[TMP0]], i32* [[CONV]], align 4
|
||||
// CHECK17-NEXT: [[TMP1:%.*]] = load i64, i64* [[Y_CASTED]], align 8
|
||||
// CHECK17-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 2, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.St*, i64)* @.omp_outlined. to void (i32*, i32*, ...)*), %struct.St* [[A]], i64 [[TMP1]])
|
||||
// CHECK17-NEXT: call void @_ZN2StD1Ev(%struct.St* nonnull align 4 dereferenceable(8) [[A]]) #[[ATTR3:[0-9]+]]
|
||||
// CHECK17-NEXT: ret void
|
||||
//
|
||||
|
@ -665,42 +632,39 @@ void parallel_master_allocate() {
|
|||
//
|
||||
//
|
||||
// CHECK17-LABEL: define {{[^@]+}}@.omp_outlined.
|
||||
// CHECK17-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR2:[0-9]+]] {
|
||||
// CHECK17-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.St* nonnull align 4 dereferenceable(8) [[A:%.*]], i64 [[Y:%.*]]) #[[ATTR2:[0-9]+]] {
|
||||
// CHECK17-NEXT: entry:
|
||||
// CHECK17-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK17-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK17-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK17-NEXT: [[Y:%.*]] = alloca i32, align 4
|
||||
// CHECK17-NEXT: [[A_ADDR:%.*]] = alloca %struct.St*, align 8
|
||||
// CHECK17-NEXT: [[Y_ADDR:%.*]] = alloca i64, align 8
|
||||
// CHECK17-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK17-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK17-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK17-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK17-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK17-NEXT: [[TMP2:%.*]] = load %struct.St*, %struct.St** [[TMP1]], align 8
|
||||
// CHECK17-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP0]], i32 0, i32 1
|
||||
// CHECK17-NEXT: [[TMP4:%.*]] = load i32, i32* [[TMP3]], align 8
|
||||
// CHECK17-NEXT: store i32 [[TMP4]], i32* [[Y]], align 4
|
||||
// CHECK17-NEXT: [[TMP5:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK17-NEXT: [[TMP6:%.*]] = load i32, i32* [[TMP5]], align 4
|
||||
// CHECK17-NEXT: [[TMP7:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP6]])
|
||||
// CHECK17-NEXT: [[TMP8:%.*]] = icmp ne i32 [[TMP7]], 0
|
||||
// CHECK17-NEXT: br i1 [[TMP8]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
|
||||
// CHECK17-NEXT: store %struct.St* [[A]], %struct.St** [[A_ADDR]], align 8
|
||||
// CHECK17-NEXT: store i64 [[Y]], i64* [[Y_ADDR]], align 8
|
||||
// CHECK17-NEXT: [[TMP0:%.*]] = load %struct.St*, %struct.St** [[A_ADDR]], align 8
|
||||
// CHECK17-NEXT: [[CONV:%.*]] = bitcast i64* [[Y_ADDR]] to i32*
|
||||
// CHECK17-NEXT: [[TMP1:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK17-NEXT: [[TMP2:%.*]] = load i32, i32* [[TMP1]], align 4
|
||||
// CHECK17-NEXT: [[TMP3:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]])
|
||||
// CHECK17-NEXT: [[TMP4:%.*]] = icmp ne i32 [[TMP3]], 0
|
||||
// CHECK17-NEXT: br i1 [[TMP4]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
|
||||
// CHECK17: omp_if.then:
|
||||
// CHECK17-NEXT: [[A:%.*]] = getelementptr inbounds [[STRUCT_ST:%.*]], %struct.St* [[TMP2]], i32 0, i32 0
|
||||
// CHECK17-NEXT: [[TMP9:%.*]] = load i32, i32* [[A]], align 4
|
||||
// CHECK17-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP9]], 1
|
||||
// CHECK17-NEXT: store i32 [[ADD]], i32* [[A]], align 4
|
||||
// CHECK17-NEXT: [[B:%.*]] = getelementptr inbounds [[STRUCT_ST]], %struct.St* [[TMP2]], i32 0, i32 1
|
||||
// CHECK17-NEXT: [[TMP10:%.*]] = load i32, i32* [[B]], align 4
|
||||
// CHECK17-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP10]], 1
|
||||
// CHECK17-NEXT: store i32 [[ADD1]], i32* [[B]], align 4
|
||||
// CHECK17-NEXT: [[TMP11:%.*]] = load i32, i32* [[Y]], align 4
|
||||
// CHECK17-NEXT: [[INC:%.*]] = add nsw i32 [[TMP11]], 1
|
||||
// CHECK17-NEXT: store i32 [[INC]], i32* [[Y]], align 4
|
||||
// CHECK17-NEXT: [[TMP12:%.*]] = load i32, i32* @_ZN2St1yE, align 4
|
||||
// CHECK17-NEXT: [[INC2:%.*]] = add nsw i32 [[TMP12]], 1
|
||||
// CHECK17-NEXT: store i32 [[INC2]], i32* @_ZN2St1yE, align 4
|
||||
// CHECK17-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP6]])
|
||||
// CHECK17-NEXT: [[A1:%.*]] = getelementptr inbounds [[STRUCT_ST:%.*]], %struct.St* [[TMP0]], i32 0, i32 0
|
||||
// CHECK17-NEXT: [[TMP5:%.*]] = load i32, i32* [[A1]], align 4
|
||||
// CHECK17-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP5]], 1
|
||||
// CHECK17-NEXT: store i32 [[ADD]], i32* [[A1]], align 4
|
||||
// CHECK17-NEXT: [[B:%.*]] = getelementptr inbounds [[STRUCT_ST]], %struct.St* [[TMP0]], i32 0, i32 1
|
||||
// CHECK17-NEXT: [[TMP6:%.*]] = load i32, i32* [[B]], align 4
|
||||
// CHECK17-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP6]], 1
|
||||
// CHECK17-NEXT: store i32 [[ADD2]], i32* [[B]], align 4
|
||||
// CHECK17-NEXT: [[TMP7:%.*]] = load i32, i32* [[CONV]], align 8
|
||||
// CHECK17-NEXT: [[INC:%.*]] = add nsw i32 [[TMP7]], 1
|
||||
// CHECK17-NEXT: store i32 [[INC]], i32* [[CONV]], align 8
|
||||
// CHECK17-NEXT: [[TMP8:%.*]] = load i32, i32* @_ZN2St1yE, align 4
|
||||
// CHECK17-NEXT: [[INC3:%.*]] = add nsw i32 [[TMP8]], 1
|
||||
// CHECK17-NEXT: store i32 [[INC3]], i32* @_ZN2St1yE, align 4
|
||||
// CHECK17-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]])
|
||||
// CHECK17-NEXT: br label [[OMP_IF_END]]
|
||||
// CHECK17: omp_if.end:
|
||||
// CHECK17-NEXT: ret void
|
||||
|
@ -742,14 +706,13 @@ void parallel_master_allocate() {
|
|||
// CHECK18-SAME: () #[[ATTR0:[0-9]+]] {
|
||||
// CHECK18-NEXT: entry:
|
||||
// CHECK18-NEXT: [[A:%.*]] = alloca [[STRUCT_ST:%.*]], align 4
|
||||
// CHECK18-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 8
|
||||
// CHECK18-NEXT: [[Y_CASTED:%.*]] = alloca i64, align 8
|
||||
// CHECK18-NEXT: call void @_ZN2StC1Ev(%struct.St* nonnull align 4 dereferenceable(8) [[A]])
|
||||
// CHECK18-NEXT: [[TMP0:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK18-NEXT: store %struct.St* [[A]], %struct.St** [[TMP0]], align 8
|
||||
// CHECK18-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 1
|
||||
// CHECK18-NEXT: [[TMP2:%.*]] = load i32, i32* @_ZZ36parallel_master_default_firstprivatevE1y, align 4
|
||||
// CHECK18-NEXT: store i32 [[TMP2]], i32* [[TMP1]], align 8
|
||||
// CHECK18-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon*)* @.omp_outlined. to void (i32*, i32*, ...)*), %struct.anon* [[OMP_OUTLINED_ARG_AGG_]])
|
||||
// CHECK18-NEXT: [[TMP0:%.*]] = load i32, i32* @_ZZ36parallel_master_default_firstprivatevE1y, align 4
|
||||
// CHECK18-NEXT: [[CONV:%.*]] = bitcast i64* [[Y_CASTED]] to i32*
|
||||
// CHECK18-NEXT: store i32 [[TMP0]], i32* [[CONV]], align 4
|
||||
// CHECK18-NEXT: [[TMP1:%.*]] = load i64, i64* [[Y_CASTED]], align 8
|
||||
// CHECK18-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 2, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.St*, i64)* @.omp_outlined. to void (i32*, i32*, ...)*), %struct.St* [[A]], i64 [[TMP1]])
|
||||
// CHECK18-NEXT: call void @_ZN2StD1Ev(%struct.St* nonnull align 4 dereferenceable(8) [[A]]) #[[ATTR3:[0-9]+]]
|
||||
// CHECK18-NEXT: ret void
|
||||
//
|
||||
|
@ -765,42 +728,39 @@ void parallel_master_allocate() {
|
|||
//
|
||||
//
|
||||
// CHECK18-LABEL: define {{[^@]+}}@.omp_outlined.
|
||||
// CHECK18-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR2:[0-9]+]] {
|
||||
// CHECK18-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.St* nonnull align 4 dereferenceable(8) [[A:%.*]], i64 [[Y:%.*]]) #[[ATTR2:[0-9]+]] {
|
||||
// CHECK18-NEXT: entry:
|
||||
// CHECK18-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK18-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK18-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK18-NEXT: [[Y:%.*]] = alloca i32, align 4
|
||||
// CHECK18-NEXT: [[A_ADDR:%.*]] = alloca %struct.St*, align 8
|
||||
// CHECK18-NEXT: [[Y_ADDR:%.*]] = alloca i64, align 8
|
||||
// CHECK18-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK18-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK18-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK18-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK18-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK18-NEXT: [[TMP2:%.*]] = load %struct.St*, %struct.St** [[TMP1]], align 8
|
||||
// CHECK18-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP0]], i32 0, i32 1
|
||||
// CHECK18-NEXT: [[TMP4:%.*]] = load i32, i32* [[TMP3]], align 8
|
||||
// CHECK18-NEXT: store i32 [[TMP4]], i32* [[Y]], align 4
|
||||
// CHECK18-NEXT: [[TMP5:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK18-NEXT: [[TMP6:%.*]] = load i32, i32* [[TMP5]], align 4
|
||||
// CHECK18-NEXT: [[TMP7:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP6]])
|
||||
// CHECK18-NEXT: [[TMP8:%.*]] = icmp ne i32 [[TMP7]], 0
|
||||
// CHECK18-NEXT: br i1 [[TMP8]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
|
||||
// CHECK18-NEXT: store %struct.St* [[A]], %struct.St** [[A_ADDR]], align 8
|
||||
// CHECK18-NEXT: store i64 [[Y]], i64* [[Y_ADDR]], align 8
|
||||
// CHECK18-NEXT: [[TMP0:%.*]] = load %struct.St*, %struct.St** [[A_ADDR]], align 8
|
||||
// CHECK18-NEXT: [[CONV:%.*]] = bitcast i64* [[Y_ADDR]] to i32*
|
||||
// CHECK18-NEXT: [[TMP1:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK18-NEXT: [[TMP2:%.*]] = load i32, i32* [[TMP1]], align 4
|
||||
// CHECK18-NEXT: [[TMP3:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]])
|
||||
// CHECK18-NEXT: [[TMP4:%.*]] = icmp ne i32 [[TMP3]], 0
|
||||
// CHECK18-NEXT: br i1 [[TMP4]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
|
||||
// CHECK18: omp_if.then:
|
||||
// CHECK18-NEXT: [[A:%.*]] = getelementptr inbounds [[STRUCT_ST:%.*]], %struct.St* [[TMP2]], i32 0, i32 0
|
||||
// CHECK18-NEXT: [[TMP9:%.*]] = load i32, i32* [[A]], align 4
|
||||
// CHECK18-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP9]], 1
|
||||
// CHECK18-NEXT: store i32 [[ADD]], i32* [[A]], align 4
|
||||
// CHECK18-NEXT: [[B:%.*]] = getelementptr inbounds [[STRUCT_ST]], %struct.St* [[TMP2]], i32 0, i32 1
|
||||
// CHECK18-NEXT: [[TMP10:%.*]] = load i32, i32* [[B]], align 4
|
||||
// CHECK18-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP10]], 1
|
||||
// CHECK18-NEXT: store i32 [[ADD1]], i32* [[B]], align 4
|
||||
// CHECK18-NEXT: [[TMP11:%.*]] = load i32, i32* [[Y]], align 4
|
||||
// CHECK18-NEXT: [[INC:%.*]] = add nsw i32 [[TMP11]], 1
|
||||
// CHECK18-NEXT: store i32 [[INC]], i32* [[Y]], align 4
|
||||
// CHECK18-NEXT: [[TMP12:%.*]] = load i32, i32* @_ZN2St1yE, align 4
|
||||
// CHECK18-NEXT: [[INC2:%.*]] = add nsw i32 [[TMP12]], 1
|
||||
// CHECK18-NEXT: store i32 [[INC2]], i32* @_ZN2St1yE, align 4
|
||||
// CHECK18-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP6]])
|
||||
// CHECK18-NEXT: [[A1:%.*]] = getelementptr inbounds [[STRUCT_ST:%.*]], %struct.St* [[TMP0]], i32 0, i32 0
|
||||
// CHECK18-NEXT: [[TMP5:%.*]] = load i32, i32* [[A1]], align 4
|
||||
// CHECK18-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP5]], 1
|
||||
// CHECK18-NEXT: store i32 [[ADD]], i32* [[A1]], align 4
|
||||
// CHECK18-NEXT: [[B:%.*]] = getelementptr inbounds [[STRUCT_ST]], %struct.St* [[TMP0]], i32 0, i32 1
|
||||
// CHECK18-NEXT: [[TMP6:%.*]] = load i32, i32* [[B]], align 4
|
||||
// CHECK18-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP6]], 1
|
||||
// CHECK18-NEXT: store i32 [[ADD2]], i32* [[B]], align 4
|
||||
// CHECK18-NEXT: [[TMP7:%.*]] = load i32, i32* [[CONV]], align 8
|
||||
// CHECK18-NEXT: [[INC:%.*]] = add nsw i32 [[TMP7]], 1
|
||||
// CHECK18-NEXT: store i32 [[INC]], i32* [[CONV]], align 8
|
||||
// CHECK18-NEXT: [[TMP8:%.*]] = load i32, i32* @_ZN2St1yE, align 4
|
||||
// CHECK18-NEXT: [[INC3:%.*]] = add nsw i32 [[TMP8]], 1
|
||||
// CHECK18-NEXT: store i32 [[INC3]], i32* @_ZN2St1yE, align 4
|
||||
// CHECK18-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]])
|
||||
// CHECK18-NEXT: br label [[OMP_IF_END]]
|
||||
// CHECK18: omp_if.end:
|
||||
// CHECK18-NEXT: ret void
|
||||
|
@ -842,38 +802,35 @@ void parallel_master_allocate() {
|
|||
// CHECK21-SAME: () #[[ATTR0:[0-9]+]] {
|
||||
// CHECK21-NEXT: entry:
|
||||
// CHECK21-NEXT: [[A:%.*]] = alloca i32, align 4
|
||||
// CHECK21-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 4
|
||||
// CHECK21-NEXT: [[TMP0:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK21-NEXT: [[TMP1:%.*]] = load i32, i32* [[A]], align 4
|
||||
// CHECK21-NEXT: store i32 [[TMP1]], i32* [[TMP0]], align 4
|
||||
// CHECK21-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon*)* @.omp_outlined. to void (i32*, i32*, ...)*), %struct.anon* [[OMP_OUTLINED_ARG_AGG_]])
|
||||
// CHECK21-NEXT: [[A_CASTED:%.*]] = alloca i64, align 8
|
||||
// CHECK21-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
|
||||
// CHECK21-NEXT: [[CONV:%.*]] = bitcast i64* [[A_CASTED]] to i32*
|
||||
// CHECK21-NEXT: store i32 [[TMP0]], i32* [[CONV]], align 4
|
||||
// CHECK21-NEXT: [[TMP1:%.*]] = load i64, i64* [[A_CASTED]], align 8
|
||||
// CHECK21-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i64)* @.omp_outlined. to void (i32*, i32*, ...)*), i64 [[TMP1]])
|
||||
// CHECK21-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK21-LABEL: define {{[^@]+}}@.omp_outlined.
|
||||
// CHECK21-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK21-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i64 [[A:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK21-NEXT: entry:
|
||||
// CHECK21-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK21-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK21-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK21-NEXT: [[A:%.*]] = alloca i32, align 4
|
||||
// CHECK21-NEXT: [[A_ADDR:%.*]] = alloca i64, align 8
|
||||
// CHECK21-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK21-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK21-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK21-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK21-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK21-NEXT: [[TMP2:%.*]] = load i32, i32* [[TMP1]], align 4
|
||||
// CHECK21-NEXT: store i32 [[TMP2]], i32* [[A]], align 4
|
||||
// CHECK21-NEXT: [[TMP3:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK21-NEXT: [[TMP4:%.*]] = load i32, i32* [[TMP3]], align 4
|
||||
// CHECK21-NEXT: [[TMP5:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP4]])
|
||||
// CHECK21-NEXT: [[TMP6:%.*]] = icmp ne i32 [[TMP5]], 0
|
||||
// CHECK21-NEXT: br i1 [[TMP6]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
|
||||
// CHECK21-NEXT: store i64 [[A]], i64* [[A_ADDR]], align 8
|
||||
// CHECK21-NEXT: [[CONV:%.*]] = bitcast i64* [[A_ADDR]] to i32*
|
||||
// CHECK21-NEXT: [[TMP0:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK21-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK21-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]])
|
||||
// CHECK21-NEXT: [[TMP3:%.*]] = icmp ne i32 [[TMP2]], 0
|
||||
// CHECK21-NEXT: br i1 [[TMP3]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
|
||||
// CHECK21: omp_if.then:
|
||||
// CHECK21-NEXT: [[TMP7:%.*]] = load i32, i32* [[A]], align 4
|
||||
// CHECK21-NEXT: [[INC:%.*]] = add nsw i32 [[TMP7]], 1
|
||||
// CHECK21-NEXT: store i32 [[INC]], i32* [[A]], align 4
|
||||
// CHECK21-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP4]])
|
||||
// CHECK21-NEXT: [[TMP4:%.*]] = load i32, i32* [[CONV]], align 8
|
||||
// CHECK21-NEXT: [[INC:%.*]] = add nsw i32 [[TMP4]], 1
|
||||
// CHECK21-NEXT: store i32 [[INC]], i32* [[CONV]], align 8
|
||||
// CHECK21-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]])
|
||||
// CHECK21-NEXT: br label [[OMP_IF_END]]
|
||||
// CHECK21: omp_if.end:
|
||||
// CHECK21-NEXT: ret void
|
||||
|
@ -883,38 +840,35 @@ void parallel_master_allocate() {
|
|||
// CHECK22-SAME: () #[[ATTR0:[0-9]+]] {
|
||||
// CHECK22-NEXT: entry:
|
||||
// CHECK22-NEXT: [[A:%.*]] = alloca i32, align 4
|
||||
// CHECK22-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 4
|
||||
// CHECK22-NEXT: [[TMP0:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK22-NEXT: [[TMP1:%.*]] = load i32, i32* [[A]], align 4
|
||||
// CHECK22-NEXT: store i32 [[TMP1]], i32* [[TMP0]], align 4
|
||||
// CHECK22-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon*)* @.omp_outlined. to void (i32*, i32*, ...)*), %struct.anon* [[OMP_OUTLINED_ARG_AGG_]])
|
||||
// CHECK22-NEXT: [[A_CASTED:%.*]] = alloca i64, align 8
|
||||
// CHECK22-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
|
||||
// CHECK22-NEXT: [[CONV:%.*]] = bitcast i64* [[A_CASTED]] to i32*
|
||||
// CHECK22-NEXT: store i32 [[TMP0]], i32* [[CONV]], align 4
|
||||
// CHECK22-NEXT: [[TMP1:%.*]] = load i64, i64* [[A_CASTED]], align 8
|
||||
// CHECK22-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i64)* @.omp_outlined. to void (i32*, i32*, ...)*), i64 [[TMP1]])
|
||||
// CHECK22-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK22-LABEL: define {{[^@]+}}@.omp_outlined.
|
||||
// CHECK22-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK22-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i64 [[A:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK22-NEXT: entry:
|
||||
// CHECK22-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK22-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK22-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK22-NEXT: [[A:%.*]] = alloca i32, align 4
|
||||
// CHECK22-NEXT: [[A_ADDR:%.*]] = alloca i64, align 8
|
||||
// CHECK22-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK22-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK22-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK22-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK22-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK22-NEXT: [[TMP2:%.*]] = load i32, i32* [[TMP1]], align 4
|
||||
// CHECK22-NEXT: store i32 [[TMP2]], i32* [[A]], align 4
|
||||
// CHECK22-NEXT: [[TMP3:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK22-NEXT: [[TMP4:%.*]] = load i32, i32* [[TMP3]], align 4
|
||||
// CHECK22-NEXT: [[TMP5:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP4]])
|
||||
// CHECK22-NEXT: [[TMP6:%.*]] = icmp ne i32 [[TMP5]], 0
|
||||
// CHECK22-NEXT: br i1 [[TMP6]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
|
||||
// CHECK22-NEXT: store i64 [[A]], i64* [[A_ADDR]], align 8
|
||||
// CHECK22-NEXT: [[CONV:%.*]] = bitcast i64* [[A_ADDR]] to i32*
|
||||
// CHECK22-NEXT: [[TMP0:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK22-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK22-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]])
|
||||
// CHECK22-NEXT: [[TMP3:%.*]] = icmp ne i32 [[TMP2]], 0
|
||||
// CHECK22-NEXT: br i1 [[TMP3]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
|
||||
// CHECK22: omp_if.then:
|
||||
// CHECK22-NEXT: [[TMP7:%.*]] = load i32, i32* [[A]], align 4
|
||||
// CHECK22-NEXT: [[INC:%.*]] = add nsw i32 [[TMP7]], 1
|
||||
// CHECK22-NEXT: store i32 [[INC]], i32* [[A]], align 4
|
||||
// CHECK22-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP4]])
|
||||
// CHECK22-NEXT: [[TMP4:%.*]] = load i32, i32* [[CONV]], align 8
|
||||
// CHECK22-NEXT: [[INC:%.*]] = add nsw i32 [[TMP4]], 1
|
||||
// CHECK22-NEXT: store i32 [[INC]], i32* [[CONV]], align 8
|
||||
// CHECK22-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]])
|
||||
// CHECK22-NEXT: br label [[OMP_IF_END]]
|
||||
// CHECK22: omp_if.end:
|
||||
// CHECK22-NEXT: ret void
|
||||
|
@ -923,44 +877,40 @@ void parallel_master_allocate() {
|
|||
// CHECK25-LABEL: define {{[^@]+}}@_Z22parallel_master_copyinv
|
||||
// CHECK25-SAME: () #[[ATTR0:[0-9]+]] {
|
||||
// CHECK25-NEXT: entry:
|
||||
// CHECK25-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 1
|
||||
// CHECK25-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon*)* @.omp_outlined. to void (i32*, i32*, ...)*), %struct.anon* [[OMP_OUTLINED_ARG_AGG_]])
|
||||
// CHECK25-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 0, void (i32*, i32*, ...)* bitcast (void (i32*, i32*)* @.omp_outlined. to void (i32*, i32*, ...)*))
|
||||
// CHECK25-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK25-LABEL: define {{[^@]+}}@.omp_outlined.
|
||||
// CHECK25-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK25-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK25-NEXT: entry:
|
||||
// CHECK25-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK25-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK25-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK25-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK25-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK25-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK25-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK25-NEXT: [[TMP1:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK25-NEXT: [[TMP2:%.*]] = load i32, i32* [[TMP1]], align 4
|
||||
// CHECK25-NEXT: [[TMP3:%.*]] = call i8* @__kmpc_threadprivate_cached(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]], i8* bitcast (i32* @a to i8*), i64 4, i8*** @a.cache.)
|
||||
// CHECK25-NEXT: [[TMP4:%.*]] = bitcast i8* [[TMP3]] to i32*
|
||||
// CHECK25-NEXT: [[TMP5:%.*]] = ptrtoint i32* [[TMP4]] to i64
|
||||
// CHECK25-NEXT: [[TMP6:%.*]] = icmp ne i64 ptrtoint (i32* @a to i64), [[TMP5]]
|
||||
// CHECK25-NEXT: br i1 [[TMP6]], label [[COPYIN_NOT_MASTER:%.*]], label [[COPYIN_NOT_MASTER_END:%.*]]
|
||||
// CHECK25-NEXT: [[TMP0:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK25-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK25-NEXT: [[TMP2:%.*]] = call i8* @__kmpc_threadprivate_cached(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]], i8* bitcast (i32* @a to i8*), i64 4, i8*** @a.cache.)
|
||||
// CHECK25-NEXT: [[TMP3:%.*]] = bitcast i8* [[TMP2]] to i32*
|
||||
// CHECK25-NEXT: [[TMP4:%.*]] = ptrtoint i32* [[TMP3]] to i64
|
||||
// CHECK25-NEXT: [[TMP5:%.*]] = icmp ne i64 ptrtoint (i32* @a to i64), [[TMP4]]
|
||||
// CHECK25-NEXT: br i1 [[TMP5]], label [[COPYIN_NOT_MASTER:%.*]], label [[COPYIN_NOT_MASTER_END:%.*]]
|
||||
// CHECK25: copyin.not.master:
|
||||
// CHECK25-NEXT: [[TMP7:%.*]] = load i32, i32* @a, align 4
|
||||
// CHECK25-NEXT: store i32 [[TMP7]], i32* [[TMP4]], align 4
|
||||
// CHECK25-NEXT: [[TMP6:%.*]] = load i32, i32* @a, align 4
|
||||
// CHECK25-NEXT: store i32 [[TMP6]], i32* [[TMP3]], align 4
|
||||
// CHECK25-NEXT: br label [[COPYIN_NOT_MASTER_END]]
|
||||
// CHECK25: copyin.not.master.end:
|
||||
// CHECK25-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 [[TMP2]])
|
||||
// CHECK25-NEXT: [[TMP8:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]])
|
||||
// CHECK25-NEXT: [[TMP9:%.*]] = icmp ne i32 [[TMP8]], 0
|
||||
// CHECK25-NEXT: br i1 [[TMP9]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
|
||||
// CHECK25-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 [[TMP1]])
|
||||
// CHECK25-NEXT: [[TMP7:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]])
|
||||
// CHECK25-NEXT: [[TMP8:%.*]] = icmp ne i32 [[TMP7]], 0
|
||||
// CHECK25-NEXT: br i1 [[TMP8]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
|
||||
// CHECK25: omp_if.then:
|
||||
// CHECK25-NEXT: [[TMP10:%.*]] = call i8* @__kmpc_threadprivate_cached(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]], i8* bitcast (i32* @a to i8*), i64 4, i8*** @a.cache.)
|
||||
// CHECK25-NEXT: [[TMP11:%.*]] = bitcast i8* [[TMP10]] to i32*
|
||||
// CHECK25-NEXT: [[TMP12:%.*]] = load i32, i32* [[TMP11]], align 4
|
||||
// CHECK25-NEXT: [[INC:%.*]] = add nsw i32 [[TMP12]], 1
|
||||
// CHECK25-NEXT: store i32 [[INC]], i32* [[TMP11]], align 4
|
||||
// CHECK25-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]])
|
||||
// CHECK25-NEXT: [[TMP9:%.*]] = call i8* @__kmpc_threadprivate_cached(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]], i8* bitcast (i32* @a to i8*), i64 4, i8*** @a.cache.)
|
||||
// CHECK25-NEXT: [[TMP10:%.*]] = bitcast i8* [[TMP9]] to i32*
|
||||
// CHECK25-NEXT: [[TMP11:%.*]] = load i32, i32* [[TMP10]], align 4
|
||||
// CHECK25-NEXT: [[INC:%.*]] = add nsw i32 [[TMP11]], 1
|
||||
// CHECK25-NEXT: store i32 [[INC]], i32* [[TMP10]], align 4
|
||||
// CHECK25-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]])
|
||||
// CHECK25-NEXT: br label [[OMP_IF_END]]
|
||||
// CHECK25: omp_if.end:
|
||||
// CHECK25-NEXT: ret void
|
||||
|
@ -969,44 +919,40 @@ void parallel_master_allocate() {
|
|||
// CHECK26-LABEL: define {{[^@]+}}@_Z22parallel_master_copyinv
|
||||
// CHECK26-SAME: () #[[ATTR0:[0-9]+]] {
|
||||
// CHECK26-NEXT: entry:
|
||||
// CHECK26-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 1
|
||||
// CHECK26-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon*)* @.omp_outlined. to void (i32*, i32*, ...)*), %struct.anon* [[OMP_OUTLINED_ARG_AGG_]])
|
||||
// CHECK26-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 0, void (i32*, i32*, ...)* bitcast (void (i32*, i32*)* @.omp_outlined. to void (i32*, i32*, ...)*))
|
||||
// CHECK26-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK26-LABEL: define {{[^@]+}}@.omp_outlined.
|
||||
// CHECK26-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK26-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK26-NEXT: entry:
|
||||
// CHECK26-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK26-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK26-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK26-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK26-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK26-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK26-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK26-NEXT: [[TMP1:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK26-NEXT: [[TMP2:%.*]] = load i32, i32* [[TMP1]], align 4
|
||||
// CHECK26-NEXT: [[TMP3:%.*]] = call i8* @__kmpc_threadprivate_cached(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]], i8* bitcast (i32* @a to i8*), i64 4, i8*** @a.cache.)
|
||||
// CHECK26-NEXT: [[TMP4:%.*]] = bitcast i8* [[TMP3]] to i32*
|
||||
// CHECK26-NEXT: [[TMP5:%.*]] = ptrtoint i32* [[TMP4]] to i64
|
||||
// CHECK26-NEXT: [[TMP6:%.*]] = icmp ne i64 ptrtoint (i32* @a to i64), [[TMP5]]
|
||||
// CHECK26-NEXT: br i1 [[TMP6]], label [[COPYIN_NOT_MASTER:%.*]], label [[COPYIN_NOT_MASTER_END:%.*]]
|
||||
// CHECK26-NEXT: [[TMP0:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK26-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK26-NEXT: [[TMP2:%.*]] = call i8* @__kmpc_threadprivate_cached(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]], i8* bitcast (i32* @a to i8*), i64 4, i8*** @a.cache.)
|
||||
// CHECK26-NEXT: [[TMP3:%.*]] = bitcast i8* [[TMP2]] to i32*
|
||||
// CHECK26-NEXT: [[TMP4:%.*]] = ptrtoint i32* [[TMP3]] to i64
|
||||
// CHECK26-NEXT: [[TMP5:%.*]] = icmp ne i64 ptrtoint (i32* @a to i64), [[TMP4]]
|
||||
// CHECK26-NEXT: br i1 [[TMP5]], label [[COPYIN_NOT_MASTER:%.*]], label [[COPYIN_NOT_MASTER_END:%.*]]
|
||||
// CHECK26: copyin.not.master:
|
||||
// CHECK26-NEXT: [[TMP7:%.*]] = load i32, i32* @a, align 4
|
||||
// CHECK26-NEXT: store i32 [[TMP7]], i32* [[TMP4]], align 4
|
||||
// CHECK26-NEXT: [[TMP6:%.*]] = load i32, i32* @a, align 4
|
||||
// CHECK26-NEXT: store i32 [[TMP6]], i32* [[TMP3]], align 4
|
||||
// CHECK26-NEXT: br label [[COPYIN_NOT_MASTER_END]]
|
||||
// CHECK26: copyin.not.master.end:
|
||||
// CHECK26-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 [[TMP2]])
|
||||
// CHECK26-NEXT: [[TMP8:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]])
|
||||
// CHECK26-NEXT: [[TMP9:%.*]] = icmp ne i32 [[TMP8]], 0
|
||||
// CHECK26-NEXT: br i1 [[TMP9]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
|
||||
// CHECK26-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 [[TMP1]])
|
||||
// CHECK26-NEXT: [[TMP7:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]])
|
||||
// CHECK26-NEXT: [[TMP8:%.*]] = icmp ne i32 [[TMP7]], 0
|
||||
// CHECK26-NEXT: br i1 [[TMP8]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
|
||||
// CHECK26: omp_if.then:
|
||||
// CHECK26-NEXT: [[TMP10:%.*]] = call i8* @__kmpc_threadprivate_cached(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]], i8* bitcast (i32* @a to i8*), i64 4, i8*** @a.cache.)
|
||||
// CHECK26-NEXT: [[TMP11:%.*]] = bitcast i8* [[TMP10]] to i32*
|
||||
// CHECK26-NEXT: [[TMP12:%.*]] = load i32, i32* [[TMP11]], align 4
|
||||
// CHECK26-NEXT: [[INC:%.*]] = add nsw i32 [[TMP12]], 1
|
||||
// CHECK26-NEXT: store i32 [[INC]], i32* [[TMP11]], align 4
|
||||
// CHECK26-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]])
|
||||
// CHECK26-NEXT: [[TMP9:%.*]] = call i8* @__kmpc_threadprivate_cached(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]], i8* bitcast (i32* @a to i8*), i64 4, i8*** @a.cache.)
|
||||
// CHECK26-NEXT: [[TMP10:%.*]] = bitcast i8* [[TMP9]] to i32*
|
||||
// CHECK26-NEXT: [[TMP11:%.*]] = load i32, i32* [[TMP10]], align 4
|
||||
// CHECK26-NEXT: [[INC:%.*]] = add nsw i32 [[TMP11]], 1
|
||||
// CHECK26-NEXT: store i32 [[INC]], i32* [[TMP10]], align 4
|
||||
// CHECK26-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]])
|
||||
// CHECK26-NEXT: br label [[OMP_IF_END]]
|
||||
// CHECK26: omp_if.end:
|
||||
// CHECK26-NEXT: ret void
|
||||
|
@ -1015,46 +961,41 @@ void parallel_master_allocate() {
|
|||
// CHECK29-LABEL: define {{[^@]+}}@_Z22parallel_master_copyinv
|
||||
// CHECK29-SAME: () #[[ATTR0:[0-9]+]] {
|
||||
// CHECK29-NEXT: entry:
|
||||
// CHECK29-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 8
|
||||
// CHECK29-NEXT: [[TMP0:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK29-NEXT: store i32* @a, i32** [[TMP0]], align 8
|
||||
// CHECK29-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon*)* @.omp_outlined. to void (i32*, i32*, ...)*), %struct.anon* [[OMP_OUTLINED_ARG_AGG_]])
|
||||
// CHECK29-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @.omp_outlined. to void (i32*, i32*, ...)*), i32* @a)
|
||||
// CHECK29-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK29-LABEL: define {{[^@]+}}@.omp_outlined.
|
||||
// CHECK29-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK29-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK29-NEXT: entry:
|
||||
// CHECK29-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK29-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK29-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK29-NEXT: [[A_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK29-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK29-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK29-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK29-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK29-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK29-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 8
|
||||
// CHECK29-NEXT: [[TMP3:%.*]] = ptrtoint i32* [[TMP2]] to i64
|
||||
// CHECK29-NEXT: [[TMP4:%.*]] = icmp ne i64 [[TMP3]], ptrtoint (i32* @a to i64)
|
||||
// CHECK29-NEXT: br i1 [[TMP4]], label [[COPYIN_NOT_MASTER:%.*]], label [[COPYIN_NOT_MASTER_END:%.*]]
|
||||
// CHECK29-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 8
|
||||
// CHECK29-NEXT: [[TMP0:%.*]] = load i32*, i32** [[A_ADDR]], align 8
|
||||
// CHECK29-NEXT: [[TMP1:%.*]] = ptrtoint i32* [[TMP0]] to i64
|
||||
// CHECK29-NEXT: [[TMP2:%.*]] = icmp ne i64 [[TMP1]], ptrtoint (i32* @a to i64)
|
||||
// CHECK29-NEXT: br i1 [[TMP2]], label [[COPYIN_NOT_MASTER:%.*]], label [[COPYIN_NOT_MASTER_END:%.*]]
|
||||
// CHECK29: copyin.not.master:
|
||||
// CHECK29-NEXT: [[TMP5:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK29-NEXT: store i32 [[TMP5]], i32* @a, align 4
|
||||
// CHECK29-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK29-NEXT: store i32 [[TMP3]], i32* @a, align 4
|
||||
// CHECK29-NEXT: br label [[COPYIN_NOT_MASTER_END]]
|
||||
// CHECK29: copyin.not.master.end:
|
||||
// CHECK29-NEXT: [[TMP4:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK29-NEXT: [[TMP5:%.*]] = load i32, i32* [[TMP4]], align 4
|
||||
// CHECK29-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 [[TMP5]])
|
||||
// CHECK29-NEXT: [[TMP6:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK29-NEXT: [[TMP7:%.*]] = load i32, i32* [[TMP6]], align 4
|
||||
// CHECK29-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 [[TMP7]])
|
||||
// CHECK29-NEXT: [[TMP8:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK29-NEXT: [[TMP9:%.*]] = load i32, i32* [[TMP8]], align 4
|
||||
// CHECK29-NEXT: [[TMP10:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB2]], i32 [[TMP9]])
|
||||
// CHECK29-NEXT: [[TMP11:%.*]] = icmp ne i32 [[TMP10]], 0
|
||||
// CHECK29-NEXT: br i1 [[TMP11]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
|
||||
// CHECK29-NEXT: [[TMP8:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB2]], i32 [[TMP7]])
|
||||
// CHECK29-NEXT: [[TMP9:%.*]] = icmp ne i32 [[TMP8]], 0
|
||||
// CHECK29-NEXT: br i1 [[TMP9]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
|
||||
// CHECK29: omp_if.then:
|
||||
// CHECK29-NEXT: [[TMP12:%.*]] = load i32, i32* @a, align 4
|
||||
// CHECK29-NEXT: [[INC:%.*]] = add nsw i32 [[TMP12]], 1
|
||||
// CHECK29-NEXT: [[TMP10:%.*]] = load i32, i32* @a, align 4
|
||||
// CHECK29-NEXT: [[INC:%.*]] = add nsw i32 [[TMP10]], 1
|
||||
// CHECK29-NEXT: store i32 [[INC]], i32* @a, align 4
|
||||
// CHECK29-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB2]], i32 [[TMP9]])
|
||||
// CHECK29-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB2]], i32 [[TMP7]])
|
||||
// CHECK29-NEXT: br label [[OMP_IF_END]]
|
||||
// CHECK29: omp_if.end:
|
||||
// CHECK29-NEXT: ret void
|
||||
|
@ -1064,3 +1005,4 @@ void parallel_master_allocate() {
|
|||
// CHECK29-SAME: () #[[ATTR4:[0-9]+]] comdat {
|
||||
// CHECK29-NEXT: ret i32* @a
|
||||
//
|
||||
//
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -40,243 +40,237 @@ int main(int argc, char **argv) {
|
|||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[ARGC_ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[ARGV_ADDR:%.*]] = alloca i8**, align 8
|
||||
// CHECK1-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 8
|
||||
// CHECK1-NEXT: store i32 [[ARGC]], i32* [[ARGC_ADDR]], align 4
|
||||
// CHECK1-NEXT: store i8** [[ARGV]], i8*** [[ARGV_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK1-NEXT: store i32* [[ARGC_ADDR]], i32** [[TMP0]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 1
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i8**, i8*** [[ARGV_ADDR]], align 8
|
||||
// CHECK1-NEXT: store i8** [[TMP2]], i8*** [[TMP1]], align 8
|
||||
// CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon*)* @.omp_outlined. to void (i32*, i32*, ...)*), %struct.anon* [[OMP_OUTLINED_ARG_AGG_]])
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load i8**, i8*** [[ARGV_ADDR]], align 8
|
||||
// CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 2, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i8**)* @.omp_outlined. to void (i32*, i32*, ...)*), i32* [[ARGC_ADDR]], i8** [[TMP0]])
|
||||
// CHECK1-NEXT: ret i32 0
|
||||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@.omp_outlined.
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[ARGC:%.*]], i8** [[ARGV:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK1-NEXT: [[ARGC:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[ARGC_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[ARGV_ADDR:%.*]] = alloca i8**, align 8
|
||||
// CHECK1-NEXT: [[ARGC1:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[SAVED_STACK:%.*]] = alloca i8*, align 8
|
||||
// CHECK1-NEXT: [[__VLA_EXPR0:%.*]] = alloca i64, align 8
|
||||
// CHECK1-NEXT: [[TMP:%.*]] = alloca i8**, align 8
|
||||
// CHECK1-NEXT: [[_TMP4:%.*]] = alloca i8*, align 8
|
||||
// CHECK1-NEXT: [[_TMP5:%.*]] = alloca i8*, align 8
|
||||
// CHECK1-NEXT: [[DOTRD_INPUT_:%.*]] = alloca [2 x %struct.kmp_taskred_input_t], align 8
|
||||
// CHECK1-NEXT: [[DOTTASK_RED_:%.*]] = alloca i8*, align 8
|
||||
// CHECK1-NEXT: [[AGG_CAPTURED:%.*]] = alloca [[STRUCT_ANON_0:%.*]], align 8
|
||||
// CHECK1-NEXT: [[AGG_CAPTURED:%.*]] = alloca [[STRUCT_ANON:%.*]], align 8
|
||||
// CHECK1-NEXT: [[DOTOMP_REDUCTION_RED_LIST:%.*]] = alloca [3 x i8*], align 8
|
||||
// CHECK1-NEXT: [[ATOMIC_TEMP:%.*]] = alloca i8, align 1
|
||||
// CHECK1-NEXT: [[_TMP23:%.*]] = alloca i8, align 1
|
||||
// CHECK1-NEXT: [[_TMP24:%.*]] = alloca i8, align 1
|
||||
// CHECK1-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 8
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP0]], i32 0, i32 1
|
||||
// CHECK1-NEXT: store i32 0, i32* [[ARGC]], align 4
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = load i8**, i8*** [[TMP3]], align 8
|
||||
// CHECK1-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds i8*, i8** [[TMP4]], i64 0
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = load i8*, i8** [[ARRAYIDX]], align 8
|
||||
// CHECK1-NEXT: [[ARRAYIDX1:%.*]] = getelementptr inbounds i8, i8* [[TMP5]], i64 0
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = sext i32 [[TMP6]] to i64
|
||||
// CHECK1-NEXT: [[LB_ADD_LEN:%.*]] = add nsw i64 -1, [[TMP7]]
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = load i8**, i8*** [[TMP3]], align 8
|
||||
// CHECK1-NEXT: [[ARRAYIDX2:%.*]] = getelementptr inbounds i8*, i8** [[TMP8]], i64 9
|
||||
// CHECK1-NEXT: [[TMP9:%.*]] = load i8*, i8** [[ARRAYIDX2]], align 8
|
||||
// CHECK1-NEXT: [[ARRAYIDX3:%.*]] = getelementptr inbounds i8, i8* [[TMP9]], i64 [[LB_ADD_LEN]]
|
||||
// CHECK1-NEXT: [[TMP10:%.*]] = ptrtoint i8* [[ARRAYIDX3]] to i64
|
||||
// CHECK1-NEXT: [[TMP11:%.*]] = ptrtoint i8* [[ARRAYIDX1]] to i64
|
||||
// CHECK1-NEXT: [[TMP12:%.*]] = sub i64 [[TMP10]], [[TMP11]]
|
||||
// CHECK1-NEXT: [[TMP13:%.*]] = sdiv exact i64 [[TMP12]], ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64)
|
||||
// CHECK1-NEXT: [[TMP14:%.*]] = add nuw i64 [[TMP13]], 1
|
||||
// CHECK1-NEXT: [[TMP15:%.*]] = mul nuw i64 [[TMP14]], ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64)
|
||||
// CHECK1-NEXT: [[TMP16:%.*]] = call i8* @llvm.stacksave()
|
||||
// CHECK1-NEXT: store i8* [[TMP16]], i8** [[SAVED_STACK]], align 8
|
||||
// CHECK1-NEXT: [[VLA:%.*]] = alloca i8, i64 [[TMP14]], align 16
|
||||
// CHECK1-NEXT: store i64 [[TMP14]], i64* [[__VLA_EXPR0]], align 8
|
||||
// CHECK1-NEXT: [[TMP17:%.*]] = getelementptr i8, i8* [[VLA]], i64 [[TMP14]]
|
||||
// CHECK1-NEXT: [[OMP_ARRAYINIT_ISEMPTY:%.*]] = icmp eq i8* [[VLA]], [[TMP17]]
|
||||
// CHECK1-NEXT: store i32* [[ARGC]], i32** [[ARGC_ADDR]], align 8
|
||||
// CHECK1-NEXT: store i8** [[ARGV]], i8*** [[ARGV_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load i32*, i32** [[ARGC_ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32 0, i32* [[ARGC1]], align 4
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = load i8**, i8*** [[ARGV_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds i8*, i8** [[TMP1]], i64 0
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i8*, i8** [[ARRAYIDX]], align 8
|
||||
// CHECK1-NEXT: [[ARRAYIDX2:%.*]] = getelementptr inbounds i8, i8* [[TMP2]], i64 0
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = sext i32 [[TMP3]] to i64
|
||||
// CHECK1-NEXT: [[LB_ADD_LEN:%.*]] = add nsw i64 -1, [[TMP4]]
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = load i8**, i8*** [[ARGV_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[ARRAYIDX3:%.*]] = getelementptr inbounds i8*, i8** [[TMP5]], i64 9
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = load i8*, i8** [[ARRAYIDX3]], align 8
|
||||
// CHECK1-NEXT: [[ARRAYIDX4:%.*]] = getelementptr inbounds i8, i8* [[TMP6]], i64 [[LB_ADD_LEN]]
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = ptrtoint i8* [[ARRAYIDX4]] to i64
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = ptrtoint i8* [[ARRAYIDX2]] to i64
|
||||
// CHECK1-NEXT: [[TMP9:%.*]] = sub i64 [[TMP7]], [[TMP8]]
|
||||
// CHECK1-NEXT: [[TMP10:%.*]] = sdiv exact i64 [[TMP9]], ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64)
|
||||
// CHECK1-NEXT: [[TMP11:%.*]] = add nuw i64 [[TMP10]], 1
|
||||
// CHECK1-NEXT: [[TMP12:%.*]] = mul nuw i64 [[TMP11]], ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64)
|
||||
// CHECK1-NEXT: [[TMP13:%.*]] = call i8* @llvm.stacksave()
|
||||
// CHECK1-NEXT: store i8* [[TMP13]], i8** [[SAVED_STACK]], align 8
|
||||
// CHECK1-NEXT: [[VLA:%.*]] = alloca i8, i64 [[TMP11]], align 16
|
||||
// CHECK1-NEXT: store i64 [[TMP11]], i64* [[__VLA_EXPR0]], align 8
|
||||
// CHECK1-NEXT: [[TMP14:%.*]] = getelementptr i8, i8* [[VLA]], i64 [[TMP11]]
|
||||
// CHECK1-NEXT: [[OMP_ARRAYINIT_ISEMPTY:%.*]] = icmp eq i8* [[VLA]], [[TMP14]]
|
||||
// CHECK1-NEXT: br i1 [[OMP_ARRAYINIT_ISEMPTY]], label [[OMP_ARRAYINIT_DONE:%.*]], label [[OMP_ARRAYINIT_BODY:%.*]]
|
||||
// CHECK1: omp.arrayinit.body:
|
||||
// CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi i8* [ [[VLA]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYINIT_BODY]] ]
|
||||
// CHECK1-NEXT: store i8 0, i8* [[OMP_ARRAYCPY_DESTELEMENTPAST]], align 1
|
||||
// CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr i8, i8* [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1
|
||||
// CHECK1-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq i8* [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP17]]
|
||||
// CHECK1-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq i8* [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP14]]
|
||||
// CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYINIT_DONE]], label [[OMP_ARRAYINIT_BODY]]
|
||||
// CHECK1: omp.arrayinit.done:
|
||||
// CHECK1-NEXT: [[TMP18:%.*]] = load i8**, i8*** [[TMP3]], align 8
|
||||
// CHECK1-NEXT: [[TMP19:%.*]] = load i8*, i8** [[TMP18]], align 8
|
||||
// CHECK1-NEXT: [[TMP20:%.*]] = ptrtoint i8* [[TMP19]] to i64
|
||||
// CHECK1-NEXT: [[TMP21:%.*]] = ptrtoint i8* [[ARRAYIDX1]] to i64
|
||||
// CHECK1-NEXT: [[TMP22:%.*]] = sub i64 [[TMP20]], [[TMP21]]
|
||||
// CHECK1-NEXT: [[TMP23:%.*]] = sdiv exact i64 [[TMP22]], ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64)
|
||||
// CHECK1-NEXT: [[TMP24:%.*]] = getelementptr i8, i8* [[VLA]], i64 [[TMP23]]
|
||||
// CHECK1-NEXT: store i8** [[_TMP4]], i8*** [[TMP]], align 8
|
||||
// CHECK1-NEXT: store i8* [[TMP24]], i8** [[_TMP4]], align 8
|
||||
// CHECK1-NEXT: [[TMP15:%.*]] = load i8**, i8*** [[ARGV_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP16:%.*]] = load i8*, i8** [[TMP15]], align 8
|
||||
// CHECK1-NEXT: [[TMP17:%.*]] = ptrtoint i8* [[TMP16]] to i64
|
||||
// CHECK1-NEXT: [[TMP18:%.*]] = ptrtoint i8* [[ARRAYIDX2]] to i64
|
||||
// CHECK1-NEXT: [[TMP19:%.*]] = sub i64 [[TMP17]], [[TMP18]]
|
||||
// CHECK1-NEXT: [[TMP20:%.*]] = sdiv exact i64 [[TMP19]], ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64)
|
||||
// CHECK1-NEXT: [[TMP21:%.*]] = getelementptr i8, i8* [[VLA]], i64 [[TMP20]]
|
||||
// CHECK1-NEXT: store i8** [[_TMP5]], i8*** [[TMP]], align 8
|
||||
// CHECK1-NEXT: store i8* [[TMP21]], i8** [[_TMP5]], align 8
|
||||
// CHECK1-NEXT: [[DOTRD_INPUT_GEP_:%.*]] = getelementptr inbounds [2 x %struct.kmp_taskred_input_t], [2 x %struct.kmp_taskred_input_t]* [[DOTRD_INPUT_]], i64 0, i64 0
|
||||
// CHECK1-NEXT: [[TMP25:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T:%.*]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP26:%.*]] = bitcast i32* [[ARGC]] to i8*
|
||||
// CHECK1-NEXT: store i8* [[TMP26]], i8** [[TMP25]], align 8
|
||||
// CHECK1-NEXT: [[TMP27:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 1
|
||||
// CHECK1-NEXT: [[TMP28:%.*]] = bitcast i32* [[TMP2]] to i8*
|
||||
// CHECK1-NEXT: store i8* [[TMP28]], i8** [[TMP27]], align 8
|
||||
// CHECK1-NEXT: [[TMP29:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 2
|
||||
// CHECK1-NEXT: store i64 4, i64* [[TMP29]], align 8
|
||||
// CHECK1-NEXT: [[TMP30:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 3
|
||||
// CHECK1-NEXT: store i8* bitcast (void (i8*, i8*)* @.red_init. to i8*), i8** [[TMP30]], align 8
|
||||
// CHECK1-NEXT: [[TMP31:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 4
|
||||
// CHECK1-NEXT: store i8* null, i8** [[TMP31]], align 8
|
||||
// CHECK1-NEXT: [[TMP32:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 5
|
||||
// CHECK1-NEXT: store i8* bitcast (void (i8*, i8*)* @.red_comb. to i8*), i8** [[TMP32]], align 8
|
||||
// CHECK1-NEXT: [[TMP33:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 6
|
||||
// CHECK1-NEXT: [[TMP34:%.*]] = bitcast i32* [[TMP33]] to i8*
|
||||
// CHECK1-NEXT: call void @llvm.memset.p0i8.i64(i8* align 8 [[TMP34]], i8 0, i64 4, i1 false)
|
||||
// CHECK1-NEXT: [[DOTRD_INPUT_GEP_5:%.*]] = getelementptr inbounds [2 x %struct.kmp_taskred_input_t], [2 x %struct.kmp_taskred_input_t]* [[DOTRD_INPUT_]], i64 0, i64 1
|
||||
// CHECK1-NEXT: [[TMP35:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_5]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP36:%.*]] = load i8**, i8*** [[TMP3]], align 8
|
||||
// CHECK1-NEXT: [[ARRAYIDX6:%.*]] = getelementptr inbounds i8*, i8** [[TMP36]], i64 0
|
||||
// CHECK1-NEXT: [[TMP37:%.*]] = load i8*, i8** [[ARRAYIDX6]], align 8
|
||||
// CHECK1-NEXT: [[ARRAYIDX7:%.*]] = getelementptr inbounds i8, i8* [[TMP37]], i64 0
|
||||
// CHECK1-NEXT: [[TMP38:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK1-NEXT: [[TMP39:%.*]] = sext i32 [[TMP38]] to i64
|
||||
// CHECK1-NEXT: [[LB_ADD_LEN8:%.*]] = add nsw i64 -1, [[TMP39]]
|
||||
// CHECK1-NEXT: [[TMP40:%.*]] = load i8**, i8*** [[TMP3]], align 8
|
||||
// CHECK1-NEXT: [[ARRAYIDX9:%.*]] = getelementptr inbounds i8*, i8** [[TMP40]], i64 9
|
||||
// CHECK1-NEXT: [[TMP41:%.*]] = load i8*, i8** [[ARRAYIDX9]], align 8
|
||||
// CHECK1-NEXT: [[ARRAYIDX10:%.*]] = getelementptr inbounds i8, i8* [[TMP41]], i64 [[LB_ADD_LEN8]]
|
||||
// CHECK1-NEXT: store i8* [[VLA]], i8** [[TMP35]], align 8
|
||||
// CHECK1-NEXT: [[TMP42:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_5]], i32 0, i32 1
|
||||
// CHECK1-NEXT: store i8* [[ARRAYIDX7]], i8** [[TMP42]], align 8
|
||||
// CHECK1-NEXT: [[TMP43:%.*]] = ptrtoint i8* [[ARRAYIDX10]] to i64
|
||||
// CHECK1-NEXT: [[TMP44:%.*]] = ptrtoint i8* [[ARRAYIDX7]] to i64
|
||||
// CHECK1-NEXT: [[TMP45:%.*]] = sub i64 [[TMP43]], [[TMP44]]
|
||||
// CHECK1-NEXT: [[TMP46:%.*]] = sdiv exact i64 [[TMP45]], ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64)
|
||||
// CHECK1-NEXT: [[TMP47:%.*]] = add nuw i64 [[TMP46]], 1
|
||||
// CHECK1-NEXT: [[TMP48:%.*]] = mul nuw i64 [[TMP47]], ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64)
|
||||
// CHECK1-NEXT: [[TMP49:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_5]], i32 0, i32 2
|
||||
// CHECK1-NEXT: store i64 [[TMP48]], i64* [[TMP49]], align 8
|
||||
// CHECK1-NEXT: [[TMP50:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_5]], i32 0, i32 3
|
||||
// CHECK1-NEXT: store i8* bitcast (void (i8*, i8*)* @.red_init..1 to i8*), i8** [[TMP50]], align 8
|
||||
// CHECK1-NEXT: [[TMP51:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_5]], i32 0, i32 4
|
||||
// CHECK1-NEXT: store i8* null, i8** [[TMP51]], align 8
|
||||
// CHECK1-NEXT: [[TMP52:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_5]], i32 0, i32 5
|
||||
// CHECK1-NEXT: store i8* bitcast (void (i8*, i8*)* @.red_comb..2 to i8*), i8** [[TMP52]], align 8
|
||||
// CHECK1-NEXT: [[TMP53:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_5]], i32 0, i32 6
|
||||
// CHECK1-NEXT: store i32 1, i32* [[TMP53]], align 8
|
||||
// CHECK1-NEXT: [[TMP54:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP55:%.*]] = load i32, i32* [[TMP54]], align 4
|
||||
// CHECK1-NEXT: [[TMP56:%.*]] = bitcast [2 x %struct.kmp_taskred_input_t]* [[DOTRD_INPUT_]] to i8*
|
||||
// CHECK1-NEXT: [[TMP57:%.*]] = call i8* @__kmpc_taskred_modifier_init(%struct.ident_t* @[[GLOB1]], i32 [[TMP55]], i32 0, i32 2, i8* [[TMP56]])
|
||||
// CHECK1-NEXT: store i8* [[TMP57]], i8** [[DOTTASK_RED_]], align 8
|
||||
// CHECK1-NEXT: [[TMP58:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[AGG_CAPTURED]], i32 0, i32 0
|
||||
// CHECK1-NEXT: store i8** [[DOTTASK_RED_]], i8*** [[TMP58]], align 8
|
||||
// CHECK1-NEXT: [[TMP59:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[AGG_CAPTURED]], i32 0, i32 1
|
||||
// CHECK1-NEXT: store i32* [[ARGC]], i32** [[TMP59]], align 8
|
||||
// CHECK1-NEXT: [[TMP60:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[AGG_CAPTURED]], i32 0, i32 2
|
||||
// CHECK1-NEXT: [[TMP61:%.*]] = load i8**, i8*** [[TMP]], align 8
|
||||
// CHECK1-NEXT: store i8** [[TMP61]], i8*** [[TMP60]], align 8
|
||||
// CHECK1-NEXT: [[TMP62:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP63:%.*]] = load i32, i32* [[TMP62]], align 4
|
||||
// CHECK1-NEXT: [[TMP64:%.*]] = call i8* @__kmpc_omp_task_alloc(%struct.ident_t* @[[GLOB1]], i32 [[TMP63]], i32 1, i64 48, i64 24, i32 (i32, i8*)* bitcast (i32 (i32, %struct.kmp_task_t_with_privates*)* @.omp_task_entry. to i32 (i32, i8*)*))
|
||||
// CHECK1-NEXT: [[TMP65:%.*]] = bitcast i8* [[TMP64]] to %struct.kmp_task_t_with_privates*
|
||||
// CHECK1-NEXT: [[TMP66:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES:%.*]], %struct.kmp_task_t_with_privates* [[TMP65]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP67:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T:%.*]], %struct.kmp_task_t* [[TMP66]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP68:%.*]] = load i8*, i8** [[TMP67]], align 8
|
||||
// CHECK1-NEXT: [[TMP69:%.*]] = bitcast %struct.anon.0* [[AGG_CAPTURED]] to i8*
|
||||
// CHECK1-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 [[TMP68]], i8* align 8 [[TMP69]], i64 24, i1 false)
|
||||
// CHECK1-NEXT: [[TMP70:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES]], %struct.kmp_task_t_with_privates* [[TMP65]], i32 0, i32 1
|
||||
// CHECK1-NEXT: [[TMP71:%.*]] = getelementptr inbounds [[STRUCT__KMP_PRIVATES_T:%.*]], %struct..kmp_privates.t* [[TMP70]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP72:%.*]] = load i8*, i8** [[DOTTASK_RED_]], align 8
|
||||
// CHECK1-NEXT: store i8* [[TMP72]], i8** [[TMP71]], align 8
|
||||
// CHECK1-NEXT: [[TMP22:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T:%.*]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP23:%.*]] = bitcast i32* [[ARGC1]] to i8*
|
||||
// CHECK1-NEXT: store i8* [[TMP23]], i8** [[TMP22]], align 8
|
||||
// CHECK1-NEXT: [[TMP24:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 1
|
||||
// CHECK1-NEXT: [[TMP25:%.*]] = bitcast i32* [[TMP0]] to i8*
|
||||
// CHECK1-NEXT: store i8* [[TMP25]], i8** [[TMP24]], align 8
|
||||
// CHECK1-NEXT: [[TMP26:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 2
|
||||
// CHECK1-NEXT: store i64 4, i64* [[TMP26]], align 8
|
||||
// CHECK1-NEXT: [[TMP27:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 3
|
||||
// CHECK1-NEXT: store i8* bitcast (void (i8*, i8*)* @.red_init. to i8*), i8** [[TMP27]], align 8
|
||||
// CHECK1-NEXT: [[TMP28:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 4
|
||||
// CHECK1-NEXT: store i8* null, i8** [[TMP28]], align 8
|
||||
// CHECK1-NEXT: [[TMP29:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 5
|
||||
// CHECK1-NEXT: store i8* bitcast (void (i8*, i8*)* @.red_comb. to i8*), i8** [[TMP29]], align 8
|
||||
// CHECK1-NEXT: [[TMP30:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 6
|
||||
// CHECK1-NEXT: [[TMP31:%.*]] = bitcast i32* [[TMP30]] to i8*
|
||||
// CHECK1-NEXT: call void @llvm.memset.p0i8.i64(i8* align 8 [[TMP31]], i8 0, i64 4, i1 false)
|
||||
// CHECK1-NEXT: [[DOTRD_INPUT_GEP_6:%.*]] = getelementptr inbounds [2 x %struct.kmp_taskred_input_t], [2 x %struct.kmp_taskred_input_t]* [[DOTRD_INPUT_]], i64 0, i64 1
|
||||
// CHECK1-NEXT: [[TMP32:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_6]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP33:%.*]] = load i8**, i8*** [[ARGV_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[ARRAYIDX7:%.*]] = getelementptr inbounds i8*, i8** [[TMP33]], i64 0
|
||||
// CHECK1-NEXT: [[TMP34:%.*]] = load i8*, i8** [[ARRAYIDX7]], align 8
|
||||
// CHECK1-NEXT: [[ARRAYIDX8:%.*]] = getelementptr inbounds i8, i8* [[TMP34]], i64 0
|
||||
// CHECK1-NEXT: [[TMP35:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK1-NEXT: [[TMP36:%.*]] = sext i32 [[TMP35]] to i64
|
||||
// CHECK1-NEXT: [[LB_ADD_LEN9:%.*]] = add nsw i64 -1, [[TMP36]]
|
||||
// CHECK1-NEXT: [[TMP37:%.*]] = load i8**, i8*** [[ARGV_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[ARRAYIDX10:%.*]] = getelementptr inbounds i8*, i8** [[TMP37]], i64 9
|
||||
// CHECK1-NEXT: [[TMP38:%.*]] = load i8*, i8** [[ARRAYIDX10]], align 8
|
||||
// CHECK1-NEXT: [[ARRAYIDX11:%.*]] = getelementptr inbounds i8, i8* [[TMP38]], i64 [[LB_ADD_LEN9]]
|
||||
// CHECK1-NEXT: store i8* [[VLA]], i8** [[TMP32]], align 8
|
||||
// CHECK1-NEXT: [[TMP39:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_6]], i32 0, i32 1
|
||||
// CHECK1-NEXT: store i8* [[ARRAYIDX8]], i8** [[TMP39]], align 8
|
||||
// CHECK1-NEXT: [[TMP40:%.*]] = ptrtoint i8* [[ARRAYIDX11]] to i64
|
||||
// CHECK1-NEXT: [[TMP41:%.*]] = ptrtoint i8* [[ARRAYIDX8]] to i64
|
||||
// CHECK1-NEXT: [[TMP42:%.*]] = sub i64 [[TMP40]], [[TMP41]]
|
||||
// CHECK1-NEXT: [[TMP43:%.*]] = sdiv exact i64 [[TMP42]], ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64)
|
||||
// CHECK1-NEXT: [[TMP44:%.*]] = add nuw i64 [[TMP43]], 1
|
||||
// CHECK1-NEXT: [[TMP45:%.*]] = mul nuw i64 [[TMP44]], ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64)
|
||||
// CHECK1-NEXT: [[TMP46:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_6]], i32 0, i32 2
|
||||
// CHECK1-NEXT: store i64 [[TMP45]], i64* [[TMP46]], align 8
|
||||
// CHECK1-NEXT: [[TMP47:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_6]], i32 0, i32 3
|
||||
// CHECK1-NEXT: store i8* bitcast (void (i8*, i8*)* @.red_init..1 to i8*), i8** [[TMP47]], align 8
|
||||
// CHECK1-NEXT: [[TMP48:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_6]], i32 0, i32 4
|
||||
// CHECK1-NEXT: store i8* null, i8** [[TMP48]], align 8
|
||||
// CHECK1-NEXT: [[TMP49:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_6]], i32 0, i32 5
|
||||
// CHECK1-NEXT: store i8* bitcast (void (i8*, i8*)* @.red_comb..2 to i8*), i8** [[TMP49]], align 8
|
||||
// CHECK1-NEXT: [[TMP50:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_6]], i32 0, i32 6
|
||||
// CHECK1-NEXT: store i32 1, i32* [[TMP50]], align 8
|
||||
// CHECK1-NEXT: [[TMP51:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP52:%.*]] = load i32, i32* [[TMP51]], align 4
|
||||
// CHECK1-NEXT: [[TMP53:%.*]] = bitcast [2 x %struct.kmp_taskred_input_t]* [[DOTRD_INPUT_]] to i8*
|
||||
// CHECK1-NEXT: [[TMP54:%.*]] = call i8* @__kmpc_taskred_modifier_init(%struct.ident_t* @[[GLOB1]], i32 [[TMP52]], i32 0, i32 2, i8* [[TMP53]])
|
||||
// CHECK1-NEXT: store i8* [[TMP54]], i8** [[DOTTASK_RED_]], align 8
|
||||
// CHECK1-NEXT: [[TMP55:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[AGG_CAPTURED]], i32 0, i32 0
|
||||
// CHECK1-NEXT: store i8** [[DOTTASK_RED_]], i8*** [[TMP55]], align 8
|
||||
// CHECK1-NEXT: [[TMP56:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[AGG_CAPTURED]], i32 0, i32 1
|
||||
// CHECK1-NEXT: store i32* [[ARGC1]], i32** [[TMP56]], align 8
|
||||
// CHECK1-NEXT: [[TMP57:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[AGG_CAPTURED]], i32 0, i32 2
|
||||
// CHECK1-NEXT: [[TMP58:%.*]] = load i8**, i8*** [[TMP]], align 8
|
||||
// CHECK1-NEXT: store i8** [[TMP58]], i8*** [[TMP57]], align 8
|
||||
// CHECK1-NEXT: [[TMP59:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP60:%.*]] = load i32, i32* [[TMP59]], align 4
|
||||
// CHECK1-NEXT: [[TMP61:%.*]] = call i8* @__kmpc_omp_task_alloc(%struct.ident_t* @[[GLOB1]], i32 [[TMP60]], i32 1, i64 48, i64 24, i32 (i32, i8*)* bitcast (i32 (i32, %struct.kmp_task_t_with_privates*)* @.omp_task_entry. to i32 (i32, i8*)*))
|
||||
// CHECK1-NEXT: [[TMP62:%.*]] = bitcast i8* [[TMP61]] to %struct.kmp_task_t_with_privates*
|
||||
// CHECK1-NEXT: [[TMP63:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES:%.*]], %struct.kmp_task_t_with_privates* [[TMP62]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP64:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T:%.*]], %struct.kmp_task_t* [[TMP63]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP65:%.*]] = load i8*, i8** [[TMP64]], align 8
|
||||
// CHECK1-NEXT: [[TMP66:%.*]] = bitcast %struct.anon* [[AGG_CAPTURED]] to i8*
|
||||
// CHECK1-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 [[TMP65]], i8* align 8 [[TMP66]], i64 24, i1 false)
|
||||
// CHECK1-NEXT: [[TMP67:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES]], %struct.kmp_task_t_with_privates* [[TMP62]], i32 0, i32 1
|
||||
// CHECK1-NEXT: [[TMP68:%.*]] = getelementptr inbounds [[STRUCT__KMP_PRIVATES_T:%.*]], %struct..kmp_privates.t* [[TMP67]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP69:%.*]] = load i8*, i8** [[DOTTASK_RED_]], align 8
|
||||
// CHECK1-NEXT: store i8* [[TMP69]], i8** [[TMP68]], align 8
|
||||
// CHECK1-NEXT: [[TMP70:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP71:%.*]] = load i32, i32* [[TMP70]], align 4
|
||||
// CHECK1-NEXT: [[TMP72:%.*]] = call i32 @__kmpc_omp_task(%struct.ident_t* @[[GLOB1]], i32 [[TMP71]], i8* [[TMP61]])
|
||||
// CHECK1-NEXT: [[TMP73:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP74:%.*]] = load i32, i32* [[TMP73]], align 4
|
||||
// CHECK1-NEXT: [[TMP75:%.*]] = call i32 @__kmpc_omp_task(%struct.ident_t* @[[GLOB1]], i32 [[TMP74]], i8* [[TMP64]])
|
||||
// CHECK1-NEXT: [[TMP76:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP77:%.*]] = load i32, i32* [[TMP76]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_task_reduction_modifier_fini(%struct.ident_t* @[[GLOB1]], i32 [[TMP77]], i32 0)
|
||||
// CHECK1-NEXT: [[TMP78:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOMP_REDUCTION_RED_LIST]], i64 0, i64 0
|
||||
// CHECK1-NEXT: [[TMP79:%.*]] = bitcast i32* [[ARGC]] to i8*
|
||||
// CHECK1-NEXT: call void @__kmpc_task_reduction_modifier_fini(%struct.ident_t* @[[GLOB1]], i32 [[TMP74]], i32 0)
|
||||
// CHECK1-NEXT: [[TMP75:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOMP_REDUCTION_RED_LIST]], i64 0, i64 0
|
||||
// CHECK1-NEXT: [[TMP76:%.*]] = bitcast i32* [[ARGC1]] to i8*
|
||||
// CHECK1-NEXT: store i8* [[TMP76]], i8** [[TMP75]], align 8
|
||||
// CHECK1-NEXT: [[TMP77:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOMP_REDUCTION_RED_LIST]], i64 0, i64 1
|
||||
// CHECK1-NEXT: store i8* [[VLA]], i8** [[TMP77]], align 8
|
||||
// CHECK1-NEXT: [[TMP78:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOMP_REDUCTION_RED_LIST]], i64 0, i64 2
|
||||
// CHECK1-NEXT: [[TMP79:%.*]] = inttoptr i64 [[TMP11]] to i8*
|
||||
// CHECK1-NEXT: store i8* [[TMP79]], i8** [[TMP78]], align 8
|
||||
// CHECK1-NEXT: [[TMP80:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOMP_REDUCTION_RED_LIST]], i64 0, i64 1
|
||||
// CHECK1-NEXT: store i8* [[VLA]], i8** [[TMP80]], align 8
|
||||
// CHECK1-NEXT: [[TMP81:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOMP_REDUCTION_RED_LIST]], i64 0, i64 2
|
||||
// CHECK1-NEXT: [[TMP82:%.*]] = inttoptr i64 [[TMP14]] to i8*
|
||||
// CHECK1-NEXT: store i8* [[TMP82]], i8** [[TMP81]], align 8
|
||||
// CHECK1-NEXT: [[TMP83:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP84:%.*]] = load i32, i32* [[TMP83]], align 4
|
||||
// CHECK1-NEXT: [[TMP85:%.*]] = bitcast [3 x i8*]* [[DOTOMP_REDUCTION_RED_LIST]] to i8*
|
||||
// CHECK1-NEXT: [[TMP86:%.*]] = call i32 @__kmpc_reduce_nowait(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 [[TMP84]], i32 2, i64 24, i8* [[TMP85]], void (i8*, i8*)* @.omp.reduction.reduction_func, [8 x i32]* @.gomp_critical_user_.reduction.var)
|
||||
// CHECK1-NEXT: switch i32 [[TMP86]], label [[DOTOMP_REDUCTION_DEFAULT:%.*]] [
|
||||
// CHECK1-NEXT: [[TMP80:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP81:%.*]] = load i32, i32* [[TMP80]], align 4
|
||||
// CHECK1-NEXT: [[TMP82:%.*]] = bitcast [3 x i8*]* [[DOTOMP_REDUCTION_RED_LIST]] to i8*
|
||||
// CHECK1-NEXT: [[TMP83:%.*]] = call i32 @__kmpc_reduce_nowait(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 [[TMP81]], i32 2, i64 24, i8* [[TMP82]], void (i8*, i8*)* @.omp.reduction.reduction_func, [8 x i32]* @.gomp_critical_user_.reduction.var)
|
||||
// CHECK1-NEXT: switch i32 [[TMP83]], label [[DOTOMP_REDUCTION_DEFAULT:%.*]] [
|
||||
// CHECK1-NEXT: i32 1, label [[DOTOMP_REDUCTION_CASE1:%.*]]
|
||||
// CHECK1-NEXT: i32 2, label [[DOTOMP_REDUCTION_CASE2:%.*]]
|
||||
// CHECK1-NEXT: ]
|
||||
// CHECK1: .omp.reduction.case1:
|
||||
// CHECK1-NEXT: [[TMP87:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK1-NEXT: [[TMP88:%.*]] = load i32, i32* [[ARGC]], align 4
|
||||
// CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP87]], [[TMP88]]
|
||||
// CHECK1-NEXT: store i32 [[ADD]], i32* [[TMP2]], align 4
|
||||
// CHECK1-NEXT: [[TMP89:%.*]] = getelementptr i8, i8* [[ARRAYIDX1]], i64 [[TMP14]]
|
||||
// CHECK1-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq i8* [[ARRAYIDX1]], [[TMP89]]
|
||||
// CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE17:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]]
|
||||
// CHECK1-NEXT: [[TMP84:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK1-NEXT: [[TMP85:%.*]] = load i32, i32* [[ARGC1]], align 4
|
||||
// CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP84]], [[TMP85]]
|
||||
// CHECK1-NEXT: store i32 [[ADD]], i32* [[TMP0]], align 4
|
||||
// CHECK1-NEXT: [[TMP86:%.*]] = getelementptr i8, i8* [[ARRAYIDX2]], i64 [[TMP11]]
|
||||
// CHECK1-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq i8* [[ARRAYIDX2]], [[TMP86]]
|
||||
// CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE18:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]]
|
||||
// CHECK1: omp.arraycpy.body:
|
||||
// CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi i8* [ [[VLA]], [[DOTOMP_REDUCTION_CASE1]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
|
||||
// CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST11:%.*]] = phi i8* [ [[ARRAYIDX1]], [[DOTOMP_REDUCTION_CASE1]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT15:%.*]], [[OMP_ARRAYCPY_BODY]] ]
|
||||
// CHECK1-NEXT: [[TMP90:%.*]] = load i8, i8* [[OMP_ARRAYCPY_DESTELEMENTPAST11]], align 1
|
||||
// CHECK1-NEXT: [[CONV:%.*]] = sext i8 [[TMP90]] to i32
|
||||
// CHECK1-NEXT: [[TMP91:%.*]] = load i8, i8* [[OMP_ARRAYCPY_SRCELEMENTPAST]], align 1
|
||||
// CHECK1-NEXT: [[CONV12:%.*]] = sext i8 [[TMP91]] to i32
|
||||
// CHECK1-NEXT: [[ADD13:%.*]] = add nsw i32 [[CONV]], [[CONV12]]
|
||||
// CHECK1-NEXT: [[CONV14:%.*]] = trunc i32 [[ADD13]] to i8
|
||||
// CHECK1-NEXT: store i8 [[CONV14]], i8* [[OMP_ARRAYCPY_DESTELEMENTPAST11]], align 1
|
||||
// CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT15]] = getelementptr i8, i8* [[OMP_ARRAYCPY_DESTELEMENTPAST11]], i32 1
|
||||
// CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST12:%.*]] = phi i8* [ [[ARRAYIDX2]], [[DOTOMP_REDUCTION_CASE1]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT16:%.*]], [[OMP_ARRAYCPY_BODY]] ]
|
||||
// CHECK1-NEXT: [[TMP87:%.*]] = load i8, i8* [[OMP_ARRAYCPY_DESTELEMENTPAST12]], align 1
|
||||
// CHECK1-NEXT: [[CONV:%.*]] = sext i8 [[TMP87]] to i32
|
||||
// CHECK1-NEXT: [[TMP88:%.*]] = load i8, i8* [[OMP_ARRAYCPY_SRCELEMENTPAST]], align 1
|
||||
// CHECK1-NEXT: [[CONV13:%.*]] = sext i8 [[TMP88]] to i32
|
||||
// CHECK1-NEXT: [[ADD14:%.*]] = add nsw i32 [[CONV]], [[CONV13]]
|
||||
// CHECK1-NEXT: [[CONV15:%.*]] = trunc i32 [[ADD14]] to i8
|
||||
// CHECK1-NEXT: store i8 [[CONV15]], i8* [[OMP_ARRAYCPY_DESTELEMENTPAST12]], align 1
|
||||
// CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT16]] = getelementptr i8, i8* [[OMP_ARRAYCPY_DESTELEMENTPAST12]], i32 1
|
||||
// CHECK1-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr i8, i8* [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1
|
||||
// CHECK1-NEXT: [[OMP_ARRAYCPY_DONE16:%.*]] = icmp eq i8* [[OMP_ARRAYCPY_DEST_ELEMENT15]], [[TMP89]]
|
||||
// CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE16]], label [[OMP_ARRAYCPY_DONE17]], label [[OMP_ARRAYCPY_BODY]]
|
||||
// CHECK1: omp.arraycpy.done17:
|
||||
// CHECK1-NEXT: call void @__kmpc_end_reduce_nowait(%struct.ident_t* @[[GLOB2]], i32 [[TMP84]], [8 x i32]* @.gomp_critical_user_.reduction.var)
|
||||
// CHECK1-NEXT: [[OMP_ARRAYCPY_DONE17:%.*]] = icmp eq i8* [[OMP_ARRAYCPY_DEST_ELEMENT16]], [[TMP86]]
|
||||
// CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE17]], label [[OMP_ARRAYCPY_DONE18]], label [[OMP_ARRAYCPY_BODY]]
|
||||
// CHECK1: omp.arraycpy.done18:
|
||||
// CHECK1-NEXT: call void @__kmpc_end_reduce_nowait(%struct.ident_t* @[[GLOB2]], i32 [[TMP81]], [8 x i32]* @.gomp_critical_user_.reduction.var)
|
||||
// CHECK1-NEXT: br label [[DOTOMP_REDUCTION_DEFAULT]]
|
||||
// CHECK1: .omp.reduction.case2:
|
||||
// CHECK1-NEXT: [[TMP92:%.*]] = load i32, i32* [[ARGC]], align 4
|
||||
// CHECK1-NEXT: [[TMP93:%.*]] = atomicrmw add i32* [[TMP2]], i32 [[TMP92]] monotonic, align 4
|
||||
// CHECK1-NEXT: [[TMP94:%.*]] = getelementptr i8, i8* [[ARRAYIDX1]], i64 [[TMP14]]
|
||||
// CHECK1-NEXT: [[OMP_ARRAYCPY_ISEMPTY18:%.*]] = icmp eq i8* [[ARRAYIDX1]], [[TMP94]]
|
||||
// CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY18]], label [[OMP_ARRAYCPY_DONE31:%.*]], label [[OMP_ARRAYCPY_BODY19:%.*]]
|
||||
// CHECK1: omp.arraycpy.body19:
|
||||
// CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST20:%.*]] = phi i8* [ [[VLA]], [[DOTOMP_REDUCTION_CASE2]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT29:%.*]], [[ATOMIC_EXIT:%.*]] ]
|
||||
// CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST21:%.*]] = phi i8* [ [[ARRAYIDX1]], [[DOTOMP_REDUCTION_CASE2]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT28:%.*]], [[ATOMIC_EXIT]] ]
|
||||
// CHECK1-NEXT: [[TMP95:%.*]] = load i8, i8* [[OMP_ARRAYCPY_SRCELEMENTPAST20]], align 1
|
||||
// CHECK1-NEXT: [[CONV22:%.*]] = sext i8 [[TMP95]] to i32
|
||||
// CHECK1-NEXT: [[ATOMIC_LOAD:%.*]] = load atomic i8, i8* [[OMP_ARRAYCPY_DESTELEMENTPAST21]] monotonic, align 1
|
||||
// CHECK1-NEXT: [[TMP89:%.*]] = load i32, i32* [[ARGC1]], align 4
|
||||
// CHECK1-NEXT: [[TMP90:%.*]] = atomicrmw add i32* [[TMP0]], i32 [[TMP89]] monotonic, align 4
|
||||
// CHECK1-NEXT: [[TMP91:%.*]] = getelementptr i8, i8* [[ARRAYIDX2]], i64 [[TMP11]]
|
||||
// CHECK1-NEXT: [[OMP_ARRAYCPY_ISEMPTY19:%.*]] = icmp eq i8* [[ARRAYIDX2]], [[TMP91]]
|
||||
// CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY19]], label [[OMP_ARRAYCPY_DONE32:%.*]], label [[OMP_ARRAYCPY_BODY20:%.*]]
|
||||
// CHECK1: omp.arraycpy.body20:
|
||||
// CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST21:%.*]] = phi i8* [ [[VLA]], [[DOTOMP_REDUCTION_CASE2]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT30:%.*]], [[ATOMIC_EXIT:%.*]] ]
|
||||
// CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST22:%.*]] = phi i8* [ [[ARRAYIDX2]], [[DOTOMP_REDUCTION_CASE2]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT29:%.*]], [[ATOMIC_EXIT]] ]
|
||||
// CHECK1-NEXT: [[TMP92:%.*]] = load i8, i8* [[OMP_ARRAYCPY_SRCELEMENTPAST21]], align 1
|
||||
// CHECK1-NEXT: [[CONV23:%.*]] = sext i8 [[TMP92]] to i32
|
||||
// CHECK1-NEXT: [[ATOMIC_LOAD:%.*]] = load atomic i8, i8* [[OMP_ARRAYCPY_DESTELEMENTPAST22]] monotonic, align 1
|
||||
// CHECK1-NEXT: br label [[ATOMIC_CONT:%.*]]
|
||||
// CHECK1: atomic_cont:
|
||||
// CHECK1-NEXT: [[TMP96:%.*]] = phi i8 [ [[ATOMIC_LOAD]], [[OMP_ARRAYCPY_BODY19]] ], [ [[TMP101:%.*]], [[ATOMIC_CONT]] ]
|
||||
// CHECK1-NEXT: store i8 [[TMP96]], i8* [[_TMP23]], align 1
|
||||
// CHECK1-NEXT: [[TMP97:%.*]] = load i8, i8* [[_TMP23]], align 1
|
||||
// CHECK1-NEXT: [[CONV24:%.*]] = sext i8 [[TMP97]] to i32
|
||||
// CHECK1-NEXT: [[TMP98:%.*]] = load i8, i8* [[OMP_ARRAYCPY_SRCELEMENTPAST20]], align 1
|
||||
// CHECK1-NEXT: [[CONV25:%.*]] = sext i8 [[TMP98]] to i32
|
||||
// CHECK1-NEXT: [[ADD26:%.*]] = add nsw i32 [[CONV24]], [[CONV25]]
|
||||
// CHECK1-NEXT: [[CONV27:%.*]] = trunc i32 [[ADD26]] to i8
|
||||
// CHECK1-NEXT: store i8 [[CONV27]], i8* [[ATOMIC_TEMP]], align 1
|
||||
// CHECK1-NEXT: [[TMP99:%.*]] = load i8, i8* [[ATOMIC_TEMP]], align 1
|
||||
// CHECK1-NEXT: [[TMP100:%.*]] = cmpxchg i8* [[OMP_ARRAYCPY_DESTELEMENTPAST21]], i8 [[TMP96]], i8 [[TMP99]] monotonic monotonic, align 1
|
||||
// CHECK1-NEXT: [[TMP101]] = extractvalue { i8, i1 } [[TMP100]], 0
|
||||
// CHECK1-NEXT: [[TMP102:%.*]] = extractvalue { i8, i1 } [[TMP100]], 1
|
||||
// CHECK1-NEXT: br i1 [[TMP102]], label [[ATOMIC_EXIT]], label [[ATOMIC_CONT]]
|
||||
// CHECK1-NEXT: [[TMP93:%.*]] = phi i8 [ [[ATOMIC_LOAD]], [[OMP_ARRAYCPY_BODY20]] ], [ [[TMP98:%.*]], [[ATOMIC_CONT]] ]
|
||||
// CHECK1-NEXT: store i8 [[TMP93]], i8* [[_TMP24]], align 1
|
||||
// CHECK1-NEXT: [[TMP94:%.*]] = load i8, i8* [[_TMP24]], align 1
|
||||
// CHECK1-NEXT: [[CONV25:%.*]] = sext i8 [[TMP94]] to i32
|
||||
// CHECK1-NEXT: [[TMP95:%.*]] = load i8, i8* [[OMP_ARRAYCPY_SRCELEMENTPAST21]], align 1
|
||||
// CHECK1-NEXT: [[CONV26:%.*]] = sext i8 [[TMP95]] to i32
|
||||
// CHECK1-NEXT: [[ADD27:%.*]] = add nsw i32 [[CONV25]], [[CONV26]]
|
||||
// CHECK1-NEXT: [[CONV28:%.*]] = trunc i32 [[ADD27]] to i8
|
||||
// CHECK1-NEXT: store i8 [[CONV28]], i8* [[ATOMIC_TEMP]], align 1
|
||||
// CHECK1-NEXT: [[TMP96:%.*]] = load i8, i8* [[ATOMIC_TEMP]], align 1
|
||||
// CHECK1-NEXT: [[TMP97:%.*]] = cmpxchg i8* [[OMP_ARRAYCPY_DESTELEMENTPAST22]], i8 [[TMP93]], i8 [[TMP96]] monotonic monotonic, align 1
|
||||
// CHECK1-NEXT: [[TMP98]] = extractvalue { i8, i1 } [[TMP97]], 0
|
||||
// CHECK1-NEXT: [[TMP99:%.*]] = extractvalue { i8, i1 } [[TMP97]], 1
|
||||
// CHECK1-NEXT: br i1 [[TMP99]], label [[ATOMIC_EXIT]], label [[ATOMIC_CONT]]
|
||||
// CHECK1: atomic_exit:
|
||||
// CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT28]] = getelementptr i8, i8* [[OMP_ARRAYCPY_DESTELEMENTPAST21]], i32 1
|
||||
// CHECK1-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT29]] = getelementptr i8, i8* [[OMP_ARRAYCPY_SRCELEMENTPAST20]], i32 1
|
||||
// CHECK1-NEXT: [[OMP_ARRAYCPY_DONE30:%.*]] = icmp eq i8* [[OMP_ARRAYCPY_DEST_ELEMENT28]], [[TMP94]]
|
||||
// CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE30]], label [[OMP_ARRAYCPY_DONE31]], label [[OMP_ARRAYCPY_BODY19]]
|
||||
// CHECK1: omp.arraycpy.done31:
|
||||
// CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT29]] = getelementptr i8, i8* [[OMP_ARRAYCPY_DESTELEMENTPAST22]], i32 1
|
||||
// CHECK1-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT30]] = getelementptr i8, i8* [[OMP_ARRAYCPY_SRCELEMENTPAST21]], i32 1
|
||||
// CHECK1-NEXT: [[OMP_ARRAYCPY_DONE31:%.*]] = icmp eq i8* [[OMP_ARRAYCPY_DEST_ELEMENT29]], [[TMP91]]
|
||||
// CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE31]], label [[OMP_ARRAYCPY_DONE32]], label [[OMP_ARRAYCPY_BODY20]]
|
||||
// CHECK1: omp.arraycpy.done32:
|
||||
// CHECK1-NEXT: br label [[DOTOMP_REDUCTION_DEFAULT]]
|
||||
// CHECK1: .omp.reduction.default:
|
||||
// CHECK1-NEXT: [[TMP103:%.*]] = load i8*, i8** [[SAVED_STACK]], align 8
|
||||
// CHECK1-NEXT: call void @llvm.stackrestore(i8* [[TMP103]])
|
||||
// CHECK1-NEXT: [[TMP100:%.*]] = load i8*, i8** [[SAVED_STACK]], align 8
|
||||
// CHECK1-NEXT: call void @llvm.stackrestore(i8* [[TMP100]])
|
||||
// CHECK1-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -386,7 +380,7 @@ int main(int argc, char **argv) {
|
|||
// CHECK1-NEXT: [[DOTPRIVATES__ADDR_I:%.*]] = alloca i8*, align 8
|
||||
// CHECK1-NEXT: [[DOTCOPY_FN__ADDR_I:%.*]] = alloca void (i8*, ...)*, align 8
|
||||
// CHECK1-NEXT: [[DOTTASK_T__ADDR_I:%.*]] = alloca i8*, align 8
|
||||
// CHECK1-NEXT: [[__CONTEXT_ADDR_I:%.*]] = alloca %struct.anon.0*, align 8
|
||||
// CHECK1-NEXT: [[__CONTEXT_ADDR_I:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK1-NEXT: [[DOTFIRSTPRIV_PTR_ADDR_I:%.*]] = alloca i8**, align 8
|
||||
// CHECK1-NEXT: [[TMP_I:%.*]] = alloca i8**, align 8
|
||||
// CHECK1-NEXT: [[TMP4_I:%.*]] = alloca i8*, align 8
|
||||
|
@ -400,7 +394,7 @@ int main(int argc, char **argv) {
|
|||
// CHECK1-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T:%.*]], %struct.kmp_task_t* [[TMP4]], i32 0, i32 2
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP4]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = load i8*, i8** [[TMP6]], align 8
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = bitcast i8* [[TMP7]] to %struct.anon.0*
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = bitcast i8* [[TMP7]] to %struct.anon*
|
||||
// CHECK1-NEXT: [[TMP9:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES]], %struct.kmp_task_t_with_privates* [[TMP3]], i32 0, i32 1
|
||||
// CHECK1-NEXT: [[TMP10:%.*]] = bitcast %struct..kmp_privates.t* [[TMP9]] to i8*
|
||||
// CHECK1-NEXT: [[TMP11:%.*]] = bitcast %struct.kmp_task_t_with_privates* [[TMP3]] to i8*
|
||||
|
@ -413,29 +407,29 @@ int main(int argc, char **argv) {
|
|||
// CHECK1-NEXT: store i8* [[TMP10]], i8** [[DOTPRIVATES__ADDR_I]], align 8, !noalias !12
|
||||
// CHECK1-NEXT: store void (i8*, ...)* bitcast (void (%struct..kmp_privates.t*, i8***)* @.omp_task_privates_map. to void (i8*, ...)*), void (i8*, ...)** [[DOTCOPY_FN__ADDR_I]], align 8, !noalias !12
|
||||
// CHECK1-NEXT: store i8* [[TMP11]], i8** [[DOTTASK_T__ADDR_I]], align 8, !noalias !12
|
||||
// CHECK1-NEXT: store %struct.anon.0* [[TMP8]], %struct.anon.0** [[__CONTEXT_ADDR_I]], align 8, !noalias !12
|
||||
// CHECK1-NEXT: [[TMP12:%.*]] = load %struct.anon.0*, %struct.anon.0** [[__CONTEXT_ADDR_I]], align 8, !noalias !12
|
||||
// CHECK1-NEXT: store %struct.anon* [[TMP8]], %struct.anon** [[__CONTEXT_ADDR_I]], align 8, !noalias !12
|
||||
// CHECK1-NEXT: [[TMP12:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR_I]], align 8, !noalias !12
|
||||
// CHECK1-NEXT: [[TMP13:%.*]] = load void (i8*, ...)*, void (i8*, ...)** [[DOTCOPY_FN__ADDR_I]], align 8, !noalias !12
|
||||
// CHECK1-NEXT: [[TMP14:%.*]] = load i8*, i8** [[DOTPRIVATES__ADDR_I]], align 8, !noalias !12
|
||||
// CHECK1-NEXT: [[TMP15:%.*]] = bitcast void (i8*, ...)* [[TMP13]] to void (i8*, i8***)*
|
||||
// CHECK1-NEXT: call void [[TMP15]](i8* [[TMP14]], i8*** [[DOTFIRSTPRIV_PTR_ADDR_I]]) #[[ATTR5:[0-9]+]]
|
||||
// CHECK1-NEXT: [[TMP16:%.*]] = load i8**, i8*** [[DOTFIRSTPRIV_PTR_ADDR_I]], align 8, !noalias !12
|
||||
// CHECK1-NEXT: [[TMP17:%.*]] = getelementptr inbounds [[STRUCT_ANON_0:%.*]], %struct.anon.0* [[TMP12]], i32 0, i32 1
|
||||
// CHECK1-NEXT: [[TMP17:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP12]], i32 0, i32 1
|
||||
// CHECK1-NEXT: [[TMP18:%.*]] = load i32*, i32** [[TMP17]], align 8
|
||||
// CHECK1-NEXT: [[TMP19:%.*]] = load i8*, i8** [[TMP16]], align 8
|
||||
// CHECK1-NEXT: [[TMP20:%.*]] = load i32, i32* [[DOTGLOBAL_TID__ADDR_I]], align 4, !noalias !12
|
||||
// CHECK1-NEXT: [[TMP21:%.*]] = bitcast i32* [[TMP18]] to i8*
|
||||
// CHECK1-NEXT: [[TMP22:%.*]] = call i8* @__kmpc_task_reduction_get_th_data(i32 [[TMP20]], i8* [[TMP19]], i8* [[TMP21]]) #[[ATTR5]]
|
||||
// CHECK1-NEXT: [[CONV_I:%.*]] = bitcast i8* [[TMP22]] to i32*
|
||||
// CHECK1-NEXT: [[TMP23:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[TMP12]], i32 0, i32 2
|
||||
// CHECK1-NEXT: [[TMP23:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP12]], i32 0, i32 2
|
||||
// CHECK1-NEXT: [[TMP24:%.*]] = load i8**, i8*** [[TMP23]], align 8
|
||||
// CHECK1-NEXT: [[TMP25:%.*]] = load i8*, i8** [[TMP24]], align 8
|
||||
// CHECK1-NEXT: [[TMP26:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[TMP12]], i32 0, i32 1
|
||||
// CHECK1-NEXT: [[TMP26:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP12]], i32 0, i32 1
|
||||
// CHECK1-NEXT: [[TMP27:%.*]] = load i32*, i32** [[TMP26]], align 8
|
||||
// CHECK1-NEXT: [[TMP28:%.*]] = load i32, i32* [[TMP27]], align 4
|
||||
// CHECK1-NEXT: [[TMP29:%.*]] = sext i32 [[TMP28]] to i64
|
||||
// CHECK1-NEXT: [[LB_ADD_LEN_I:%.*]] = add nsw i64 -1, [[TMP29]]
|
||||
// CHECK1-NEXT: [[TMP30:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[TMP12]], i32 0, i32 2
|
||||
// CHECK1-NEXT: [[TMP30:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP12]], i32 0, i32 2
|
||||
// CHECK1-NEXT: [[TMP31:%.*]] = load i8**, i8*** [[TMP30]], align 8
|
||||
// CHECK1-NEXT: [[ARRAYIDX2_I:%.*]] = getelementptr inbounds i8*, i8** [[TMP31]], i64 9
|
||||
// CHECK1-NEXT: [[TMP32:%.*]] = load i8*, i8** [[ARRAYIDX2_I]], align 8
|
||||
|
@ -449,7 +443,7 @@ int main(int argc, char **argv) {
|
|||
// CHECK1-NEXT: store i64 [[TMP37]], i64* @{{reduction_size[.].+[.]}}, align 8
|
||||
// CHECK1-NEXT: [[TMP39:%.*]] = load i8*, i8** [[TMP16]], align 8
|
||||
// CHECK1-NEXT: [[TMP40:%.*]] = call i8* @__kmpc_task_reduction_get_th_data(i32 [[TMP20]], i8* [[TMP39]], i8* [[TMP25]]) #[[ATTR5]]
|
||||
// CHECK1-NEXT: [[TMP41:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[TMP12]], i32 0, i32 2
|
||||
// CHECK1-NEXT: [[TMP41:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP12]], i32 0, i32 2
|
||||
// CHECK1-NEXT: [[TMP42:%.*]] = load i8**, i8*** [[TMP41]], align 8
|
||||
// CHECK1-NEXT: [[TMP43:%.*]] = load i8*, i8** [[TMP42]], align 8
|
||||
// CHECK1-NEXT: [[TMP44:%.*]] = ptrtoint i8* [[TMP43]] to i64
|
||||
|
@ -516,243 +510,237 @@ int main(int argc, char **argv) {
|
|||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[ARGC_ADDR:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[ARGV_ADDR:%.*]] = alloca i8**, align 8
|
||||
// CHECK2-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 8
|
||||
// CHECK2-NEXT: store i32 [[ARGC]], i32* [[ARGC_ADDR]], align 4
|
||||
// CHECK2-NEXT: store i8** [[ARGV]], i8*** [[ARGV_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK2-NEXT: store i32* [[ARGC_ADDR]], i32** [[TMP0]], align 8
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 1
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i8**, i8*** [[ARGV_ADDR]], align 8
|
||||
// CHECK2-NEXT: store i8** [[TMP2]], i8*** [[TMP1]], align 8
|
||||
// CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon*)* @.omp_outlined. to void (i32*, i32*, ...)*), %struct.anon* [[OMP_OUTLINED_ARG_AGG_]])
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load i8**, i8*** [[ARGV_ADDR]], align 8
|
||||
// CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 2, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i8**)* @.omp_outlined. to void (i32*, i32*, ...)*), i32* [[ARGC_ADDR]], i8** [[TMP0]])
|
||||
// CHECK2-NEXT: ret i32 0
|
||||
//
|
||||
//
|
||||
// CHECK2-LABEL: define {{[^@]+}}@.omp_outlined.
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[ARGC:%.*]], i8** [[ARGV:%.*]]) #[[ATTR1:[0-9]+]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK2-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK2-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK2-NEXT: [[ARGC:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[ARGC_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK2-NEXT: [[ARGV_ADDR:%.*]] = alloca i8**, align 8
|
||||
// CHECK2-NEXT: [[ARGC1:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[SAVED_STACK:%.*]] = alloca i8*, align 8
|
||||
// CHECK2-NEXT: [[__VLA_EXPR0:%.*]] = alloca i64, align 8
|
||||
// CHECK2-NEXT: [[TMP:%.*]] = alloca i8**, align 8
|
||||
// CHECK2-NEXT: [[_TMP4:%.*]] = alloca i8*, align 8
|
||||
// CHECK2-NEXT: [[_TMP5:%.*]] = alloca i8*, align 8
|
||||
// CHECK2-NEXT: [[DOTRD_INPUT_:%.*]] = alloca [2 x %struct.kmp_taskred_input_t], align 8
|
||||
// CHECK2-NEXT: [[DOTTASK_RED_:%.*]] = alloca i8*, align 8
|
||||
// CHECK2-NEXT: [[AGG_CAPTURED:%.*]] = alloca [[STRUCT_ANON_0:%.*]], align 8
|
||||
// CHECK2-NEXT: [[AGG_CAPTURED:%.*]] = alloca [[STRUCT_ANON:%.*]], align 8
|
||||
// CHECK2-NEXT: [[DOTOMP_REDUCTION_RED_LIST:%.*]] = alloca [3 x i8*], align 8
|
||||
// CHECK2-NEXT: [[ATOMIC_TEMP:%.*]] = alloca i8, align 1
|
||||
// CHECK2-NEXT: [[_TMP23:%.*]] = alloca i8, align 1
|
||||
// CHECK2-NEXT: [[_TMP24:%.*]] = alloca i8, align 1
|
||||
// CHECK2-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 8
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP0]], i32 0, i32 1
|
||||
// CHECK2-NEXT: store i32 0, i32* [[ARGC]], align 4
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = load i8**, i8*** [[TMP3]], align 8
|
||||
// CHECK2-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds i8*, i8** [[TMP4]], i64 0
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = load i8*, i8** [[ARRAYIDX]], align 8
|
||||
// CHECK2-NEXT: [[ARRAYIDX1:%.*]] = getelementptr inbounds i8, i8* [[TMP5]], i64 0
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = sext i32 [[TMP6]] to i64
|
||||
// CHECK2-NEXT: [[LB_ADD_LEN:%.*]] = add nsw i64 -1, [[TMP7]]
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = load i8**, i8*** [[TMP3]], align 8
|
||||
// CHECK2-NEXT: [[ARRAYIDX2:%.*]] = getelementptr inbounds i8*, i8** [[TMP8]], i64 9
|
||||
// CHECK2-NEXT: [[TMP9:%.*]] = load i8*, i8** [[ARRAYIDX2]], align 8
|
||||
// CHECK2-NEXT: [[ARRAYIDX3:%.*]] = getelementptr inbounds i8, i8* [[TMP9]], i64 [[LB_ADD_LEN]]
|
||||
// CHECK2-NEXT: [[TMP10:%.*]] = ptrtoint i8* [[ARRAYIDX3]] to i64
|
||||
// CHECK2-NEXT: [[TMP11:%.*]] = ptrtoint i8* [[ARRAYIDX1]] to i64
|
||||
// CHECK2-NEXT: [[TMP12:%.*]] = sub i64 [[TMP10]], [[TMP11]]
|
||||
// CHECK2-NEXT: [[TMP13:%.*]] = sdiv exact i64 [[TMP12]], ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64)
|
||||
// CHECK2-NEXT: [[TMP14:%.*]] = add nuw i64 [[TMP13]], 1
|
||||
// CHECK2-NEXT: [[TMP15:%.*]] = mul nuw i64 [[TMP14]], ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64)
|
||||
// CHECK2-NEXT: [[TMP16:%.*]] = call i8* @llvm.stacksave()
|
||||
// CHECK2-NEXT: store i8* [[TMP16]], i8** [[SAVED_STACK]], align 8
|
||||
// CHECK2-NEXT: [[VLA:%.*]] = alloca i8, i64 [[TMP14]], align 16
|
||||
// CHECK2-NEXT: store i64 [[TMP14]], i64* [[__VLA_EXPR0]], align 8
|
||||
// CHECK2-NEXT: [[TMP17:%.*]] = getelementptr i8, i8* [[VLA]], i64 [[TMP14]]
|
||||
// CHECK2-NEXT: [[OMP_ARRAYINIT_ISEMPTY:%.*]] = icmp eq i8* [[VLA]], [[TMP17]]
|
||||
// CHECK2-NEXT: store i32* [[ARGC]], i32** [[ARGC_ADDR]], align 8
|
||||
// CHECK2-NEXT: store i8** [[ARGV]], i8*** [[ARGV_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load i32*, i32** [[ARGC_ADDR]], align 8
|
||||
// CHECK2-NEXT: store i32 0, i32* [[ARGC1]], align 4
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = load i8**, i8*** [[ARGV_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds i8*, i8** [[TMP1]], i64 0
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i8*, i8** [[ARRAYIDX]], align 8
|
||||
// CHECK2-NEXT: [[ARRAYIDX2:%.*]] = getelementptr inbounds i8, i8* [[TMP2]], i64 0
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = sext i32 [[TMP3]] to i64
|
||||
// CHECK2-NEXT: [[LB_ADD_LEN:%.*]] = add nsw i64 -1, [[TMP4]]
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = load i8**, i8*** [[ARGV_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[ARRAYIDX3:%.*]] = getelementptr inbounds i8*, i8** [[TMP5]], i64 9
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = load i8*, i8** [[ARRAYIDX3]], align 8
|
||||
// CHECK2-NEXT: [[ARRAYIDX4:%.*]] = getelementptr inbounds i8, i8* [[TMP6]], i64 [[LB_ADD_LEN]]
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = ptrtoint i8* [[ARRAYIDX4]] to i64
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = ptrtoint i8* [[ARRAYIDX2]] to i64
|
||||
// CHECK2-NEXT: [[TMP9:%.*]] = sub i64 [[TMP7]], [[TMP8]]
|
||||
// CHECK2-NEXT: [[TMP10:%.*]] = sdiv exact i64 [[TMP9]], ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64)
|
||||
// CHECK2-NEXT: [[TMP11:%.*]] = add nuw i64 [[TMP10]], 1
|
||||
// CHECK2-NEXT: [[TMP12:%.*]] = mul nuw i64 [[TMP11]], ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64)
|
||||
// CHECK2-NEXT: [[TMP13:%.*]] = call i8* @llvm.stacksave()
|
||||
// CHECK2-NEXT: store i8* [[TMP13]], i8** [[SAVED_STACK]], align 8
|
||||
// CHECK2-NEXT: [[VLA:%.*]] = alloca i8, i64 [[TMP11]], align 16
|
||||
// CHECK2-NEXT: store i64 [[TMP11]], i64* [[__VLA_EXPR0]], align 8
|
||||
// CHECK2-NEXT: [[TMP14:%.*]] = getelementptr i8, i8* [[VLA]], i64 [[TMP11]]
|
||||
// CHECK2-NEXT: [[OMP_ARRAYINIT_ISEMPTY:%.*]] = icmp eq i8* [[VLA]], [[TMP14]]
|
||||
// CHECK2-NEXT: br i1 [[OMP_ARRAYINIT_ISEMPTY]], label [[OMP_ARRAYINIT_DONE:%.*]], label [[OMP_ARRAYINIT_BODY:%.*]]
|
||||
// CHECK2: omp.arrayinit.body:
|
||||
// CHECK2-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi i8* [ [[VLA]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYINIT_BODY]] ]
|
||||
// CHECK2-NEXT: store i8 0, i8* [[OMP_ARRAYCPY_DESTELEMENTPAST]], align 1
|
||||
// CHECK2-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr i8, i8* [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1
|
||||
// CHECK2-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq i8* [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP17]]
|
||||
// CHECK2-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq i8* [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP14]]
|
||||
// CHECK2-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYINIT_DONE]], label [[OMP_ARRAYINIT_BODY]]
|
||||
// CHECK2: omp.arrayinit.done:
|
||||
// CHECK2-NEXT: [[TMP18:%.*]] = load i8**, i8*** [[TMP3]], align 8
|
||||
// CHECK2-NEXT: [[TMP19:%.*]] = load i8*, i8** [[TMP18]], align 8
|
||||
// CHECK2-NEXT: [[TMP20:%.*]] = ptrtoint i8* [[TMP19]] to i64
|
||||
// CHECK2-NEXT: [[TMP21:%.*]] = ptrtoint i8* [[ARRAYIDX1]] to i64
|
||||
// CHECK2-NEXT: [[TMP22:%.*]] = sub i64 [[TMP20]], [[TMP21]]
|
||||
// CHECK2-NEXT: [[TMP23:%.*]] = sdiv exact i64 [[TMP22]], ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64)
|
||||
// CHECK2-NEXT: [[TMP24:%.*]] = getelementptr i8, i8* [[VLA]], i64 [[TMP23]]
|
||||
// CHECK2-NEXT: store i8** [[_TMP4]], i8*** [[TMP]], align 8
|
||||
// CHECK2-NEXT: store i8* [[TMP24]], i8** [[_TMP4]], align 8
|
||||
// CHECK2-NEXT: [[TMP15:%.*]] = load i8**, i8*** [[ARGV_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP16:%.*]] = load i8*, i8** [[TMP15]], align 8
|
||||
// CHECK2-NEXT: [[TMP17:%.*]] = ptrtoint i8* [[TMP16]] to i64
|
||||
// CHECK2-NEXT: [[TMP18:%.*]] = ptrtoint i8* [[ARRAYIDX2]] to i64
|
||||
// CHECK2-NEXT: [[TMP19:%.*]] = sub i64 [[TMP17]], [[TMP18]]
|
||||
// CHECK2-NEXT: [[TMP20:%.*]] = sdiv exact i64 [[TMP19]], ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64)
|
||||
// CHECK2-NEXT: [[TMP21:%.*]] = getelementptr i8, i8* [[VLA]], i64 [[TMP20]]
|
||||
// CHECK2-NEXT: store i8** [[_TMP5]], i8*** [[TMP]], align 8
|
||||
// CHECK2-NEXT: store i8* [[TMP21]], i8** [[_TMP5]], align 8
|
||||
// CHECK2-NEXT: [[DOTRD_INPUT_GEP_:%.*]] = getelementptr inbounds [2 x %struct.kmp_taskred_input_t], [2 x %struct.kmp_taskred_input_t]* [[DOTRD_INPUT_]], i64 0, i64 0
|
||||
// CHECK2-NEXT: [[TMP25:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T:%.*]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP26:%.*]] = bitcast i32* [[ARGC]] to i8*
|
||||
// CHECK2-NEXT: store i8* [[TMP26]], i8** [[TMP25]], align 8
|
||||
// CHECK2-NEXT: [[TMP27:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 1
|
||||
// CHECK2-NEXT: [[TMP28:%.*]] = bitcast i32* [[TMP2]] to i8*
|
||||
// CHECK2-NEXT: store i8* [[TMP28]], i8** [[TMP27]], align 8
|
||||
// CHECK2-NEXT: [[TMP29:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 2
|
||||
// CHECK2-NEXT: store i64 4, i64* [[TMP29]], align 8
|
||||
// CHECK2-NEXT: [[TMP30:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 3
|
||||
// CHECK2-NEXT: store i8* bitcast (void (i8*, i8*)* @.red_init. to i8*), i8** [[TMP30]], align 8
|
||||
// CHECK2-NEXT: [[TMP31:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 4
|
||||
// CHECK2-NEXT: store i8* null, i8** [[TMP31]], align 8
|
||||
// CHECK2-NEXT: [[TMP32:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 5
|
||||
// CHECK2-NEXT: store i8* bitcast (void (i8*, i8*)* @.red_comb. to i8*), i8** [[TMP32]], align 8
|
||||
// CHECK2-NEXT: [[TMP33:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 6
|
||||
// CHECK2-NEXT: [[TMP34:%.*]] = bitcast i32* [[TMP33]] to i8*
|
||||
// CHECK2-NEXT: call void @llvm.memset.p0i8.i64(i8* align 8 [[TMP34]], i8 0, i64 4, i1 false)
|
||||
// CHECK2-NEXT: [[DOTRD_INPUT_GEP_5:%.*]] = getelementptr inbounds [2 x %struct.kmp_taskred_input_t], [2 x %struct.kmp_taskred_input_t]* [[DOTRD_INPUT_]], i64 0, i64 1
|
||||
// CHECK2-NEXT: [[TMP35:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_5]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP36:%.*]] = load i8**, i8*** [[TMP3]], align 8
|
||||
// CHECK2-NEXT: [[ARRAYIDX6:%.*]] = getelementptr inbounds i8*, i8** [[TMP36]], i64 0
|
||||
// CHECK2-NEXT: [[TMP37:%.*]] = load i8*, i8** [[ARRAYIDX6]], align 8
|
||||
// CHECK2-NEXT: [[ARRAYIDX7:%.*]] = getelementptr inbounds i8, i8* [[TMP37]], i64 0
|
||||
// CHECK2-NEXT: [[TMP38:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK2-NEXT: [[TMP39:%.*]] = sext i32 [[TMP38]] to i64
|
||||
// CHECK2-NEXT: [[LB_ADD_LEN8:%.*]] = add nsw i64 -1, [[TMP39]]
|
||||
// CHECK2-NEXT: [[TMP40:%.*]] = load i8**, i8*** [[TMP3]], align 8
|
||||
// CHECK2-NEXT: [[ARRAYIDX9:%.*]] = getelementptr inbounds i8*, i8** [[TMP40]], i64 9
|
||||
// CHECK2-NEXT: [[TMP41:%.*]] = load i8*, i8** [[ARRAYIDX9]], align 8
|
||||
// CHECK2-NEXT: [[ARRAYIDX10:%.*]] = getelementptr inbounds i8, i8* [[TMP41]], i64 [[LB_ADD_LEN8]]
|
||||
// CHECK2-NEXT: store i8* [[VLA]], i8** [[TMP35]], align 8
|
||||
// CHECK2-NEXT: [[TMP42:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_5]], i32 0, i32 1
|
||||
// CHECK2-NEXT: store i8* [[ARRAYIDX7]], i8** [[TMP42]], align 8
|
||||
// CHECK2-NEXT: [[TMP43:%.*]] = ptrtoint i8* [[ARRAYIDX10]] to i64
|
||||
// CHECK2-NEXT: [[TMP44:%.*]] = ptrtoint i8* [[ARRAYIDX7]] to i64
|
||||
// CHECK2-NEXT: [[TMP45:%.*]] = sub i64 [[TMP43]], [[TMP44]]
|
||||
// CHECK2-NEXT: [[TMP46:%.*]] = sdiv exact i64 [[TMP45]], ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64)
|
||||
// CHECK2-NEXT: [[TMP47:%.*]] = add nuw i64 [[TMP46]], 1
|
||||
// CHECK2-NEXT: [[TMP48:%.*]] = mul nuw i64 [[TMP47]], ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64)
|
||||
// CHECK2-NEXT: [[TMP49:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_5]], i32 0, i32 2
|
||||
// CHECK2-NEXT: store i64 [[TMP48]], i64* [[TMP49]], align 8
|
||||
// CHECK2-NEXT: [[TMP50:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_5]], i32 0, i32 3
|
||||
// CHECK2-NEXT: store i8* bitcast (void (i8*, i8*)* @.red_init..1 to i8*), i8** [[TMP50]], align 8
|
||||
// CHECK2-NEXT: [[TMP51:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_5]], i32 0, i32 4
|
||||
// CHECK2-NEXT: store i8* null, i8** [[TMP51]], align 8
|
||||
// CHECK2-NEXT: [[TMP52:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_5]], i32 0, i32 5
|
||||
// CHECK2-NEXT: store i8* bitcast (void (i8*, i8*)* @.red_comb..2 to i8*), i8** [[TMP52]], align 8
|
||||
// CHECK2-NEXT: [[TMP53:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_5]], i32 0, i32 6
|
||||
// CHECK2-NEXT: store i32 1, i32* [[TMP53]], align 8
|
||||
// CHECK2-NEXT: [[TMP54:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP55:%.*]] = load i32, i32* [[TMP54]], align 4
|
||||
// CHECK2-NEXT: [[TMP56:%.*]] = bitcast [2 x %struct.kmp_taskred_input_t]* [[DOTRD_INPUT_]] to i8*
|
||||
// CHECK2-NEXT: [[TMP57:%.*]] = call i8* @__kmpc_taskred_modifier_init(%struct.ident_t* @[[GLOB1]], i32 [[TMP55]], i32 0, i32 2, i8* [[TMP56]])
|
||||
// CHECK2-NEXT: store i8* [[TMP57]], i8** [[DOTTASK_RED_]], align 8
|
||||
// CHECK2-NEXT: [[TMP58:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[AGG_CAPTURED]], i32 0, i32 0
|
||||
// CHECK2-NEXT: store i8** [[DOTTASK_RED_]], i8*** [[TMP58]], align 8
|
||||
// CHECK2-NEXT: [[TMP59:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[AGG_CAPTURED]], i32 0, i32 1
|
||||
// CHECK2-NEXT: store i32* [[ARGC]], i32** [[TMP59]], align 8
|
||||
// CHECK2-NEXT: [[TMP60:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[AGG_CAPTURED]], i32 0, i32 2
|
||||
// CHECK2-NEXT: [[TMP61:%.*]] = load i8**, i8*** [[TMP]], align 8
|
||||
// CHECK2-NEXT: store i8** [[TMP61]], i8*** [[TMP60]], align 8
|
||||
// CHECK2-NEXT: [[TMP62:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP63:%.*]] = load i32, i32* [[TMP62]], align 4
|
||||
// CHECK2-NEXT: [[TMP64:%.*]] = call i8* @__kmpc_omp_task_alloc(%struct.ident_t* @[[GLOB1]], i32 [[TMP63]], i32 1, i64 48, i64 24, i32 (i32, i8*)* bitcast (i32 (i32, %struct.kmp_task_t_with_privates*)* @.omp_task_entry. to i32 (i32, i8*)*))
|
||||
// CHECK2-NEXT: [[TMP65:%.*]] = bitcast i8* [[TMP64]] to %struct.kmp_task_t_with_privates*
|
||||
// CHECK2-NEXT: [[TMP66:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES:%.*]], %struct.kmp_task_t_with_privates* [[TMP65]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP67:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T:%.*]], %struct.kmp_task_t* [[TMP66]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP68:%.*]] = load i8*, i8** [[TMP67]], align 8
|
||||
// CHECK2-NEXT: [[TMP69:%.*]] = bitcast %struct.anon.0* [[AGG_CAPTURED]] to i8*
|
||||
// CHECK2-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 [[TMP68]], i8* align 8 [[TMP69]], i64 24, i1 false)
|
||||
// CHECK2-NEXT: [[TMP70:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES]], %struct.kmp_task_t_with_privates* [[TMP65]], i32 0, i32 1
|
||||
// CHECK2-NEXT: [[TMP71:%.*]] = getelementptr inbounds [[STRUCT__KMP_PRIVATES_T:%.*]], %struct..kmp_privates.t* [[TMP70]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP72:%.*]] = load i8*, i8** [[DOTTASK_RED_]], align 8
|
||||
// CHECK2-NEXT: store i8* [[TMP72]], i8** [[TMP71]], align 8
|
||||
// CHECK2-NEXT: [[TMP22:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T:%.*]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP23:%.*]] = bitcast i32* [[ARGC1]] to i8*
|
||||
// CHECK2-NEXT: store i8* [[TMP23]], i8** [[TMP22]], align 8
|
||||
// CHECK2-NEXT: [[TMP24:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 1
|
||||
// CHECK2-NEXT: [[TMP25:%.*]] = bitcast i32* [[TMP0]] to i8*
|
||||
// CHECK2-NEXT: store i8* [[TMP25]], i8** [[TMP24]], align 8
|
||||
// CHECK2-NEXT: [[TMP26:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 2
|
||||
// CHECK2-NEXT: store i64 4, i64* [[TMP26]], align 8
|
||||
// CHECK2-NEXT: [[TMP27:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 3
|
||||
// CHECK2-NEXT: store i8* bitcast (void (i8*, i8*)* @.red_init. to i8*), i8** [[TMP27]], align 8
|
||||
// CHECK2-NEXT: [[TMP28:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 4
|
||||
// CHECK2-NEXT: store i8* null, i8** [[TMP28]], align 8
|
||||
// CHECK2-NEXT: [[TMP29:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 5
|
||||
// CHECK2-NEXT: store i8* bitcast (void (i8*, i8*)* @.red_comb. to i8*), i8** [[TMP29]], align 8
|
||||
// CHECK2-NEXT: [[TMP30:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_]], i32 0, i32 6
|
||||
// CHECK2-NEXT: [[TMP31:%.*]] = bitcast i32* [[TMP30]] to i8*
|
||||
// CHECK2-NEXT: call void @llvm.memset.p0i8.i64(i8* align 8 [[TMP31]], i8 0, i64 4, i1 false)
|
||||
// CHECK2-NEXT: [[DOTRD_INPUT_GEP_6:%.*]] = getelementptr inbounds [2 x %struct.kmp_taskred_input_t], [2 x %struct.kmp_taskred_input_t]* [[DOTRD_INPUT_]], i64 0, i64 1
|
||||
// CHECK2-NEXT: [[TMP32:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_6]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP33:%.*]] = load i8**, i8*** [[ARGV_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[ARRAYIDX7:%.*]] = getelementptr inbounds i8*, i8** [[TMP33]], i64 0
|
||||
// CHECK2-NEXT: [[TMP34:%.*]] = load i8*, i8** [[ARRAYIDX7]], align 8
|
||||
// CHECK2-NEXT: [[ARRAYIDX8:%.*]] = getelementptr inbounds i8, i8* [[TMP34]], i64 0
|
||||
// CHECK2-NEXT: [[TMP35:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK2-NEXT: [[TMP36:%.*]] = sext i32 [[TMP35]] to i64
|
||||
// CHECK2-NEXT: [[LB_ADD_LEN9:%.*]] = add nsw i64 -1, [[TMP36]]
|
||||
// CHECK2-NEXT: [[TMP37:%.*]] = load i8**, i8*** [[ARGV_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[ARRAYIDX10:%.*]] = getelementptr inbounds i8*, i8** [[TMP37]], i64 9
|
||||
// CHECK2-NEXT: [[TMP38:%.*]] = load i8*, i8** [[ARRAYIDX10]], align 8
|
||||
// CHECK2-NEXT: [[ARRAYIDX11:%.*]] = getelementptr inbounds i8, i8* [[TMP38]], i64 [[LB_ADD_LEN9]]
|
||||
// CHECK2-NEXT: store i8* [[VLA]], i8** [[TMP32]], align 8
|
||||
// CHECK2-NEXT: [[TMP39:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_6]], i32 0, i32 1
|
||||
// CHECK2-NEXT: store i8* [[ARRAYIDX8]], i8** [[TMP39]], align 8
|
||||
// CHECK2-NEXT: [[TMP40:%.*]] = ptrtoint i8* [[ARRAYIDX11]] to i64
|
||||
// CHECK2-NEXT: [[TMP41:%.*]] = ptrtoint i8* [[ARRAYIDX8]] to i64
|
||||
// CHECK2-NEXT: [[TMP42:%.*]] = sub i64 [[TMP40]], [[TMP41]]
|
||||
// CHECK2-NEXT: [[TMP43:%.*]] = sdiv exact i64 [[TMP42]], ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64)
|
||||
// CHECK2-NEXT: [[TMP44:%.*]] = add nuw i64 [[TMP43]], 1
|
||||
// CHECK2-NEXT: [[TMP45:%.*]] = mul nuw i64 [[TMP44]], ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64)
|
||||
// CHECK2-NEXT: [[TMP46:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_6]], i32 0, i32 2
|
||||
// CHECK2-NEXT: store i64 [[TMP45]], i64* [[TMP46]], align 8
|
||||
// CHECK2-NEXT: [[TMP47:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_6]], i32 0, i32 3
|
||||
// CHECK2-NEXT: store i8* bitcast (void (i8*, i8*)* @.red_init..1 to i8*), i8** [[TMP47]], align 8
|
||||
// CHECK2-NEXT: [[TMP48:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_6]], i32 0, i32 4
|
||||
// CHECK2-NEXT: store i8* null, i8** [[TMP48]], align 8
|
||||
// CHECK2-NEXT: [[TMP49:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_6]], i32 0, i32 5
|
||||
// CHECK2-NEXT: store i8* bitcast (void (i8*, i8*)* @.red_comb..2 to i8*), i8** [[TMP49]], align 8
|
||||
// CHECK2-NEXT: [[TMP50:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASKRED_INPUT_T]], %struct.kmp_taskred_input_t* [[DOTRD_INPUT_GEP_6]], i32 0, i32 6
|
||||
// CHECK2-NEXT: store i32 1, i32* [[TMP50]], align 8
|
||||
// CHECK2-NEXT: [[TMP51:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP52:%.*]] = load i32, i32* [[TMP51]], align 4
|
||||
// CHECK2-NEXT: [[TMP53:%.*]] = bitcast [2 x %struct.kmp_taskred_input_t]* [[DOTRD_INPUT_]] to i8*
|
||||
// CHECK2-NEXT: [[TMP54:%.*]] = call i8* @__kmpc_taskred_modifier_init(%struct.ident_t* @[[GLOB1]], i32 [[TMP52]], i32 0, i32 2, i8* [[TMP53]])
|
||||
// CHECK2-NEXT: store i8* [[TMP54]], i8** [[DOTTASK_RED_]], align 8
|
||||
// CHECK2-NEXT: [[TMP55:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[AGG_CAPTURED]], i32 0, i32 0
|
||||
// CHECK2-NEXT: store i8** [[DOTTASK_RED_]], i8*** [[TMP55]], align 8
|
||||
// CHECK2-NEXT: [[TMP56:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[AGG_CAPTURED]], i32 0, i32 1
|
||||
// CHECK2-NEXT: store i32* [[ARGC1]], i32** [[TMP56]], align 8
|
||||
// CHECK2-NEXT: [[TMP57:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[AGG_CAPTURED]], i32 0, i32 2
|
||||
// CHECK2-NEXT: [[TMP58:%.*]] = load i8**, i8*** [[TMP]], align 8
|
||||
// CHECK2-NEXT: store i8** [[TMP58]], i8*** [[TMP57]], align 8
|
||||
// CHECK2-NEXT: [[TMP59:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP60:%.*]] = load i32, i32* [[TMP59]], align 4
|
||||
// CHECK2-NEXT: [[TMP61:%.*]] = call i8* @__kmpc_omp_task_alloc(%struct.ident_t* @[[GLOB1]], i32 [[TMP60]], i32 1, i64 48, i64 24, i32 (i32, i8*)* bitcast (i32 (i32, %struct.kmp_task_t_with_privates*)* @.omp_task_entry. to i32 (i32, i8*)*))
|
||||
// CHECK2-NEXT: [[TMP62:%.*]] = bitcast i8* [[TMP61]] to %struct.kmp_task_t_with_privates*
|
||||
// CHECK2-NEXT: [[TMP63:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES:%.*]], %struct.kmp_task_t_with_privates* [[TMP62]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP64:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T:%.*]], %struct.kmp_task_t* [[TMP63]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP65:%.*]] = load i8*, i8** [[TMP64]], align 8
|
||||
// CHECK2-NEXT: [[TMP66:%.*]] = bitcast %struct.anon* [[AGG_CAPTURED]] to i8*
|
||||
// CHECK2-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 [[TMP65]], i8* align 8 [[TMP66]], i64 24, i1 false)
|
||||
// CHECK2-NEXT: [[TMP67:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES]], %struct.kmp_task_t_with_privates* [[TMP62]], i32 0, i32 1
|
||||
// CHECK2-NEXT: [[TMP68:%.*]] = getelementptr inbounds [[STRUCT__KMP_PRIVATES_T:%.*]], %struct..kmp_privates.t* [[TMP67]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP69:%.*]] = load i8*, i8** [[DOTTASK_RED_]], align 8
|
||||
// CHECK2-NEXT: store i8* [[TMP69]], i8** [[TMP68]], align 8
|
||||
// CHECK2-NEXT: [[TMP70:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP71:%.*]] = load i32, i32* [[TMP70]], align 4
|
||||
// CHECK2-NEXT: [[TMP72:%.*]] = call i32 @__kmpc_omp_task(%struct.ident_t* @[[GLOB1]], i32 [[TMP71]], i8* [[TMP61]])
|
||||
// CHECK2-NEXT: [[TMP73:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP74:%.*]] = load i32, i32* [[TMP73]], align 4
|
||||
// CHECK2-NEXT: [[TMP75:%.*]] = call i32 @__kmpc_omp_task(%struct.ident_t* @[[GLOB1]], i32 [[TMP74]], i8* [[TMP64]])
|
||||
// CHECK2-NEXT: [[TMP76:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP77:%.*]] = load i32, i32* [[TMP76]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_task_reduction_modifier_fini(%struct.ident_t* @[[GLOB1]], i32 [[TMP77]], i32 0)
|
||||
// CHECK2-NEXT: [[TMP78:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOMP_REDUCTION_RED_LIST]], i64 0, i64 0
|
||||
// CHECK2-NEXT: [[TMP79:%.*]] = bitcast i32* [[ARGC]] to i8*
|
||||
// CHECK2-NEXT: call void @__kmpc_task_reduction_modifier_fini(%struct.ident_t* @[[GLOB1]], i32 [[TMP74]], i32 0)
|
||||
// CHECK2-NEXT: [[TMP75:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOMP_REDUCTION_RED_LIST]], i64 0, i64 0
|
||||
// CHECK2-NEXT: [[TMP76:%.*]] = bitcast i32* [[ARGC1]] to i8*
|
||||
// CHECK2-NEXT: store i8* [[TMP76]], i8** [[TMP75]], align 8
|
||||
// CHECK2-NEXT: [[TMP77:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOMP_REDUCTION_RED_LIST]], i64 0, i64 1
|
||||
// CHECK2-NEXT: store i8* [[VLA]], i8** [[TMP77]], align 8
|
||||
// CHECK2-NEXT: [[TMP78:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOMP_REDUCTION_RED_LIST]], i64 0, i64 2
|
||||
// CHECK2-NEXT: [[TMP79:%.*]] = inttoptr i64 [[TMP11]] to i8*
|
||||
// CHECK2-NEXT: store i8* [[TMP79]], i8** [[TMP78]], align 8
|
||||
// CHECK2-NEXT: [[TMP80:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOMP_REDUCTION_RED_LIST]], i64 0, i64 1
|
||||
// CHECK2-NEXT: store i8* [[VLA]], i8** [[TMP80]], align 8
|
||||
// CHECK2-NEXT: [[TMP81:%.*]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[DOTOMP_REDUCTION_RED_LIST]], i64 0, i64 2
|
||||
// CHECK2-NEXT: [[TMP82:%.*]] = inttoptr i64 [[TMP14]] to i8*
|
||||
// CHECK2-NEXT: store i8* [[TMP82]], i8** [[TMP81]], align 8
|
||||
// CHECK2-NEXT: [[TMP83:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP84:%.*]] = load i32, i32* [[TMP83]], align 4
|
||||
// CHECK2-NEXT: [[TMP85:%.*]] = bitcast [3 x i8*]* [[DOTOMP_REDUCTION_RED_LIST]] to i8*
|
||||
// CHECK2-NEXT: [[TMP86:%.*]] = call i32 @__kmpc_reduce_nowait(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 [[TMP84]], i32 2, i64 24, i8* [[TMP85]], void (i8*, i8*)* @.omp.reduction.reduction_func, [8 x i32]* @.gomp_critical_user_.reduction.var)
|
||||
// CHECK2-NEXT: switch i32 [[TMP86]], label [[DOTOMP_REDUCTION_DEFAULT:%.*]] [
|
||||
// CHECK2-NEXT: [[TMP80:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP81:%.*]] = load i32, i32* [[TMP80]], align 4
|
||||
// CHECK2-NEXT: [[TMP82:%.*]] = bitcast [3 x i8*]* [[DOTOMP_REDUCTION_RED_LIST]] to i8*
|
||||
// CHECK2-NEXT: [[TMP83:%.*]] = call i32 @__kmpc_reduce_nowait(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 [[TMP81]], i32 2, i64 24, i8* [[TMP82]], void (i8*, i8*)* @.omp.reduction.reduction_func, [8 x i32]* @.gomp_critical_user_.reduction.var)
|
||||
// CHECK2-NEXT: switch i32 [[TMP83]], label [[DOTOMP_REDUCTION_DEFAULT:%.*]] [
|
||||
// CHECK2-NEXT: i32 1, label [[DOTOMP_REDUCTION_CASE1:%.*]]
|
||||
// CHECK2-NEXT: i32 2, label [[DOTOMP_REDUCTION_CASE2:%.*]]
|
||||
// CHECK2-NEXT: ]
|
||||
// CHECK2: .omp.reduction.case1:
|
||||
// CHECK2-NEXT: [[TMP87:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK2-NEXT: [[TMP88:%.*]] = load i32, i32* [[ARGC]], align 4
|
||||
// CHECK2-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP87]], [[TMP88]]
|
||||
// CHECK2-NEXT: store i32 [[ADD]], i32* [[TMP2]], align 4
|
||||
// CHECK2-NEXT: [[TMP89:%.*]] = getelementptr i8, i8* [[ARRAYIDX1]], i64 [[TMP14]]
|
||||
// CHECK2-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq i8* [[ARRAYIDX1]], [[TMP89]]
|
||||
// CHECK2-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE17:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]]
|
||||
// CHECK2-NEXT: [[TMP84:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK2-NEXT: [[TMP85:%.*]] = load i32, i32* [[ARGC1]], align 4
|
||||
// CHECK2-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP84]], [[TMP85]]
|
||||
// CHECK2-NEXT: store i32 [[ADD]], i32* [[TMP0]], align 4
|
||||
// CHECK2-NEXT: [[TMP86:%.*]] = getelementptr i8, i8* [[ARRAYIDX2]], i64 [[TMP11]]
|
||||
// CHECK2-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq i8* [[ARRAYIDX2]], [[TMP86]]
|
||||
// CHECK2-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE18:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]]
|
||||
// CHECK2: omp.arraycpy.body:
|
||||
// CHECK2-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi i8* [ [[VLA]], [[DOTOMP_REDUCTION_CASE1]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
|
||||
// CHECK2-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST11:%.*]] = phi i8* [ [[ARRAYIDX1]], [[DOTOMP_REDUCTION_CASE1]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT15:%.*]], [[OMP_ARRAYCPY_BODY]] ]
|
||||
// CHECK2-NEXT: [[TMP90:%.*]] = load i8, i8* [[OMP_ARRAYCPY_DESTELEMENTPAST11]], align 1
|
||||
// CHECK2-NEXT: [[CONV:%.*]] = sext i8 [[TMP90]] to i32
|
||||
// CHECK2-NEXT: [[TMP91:%.*]] = load i8, i8* [[OMP_ARRAYCPY_SRCELEMENTPAST]], align 1
|
||||
// CHECK2-NEXT: [[CONV12:%.*]] = sext i8 [[TMP91]] to i32
|
||||
// CHECK2-NEXT: [[ADD13:%.*]] = add nsw i32 [[CONV]], [[CONV12]]
|
||||
// CHECK2-NEXT: [[CONV14:%.*]] = trunc i32 [[ADD13]] to i8
|
||||
// CHECK2-NEXT: store i8 [[CONV14]], i8* [[OMP_ARRAYCPY_DESTELEMENTPAST11]], align 1
|
||||
// CHECK2-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT15]] = getelementptr i8, i8* [[OMP_ARRAYCPY_DESTELEMENTPAST11]], i32 1
|
||||
// CHECK2-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST12:%.*]] = phi i8* [ [[ARRAYIDX2]], [[DOTOMP_REDUCTION_CASE1]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT16:%.*]], [[OMP_ARRAYCPY_BODY]] ]
|
||||
// CHECK2-NEXT: [[TMP87:%.*]] = load i8, i8* [[OMP_ARRAYCPY_DESTELEMENTPAST12]], align 1
|
||||
// CHECK2-NEXT: [[CONV:%.*]] = sext i8 [[TMP87]] to i32
|
||||
// CHECK2-NEXT: [[TMP88:%.*]] = load i8, i8* [[OMP_ARRAYCPY_SRCELEMENTPAST]], align 1
|
||||
// CHECK2-NEXT: [[CONV13:%.*]] = sext i8 [[TMP88]] to i32
|
||||
// CHECK2-NEXT: [[ADD14:%.*]] = add nsw i32 [[CONV]], [[CONV13]]
|
||||
// CHECK2-NEXT: [[CONV15:%.*]] = trunc i32 [[ADD14]] to i8
|
||||
// CHECK2-NEXT: store i8 [[CONV15]], i8* [[OMP_ARRAYCPY_DESTELEMENTPAST12]], align 1
|
||||
// CHECK2-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT16]] = getelementptr i8, i8* [[OMP_ARRAYCPY_DESTELEMENTPAST12]], i32 1
|
||||
// CHECK2-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr i8, i8* [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1
|
||||
// CHECK2-NEXT: [[OMP_ARRAYCPY_DONE16:%.*]] = icmp eq i8* [[OMP_ARRAYCPY_DEST_ELEMENT15]], [[TMP89]]
|
||||
// CHECK2-NEXT: br i1 [[OMP_ARRAYCPY_DONE16]], label [[OMP_ARRAYCPY_DONE17]], label [[OMP_ARRAYCPY_BODY]]
|
||||
// CHECK2: omp.arraycpy.done17:
|
||||
// CHECK2-NEXT: call void @__kmpc_end_reduce_nowait(%struct.ident_t* @[[GLOB2]], i32 [[TMP84]], [8 x i32]* @.gomp_critical_user_.reduction.var)
|
||||
// CHECK2-NEXT: [[OMP_ARRAYCPY_DONE17:%.*]] = icmp eq i8* [[OMP_ARRAYCPY_DEST_ELEMENT16]], [[TMP86]]
|
||||
// CHECK2-NEXT: br i1 [[OMP_ARRAYCPY_DONE17]], label [[OMP_ARRAYCPY_DONE18]], label [[OMP_ARRAYCPY_BODY]]
|
||||
// CHECK2: omp.arraycpy.done18:
|
||||
// CHECK2-NEXT: call void @__kmpc_end_reduce_nowait(%struct.ident_t* @[[GLOB2]], i32 [[TMP81]], [8 x i32]* @.gomp_critical_user_.reduction.var)
|
||||
// CHECK2-NEXT: br label [[DOTOMP_REDUCTION_DEFAULT]]
|
||||
// CHECK2: .omp.reduction.case2:
|
||||
// CHECK2-NEXT: [[TMP92:%.*]] = load i32, i32* [[ARGC]], align 4
|
||||
// CHECK2-NEXT: [[TMP93:%.*]] = atomicrmw add i32* [[TMP2]], i32 [[TMP92]] monotonic, align 4
|
||||
// CHECK2-NEXT: [[TMP94:%.*]] = getelementptr i8, i8* [[ARRAYIDX1]], i64 [[TMP14]]
|
||||
// CHECK2-NEXT: [[OMP_ARRAYCPY_ISEMPTY18:%.*]] = icmp eq i8* [[ARRAYIDX1]], [[TMP94]]
|
||||
// CHECK2-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY18]], label [[OMP_ARRAYCPY_DONE31:%.*]], label [[OMP_ARRAYCPY_BODY19:%.*]]
|
||||
// CHECK2: omp.arraycpy.body19:
|
||||
// CHECK2-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST20:%.*]] = phi i8* [ [[VLA]], [[DOTOMP_REDUCTION_CASE2]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT29:%.*]], [[ATOMIC_EXIT:%.*]] ]
|
||||
// CHECK2-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST21:%.*]] = phi i8* [ [[ARRAYIDX1]], [[DOTOMP_REDUCTION_CASE2]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT28:%.*]], [[ATOMIC_EXIT]] ]
|
||||
// CHECK2-NEXT: [[TMP95:%.*]] = load i8, i8* [[OMP_ARRAYCPY_SRCELEMENTPAST20]], align 1
|
||||
// CHECK2-NEXT: [[CONV22:%.*]] = sext i8 [[TMP95]] to i32
|
||||
// CHECK2-NEXT: [[ATOMIC_LOAD:%.*]] = load atomic i8, i8* [[OMP_ARRAYCPY_DESTELEMENTPAST21]] monotonic, align 1
|
||||
// CHECK2-NEXT: [[TMP89:%.*]] = load i32, i32* [[ARGC1]], align 4
|
||||
// CHECK2-NEXT: [[TMP90:%.*]] = atomicrmw add i32* [[TMP0]], i32 [[TMP89]] monotonic, align 4
|
||||
// CHECK2-NEXT: [[TMP91:%.*]] = getelementptr i8, i8* [[ARRAYIDX2]], i64 [[TMP11]]
|
||||
// CHECK2-NEXT: [[OMP_ARRAYCPY_ISEMPTY19:%.*]] = icmp eq i8* [[ARRAYIDX2]], [[TMP91]]
|
||||
// CHECK2-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY19]], label [[OMP_ARRAYCPY_DONE32:%.*]], label [[OMP_ARRAYCPY_BODY20:%.*]]
|
||||
// CHECK2: omp.arraycpy.body20:
|
||||
// CHECK2-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST21:%.*]] = phi i8* [ [[VLA]], [[DOTOMP_REDUCTION_CASE2]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT30:%.*]], [[ATOMIC_EXIT:%.*]] ]
|
||||
// CHECK2-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST22:%.*]] = phi i8* [ [[ARRAYIDX2]], [[DOTOMP_REDUCTION_CASE2]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT29:%.*]], [[ATOMIC_EXIT]] ]
|
||||
// CHECK2-NEXT: [[TMP92:%.*]] = load i8, i8* [[OMP_ARRAYCPY_SRCELEMENTPAST21]], align 1
|
||||
// CHECK2-NEXT: [[CONV23:%.*]] = sext i8 [[TMP92]] to i32
|
||||
// CHECK2-NEXT: [[ATOMIC_LOAD:%.*]] = load atomic i8, i8* [[OMP_ARRAYCPY_DESTELEMENTPAST22]] monotonic, align 1
|
||||
// CHECK2-NEXT: br label [[ATOMIC_CONT:%.*]]
|
||||
// CHECK2: atomic_cont:
|
||||
// CHECK2-NEXT: [[TMP96:%.*]] = phi i8 [ [[ATOMIC_LOAD]], [[OMP_ARRAYCPY_BODY19]] ], [ [[TMP101:%.*]], [[ATOMIC_CONT]] ]
|
||||
// CHECK2-NEXT: store i8 [[TMP96]], i8* [[_TMP23]], align 1
|
||||
// CHECK2-NEXT: [[TMP97:%.*]] = load i8, i8* [[_TMP23]], align 1
|
||||
// CHECK2-NEXT: [[CONV24:%.*]] = sext i8 [[TMP97]] to i32
|
||||
// CHECK2-NEXT: [[TMP98:%.*]] = load i8, i8* [[OMP_ARRAYCPY_SRCELEMENTPAST20]], align 1
|
||||
// CHECK2-NEXT: [[CONV25:%.*]] = sext i8 [[TMP98]] to i32
|
||||
// CHECK2-NEXT: [[ADD26:%.*]] = add nsw i32 [[CONV24]], [[CONV25]]
|
||||
// CHECK2-NEXT: [[CONV27:%.*]] = trunc i32 [[ADD26]] to i8
|
||||
// CHECK2-NEXT: store i8 [[CONV27]], i8* [[ATOMIC_TEMP]], align 1
|
||||
// CHECK2-NEXT: [[TMP99:%.*]] = load i8, i8* [[ATOMIC_TEMP]], align 1
|
||||
// CHECK2-NEXT: [[TMP100:%.*]] = cmpxchg i8* [[OMP_ARRAYCPY_DESTELEMENTPAST21]], i8 [[TMP96]], i8 [[TMP99]] monotonic monotonic, align 1
|
||||
// CHECK2-NEXT: [[TMP101]] = extractvalue { i8, i1 } [[TMP100]], 0
|
||||
// CHECK2-NEXT: [[TMP102:%.*]] = extractvalue { i8, i1 } [[TMP100]], 1
|
||||
// CHECK2-NEXT: br i1 [[TMP102]], label [[ATOMIC_EXIT]], label [[ATOMIC_CONT]]
|
||||
// CHECK2-NEXT: [[TMP93:%.*]] = phi i8 [ [[ATOMIC_LOAD]], [[OMP_ARRAYCPY_BODY20]] ], [ [[TMP98:%.*]], [[ATOMIC_CONT]] ]
|
||||
// CHECK2-NEXT: store i8 [[TMP93]], i8* [[_TMP24]], align 1
|
||||
// CHECK2-NEXT: [[TMP94:%.*]] = load i8, i8* [[_TMP24]], align 1
|
||||
// CHECK2-NEXT: [[CONV25:%.*]] = sext i8 [[TMP94]] to i32
|
||||
// CHECK2-NEXT: [[TMP95:%.*]] = load i8, i8* [[OMP_ARRAYCPY_SRCELEMENTPAST21]], align 1
|
||||
// CHECK2-NEXT: [[CONV26:%.*]] = sext i8 [[TMP95]] to i32
|
||||
// CHECK2-NEXT: [[ADD27:%.*]] = add nsw i32 [[CONV25]], [[CONV26]]
|
||||
// CHECK2-NEXT: [[CONV28:%.*]] = trunc i32 [[ADD27]] to i8
|
||||
// CHECK2-NEXT: store i8 [[CONV28]], i8* [[ATOMIC_TEMP]], align 1
|
||||
// CHECK2-NEXT: [[TMP96:%.*]] = load i8, i8* [[ATOMIC_TEMP]], align 1
|
||||
// CHECK2-NEXT: [[TMP97:%.*]] = cmpxchg i8* [[OMP_ARRAYCPY_DESTELEMENTPAST22]], i8 [[TMP93]], i8 [[TMP96]] monotonic monotonic, align 1
|
||||
// CHECK2-NEXT: [[TMP98]] = extractvalue { i8, i1 } [[TMP97]], 0
|
||||
// CHECK2-NEXT: [[TMP99:%.*]] = extractvalue { i8, i1 } [[TMP97]], 1
|
||||
// CHECK2-NEXT: br i1 [[TMP99]], label [[ATOMIC_EXIT]], label [[ATOMIC_CONT]]
|
||||
// CHECK2: atomic_exit:
|
||||
// CHECK2-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT28]] = getelementptr i8, i8* [[OMP_ARRAYCPY_DESTELEMENTPAST21]], i32 1
|
||||
// CHECK2-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT29]] = getelementptr i8, i8* [[OMP_ARRAYCPY_SRCELEMENTPAST20]], i32 1
|
||||
// CHECK2-NEXT: [[OMP_ARRAYCPY_DONE30:%.*]] = icmp eq i8* [[OMP_ARRAYCPY_DEST_ELEMENT28]], [[TMP94]]
|
||||
// CHECK2-NEXT: br i1 [[OMP_ARRAYCPY_DONE30]], label [[OMP_ARRAYCPY_DONE31]], label [[OMP_ARRAYCPY_BODY19]]
|
||||
// CHECK2: omp.arraycpy.done31:
|
||||
// CHECK2-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT29]] = getelementptr i8, i8* [[OMP_ARRAYCPY_DESTELEMENTPAST22]], i32 1
|
||||
// CHECK2-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT30]] = getelementptr i8, i8* [[OMP_ARRAYCPY_SRCELEMENTPAST21]], i32 1
|
||||
// CHECK2-NEXT: [[OMP_ARRAYCPY_DONE31:%.*]] = icmp eq i8* [[OMP_ARRAYCPY_DEST_ELEMENT29]], [[TMP91]]
|
||||
// CHECK2-NEXT: br i1 [[OMP_ARRAYCPY_DONE31]], label [[OMP_ARRAYCPY_DONE32]], label [[OMP_ARRAYCPY_BODY20]]
|
||||
// CHECK2: omp.arraycpy.done32:
|
||||
// CHECK2-NEXT: br label [[DOTOMP_REDUCTION_DEFAULT]]
|
||||
// CHECK2: .omp.reduction.default:
|
||||
// CHECK2-NEXT: [[TMP103:%.*]] = load i8*, i8** [[SAVED_STACK]], align 8
|
||||
// CHECK2-NEXT: call void @llvm.stackrestore(i8* [[TMP103]])
|
||||
// CHECK2-NEXT: [[TMP100:%.*]] = load i8*, i8** [[SAVED_STACK]], align 8
|
||||
// CHECK2-NEXT: call void @llvm.stackrestore(i8* [[TMP100]])
|
||||
// CHECK2-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -862,7 +850,7 @@ int main(int argc, char **argv) {
|
|||
// CHECK2-NEXT: [[DOTPRIVATES__ADDR_I:%.*]] = alloca i8*, align 8
|
||||
// CHECK2-NEXT: [[DOTCOPY_FN__ADDR_I:%.*]] = alloca void (i8*, ...)*, align 8
|
||||
// CHECK2-NEXT: [[DOTTASK_T__ADDR_I:%.*]] = alloca i8*, align 8
|
||||
// CHECK2-NEXT: [[__CONTEXT_ADDR_I:%.*]] = alloca %struct.anon.0*, align 8
|
||||
// CHECK2-NEXT: [[__CONTEXT_ADDR_I:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK2-NEXT: [[DOTFIRSTPRIV_PTR_ADDR_I:%.*]] = alloca i8**, align 8
|
||||
// CHECK2-NEXT: [[TMP_I:%.*]] = alloca i8**, align 8
|
||||
// CHECK2-NEXT: [[TMP4_I:%.*]] = alloca i8*, align 8
|
||||
|
@ -876,7 +864,7 @@ int main(int argc, char **argv) {
|
|||
// CHECK2-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T:%.*]], %struct.kmp_task_t* [[TMP4]], i32 0, i32 2
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP4]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = load i8*, i8** [[TMP6]], align 8
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = bitcast i8* [[TMP7]] to %struct.anon.0*
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = bitcast i8* [[TMP7]] to %struct.anon*
|
||||
// CHECK2-NEXT: [[TMP9:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES]], %struct.kmp_task_t_with_privates* [[TMP3]], i32 0, i32 1
|
||||
// CHECK2-NEXT: [[TMP10:%.*]] = bitcast %struct..kmp_privates.t* [[TMP9]] to i8*
|
||||
// CHECK2-NEXT: [[TMP11:%.*]] = bitcast %struct.kmp_task_t_with_privates* [[TMP3]] to i8*
|
||||
|
@ -889,29 +877,29 @@ int main(int argc, char **argv) {
|
|||
// CHECK2-NEXT: store i8* [[TMP10]], i8** [[DOTPRIVATES__ADDR_I]], align 8, !noalias !12
|
||||
// CHECK2-NEXT: store void (i8*, ...)* bitcast (void (%struct..kmp_privates.t*, i8***)* @.omp_task_privates_map. to void (i8*, ...)*), void (i8*, ...)** [[DOTCOPY_FN__ADDR_I]], align 8, !noalias !12
|
||||
// CHECK2-NEXT: store i8* [[TMP11]], i8** [[DOTTASK_T__ADDR_I]], align 8, !noalias !12
|
||||
// CHECK2-NEXT: store %struct.anon.0* [[TMP8]], %struct.anon.0** [[__CONTEXT_ADDR_I]], align 8, !noalias !12
|
||||
// CHECK2-NEXT: [[TMP12:%.*]] = load %struct.anon.0*, %struct.anon.0** [[__CONTEXT_ADDR_I]], align 8, !noalias !12
|
||||
// CHECK2-NEXT: store %struct.anon* [[TMP8]], %struct.anon** [[__CONTEXT_ADDR_I]], align 8, !noalias !12
|
||||
// CHECK2-NEXT: [[TMP12:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR_I]], align 8, !noalias !12
|
||||
// CHECK2-NEXT: [[TMP13:%.*]] = load void (i8*, ...)*, void (i8*, ...)** [[DOTCOPY_FN__ADDR_I]], align 8, !noalias !12
|
||||
// CHECK2-NEXT: [[TMP14:%.*]] = load i8*, i8** [[DOTPRIVATES__ADDR_I]], align 8, !noalias !12
|
||||
// CHECK2-NEXT: [[TMP15:%.*]] = bitcast void (i8*, ...)* [[TMP13]] to void (i8*, i8***)*
|
||||
// CHECK2-NEXT: call void [[TMP15]](i8* [[TMP14]], i8*** [[DOTFIRSTPRIV_PTR_ADDR_I]]) #[[ATTR5:[0-9]+]]
|
||||
// CHECK2-NEXT: [[TMP16:%.*]] = load i8**, i8*** [[DOTFIRSTPRIV_PTR_ADDR_I]], align 8, !noalias !12
|
||||
// CHECK2-NEXT: [[TMP17:%.*]] = getelementptr inbounds [[STRUCT_ANON_0:%.*]], %struct.anon.0* [[TMP12]], i32 0, i32 1
|
||||
// CHECK2-NEXT: [[TMP17:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP12]], i32 0, i32 1
|
||||
// CHECK2-NEXT: [[TMP18:%.*]] = load i32*, i32** [[TMP17]], align 8
|
||||
// CHECK2-NEXT: [[TMP19:%.*]] = load i8*, i8** [[TMP16]], align 8
|
||||
// CHECK2-NEXT: [[TMP20:%.*]] = load i32, i32* [[DOTGLOBAL_TID__ADDR_I]], align 4, !noalias !12
|
||||
// CHECK2-NEXT: [[TMP21:%.*]] = bitcast i32* [[TMP18]] to i8*
|
||||
// CHECK2-NEXT: [[TMP22:%.*]] = call i8* @__kmpc_task_reduction_get_th_data(i32 [[TMP20]], i8* [[TMP19]], i8* [[TMP21]]) #[[ATTR5]]
|
||||
// CHECK2-NEXT: [[CONV_I:%.*]] = bitcast i8* [[TMP22]] to i32*
|
||||
// CHECK2-NEXT: [[TMP23:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[TMP12]], i32 0, i32 2
|
||||
// CHECK2-NEXT: [[TMP23:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP12]], i32 0, i32 2
|
||||
// CHECK2-NEXT: [[TMP24:%.*]] = load i8**, i8*** [[TMP23]], align 8
|
||||
// CHECK2-NEXT: [[TMP25:%.*]] = load i8*, i8** [[TMP24]], align 8
|
||||
// CHECK2-NEXT: [[TMP26:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[TMP12]], i32 0, i32 1
|
||||
// CHECK2-NEXT: [[TMP26:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP12]], i32 0, i32 1
|
||||
// CHECK2-NEXT: [[TMP27:%.*]] = load i32*, i32** [[TMP26]], align 8
|
||||
// CHECK2-NEXT: [[TMP28:%.*]] = load i32, i32* [[TMP27]], align 4
|
||||
// CHECK2-NEXT: [[TMP29:%.*]] = sext i32 [[TMP28]] to i64
|
||||
// CHECK2-NEXT: [[LB_ADD_LEN_I:%.*]] = add nsw i64 -1, [[TMP29]]
|
||||
// CHECK2-NEXT: [[TMP30:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[TMP12]], i32 0, i32 2
|
||||
// CHECK2-NEXT: [[TMP30:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP12]], i32 0, i32 2
|
||||
// CHECK2-NEXT: [[TMP31:%.*]] = load i8**, i8*** [[TMP30]], align 8
|
||||
// CHECK2-NEXT: [[ARRAYIDX2_I:%.*]] = getelementptr inbounds i8*, i8** [[TMP31]], i64 9
|
||||
// CHECK2-NEXT: [[TMP32:%.*]] = load i8*, i8** [[ARRAYIDX2_I]], align 8
|
||||
|
@ -925,7 +913,7 @@ int main(int argc, char **argv) {
|
|||
// CHECK2-NEXT: store i64 [[TMP37]], i64* @{{reduction_size[.].+[.]}}, align 8
|
||||
// CHECK2-NEXT: [[TMP39:%.*]] = load i8*, i8** [[TMP16]], align 8
|
||||
// CHECK2-NEXT: [[TMP40:%.*]] = call i8* @__kmpc_task_reduction_get_th_data(i32 [[TMP20]], i8* [[TMP39]], i8* [[TMP25]]) #[[ATTR5]]
|
||||
// CHECK2-NEXT: [[TMP41:%.*]] = getelementptr inbounds [[STRUCT_ANON_0]], %struct.anon.0* [[TMP12]], i32 0, i32 2
|
||||
// CHECK2-NEXT: [[TMP41:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP12]], i32 0, i32 2
|
||||
// CHECK2-NEXT: [[TMP42:%.*]] = load i8**, i8*** [[TMP41]], align 8
|
||||
// CHECK2-NEXT: [[TMP43:%.*]] = load i8*, i8** [[TMP42]], align 8
|
||||
// CHECK2-NEXT: [[TMP44:%.*]] = ptrtoint i8* [[TMP43]] to i64
|
||||
|
|
|
@ -57,19 +57,17 @@ int main() {
|
|||
// CHECK1-SAME: () #[[ATTR2:[0-9]+]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 1
|
||||
// CHECK1-NEXT: store i32 0, i32* [[RETVAL]], align 4
|
||||
// CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon*)* @.omp_outlined. to void (i32*, i32*, ...)*), %struct.anon* [[OMP_OUTLINED_ARG_AGG_]])
|
||||
// CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 0, void (i32*, i32*, ...)* bitcast (void (i32*, i32*)* @.omp_outlined. to void (i32*, i32*, ...)*))
|
||||
// CHECK1-NEXT: [[CALL:%.*]] = call i32 @_Z5tmainIiET_v()
|
||||
// CHECK1-NEXT: ret i32 [[CALL]]
|
||||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@.omp_outlined.
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR3:[0-9]+]] personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]]) #[[ATTR3:[0-9]+]] personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK1-NEXT: [[DOTOMP_SECTIONS_LB_:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[DOTOMP_SECTIONS_UB_:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[DOTOMP_SECTIONS_ST_:%.*]] = alloca i32, align 4
|
||||
|
@ -77,30 +75,28 @@ int main() {
|
|||
// CHECK1-NEXT: [[DOTOMP_SECTIONS_IV_:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32 0, i32* [[DOTOMP_SECTIONS_LB_]], align 4
|
||||
// CHECK1-NEXT: store i32 1, i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK1-NEXT: store i32 1, i32* [[DOTOMP_SECTIONS_ST_]], align 4
|
||||
// CHECK1-NEXT: store i32 0, i32* [[DOTOMP_SECTIONS_IL_]], align 4
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i32, i32* [[TMP1]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 [[TMP2]], i32 34, i32* [[DOTOMP_SECTIONS_IL_]], i32* [[DOTOMP_SECTIONS_LB_]], i32* [[DOTOMP_SECTIONS_UB_]], i32* [[DOTOMP_SECTIONS_ST_]], i32 1, i32 1)
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = icmp slt i32 [[TMP3]], 1
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = select i1 [[TMP4]], i32 [[TMP3]], i32 1
|
||||
// CHECK1-NEXT: store i32 [[TMP5]], i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_LB_]], align 4
|
||||
// CHECK1-NEXT: store i32 [[TMP6]], i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 [[TMP1]], i32 34, i32* [[DOTOMP_SECTIONS_IL_]], i32* [[DOTOMP_SECTIONS_LB_]], i32* [[DOTOMP_SECTIONS_UB_]], i32* [[DOTOMP_SECTIONS_ST_]], i32 1, i32 1)
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = icmp slt i32 [[TMP2]], 1
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = select i1 [[TMP3]], i32 [[TMP2]], i32 1
|
||||
// CHECK1-NEXT: store i32 [[TMP4]], i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_LB_]], align 4
|
||||
// CHECK1-NEXT: store i32 [[TMP5]], i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK1-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
|
||||
// CHECK1: omp.inner.for.cond:
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK1-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP7]], [[TMP8]]
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK1-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP6]], [[TMP7]]
|
||||
// CHECK1-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
|
||||
// CHECK1: omp.inner.for.body:
|
||||
// CHECK1-NEXT: [[TMP9:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK1-NEXT: switch i32 [[TMP9]], label [[DOTOMP_SECTIONS_EXIT:%.*]] [
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK1-NEXT: switch i32 [[TMP8]], label [[DOTOMP_SECTIONS_EXIT:%.*]] [
|
||||
// CHECK1-NEXT: i32 0, label [[DOTOMP_SECTIONS_CASE:%.*]]
|
||||
// CHECK1-NEXT: i32 1, label [[DOTOMP_SECTIONS_CASE1:%.*]]
|
||||
// CHECK1-NEXT: ]
|
||||
|
@ -117,18 +113,18 @@ int main() {
|
|||
// CHECK1: .omp.sections.exit:
|
||||
// CHECK1-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
|
||||
// CHECK1: omp.inner.for.inc:
|
||||
// CHECK1-NEXT: [[TMP10:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK1-NEXT: [[INC:%.*]] = add nsw i32 [[TMP10]], 1
|
||||
// CHECK1-NEXT: [[TMP9:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK1-NEXT: [[INC:%.*]] = add nsw i32 [[TMP9]], 1
|
||||
// CHECK1-NEXT: store i32 [[INC]], i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK1-NEXT: br label [[OMP_INNER_FOR_COND]]
|
||||
// CHECK1: omp.inner.for.end:
|
||||
// CHECK1-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]])
|
||||
// CHECK1-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]])
|
||||
// CHECK1-NEXT: ret void
|
||||
// CHECK1: terminate.lpad:
|
||||
// CHECK1-NEXT: [[TMP11:%.*]] = landingpad { i8*, i32 }
|
||||
// CHECK1-NEXT: [[TMP10:%.*]] = landingpad { i8*, i32 }
|
||||
// CHECK1-NEXT: catch i8* null
|
||||
// CHECK1-NEXT: [[TMP12:%.*]] = extractvalue { i8*, i32 } [[TMP11]], 0
|
||||
// CHECK1-NEXT: call void @__clang_call_terminate(i8* [[TMP12]]) #[[ATTR7:[0-9]+]]
|
||||
// CHECK1-NEXT: [[TMP11:%.*]] = extractvalue { i8*, i32 } [[TMP10]], 0
|
||||
// CHECK1-NEXT: call void @__clang_call_terminate(i8* [[TMP11]]) #[[ATTR7:[0-9]+]]
|
||||
// CHECK1-NEXT: unreachable
|
||||
//
|
||||
//
|
||||
|
@ -142,17 +138,15 @@ int main() {
|
|||
// CHECK1-LABEL: define {{[^@]+}}@_Z5tmainIiET_v
|
||||
// CHECK1-SAME: () #[[ATTR6:[0-9]+]] comdat {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON_0:%.*]], align 1
|
||||
// CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB2]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon.0*)* @.omp_outlined..1 to void (i32*, i32*, ...)*), %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]])
|
||||
// CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB2]], i32 0, void (i32*, i32*, ...)* bitcast (void (i32*, i32*)* @.omp_outlined..1 to void (i32*, i32*, ...)*))
|
||||
// CHECK1-NEXT: ret i32 0
|
||||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@.omp_outlined..1
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.0* noalias [[__CONTEXT:%.*]]) #[[ATTR3]] personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]]) #[[ATTR3]] personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.0*, align 8
|
||||
// CHECK1-NEXT: [[DOTOMP_SECTIONS_LB_:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[DOTOMP_SECTIONS_UB_:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[DOTOMP_SECTIONS_ST_:%.*]] = alloca i32, align 4
|
||||
|
@ -160,30 +154,28 @@ int main() {
|
|||
// CHECK1-NEXT: [[DOTOMP_SECTIONS_IV_:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store %struct.anon.0* [[__CONTEXT]], %struct.anon.0** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load %struct.anon.0*, %struct.anon.0** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32 0, i32* [[DOTOMP_SECTIONS_LB_]], align 4
|
||||
// CHECK1-NEXT: store i32 0, i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK1-NEXT: store i32 1, i32* [[DOTOMP_SECTIONS_ST_]], align 4
|
||||
// CHECK1-NEXT: store i32 0, i32* [[DOTOMP_SECTIONS_IL_]], align 4
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i32, i32* [[TMP1]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]], i32 34, i32* [[DOTOMP_SECTIONS_IL_]], i32* [[DOTOMP_SECTIONS_LB_]], i32* [[DOTOMP_SECTIONS_UB_]], i32* [[DOTOMP_SECTIONS_ST_]], i32 1, i32 1)
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = icmp slt i32 [[TMP3]], 0
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = select i1 [[TMP4]], i32 [[TMP3]], i32 0
|
||||
// CHECK1-NEXT: store i32 [[TMP5]], i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_LB_]], align 4
|
||||
// CHECK1-NEXT: store i32 [[TMP6]], i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]], i32 34, i32* [[DOTOMP_SECTIONS_IL_]], i32* [[DOTOMP_SECTIONS_LB_]], i32* [[DOTOMP_SECTIONS_UB_]], i32* [[DOTOMP_SECTIONS_ST_]], i32 1, i32 1)
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = icmp slt i32 [[TMP2]], 0
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = select i1 [[TMP3]], i32 [[TMP2]], i32 0
|
||||
// CHECK1-NEXT: store i32 [[TMP4]], i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_LB_]], align 4
|
||||
// CHECK1-NEXT: store i32 [[TMP5]], i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK1-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
|
||||
// CHECK1: omp.inner.for.cond:
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK1-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP7]], [[TMP8]]
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK1-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP6]], [[TMP7]]
|
||||
// CHECK1-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
|
||||
// CHECK1: omp.inner.for.body:
|
||||
// CHECK1-NEXT: [[TMP9:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK1-NEXT: switch i32 [[TMP9]], label [[DOTOMP_SECTIONS_EXIT:%.*]] [
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK1-NEXT: switch i32 [[TMP8]], label [[DOTOMP_SECTIONS_EXIT:%.*]] [
|
||||
// CHECK1-NEXT: i32 0, label [[DOTOMP_SECTIONS_CASE:%.*]]
|
||||
// CHECK1-NEXT: ]
|
||||
// CHECK1: .omp.sections.case:
|
||||
|
@ -194,18 +186,18 @@ int main() {
|
|||
// CHECK1: .omp.sections.exit:
|
||||
// CHECK1-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
|
||||
// CHECK1: omp.inner.for.inc:
|
||||
// CHECK1-NEXT: [[TMP10:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK1-NEXT: [[INC:%.*]] = add nsw i32 [[TMP10]], 1
|
||||
// CHECK1-NEXT: [[TMP9:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK1-NEXT: [[INC:%.*]] = add nsw i32 [[TMP9]], 1
|
||||
// CHECK1-NEXT: store i32 [[INC]], i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK1-NEXT: br label [[OMP_INNER_FOR_COND]]
|
||||
// CHECK1: omp.inner.for.end:
|
||||
// CHECK1-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]])
|
||||
// CHECK1-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]])
|
||||
// CHECK1-NEXT: ret void
|
||||
// CHECK1: terminate.lpad:
|
||||
// CHECK1-NEXT: [[TMP11:%.*]] = landingpad { i8*, i32 }
|
||||
// CHECK1-NEXT: [[TMP10:%.*]] = landingpad { i8*, i32 }
|
||||
// CHECK1-NEXT: catch i8* null
|
||||
// CHECK1-NEXT: [[TMP12:%.*]] = extractvalue { i8*, i32 } [[TMP11]], 0
|
||||
// CHECK1-NEXT: call void @__clang_call_terminate(i8* [[TMP12]]) #[[ATTR7]]
|
||||
// CHECK1-NEXT: [[TMP11:%.*]] = extractvalue { i8*, i32 } [[TMP10]], 0
|
||||
// CHECK1-NEXT: call void @__clang_call_terminate(i8* [[TMP11]]) #[[ATTR7]]
|
||||
// CHECK1-NEXT: unreachable
|
||||
//
|
||||
//
|
||||
|
@ -227,19 +219,17 @@ int main() {
|
|||
// CHECK2-SAME: () #[[ATTR2:[0-9]+]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 1
|
||||
// CHECK2-NEXT: store i32 0, i32* [[RETVAL]], align 4
|
||||
// CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon*)* @.omp_outlined. to void (i32*, i32*, ...)*), %struct.anon* [[OMP_OUTLINED_ARG_AGG_]])
|
||||
// CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 0, void (i32*, i32*, ...)* bitcast (void (i32*, i32*)* @.omp_outlined. to void (i32*, i32*, ...)*))
|
||||
// CHECK2-NEXT: [[CALL:%.*]] = call i32 @_Z5tmainIiET_v()
|
||||
// CHECK2-NEXT: ret i32 [[CALL]]
|
||||
//
|
||||
//
|
||||
// CHECK2-LABEL: define {{[^@]+}}@.omp_outlined.
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR3:[0-9]+]] personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]]) #[[ATTR3:[0-9]+]] personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK2-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK2-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK2-NEXT: [[DOTOMP_SECTIONS_LB_:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[DOTOMP_SECTIONS_UB_:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[DOTOMP_SECTIONS_ST_:%.*]] = alloca i32, align 4
|
||||
|
@ -247,30 +237,28 @@ int main() {
|
|||
// CHECK2-NEXT: [[DOTOMP_SECTIONS_IV_:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK2-NEXT: store i32 0, i32* [[DOTOMP_SECTIONS_LB_]], align 4
|
||||
// CHECK2-NEXT: store i32 1, i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK2-NEXT: store i32 1, i32* [[DOTOMP_SECTIONS_ST_]], align 4
|
||||
// CHECK2-NEXT: store i32 0, i32* [[DOTOMP_SECTIONS_IL_]], align 4
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i32, i32* [[TMP1]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 [[TMP2]], i32 34, i32* [[DOTOMP_SECTIONS_IL_]], i32* [[DOTOMP_SECTIONS_LB_]], i32* [[DOTOMP_SECTIONS_UB_]], i32* [[DOTOMP_SECTIONS_ST_]], i32 1, i32 1)
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = icmp slt i32 [[TMP3]], 1
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = select i1 [[TMP4]], i32 [[TMP3]], i32 1
|
||||
// CHECK2-NEXT: store i32 [[TMP5]], i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_LB_]], align 4
|
||||
// CHECK2-NEXT: store i32 [[TMP6]], i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 [[TMP1]], i32 34, i32* [[DOTOMP_SECTIONS_IL_]], i32* [[DOTOMP_SECTIONS_LB_]], i32* [[DOTOMP_SECTIONS_UB_]], i32* [[DOTOMP_SECTIONS_ST_]], i32 1, i32 1)
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = icmp slt i32 [[TMP2]], 1
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = select i1 [[TMP3]], i32 [[TMP2]], i32 1
|
||||
// CHECK2-NEXT: store i32 [[TMP4]], i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_LB_]], align 4
|
||||
// CHECK2-NEXT: store i32 [[TMP5]], i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK2-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
|
||||
// CHECK2: omp.inner.for.cond:
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK2-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP7]], [[TMP8]]
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK2-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP6]], [[TMP7]]
|
||||
// CHECK2-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
|
||||
// CHECK2: omp.inner.for.body:
|
||||
// CHECK2-NEXT: [[TMP9:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK2-NEXT: switch i32 [[TMP9]], label [[DOTOMP_SECTIONS_EXIT:%.*]] [
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK2-NEXT: switch i32 [[TMP8]], label [[DOTOMP_SECTIONS_EXIT:%.*]] [
|
||||
// CHECK2-NEXT: i32 0, label [[DOTOMP_SECTIONS_CASE:%.*]]
|
||||
// CHECK2-NEXT: i32 1, label [[DOTOMP_SECTIONS_CASE1:%.*]]
|
||||
// CHECK2-NEXT: ]
|
||||
|
@ -287,18 +275,18 @@ int main() {
|
|||
// CHECK2: .omp.sections.exit:
|
||||
// CHECK2-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
|
||||
// CHECK2: omp.inner.for.inc:
|
||||
// CHECK2-NEXT: [[TMP10:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK2-NEXT: [[INC:%.*]] = add nsw i32 [[TMP10]], 1
|
||||
// CHECK2-NEXT: [[TMP9:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK2-NEXT: [[INC:%.*]] = add nsw i32 [[TMP9]], 1
|
||||
// CHECK2-NEXT: store i32 [[INC]], i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK2-NEXT: br label [[OMP_INNER_FOR_COND]]
|
||||
// CHECK2: omp.inner.for.end:
|
||||
// CHECK2-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]])
|
||||
// CHECK2-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]])
|
||||
// CHECK2-NEXT: ret void
|
||||
// CHECK2: terminate.lpad:
|
||||
// CHECK2-NEXT: [[TMP11:%.*]] = landingpad { i8*, i32 }
|
||||
// CHECK2-NEXT: [[TMP10:%.*]] = landingpad { i8*, i32 }
|
||||
// CHECK2-NEXT: catch i8* null
|
||||
// CHECK2-NEXT: [[TMP12:%.*]] = extractvalue { i8*, i32 } [[TMP11]], 0
|
||||
// CHECK2-NEXT: call void @__clang_call_terminate(i8* [[TMP12]]) #[[ATTR7:[0-9]+]]
|
||||
// CHECK2-NEXT: [[TMP11:%.*]] = extractvalue { i8*, i32 } [[TMP10]], 0
|
||||
// CHECK2-NEXT: call void @__clang_call_terminate(i8* [[TMP11]]) #[[ATTR7:[0-9]+]]
|
||||
// CHECK2-NEXT: unreachable
|
||||
//
|
||||
//
|
||||
|
@ -312,17 +300,15 @@ int main() {
|
|||
// CHECK2-LABEL: define {{[^@]+}}@_Z5tmainIiET_v
|
||||
// CHECK2-SAME: () #[[ATTR6:[0-9]+]] comdat {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON_0:%.*]], align 1
|
||||
// CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB2]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon.0*)* @.omp_outlined..1 to void (i32*, i32*, ...)*), %struct.anon.0* [[OMP_OUTLINED_ARG_AGG_]])
|
||||
// CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB2]], i32 0, void (i32*, i32*, ...)* bitcast (void (i32*, i32*)* @.omp_outlined..1 to void (i32*, i32*, ...)*))
|
||||
// CHECK2-NEXT: ret i32 0
|
||||
//
|
||||
//
|
||||
// CHECK2-LABEL: define {{[^@]+}}@.omp_outlined..1
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon.0* noalias [[__CONTEXT:%.*]]) #[[ATTR3]] personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]]) #[[ATTR3]] personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK2-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK2-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon.0*, align 8
|
||||
// CHECK2-NEXT: [[DOTOMP_SECTIONS_LB_:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[DOTOMP_SECTIONS_UB_:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[DOTOMP_SECTIONS_ST_:%.*]] = alloca i32, align 4
|
||||
|
@ -330,30 +316,28 @@ int main() {
|
|||
// CHECK2-NEXT: [[DOTOMP_SECTIONS_IV_:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: store %struct.anon.0* [[__CONTEXT]], %struct.anon.0** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load %struct.anon.0*, %struct.anon.0** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK2-NEXT: store i32 0, i32* [[DOTOMP_SECTIONS_LB_]], align 4
|
||||
// CHECK2-NEXT: store i32 0, i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK2-NEXT: store i32 1, i32* [[DOTOMP_SECTIONS_ST_]], align 4
|
||||
// CHECK2-NEXT: store i32 0, i32* [[DOTOMP_SECTIONS_IL_]], align 4
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i32, i32* [[TMP1]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]], i32 34, i32* [[DOTOMP_SECTIONS_IL_]], i32* [[DOTOMP_SECTIONS_LB_]], i32* [[DOTOMP_SECTIONS_UB_]], i32* [[DOTOMP_SECTIONS_ST_]], i32 1, i32 1)
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = icmp slt i32 [[TMP3]], 0
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = select i1 [[TMP4]], i32 [[TMP3]], i32 0
|
||||
// CHECK2-NEXT: store i32 [[TMP5]], i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_LB_]], align 4
|
||||
// CHECK2-NEXT: store i32 [[TMP6]], i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]], i32 34, i32* [[DOTOMP_SECTIONS_IL_]], i32* [[DOTOMP_SECTIONS_LB_]], i32* [[DOTOMP_SECTIONS_UB_]], i32* [[DOTOMP_SECTIONS_ST_]], i32 1, i32 1)
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = icmp slt i32 [[TMP2]], 0
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = select i1 [[TMP3]], i32 [[TMP2]], i32 0
|
||||
// CHECK2-NEXT: store i32 [[TMP4]], i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_LB_]], align 4
|
||||
// CHECK2-NEXT: store i32 [[TMP5]], i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK2-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
|
||||
// CHECK2: omp.inner.for.cond:
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK2-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP7]], [[TMP8]]
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK2-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP6]], [[TMP7]]
|
||||
// CHECK2-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
|
||||
// CHECK2: omp.inner.for.body:
|
||||
// CHECK2-NEXT: [[TMP9:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK2-NEXT: switch i32 [[TMP9]], label [[DOTOMP_SECTIONS_EXIT:%.*]] [
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK2-NEXT: switch i32 [[TMP8]], label [[DOTOMP_SECTIONS_EXIT:%.*]] [
|
||||
// CHECK2-NEXT: i32 0, label [[DOTOMP_SECTIONS_CASE:%.*]]
|
||||
// CHECK2-NEXT: ]
|
||||
// CHECK2: .omp.sections.case:
|
||||
|
@ -364,17 +348,18 @@ int main() {
|
|||
// CHECK2: .omp.sections.exit:
|
||||
// CHECK2-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
|
||||
// CHECK2: omp.inner.for.inc:
|
||||
// CHECK2-NEXT: [[TMP10:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK2-NEXT: [[INC:%.*]] = add nsw i32 [[TMP10]], 1
|
||||
// CHECK2-NEXT: [[TMP9:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK2-NEXT: [[INC:%.*]] = add nsw i32 [[TMP9]], 1
|
||||
// CHECK2-NEXT: store i32 [[INC]], i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK2-NEXT: br label [[OMP_INNER_FOR_COND]]
|
||||
// CHECK2: omp.inner.for.end:
|
||||
// CHECK2-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB1]], i32 [[TMP2]])
|
||||
// CHECK2-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]])
|
||||
// CHECK2-NEXT: ret void
|
||||
// CHECK2: terminate.lpad:
|
||||
// CHECK2-NEXT: [[TMP11:%.*]] = landingpad { i8*, i32 }
|
||||
// CHECK2-NEXT: [[TMP10:%.*]] = landingpad { i8*, i32 }
|
||||
// CHECK2-NEXT: catch i8* null
|
||||
// CHECK2-NEXT: [[TMP12:%.*]] = extractvalue { i8*, i32 } [[TMP11]], 0
|
||||
// CHECK2-NEXT: call void @__clang_call_terminate(i8* [[TMP12]]) #[[ATTR7]]
|
||||
// CHECK2-NEXT: [[TMP11:%.*]] = extractvalue { i8*, i32 } [[TMP10]], 0
|
||||
// CHECK2-NEXT: call void @__clang_call_terminate(i8* [[TMP11]]) #[[ATTR7]]
|
||||
// CHECK2-NEXT: unreachable
|
||||
//
|
||||
//
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,5 @@
|
|||
// RUN: %clang_cc1 -verify=host -Rpass=openmp-opt -Rpass-analysis=openmp-opt -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm-bc %s -o %t-ppc-host.bc
|
||||
// RUN: %clang_cc1 -mllvm -debug-only=openmp-opt -verify=all,safe -Rpass=openmp-opt -Rpass-analysis=openmp-opt -fopenmp -O2 -x c++ -triple nvptx64-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o %t.out
|
||||
// RUN: %clang_cc1 -verify=all,safe -Rpass=openmp-opt -Rpass-analysis=openmp-opt -fopenmp -O2 -x c++ -triple nvptx64-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o %t.out
|
||||
// RUN: %clang_cc1 -fexperimental-new-pass-manager -verify=all,safe -Rpass=openmp-opt -Rpass-analysis=openmp-opt -fopenmp -O2 -x c++ -triple nvptx64-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o %t.out
|
||||
|
||||
// host-no-diagnostics
|
||||
|
@ -9,16 +9,12 @@ void baz(void) __attribute__((assume("omp_no_openmp")));
|
|||
void bar1(void) {
|
||||
#pragma omp parallel // #0
|
||||
// safe-remark@#0 {{Parallel region is used in unknown ways. Will not attempt to rewrite the state machine. [OMP101]}}
|
||||
// safe-remark@#0 3 {{Value has potential side effects preventing SPMD-mode execution. [OMP121]}}
|
||||
// safe-remark@#0 {{Replaced globalized variable with 1 byte of shared memory. [OMP111]}}
|
||||
{
|
||||
}
|
||||
}
|
||||
void bar2(void) {
|
||||
#pragma omp parallel // #1
|
||||
// safe-remark@#1 {{Parallel region is used in unknown ways. Will not attempt to rewrite the state machine. [OMP101]}}
|
||||
// safe-remark@#1 2 {{Value has potential side effects preventing SPMD-mode execution. [OMP121]}}
|
||||
// safe-remark@#1 {{Replaced globalized variable with 1 byte of shared memory. [OMP111]}}
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -30,14 +26,10 @@ void foo1(void) {
|
|||
{
|
||||
baz(); // all-remark {{Value has potential side effects preventing SPMD-mode execution. Add `__attribute__((assume("ompx_spmd_amenable")))` to the called function to override. [OMP121]}}
|
||||
#pragma omp parallel // #3
|
||||
// all-remark@#3 {{Value has potential side effects preventing SPMD-mode execution. [OMP121]}}
|
||||
// all-remark@#3 {{Replaced globalized variable with 1 byte of shared memory. [OMP111]}}
|
||||
{
|
||||
}
|
||||
bar1();
|
||||
#pragma omp parallel // #4
|
||||
// all-remark@#4 {{Value has potential side effects preventing SPMD-mode execution. [OMP121]}}
|
||||
// all-remark@#4 {{Replaced globalized variable with 1 byte of shared memory. [OMP111]}}
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -49,15 +41,11 @@ void foo2(void) {
|
|||
{
|
||||
baz(); // all-remark {{Value has potential side effects preventing SPMD-mode execution. Add `__attribute__((assume("ompx_spmd_amenable")))` to the called function to override. [OMP121]}}
|
||||
#pragma omp parallel // #6
|
||||
// all-remark@#6 {{Value has potential side effects preventing SPMD-mode execution. [OMP121]}}
|
||||
// all-remark@#6 {{Replaced globalized variable with 1 byte of shared memory. [OMP111]}}
|
||||
{
|
||||
}
|
||||
bar1();
|
||||
bar2();
|
||||
#pragma omp parallel // #7
|
||||
// all-remark@#7 {{Value has potential side effects preventing SPMD-mode execution. [OMP121]}}
|
||||
// all-remark@#7 {{Replaced globalized variable with 1 byte of shared memory. [OMP111]}}
|
||||
{
|
||||
}
|
||||
bar1();
|
||||
|
@ -71,15 +59,11 @@ void foo3(void) {
|
|||
{
|
||||
baz(); // all-remark {{Value has potential side effects preventing SPMD-mode execution. Add `__attribute__((assume("ompx_spmd_amenable")))` to the called function to override. [OMP121]}}
|
||||
#pragma omp parallel // #9
|
||||
// all-remark@#9 {{Value has potential side effects preventing SPMD-mode execution. [OMP121]}}
|
||||
// all-remark@#9 {{Replaced globalized variable with 1 byte of shared memory. [OMP111]}}
|
||||
{
|
||||
}
|
||||
bar1();
|
||||
bar2();
|
||||
#pragma omp parallel // #10
|
||||
// all-remark@#10 {{Value has potential side effects preventing SPMD-mode execution. [OMP121]}}
|
||||
// all-remark@#10 {{Replaced globalized variable with 1 byte of shared memory. [OMP111]}}
|
||||
{
|
||||
}
|
||||
bar1();
|
||||
|
|
|
@ -9,8 +9,6 @@ void baz(void) __attribute__((assume("omp_no_openmp")));
|
|||
void bar(void) {
|
||||
#pragma omp parallel // #1 \
|
||||
// expected-remark@#1 {{Parallel region is used in unknown ways. Will not attempt to rewrite the state machine. [OMP101]}}
|
||||
// expected-remark@#1 {{Value has potential side effects preventing SPMD-mode execution. [OMP121]}}
|
||||
// expected-remark@#1 {{Replaced globalized variable with 1 byte of shared memory. [OMP111]}}
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -20,15 +18,11 @@ void foo(void) {
|
|||
// expected-remark@#2 {{Rewriting generic-mode kernel with a customized state machine. [OMP131]}}
|
||||
{
|
||||
baz(); // expected-remark {{Value has potential side effects preventing SPMD-mode execution. Add `__attribute__((assume("ompx_spmd_amenable")))` to the called function to override. [OMP121]}}
|
||||
#pragma omp parallel // #3
|
||||
// expected-remark@#3 {{Value has potential side effects preventing SPMD-mode execution. [OMP121]}}
|
||||
// expected-remark@#3 {{Replaced globalized variable with 1 byte of shared memory. [OMP111]}}
|
||||
#pragma omp parallel
|
||||
{
|
||||
}
|
||||
bar();
|
||||
#pragma omp parallel // #4
|
||||
// expected-remark@#4 {{Value has potential side effects preventing SPMD-mode execution. [OMP121]}}
|
||||
// expected-remark@#4 {{Replaced globalized variable with 1 byte of shared memory. [OMP111]}}
|
||||
#pragma omp parallel
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
@ -400,7 +400,6 @@ int main() {
|
|||
// CHECK1-NEXT: [[VEC:%.*]] = alloca [2 x i32], align 4
|
||||
// CHECK1-NEXT: [[S_ARR:%.*]] = alloca [2 x %struct.S.0], align 4
|
||||
// CHECK1-NEXT: [[VAR:%.*]] = alloca [[STRUCT_S_0]], align 4
|
||||
// CHECK1-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 8
|
||||
// CHECK1-NEXT: call void @_ZN1SIiEC1Ev(%struct.S.0* nonnull align 4 dereferenceable(4) [[TEST]])
|
||||
// CHECK1-NEXT: store i32 0, i32* [[T_VAR]], align 4
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = bitcast [2 x i32]* [[VEC]] to i8*
|
||||
|
@ -410,30 +409,22 @@ int main() {
|
|||
// CHECK1-NEXT: [[ARRAYINIT_ELEMENT:%.*]] = getelementptr inbounds [[STRUCT_S_0]], %struct.S.0* [[ARRAYINIT_BEGIN]], i64 1
|
||||
// CHECK1-NEXT: call void @_ZN1SIiEC1Ei(%struct.S.0* nonnull align 4 dereferenceable(4) [[ARRAYINIT_ELEMENT]], i32 2)
|
||||
// CHECK1-NEXT: call void @_ZN1SIiEC1Ei(%struct.S.0* nonnull align 4 dereferenceable(4) [[VAR]], i32 3)
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK1-NEXT: store i32* [[T_VAR]], i32** [[TMP1]], align 8
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 1
|
||||
// CHECK1-NEXT: store [2 x i32]* [[VEC]], [2 x i32]** [[TMP2]], align 8
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 2
|
||||
// CHECK1-NEXT: store [2 x %struct.S.0]* [[S_ARR]], [2 x %struct.S.0]** [[TMP3]], align 8
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 3
|
||||
// CHECK1-NEXT: store %struct.S.0* [[VAR]], %struct.S.0** [[TMP4]], align 8
|
||||
// CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB2]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon*)* @.omp_outlined. to void (i32*, i32*, ...)*), %struct.anon* [[OMP_OUTLINED_ARG_AGG_]])
|
||||
// CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB2]], i32 4, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, [2 x i32]*, [2 x %struct.S.0]*, %struct.S.0*)* @.omp_outlined. to void (i32*, i32*, ...)*), i32* [[T_VAR]], [2 x i32]* [[VEC]], [2 x %struct.S.0]* [[S_ARR]], %struct.S.0* [[VAR]])
|
||||
// CHECK1-NEXT: store i32 0, i32* [[RETVAL]], align 4
|
||||
// CHECK1-NEXT: call void @_ZN1SIiED1Ev(%struct.S.0* nonnull align 4 dereferenceable(4) [[VAR]]) #[[ATTR2]]
|
||||
// CHECK1-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S.0], [2 x %struct.S.0]* [[S_ARR]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_S_0]], %struct.S.0* [[ARRAY_BEGIN]], i64 2
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_S_0]], %struct.S.0* [[ARRAY_BEGIN]], i64 2
|
||||
// CHECK1-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
|
||||
// CHECK1: arraydestroy.body:
|
||||
// CHECK1-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi %struct.S.0* [ [[TMP5]], [[ENTRY:%.*]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
|
||||
// CHECK1-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi %struct.S.0* [ [[TMP1]], [[ENTRY:%.*]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
|
||||
// CHECK1-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S_0]], %struct.S.0* [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
|
||||
// CHECK1-NEXT: call void @_ZN1SIiED1Ev(%struct.S.0* nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR2]]
|
||||
// CHECK1-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq %struct.S.0* [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN]]
|
||||
// CHECK1-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE1:%.*]], label [[ARRAYDESTROY_BODY]]
|
||||
// CHECK1: arraydestroy.done1:
|
||||
// CHECK1-NEXT: call void @_ZN1SIiED1Ev(%struct.S.0* nonnull align 4 dereferenceable(4) [[TEST]]) #[[ATTR2]]
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = load i32, i32* [[RETVAL]], align 4
|
||||
// CHECK1-NEXT: ret i32 [[TMP6]]
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i32, i32* [[RETVAL]], align 4
|
||||
// CHECK1-NEXT: ret i32 [[TMP2]]
|
||||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@_ZN2StC2Ev
|
||||
|
@ -502,119 +493,120 @@ int main() {
|
|||
//
|
||||
//
|
||||
// CHECK1-LABEL: define {{[^@]+}}@.omp_outlined.
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR6:[0-9]+]] {
|
||||
// CHECK1-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[T_VAR:%.*]], [2 x i32]* nonnull align 4 dereferenceable(8) [[VEC:%.*]], [2 x %struct.S.0]* nonnull align 4 dereferenceable(8) [[S_ARR:%.*]], %struct.S.0* nonnull align 4 dereferenceable(4) [[VAR:%.*]]) #[[ATTR6:[0-9]+]] {
|
||||
// CHECK1-NEXT: entry:
|
||||
// CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK1-NEXT: [[T_VAR_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK1-NEXT: [[VEC_ADDR:%.*]] = alloca [2 x i32]*, align 8
|
||||
// CHECK1-NEXT: [[S_ARR_ADDR:%.*]] = alloca [2 x %struct.S.0]*, align 8
|
||||
// CHECK1-NEXT: [[VAR_ADDR:%.*]] = alloca %struct.S.0*, align 8
|
||||
// CHECK1-NEXT: [[DOTOMP_SECTIONS_LB_:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[DOTOMP_SECTIONS_UB_:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[DOTOMP_SECTIONS_ST_:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[DOTOMP_SECTIONS_IL_:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[DOTOMP_SECTIONS_IV_:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[T_VAR:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[VEC:%.*]] = alloca [2 x i32], align 4
|
||||
// CHECK1-NEXT: [[S_ARR:%.*]] = alloca [2 x %struct.S.0], align 4
|
||||
// CHECK1-NEXT: [[T_VAR1:%.*]] = alloca i32, align 4
|
||||
// CHECK1-NEXT: [[VEC2:%.*]] = alloca [2 x i32], align 4
|
||||
// CHECK1-NEXT: [[S_ARR3:%.*]] = alloca [2 x %struct.S.0], align 4
|
||||
// CHECK1-NEXT: [[AGG_TMP:%.*]] = alloca [[STRUCT_ST:%.*]], align 4
|
||||
// CHECK1-NEXT: [[VAR:%.*]] = alloca [[STRUCT_S_0:%.*]], align 4
|
||||
// CHECK1-NEXT: [[AGG_TMP2:%.*]] = alloca [[STRUCT_ST]], align 4
|
||||
// CHECK1-NEXT: [[VAR5:%.*]] = alloca [[STRUCT_S_0:%.*]], align 4
|
||||
// CHECK1-NEXT: [[AGG_TMP6:%.*]] = alloca [[STRUCT_ST]], align 4
|
||||
// CHECK1-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 8
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP0]], i32 0, i32 1
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = load [2 x i32]*, [2 x i32]** [[TMP3]], align 8
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP0]], i32 0, i32 2
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = load [2 x %struct.S.0]*, [2 x %struct.S.0]** [[TMP5]], align 8
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP0]], i32 0, i32 3
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = load %struct.S.0*, %struct.S.0** [[TMP7]], align 8
|
||||
// CHECK1-NEXT: store i32* [[T_VAR]], i32** [[T_VAR_ADDR]], align 8
|
||||
// CHECK1-NEXT: store [2 x i32]* [[VEC]], [2 x i32]** [[VEC_ADDR]], align 8
|
||||
// CHECK1-NEXT: store [2 x %struct.S.0]* [[S_ARR]], [2 x %struct.S.0]** [[S_ARR_ADDR]], align 8
|
||||
// CHECK1-NEXT: store %struct.S.0* [[VAR]], %struct.S.0** [[VAR_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP0:%.*]] = load i32*, i32** [[T_VAR_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP1:%.*]] = load [2 x i32]*, [2 x i32]** [[VEC_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP2:%.*]] = load [2 x %struct.S.0]*, [2 x %struct.S.0]** [[S_ARR_ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP3:%.*]] = load %struct.S.0*, %struct.S.0** [[VAR_ADDR]], align 8
|
||||
// CHECK1-NEXT: store i32 0, i32* [[DOTOMP_SECTIONS_LB_]], align 4
|
||||
// CHECK1-NEXT: store i32 1, i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK1-NEXT: store i32 1, i32* [[DOTOMP_SECTIONS_ST_]], align 4
|
||||
// CHECK1-NEXT: store i32 0, i32* [[DOTOMP_SECTIONS_IL_]], align 4
|
||||
// CHECK1-NEXT: [[TMP9:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK1-NEXT: store i32 [[TMP9]], i32* [[T_VAR]], align 4
|
||||
// CHECK1-NEXT: [[TMP10:%.*]] = bitcast [2 x i32]* [[VEC]] to i8*
|
||||
// CHECK1-NEXT: [[TMP11:%.*]] = bitcast [2 x i32]* [[TMP4]] to i8*
|
||||
// CHECK1-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 [[TMP10]], i8* align 4 [[TMP11]], i64 8, i1 false)
|
||||
// CHECK1-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S.0], [2 x %struct.S.0]* [[S_ARR]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP12:%.*]] = bitcast [2 x %struct.S.0]* [[TMP6]] to %struct.S.0*
|
||||
// CHECK1-NEXT: [[TMP13:%.*]] = getelementptr [[STRUCT_S_0]], %struct.S.0* [[ARRAY_BEGIN]], i64 2
|
||||
// CHECK1-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq %struct.S.0* [[ARRAY_BEGIN]], [[TMP13]]
|
||||
// CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE1:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]]
|
||||
// CHECK1-NEXT: [[TMP4:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK1-NEXT: store i32 [[TMP4]], i32* [[T_VAR1]], align 4
|
||||
// CHECK1-NEXT: [[TMP5:%.*]] = bitcast [2 x i32]* [[VEC2]] to i8*
|
||||
// CHECK1-NEXT: [[TMP6:%.*]] = bitcast [2 x i32]* [[TMP1]] to i8*
|
||||
// CHECK1-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 [[TMP5]], i8* align 4 [[TMP6]], i64 8, i1 false)
|
||||
// CHECK1-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S.0], [2 x %struct.S.0]* [[S_ARR3]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP7:%.*]] = bitcast [2 x %struct.S.0]* [[TMP2]] to %struct.S.0*
|
||||
// CHECK1-NEXT: [[TMP8:%.*]] = getelementptr [[STRUCT_S_0]], %struct.S.0* [[ARRAY_BEGIN]], i64 2
|
||||
// CHECK1-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq %struct.S.0* [[ARRAY_BEGIN]], [[TMP8]]
|
||||
// CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE4:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]]
|
||||
// CHECK1: omp.arraycpy.body:
|
||||
// CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi %struct.S.0* [ [[TMP12]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
|
||||
// CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi %struct.S.0* [ [[TMP7]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
|
||||
// CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi %struct.S.0* [ [[ARRAY_BEGIN]], [[ENTRY]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
|
||||
// CHECK1-NEXT: call void @_ZN2StC1Ev(%struct.St* nonnull align 4 dereferenceable(8) [[AGG_TMP]])
|
||||
// CHECK1-NEXT: call void @_ZN1SIiEC1ERKS0_2St(%struct.S.0* nonnull align 4 dereferenceable(4) [[OMP_ARRAYCPY_DESTELEMENTPAST]], %struct.S.0* nonnull align 4 dereferenceable(4) [[OMP_ARRAYCPY_SRCELEMENTPAST]], %struct.St* [[AGG_TMP]])
|
||||
// CHECK1-NEXT: call void @_ZN2StD1Ev(%struct.St* nonnull align 4 dereferenceable(8) [[AGG_TMP]]) #[[ATTR2]]
|
||||
// CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr [[STRUCT_S_0]], %struct.S.0* [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1
|
||||
// CHECK1-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr [[STRUCT_S_0]], %struct.S.0* [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1
|
||||
// CHECK1-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq %struct.S.0* [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP13]]
|
||||
// CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYCPY_DONE1]], label [[OMP_ARRAYCPY_BODY]]
|
||||
// CHECK1: omp.arraycpy.done1:
|
||||
// CHECK1-NEXT: call void @_ZN2StC1Ev(%struct.St* nonnull align 4 dereferenceable(8) [[AGG_TMP2]])
|
||||
// CHECK1-NEXT: call void @_ZN1SIiEC1ERKS0_2St(%struct.S.0* nonnull align 4 dereferenceable(4) [[VAR]], %struct.S.0* nonnull align 4 dereferenceable(4) [[TMP8]], %struct.St* [[AGG_TMP2]])
|
||||
// CHECK1-NEXT: call void @_ZN2StD1Ev(%struct.St* nonnull align 4 dereferenceable(8) [[AGG_TMP2]]) #[[ATTR2]]
|
||||
// CHECK1-NEXT: [[TMP14:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP15:%.*]] = load i32, i32* [[TMP14]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB1]], i32 [[TMP15]], i32 34, i32* [[DOTOMP_SECTIONS_IL_]], i32* [[DOTOMP_SECTIONS_LB_]], i32* [[DOTOMP_SECTIONS_UB_]], i32* [[DOTOMP_SECTIONS_ST_]], i32 1, i32 1)
|
||||
// CHECK1-NEXT: [[TMP16:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK1-NEXT: [[TMP17:%.*]] = icmp slt i32 [[TMP16]], 1
|
||||
// CHECK1-NEXT: [[TMP18:%.*]] = select i1 [[TMP17]], i32 [[TMP16]], i32 1
|
||||
// CHECK1-NEXT: store i32 [[TMP18]], i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK1-NEXT: [[TMP19:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_LB_]], align 4
|
||||
// CHECK1-NEXT: store i32 [[TMP19]], i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK1-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq %struct.S.0* [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP8]]
|
||||
// CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYCPY_DONE4]], label [[OMP_ARRAYCPY_BODY]]
|
||||
// CHECK1: omp.arraycpy.done4:
|
||||
// CHECK1-NEXT: call void @_ZN2StC1Ev(%struct.St* nonnull align 4 dereferenceable(8) [[AGG_TMP6]])
|
||||
// CHECK1-NEXT: call void @_ZN1SIiEC1ERKS0_2St(%struct.S.0* nonnull align 4 dereferenceable(4) [[VAR5]], %struct.S.0* nonnull align 4 dereferenceable(4) [[TMP3]], %struct.St* [[AGG_TMP6]])
|
||||
// CHECK1-NEXT: call void @_ZN2StD1Ev(%struct.St* nonnull align 4 dereferenceable(8) [[AGG_TMP6]]) #[[ATTR2]]
|
||||
// CHECK1-NEXT: [[TMP9:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP10:%.*]] = load i32, i32* [[TMP9]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB1]], i32 [[TMP10]], i32 34, i32* [[DOTOMP_SECTIONS_IL_]], i32* [[DOTOMP_SECTIONS_LB_]], i32* [[DOTOMP_SECTIONS_UB_]], i32* [[DOTOMP_SECTIONS_ST_]], i32 1, i32 1)
|
||||
// CHECK1-NEXT: [[TMP11:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK1-NEXT: [[TMP12:%.*]] = icmp slt i32 [[TMP11]], 1
|
||||
// CHECK1-NEXT: [[TMP13:%.*]] = select i1 [[TMP12]], i32 [[TMP11]], i32 1
|
||||
// CHECK1-NEXT: store i32 [[TMP13]], i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK1-NEXT: [[TMP14:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_LB_]], align 4
|
||||
// CHECK1-NEXT: store i32 [[TMP14]], i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK1-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
|
||||
// CHECK1: omp.inner.for.cond:
|
||||
// CHECK1-NEXT: [[TMP20:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK1-NEXT: [[TMP21:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK1-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP20]], [[TMP21]]
|
||||
// CHECK1-NEXT: [[TMP15:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK1-NEXT: [[TMP16:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK1-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP15]], [[TMP16]]
|
||||
// CHECK1-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
|
||||
// CHECK1: omp.inner.for.body:
|
||||
// CHECK1-NEXT: [[TMP22:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK1-NEXT: switch i32 [[TMP22]], label [[DOTOMP_SECTIONS_EXIT:%.*]] [
|
||||
// CHECK1-NEXT: [[TMP17:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK1-NEXT: switch i32 [[TMP17]], label [[DOTOMP_SECTIONS_EXIT:%.*]] [
|
||||
// CHECK1-NEXT: i32 0, label [[DOTOMP_SECTIONS_CASE:%.*]]
|
||||
// CHECK1-NEXT: i32 1, label [[DOTOMP_SECTIONS_CASE3:%.*]]
|
||||
// CHECK1-NEXT: i32 1, label [[DOTOMP_SECTIONS_CASE7:%.*]]
|
||||
// CHECK1-NEXT: ]
|
||||
// CHECK1: .omp.sections.case:
|
||||
// CHECK1-NEXT: [[TMP23:%.*]] = load i32, i32* [[T_VAR]], align 4
|
||||
// CHECK1-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [2 x i32], [2 x i32]* [[VEC]], i64 0, i64 0
|
||||
// CHECK1-NEXT: store i32 [[TMP23]], i32* [[ARRAYIDX]], align 4
|
||||
// CHECK1-NEXT: [[TMP18:%.*]] = load i32, i32* [[T_VAR1]], align 4
|
||||
// CHECK1-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [2 x i32], [2 x i32]* [[VEC2]], i64 0, i64 0
|
||||
// CHECK1-NEXT: store i32 [[TMP18]], i32* [[ARRAYIDX]], align 4
|
||||
// CHECK1-NEXT: br label [[DOTOMP_SECTIONS_EXIT]]
|
||||
// CHECK1: .omp.sections.case3:
|
||||
// CHECK1-NEXT: [[ARRAYIDX4:%.*]] = getelementptr inbounds [2 x %struct.S.0], [2 x %struct.S.0]* [[S_ARR]], i64 0, i64 0
|
||||
// CHECK1-NEXT: [[TMP24:%.*]] = bitcast %struct.S.0* [[ARRAYIDX4]] to i8*
|
||||
// CHECK1-NEXT: [[TMP25:%.*]] = bitcast %struct.S.0* [[VAR]] to i8*
|
||||
// CHECK1-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 [[TMP24]], i8* align 4 [[TMP25]], i64 4, i1 false)
|
||||
// CHECK1: .omp.sections.case7:
|
||||
// CHECK1-NEXT: [[ARRAYIDX8:%.*]] = getelementptr inbounds [2 x %struct.S.0], [2 x %struct.S.0]* [[S_ARR3]], i64 0, i64 0
|
||||
// CHECK1-NEXT: [[TMP19:%.*]] = bitcast %struct.S.0* [[ARRAYIDX8]] to i8*
|
||||
// CHECK1-NEXT: [[TMP20:%.*]] = bitcast %struct.S.0* [[VAR5]] to i8*
|
||||
// CHECK1-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 [[TMP19]], i8* align 4 [[TMP20]], i64 4, i1 false)
|
||||
// CHECK1-NEXT: br label [[DOTOMP_SECTIONS_EXIT]]
|
||||
// CHECK1: .omp.sections.exit:
|
||||
// CHECK1-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
|
||||
// CHECK1: omp.inner.for.inc:
|
||||
// CHECK1-NEXT: [[TMP26:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK1-NEXT: [[INC:%.*]] = add nsw i32 [[TMP26]], 1
|
||||
// CHECK1-NEXT: [[TMP21:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK1-NEXT: [[INC:%.*]] = add nsw i32 [[TMP21]], 1
|
||||
// CHECK1-NEXT: store i32 [[INC]], i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK1-NEXT: br label [[OMP_INNER_FOR_COND]]
|
||||
// CHECK1: omp.inner.for.end:
|
||||
// CHECK1-NEXT: [[TMP27:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP28:%.*]] = load i32, i32* [[TMP27]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB1]], i32 [[TMP28]])
|
||||
// CHECK1-NEXT: call void @_ZN1SIiED1Ev(%struct.S.0* nonnull align 4 dereferenceable(4) [[VAR]]) #[[ATTR2]]
|
||||
// CHECK1-NEXT: [[ARRAY_BEGIN5:%.*]] = getelementptr inbounds [2 x %struct.S.0], [2 x %struct.S.0]* [[S_ARR]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP29:%.*]] = getelementptr inbounds [[STRUCT_S_0]], %struct.S.0* [[ARRAY_BEGIN5]], i64 2
|
||||
// CHECK1-NEXT: [[TMP22:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP23:%.*]] = load i32, i32* [[TMP22]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB1]], i32 [[TMP23]])
|
||||
// CHECK1-NEXT: call void @_ZN1SIiED1Ev(%struct.S.0* nonnull align 4 dereferenceable(4) [[VAR5]]) #[[ATTR2]]
|
||||
// CHECK1-NEXT: [[ARRAY_BEGIN9:%.*]] = getelementptr inbounds [2 x %struct.S.0], [2 x %struct.S.0]* [[S_ARR3]], i32 0, i32 0
|
||||
// CHECK1-NEXT: [[TMP24:%.*]] = getelementptr inbounds [[STRUCT_S_0]], %struct.S.0* [[ARRAY_BEGIN9]], i64 2
|
||||
// CHECK1-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
|
||||
// CHECK1: arraydestroy.body:
|
||||
// CHECK1-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi %struct.S.0* [ [[TMP29]], [[OMP_INNER_FOR_END]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
|
||||
// CHECK1-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi %struct.S.0* [ [[TMP24]], [[OMP_INNER_FOR_END]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
|
||||
// CHECK1-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S_0]], %struct.S.0* [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
|
||||
// CHECK1-NEXT: call void @_ZN1SIiED1Ev(%struct.S.0* nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR2]]
|
||||
// CHECK1-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq %struct.S.0* [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN5]]
|
||||
// CHECK1-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE6:%.*]], label [[ARRAYDESTROY_BODY]]
|
||||
// CHECK1: arraydestroy.done6:
|
||||
// CHECK1-NEXT: [[TMP30:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP31:%.*]] = load i32, i32* [[TMP30]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB3:[0-9]+]], i32 [[TMP31]])
|
||||
// CHECK1-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq %struct.S.0* [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN9]]
|
||||
// CHECK1-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE10:%.*]], label [[ARRAYDESTROY_BODY]]
|
||||
// CHECK1: arraydestroy.done10:
|
||||
// CHECK1-NEXT: [[TMP25:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK1-NEXT: [[TMP26:%.*]] = load i32, i32* [[TMP25]], align 4
|
||||
// CHECK1-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB3:[0-9]+]], i32 [[TMP26]])
|
||||
// CHECK1-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -959,7 +951,6 @@ int main() {
|
|||
// CHECK2-NEXT: [[VEC:%.*]] = alloca [2 x i32], align 4
|
||||
// CHECK2-NEXT: [[S_ARR:%.*]] = alloca [2 x %struct.S.0], align 4
|
||||
// CHECK2-NEXT: [[VAR:%.*]] = alloca [[STRUCT_S_0]], align 4
|
||||
// CHECK2-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 8
|
||||
// CHECK2-NEXT: call void @_ZN1SIiEC1Ev(%struct.S.0* nonnull align 4 dereferenceable(4) [[TEST]])
|
||||
// CHECK2-NEXT: store i32 0, i32* [[T_VAR]], align 4
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = bitcast [2 x i32]* [[VEC]] to i8*
|
||||
|
@ -969,30 +960,22 @@ int main() {
|
|||
// CHECK2-NEXT: [[ARRAYINIT_ELEMENT:%.*]] = getelementptr inbounds [[STRUCT_S_0]], %struct.S.0* [[ARRAYINIT_BEGIN]], i64 1
|
||||
// CHECK2-NEXT: call void @_ZN1SIiEC1Ei(%struct.S.0* nonnull align 4 dereferenceable(4) [[ARRAYINIT_ELEMENT]], i32 2)
|
||||
// CHECK2-NEXT: call void @_ZN1SIiEC1Ei(%struct.S.0* nonnull align 4 dereferenceable(4) [[VAR]], i32 3)
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK2-NEXT: store i32* [[T_VAR]], i32** [[TMP1]], align 8
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 1
|
||||
// CHECK2-NEXT: store [2 x i32]* [[VEC]], [2 x i32]** [[TMP2]], align 8
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 2
|
||||
// CHECK2-NEXT: store [2 x %struct.S.0]* [[S_ARR]], [2 x %struct.S.0]** [[TMP3]], align 8
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 3
|
||||
// CHECK2-NEXT: store %struct.S.0* [[VAR]], %struct.S.0** [[TMP4]], align 8
|
||||
// CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB2]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon*)* @.omp_outlined. to void (i32*, i32*, ...)*), %struct.anon* [[OMP_OUTLINED_ARG_AGG_]])
|
||||
// CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB2]], i32 4, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, [2 x i32]*, [2 x %struct.S.0]*, %struct.S.0*)* @.omp_outlined. to void (i32*, i32*, ...)*), i32* [[T_VAR]], [2 x i32]* [[VEC]], [2 x %struct.S.0]* [[S_ARR]], %struct.S.0* [[VAR]])
|
||||
// CHECK2-NEXT: store i32 0, i32* [[RETVAL]], align 4
|
||||
// CHECK2-NEXT: call void @_ZN1SIiED1Ev(%struct.S.0* nonnull align 4 dereferenceable(4) [[VAR]]) #[[ATTR2]]
|
||||
// CHECK2-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S.0], [2 x %struct.S.0]* [[S_ARR]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_S_0]], %struct.S.0* [[ARRAY_BEGIN]], i64 2
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_S_0]], %struct.S.0* [[ARRAY_BEGIN]], i64 2
|
||||
// CHECK2-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
|
||||
// CHECK2: arraydestroy.body:
|
||||
// CHECK2-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi %struct.S.0* [ [[TMP5]], [[ENTRY:%.*]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
|
||||
// CHECK2-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi %struct.S.0* [ [[TMP1]], [[ENTRY:%.*]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
|
||||
// CHECK2-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S_0]], %struct.S.0* [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
|
||||
// CHECK2-NEXT: call void @_ZN1SIiED1Ev(%struct.S.0* nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR2]]
|
||||
// CHECK2-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq %struct.S.0* [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN]]
|
||||
// CHECK2-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE1:%.*]], label [[ARRAYDESTROY_BODY]]
|
||||
// CHECK2: arraydestroy.done1:
|
||||
// CHECK2-NEXT: call void @_ZN1SIiED1Ev(%struct.S.0* nonnull align 4 dereferenceable(4) [[TEST]]) #[[ATTR2]]
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = load i32, i32* [[RETVAL]], align 4
|
||||
// CHECK2-NEXT: ret i32 [[TMP6]]
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i32, i32* [[RETVAL]], align 4
|
||||
// CHECK2-NEXT: ret i32 [[TMP2]]
|
||||
//
|
||||
//
|
||||
// CHECK2-LABEL: define {{[^@]+}}@_ZN2StC2Ev
|
||||
|
@ -1061,119 +1044,120 @@ int main() {
|
|||
//
|
||||
//
|
||||
// CHECK2-LABEL: define {{[^@]+}}@.omp_outlined.
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR6:[0-9]+]] {
|
||||
// CHECK2-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[T_VAR:%.*]], [2 x i32]* nonnull align 4 dereferenceable(8) [[VEC:%.*]], [2 x %struct.S.0]* nonnull align 4 dereferenceable(8) [[S_ARR:%.*]], %struct.S.0* nonnull align 4 dereferenceable(4) [[VAR:%.*]]) #[[ATTR6:[0-9]+]] {
|
||||
// CHECK2-NEXT: entry:
|
||||
// CHECK2-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK2-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK2-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK2-NEXT: [[T_VAR_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK2-NEXT: [[VEC_ADDR:%.*]] = alloca [2 x i32]*, align 8
|
||||
// CHECK2-NEXT: [[S_ARR_ADDR:%.*]] = alloca [2 x %struct.S.0]*, align 8
|
||||
// CHECK2-NEXT: [[VAR_ADDR:%.*]] = alloca %struct.S.0*, align 8
|
||||
// CHECK2-NEXT: [[DOTOMP_SECTIONS_LB_:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[DOTOMP_SECTIONS_UB_:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[DOTOMP_SECTIONS_ST_:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[DOTOMP_SECTIONS_IL_:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[DOTOMP_SECTIONS_IV_:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[T_VAR:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[VEC:%.*]] = alloca [2 x i32], align 4
|
||||
// CHECK2-NEXT: [[S_ARR:%.*]] = alloca [2 x %struct.S.0], align 4
|
||||
// CHECK2-NEXT: [[T_VAR1:%.*]] = alloca i32, align 4
|
||||
// CHECK2-NEXT: [[VEC2:%.*]] = alloca [2 x i32], align 4
|
||||
// CHECK2-NEXT: [[S_ARR3:%.*]] = alloca [2 x %struct.S.0], align 4
|
||||
// CHECK2-NEXT: [[AGG_TMP:%.*]] = alloca [[STRUCT_ST:%.*]], align 4
|
||||
// CHECK2-NEXT: [[VAR:%.*]] = alloca [[STRUCT_S_0:%.*]], align 4
|
||||
// CHECK2-NEXT: [[AGG_TMP2:%.*]] = alloca [[STRUCT_ST]], align 4
|
||||
// CHECK2-NEXT: [[VAR5:%.*]] = alloca [[STRUCT_S_0:%.*]], align 4
|
||||
// CHECK2-NEXT: [[AGG_TMP6:%.*]] = alloca [[STRUCT_ST]], align 4
|
||||
// CHECK2-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 8
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP0]], i32 0, i32 1
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = load [2 x i32]*, [2 x i32]** [[TMP3]], align 8
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP0]], i32 0, i32 2
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = load [2 x %struct.S.0]*, [2 x %struct.S.0]** [[TMP5]], align 8
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[TMP0]], i32 0, i32 3
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = load %struct.S.0*, %struct.S.0** [[TMP7]], align 8
|
||||
// CHECK2-NEXT: store i32* [[T_VAR]], i32** [[T_VAR_ADDR]], align 8
|
||||
// CHECK2-NEXT: store [2 x i32]* [[VEC]], [2 x i32]** [[VEC_ADDR]], align 8
|
||||
// CHECK2-NEXT: store [2 x %struct.S.0]* [[S_ARR]], [2 x %struct.S.0]** [[S_ARR_ADDR]], align 8
|
||||
// CHECK2-NEXT: store %struct.S.0* [[VAR]], %struct.S.0** [[VAR_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP0:%.*]] = load i32*, i32** [[T_VAR_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP1:%.*]] = load [2 x i32]*, [2 x i32]** [[VEC_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP2:%.*]] = load [2 x %struct.S.0]*, [2 x %struct.S.0]** [[S_ARR_ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP3:%.*]] = load %struct.S.0*, %struct.S.0** [[VAR_ADDR]], align 8
|
||||
// CHECK2-NEXT: store i32 0, i32* [[DOTOMP_SECTIONS_LB_]], align 4
|
||||
// CHECK2-NEXT: store i32 1, i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK2-NEXT: store i32 1, i32* [[DOTOMP_SECTIONS_ST_]], align 4
|
||||
// CHECK2-NEXT: store i32 0, i32* [[DOTOMP_SECTIONS_IL_]], align 4
|
||||
// CHECK2-NEXT: [[TMP9:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK2-NEXT: store i32 [[TMP9]], i32* [[T_VAR]], align 4
|
||||
// CHECK2-NEXT: [[TMP10:%.*]] = bitcast [2 x i32]* [[VEC]] to i8*
|
||||
// CHECK2-NEXT: [[TMP11:%.*]] = bitcast [2 x i32]* [[TMP4]] to i8*
|
||||
// CHECK2-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 [[TMP10]], i8* align 4 [[TMP11]], i64 8, i1 false)
|
||||
// CHECK2-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S.0], [2 x %struct.S.0]* [[S_ARR]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP12:%.*]] = bitcast [2 x %struct.S.0]* [[TMP6]] to %struct.S.0*
|
||||
// CHECK2-NEXT: [[TMP13:%.*]] = getelementptr [[STRUCT_S_0]], %struct.S.0* [[ARRAY_BEGIN]], i64 2
|
||||
// CHECK2-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq %struct.S.0* [[ARRAY_BEGIN]], [[TMP13]]
|
||||
// CHECK2-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE1:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]]
|
||||
// CHECK2-NEXT: [[TMP4:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK2-NEXT: store i32 [[TMP4]], i32* [[T_VAR1]], align 4
|
||||
// CHECK2-NEXT: [[TMP5:%.*]] = bitcast [2 x i32]* [[VEC2]] to i8*
|
||||
// CHECK2-NEXT: [[TMP6:%.*]] = bitcast [2 x i32]* [[TMP1]] to i8*
|
||||
// CHECK2-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 [[TMP5]], i8* align 4 [[TMP6]], i64 8, i1 false)
|
||||
// CHECK2-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S.0], [2 x %struct.S.0]* [[S_ARR3]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP7:%.*]] = bitcast [2 x %struct.S.0]* [[TMP2]] to %struct.S.0*
|
||||
// CHECK2-NEXT: [[TMP8:%.*]] = getelementptr [[STRUCT_S_0]], %struct.S.0* [[ARRAY_BEGIN]], i64 2
|
||||
// CHECK2-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq %struct.S.0* [[ARRAY_BEGIN]], [[TMP8]]
|
||||
// CHECK2-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE4:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]]
|
||||
// CHECK2: omp.arraycpy.body:
|
||||
// CHECK2-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi %struct.S.0* [ [[TMP12]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
|
||||
// CHECK2-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi %struct.S.0* [ [[TMP7]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
|
||||
// CHECK2-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi %struct.S.0* [ [[ARRAY_BEGIN]], [[ENTRY]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
|
||||
// CHECK2-NEXT: call void @_ZN2StC1Ev(%struct.St* nonnull align 4 dereferenceable(8) [[AGG_TMP]])
|
||||
// CHECK2-NEXT: call void @_ZN1SIiEC1ERKS0_2St(%struct.S.0* nonnull align 4 dereferenceable(4) [[OMP_ARRAYCPY_DESTELEMENTPAST]], %struct.S.0* nonnull align 4 dereferenceable(4) [[OMP_ARRAYCPY_SRCELEMENTPAST]], %struct.St* [[AGG_TMP]])
|
||||
// CHECK2-NEXT: call void @_ZN2StD1Ev(%struct.St* nonnull align 4 dereferenceable(8) [[AGG_TMP]]) #[[ATTR2]]
|
||||
// CHECK2-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr [[STRUCT_S_0]], %struct.S.0* [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1
|
||||
// CHECK2-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr [[STRUCT_S_0]], %struct.S.0* [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1
|
||||
// CHECK2-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq %struct.S.0* [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP13]]
|
||||
// CHECK2-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYCPY_DONE1]], label [[OMP_ARRAYCPY_BODY]]
|
||||
// CHECK2: omp.arraycpy.done1:
|
||||
// CHECK2-NEXT: call void @_ZN2StC1Ev(%struct.St* nonnull align 4 dereferenceable(8) [[AGG_TMP2]])
|
||||
// CHECK2-NEXT: call void @_ZN1SIiEC1ERKS0_2St(%struct.S.0* nonnull align 4 dereferenceable(4) [[VAR]], %struct.S.0* nonnull align 4 dereferenceable(4) [[TMP8]], %struct.St* [[AGG_TMP2]])
|
||||
// CHECK2-NEXT: call void @_ZN2StD1Ev(%struct.St* nonnull align 4 dereferenceable(8) [[AGG_TMP2]]) #[[ATTR2]]
|
||||
// CHECK2-NEXT: [[TMP14:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP15:%.*]] = load i32, i32* [[TMP14]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB1]], i32 [[TMP15]], i32 34, i32* [[DOTOMP_SECTIONS_IL_]], i32* [[DOTOMP_SECTIONS_LB_]], i32* [[DOTOMP_SECTIONS_UB_]], i32* [[DOTOMP_SECTIONS_ST_]], i32 1, i32 1)
|
||||
// CHECK2-NEXT: [[TMP16:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK2-NEXT: [[TMP17:%.*]] = icmp slt i32 [[TMP16]], 1
|
||||
// CHECK2-NEXT: [[TMP18:%.*]] = select i1 [[TMP17]], i32 [[TMP16]], i32 1
|
||||
// CHECK2-NEXT: store i32 [[TMP18]], i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK2-NEXT: [[TMP19:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_LB_]], align 4
|
||||
// CHECK2-NEXT: store i32 [[TMP19]], i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK2-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq %struct.S.0* [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP8]]
|
||||
// CHECK2-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYCPY_DONE4]], label [[OMP_ARRAYCPY_BODY]]
|
||||
// CHECK2: omp.arraycpy.done4:
|
||||
// CHECK2-NEXT: call void @_ZN2StC1Ev(%struct.St* nonnull align 4 dereferenceable(8) [[AGG_TMP6]])
|
||||
// CHECK2-NEXT: call void @_ZN1SIiEC1ERKS0_2St(%struct.S.0* nonnull align 4 dereferenceable(4) [[VAR5]], %struct.S.0* nonnull align 4 dereferenceable(4) [[TMP3]], %struct.St* [[AGG_TMP6]])
|
||||
// CHECK2-NEXT: call void @_ZN2StD1Ev(%struct.St* nonnull align 4 dereferenceable(8) [[AGG_TMP6]]) #[[ATTR2]]
|
||||
// CHECK2-NEXT: [[TMP9:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP10:%.*]] = load i32, i32* [[TMP9]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB1]], i32 [[TMP10]], i32 34, i32* [[DOTOMP_SECTIONS_IL_]], i32* [[DOTOMP_SECTIONS_LB_]], i32* [[DOTOMP_SECTIONS_UB_]], i32* [[DOTOMP_SECTIONS_ST_]], i32 1, i32 1)
|
||||
// CHECK2-NEXT: [[TMP11:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK2-NEXT: [[TMP12:%.*]] = icmp slt i32 [[TMP11]], 1
|
||||
// CHECK2-NEXT: [[TMP13:%.*]] = select i1 [[TMP12]], i32 [[TMP11]], i32 1
|
||||
// CHECK2-NEXT: store i32 [[TMP13]], i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK2-NEXT: [[TMP14:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_LB_]], align 4
|
||||
// CHECK2-NEXT: store i32 [[TMP14]], i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK2-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
|
||||
// CHECK2: omp.inner.for.cond:
|
||||
// CHECK2-NEXT: [[TMP20:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK2-NEXT: [[TMP21:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK2-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP20]], [[TMP21]]
|
||||
// CHECK2-NEXT: [[TMP15:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK2-NEXT: [[TMP16:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK2-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP15]], [[TMP16]]
|
||||
// CHECK2-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
|
||||
// CHECK2: omp.inner.for.body:
|
||||
// CHECK2-NEXT: [[TMP22:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK2-NEXT: switch i32 [[TMP22]], label [[DOTOMP_SECTIONS_EXIT:%.*]] [
|
||||
// CHECK2-NEXT: [[TMP17:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK2-NEXT: switch i32 [[TMP17]], label [[DOTOMP_SECTIONS_EXIT:%.*]] [
|
||||
// CHECK2-NEXT: i32 0, label [[DOTOMP_SECTIONS_CASE:%.*]]
|
||||
// CHECK2-NEXT: i32 1, label [[DOTOMP_SECTIONS_CASE3:%.*]]
|
||||
// CHECK2-NEXT: i32 1, label [[DOTOMP_SECTIONS_CASE7:%.*]]
|
||||
// CHECK2-NEXT: ]
|
||||
// CHECK2: .omp.sections.case:
|
||||
// CHECK2-NEXT: [[TMP23:%.*]] = load i32, i32* [[T_VAR]], align 4
|
||||
// CHECK2-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [2 x i32], [2 x i32]* [[VEC]], i64 0, i64 0
|
||||
// CHECK2-NEXT: store i32 [[TMP23]], i32* [[ARRAYIDX]], align 4
|
||||
// CHECK2-NEXT: [[TMP18:%.*]] = load i32, i32* [[T_VAR1]], align 4
|
||||
// CHECK2-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [2 x i32], [2 x i32]* [[VEC2]], i64 0, i64 0
|
||||
// CHECK2-NEXT: store i32 [[TMP18]], i32* [[ARRAYIDX]], align 4
|
||||
// CHECK2-NEXT: br label [[DOTOMP_SECTIONS_EXIT]]
|
||||
// CHECK2: .omp.sections.case3:
|
||||
// CHECK2-NEXT: [[ARRAYIDX4:%.*]] = getelementptr inbounds [2 x %struct.S.0], [2 x %struct.S.0]* [[S_ARR]], i64 0, i64 0
|
||||
// CHECK2-NEXT: [[TMP24:%.*]] = bitcast %struct.S.0* [[ARRAYIDX4]] to i8*
|
||||
// CHECK2-NEXT: [[TMP25:%.*]] = bitcast %struct.S.0* [[VAR]] to i8*
|
||||
// CHECK2-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 [[TMP24]], i8* align 4 [[TMP25]], i64 4, i1 false)
|
||||
// CHECK2: .omp.sections.case7:
|
||||
// CHECK2-NEXT: [[ARRAYIDX8:%.*]] = getelementptr inbounds [2 x %struct.S.0], [2 x %struct.S.0]* [[S_ARR3]], i64 0, i64 0
|
||||
// CHECK2-NEXT: [[TMP19:%.*]] = bitcast %struct.S.0* [[ARRAYIDX8]] to i8*
|
||||
// CHECK2-NEXT: [[TMP20:%.*]] = bitcast %struct.S.0* [[VAR5]] to i8*
|
||||
// CHECK2-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 [[TMP19]], i8* align 4 [[TMP20]], i64 4, i1 false)
|
||||
// CHECK2-NEXT: br label [[DOTOMP_SECTIONS_EXIT]]
|
||||
// CHECK2: .omp.sections.exit:
|
||||
// CHECK2-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
|
||||
// CHECK2: omp.inner.for.inc:
|
||||
// CHECK2-NEXT: [[TMP26:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK2-NEXT: [[INC:%.*]] = add nsw i32 [[TMP26]], 1
|
||||
// CHECK2-NEXT: [[TMP21:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK2-NEXT: [[INC:%.*]] = add nsw i32 [[TMP21]], 1
|
||||
// CHECK2-NEXT: store i32 [[INC]], i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK2-NEXT: br label [[OMP_INNER_FOR_COND]]
|
||||
// CHECK2: omp.inner.for.end:
|
||||
// CHECK2-NEXT: [[TMP27:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP28:%.*]] = load i32, i32* [[TMP27]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB1]], i32 [[TMP28]])
|
||||
// CHECK2-NEXT: call void @_ZN1SIiED1Ev(%struct.S.0* nonnull align 4 dereferenceable(4) [[VAR]]) #[[ATTR2]]
|
||||
// CHECK2-NEXT: [[ARRAY_BEGIN5:%.*]] = getelementptr inbounds [2 x %struct.S.0], [2 x %struct.S.0]* [[S_ARR]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP29:%.*]] = getelementptr inbounds [[STRUCT_S_0]], %struct.S.0* [[ARRAY_BEGIN5]], i64 2
|
||||
// CHECK2-NEXT: [[TMP22:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP23:%.*]] = load i32, i32* [[TMP22]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB1]], i32 [[TMP23]])
|
||||
// CHECK2-NEXT: call void @_ZN1SIiED1Ev(%struct.S.0* nonnull align 4 dereferenceable(4) [[VAR5]]) #[[ATTR2]]
|
||||
// CHECK2-NEXT: [[ARRAY_BEGIN9:%.*]] = getelementptr inbounds [2 x %struct.S.0], [2 x %struct.S.0]* [[S_ARR3]], i32 0, i32 0
|
||||
// CHECK2-NEXT: [[TMP24:%.*]] = getelementptr inbounds [[STRUCT_S_0]], %struct.S.0* [[ARRAY_BEGIN9]], i64 2
|
||||
// CHECK2-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
|
||||
// CHECK2: arraydestroy.body:
|
||||
// CHECK2-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi %struct.S.0* [ [[TMP29]], [[OMP_INNER_FOR_END]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
|
||||
// CHECK2-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi %struct.S.0* [ [[TMP24]], [[OMP_INNER_FOR_END]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
|
||||
// CHECK2-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S_0]], %struct.S.0* [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
|
||||
// CHECK2-NEXT: call void @_ZN1SIiED1Ev(%struct.S.0* nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR2]]
|
||||
// CHECK2-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq %struct.S.0* [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN5]]
|
||||
// CHECK2-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE6:%.*]], label [[ARRAYDESTROY_BODY]]
|
||||
// CHECK2: arraydestroy.done6:
|
||||
// CHECK2-NEXT: [[TMP30:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP31:%.*]] = load i32, i32* [[TMP30]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB3:[0-9]+]], i32 [[TMP31]])
|
||||
// CHECK2-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq %struct.S.0* [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN9]]
|
||||
// CHECK2-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE10:%.*]], label [[ARRAYDESTROY_BODY]]
|
||||
// CHECK2: arraydestroy.done10:
|
||||
// CHECK2-NEXT: [[TMP25:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK2-NEXT: [[TMP26:%.*]] = load i32, i32* [[TMP25]], align 4
|
||||
// CHECK2-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB3:[0-9]+]], i32 [[TMP26]])
|
||||
// CHECK2-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -1391,75 +1375,73 @@ int main() {
|
|||
//
|
||||
//
|
||||
// CHECK3-LABEL: define {{[^@]+}}@.omp_outlined.
|
||||
// CHECK3-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR5:[0-9]+]] {
|
||||
// CHECK3-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[SIVAR:%.*]]) #[[ATTR5:[0-9]+]] {
|
||||
// CHECK3-NEXT: entry:
|
||||
// CHECK3-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK3-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK3-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK3-NEXT: [[SIVAR_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK3-NEXT: [[DOTOMP_SECTIONS_LB_:%.*]] = alloca i32, align 4
|
||||
// CHECK3-NEXT: [[DOTOMP_SECTIONS_UB_:%.*]] = alloca i32, align 4
|
||||
// CHECK3-NEXT: [[DOTOMP_SECTIONS_ST_:%.*]] = alloca i32, align 4
|
||||
// CHECK3-NEXT: [[DOTOMP_SECTIONS_IL_:%.*]] = alloca i32, align 4
|
||||
// CHECK3-NEXT: [[DOTOMP_SECTIONS_IV_:%.*]] = alloca i32, align 4
|
||||
// CHECK3-NEXT: [[G:%.*]] = alloca i32, align 4
|
||||
// CHECK3-NEXT: [[SIVAR:%.*]] = alloca i32, align 4
|
||||
// CHECK3-NEXT: [[SIVAR1:%.*]] = alloca i32, align 4
|
||||
// CHECK3-NEXT: [[REF_TMP:%.*]] = alloca [[CLASS_ANON_0:%.*]], align 8
|
||||
// CHECK3-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK3-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK3-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK3-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 8
|
||||
// CHECK3-NEXT: store i32* [[SIVAR]], i32** [[SIVAR_ADDR]], align 8
|
||||
// CHECK3-NEXT: [[TMP0:%.*]] = load i32*, i32** [[SIVAR_ADDR]], align 8
|
||||
// CHECK3-NEXT: store i32 0, i32* [[DOTOMP_SECTIONS_LB_]], align 4
|
||||
// CHECK3-NEXT: store i32 1, i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK3-NEXT: store i32 1, i32* [[DOTOMP_SECTIONS_ST_]], align 4
|
||||
// CHECK3-NEXT: store i32 0, i32* [[DOTOMP_SECTIONS_IL_]], align 4
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = load volatile i32, i32* @g, align 4
|
||||
// CHECK3-NEXT: store i32 [[TMP3]], i32* [[G]], align 4
|
||||
// CHECK3-NEXT: [[TMP4:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK3-NEXT: store i32 [[TMP4]], i32* [[SIVAR]], align 4
|
||||
// CHECK3-NEXT: [[TMP5:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK3-NEXT: [[TMP6:%.*]] = load i32, i32* [[TMP5]], align 4
|
||||
// CHECK3-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 [[TMP6]], i32 34, i32* [[DOTOMP_SECTIONS_IL_]], i32* [[DOTOMP_SECTIONS_LB_]], i32* [[DOTOMP_SECTIONS_UB_]], i32* [[DOTOMP_SECTIONS_ST_]], i32 1, i32 1)
|
||||
// CHECK3-NEXT: [[TMP7:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK3-NEXT: [[TMP8:%.*]] = icmp slt i32 [[TMP7]], 1
|
||||
// CHECK3-NEXT: [[TMP9:%.*]] = select i1 [[TMP8]], i32 [[TMP7]], i32 1
|
||||
// CHECK3-NEXT: store i32 [[TMP9]], i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK3-NEXT: [[TMP10:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_LB_]], align 4
|
||||
// CHECK3-NEXT: store i32 [[TMP10]], i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK3-NEXT: [[TMP1:%.*]] = load volatile i32, i32* @g, align 4
|
||||
// CHECK3-NEXT: store i32 [[TMP1]], i32* [[G]], align 4
|
||||
// CHECK3-NEXT: [[TMP2:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK3-NEXT: store i32 [[TMP2]], i32* [[SIVAR1]], align 4
|
||||
// CHECK3-NEXT: [[TMP3:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK3-NEXT: [[TMP4:%.*]] = load i32, i32* [[TMP3]], align 4
|
||||
// CHECK3-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 [[TMP4]], i32 34, i32* [[DOTOMP_SECTIONS_IL_]], i32* [[DOTOMP_SECTIONS_LB_]], i32* [[DOTOMP_SECTIONS_UB_]], i32* [[DOTOMP_SECTIONS_ST_]], i32 1, i32 1)
|
||||
// CHECK3-NEXT: [[TMP5:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK3-NEXT: [[TMP6:%.*]] = icmp slt i32 [[TMP5]], 1
|
||||
// CHECK3-NEXT: [[TMP7:%.*]] = select i1 [[TMP6]], i32 [[TMP5]], i32 1
|
||||
// CHECK3-NEXT: store i32 [[TMP7]], i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK3-NEXT: [[TMP8:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_LB_]], align 4
|
||||
// CHECK3-NEXT: store i32 [[TMP8]], i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK3-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
|
||||
// CHECK3: omp.inner.for.cond:
|
||||
// CHECK3-NEXT: [[TMP11:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK3-NEXT: [[TMP12:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK3-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP11]], [[TMP12]]
|
||||
// CHECK3-NEXT: [[TMP9:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK3-NEXT: [[TMP10:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK3-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP9]], [[TMP10]]
|
||||
// CHECK3-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
|
||||
// CHECK3: omp.inner.for.body:
|
||||
// CHECK3-NEXT: [[TMP13:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK3-NEXT: switch i32 [[TMP13]], label [[DOTOMP_SECTIONS_EXIT:%.*]] [
|
||||
// CHECK3-NEXT: [[TMP11:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK3-NEXT: switch i32 [[TMP11]], label [[DOTOMP_SECTIONS_EXIT:%.*]] [
|
||||
// CHECK3-NEXT: i32 0, label [[DOTOMP_SECTIONS_CASE:%.*]]
|
||||
// CHECK3-NEXT: i32 1, label [[DOTOMP_SECTIONS_CASE1:%.*]]
|
||||
// CHECK3-NEXT: i32 1, label [[DOTOMP_SECTIONS_CASE2:%.*]]
|
||||
// CHECK3-NEXT: ]
|
||||
// CHECK3: .omp.sections.case:
|
||||
// CHECK3-NEXT: store i32 1, i32* [[G]], align 4
|
||||
// CHECK3-NEXT: store i32 10, i32* [[SIVAR]], align 4
|
||||
// CHECK3-NEXT: store i32 10, i32* [[SIVAR1]], align 4
|
||||
// CHECK3-NEXT: br label [[DOTOMP_SECTIONS_EXIT]]
|
||||
// CHECK3: .omp.sections.case1:
|
||||
// CHECK3-NEXT: [[TMP14:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], %class.anon.0* [[REF_TMP]], i32 0, i32 0
|
||||
// CHECK3-NEXT: store i32* [[G]], i32** [[TMP14]], align 8
|
||||
// CHECK3-NEXT: [[TMP15:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], %class.anon.0* [[REF_TMP]], i32 0, i32 1
|
||||
// CHECK3-NEXT: store i32* [[SIVAR]], i32** [[TMP15]], align 8
|
||||
// CHECK3: .omp.sections.case2:
|
||||
// CHECK3-NEXT: [[TMP12:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], %class.anon.0* [[REF_TMP]], i32 0, i32 0
|
||||
// CHECK3-NEXT: store i32* [[G]], i32** [[TMP12]], align 8
|
||||
// CHECK3-NEXT: [[TMP13:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], %class.anon.0* [[REF_TMP]], i32 0, i32 1
|
||||
// CHECK3-NEXT: store i32* [[SIVAR1]], i32** [[TMP13]], align 8
|
||||
// CHECK3-NEXT: call void @"_ZZZ4mainENK3$_0clEvENKUlvE_clEv"(%class.anon.0* nonnull align 8 dereferenceable(16) [[REF_TMP]])
|
||||
// CHECK3-NEXT: br label [[DOTOMP_SECTIONS_EXIT]]
|
||||
// CHECK3: .omp.sections.exit:
|
||||
// CHECK3-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
|
||||
// CHECK3: omp.inner.for.inc:
|
||||
// CHECK3-NEXT: [[TMP16:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK3-NEXT: [[INC:%.*]] = add nsw i32 [[TMP16]], 1
|
||||
// CHECK3-NEXT: [[TMP14:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK3-NEXT: [[INC:%.*]] = add nsw i32 [[TMP14]], 1
|
||||
// CHECK3-NEXT: store i32 [[INC]], i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK3-NEXT: br label [[OMP_INNER_FOR_COND]]
|
||||
// CHECK3: omp.inner.for.end:
|
||||
// CHECK3-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB1]], i32 [[TMP6]])
|
||||
// CHECK3-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 [[TMP6]])
|
||||
// CHECK3-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB1]], i32 [[TMP4]])
|
||||
// CHECK3-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 [[TMP4]])
|
||||
// CHECK3-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -1619,70 +1601,65 @@ int main() {
|
|||
// CHECK4-NEXT: entry:
|
||||
// CHECK4-NEXT: [[DOTBLOCK_DESCRIPTOR_ADDR:%.*]] = alloca i8*, align 8
|
||||
// CHECK4-NEXT: [[BLOCK_ADDR:%.*]] = alloca <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i32 }>*, align 8
|
||||
// CHECK4-NEXT: [[OMP_OUTLINED_ARG_AGG_:%.*]] = alloca [[STRUCT_ANON:%.*]], align 8
|
||||
// CHECK4-NEXT: store i8* [[DOTBLOCK_DESCRIPTOR]], i8** [[DOTBLOCK_DESCRIPTOR_ADDR]], align 8
|
||||
// CHECK4-NEXT: [[BLOCK:%.*]] = bitcast i8* [[DOTBLOCK_DESCRIPTOR]] to <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i32 }>*
|
||||
// CHECK4-NEXT: store <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i32 }>* [[BLOCK]], <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i32 }>** [[BLOCK_ADDR]], align 8
|
||||
// CHECK4-NEXT: [[TMP0:%.*]] = getelementptr inbounds [[STRUCT_ANON]], %struct.anon* [[OMP_OUTLINED_ARG_AGG_]], i32 0, i32 0
|
||||
// CHECK4-NEXT: store i32* @_ZZ4mainE5sivar, i32** [[TMP0]], align 8
|
||||
// CHECK4-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB3:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon*)* @.omp_outlined. to void (i32*, i32*, ...)*), %struct.anon* [[OMP_OUTLINED_ARG_AGG_]])
|
||||
// CHECK4-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB3:[0-9]+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @.omp_outlined. to void (i32*, i32*, ...)*), i32* @_ZZ4mainE5sivar)
|
||||
// CHECK4-NEXT: ret void
|
||||
//
|
||||
//
|
||||
// CHECK4-LABEL: define {{[^@]+}}@.omp_outlined.
|
||||
// CHECK4-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], %struct.anon* noalias [[__CONTEXT:%.*]]) #[[ATTR4:[0-9]+]] {
|
||||
// CHECK4-SAME: (i32* noalias [[DOTGLOBAL_TID_:%.*]], i32* noalias [[DOTBOUND_TID_:%.*]], i32* nonnull align 4 dereferenceable(4) [[SIVAR:%.*]]) #[[ATTR4:[0-9]+]] {
|
||||
// CHECK4-NEXT: entry:
|
||||
// CHECK4-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK4-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK4-NEXT: [[__CONTEXT_ADDR:%.*]] = alloca %struct.anon*, align 8
|
||||
// CHECK4-NEXT: [[SIVAR_ADDR:%.*]] = alloca i32*, align 8
|
||||
// CHECK4-NEXT: [[DOTOMP_SECTIONS_LB_:%.*]] = alloca i32, align 4
|
||||
// CHECK4-NEXT: [[DOTOMP_SECTIONS_UB_:%.*]] = alloca i32, align 4
|
||||
// CHECK4-NEXT: [[DOTOMP_SECTIONS_ST_:%.*]] = alloca i32, align 4
|
||||
// CHECK4-NEXT: [[DOTOMP_SECTIONS_IL_:%.*]] = alloca i32, align 4
|
||||
// CHECK4-NEXT: [[DOTOMP_SECTIONS_IV_:%.*]] = alloca i32, align 4
|
||||
// CHECK4-NEXT: [[G:%.*]] = alloca i32, align 4
|
||||
// CHECK4-NEXT: [[SIVAR:%.*]] = alloca i32, align 4
|
||||
// CHECK4-NEXT: [[SIVAR1:%.*]] = alloca i32, align 4
|
||||
// CHECK4-NEXT: [[BLOCK:%.*]] = alloca <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i32, i32 }>, align 8
|
||||
// CHECK4-NEXT: store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK4-NEXT: store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
|
||||
// CHECK4-NEXT: store %struct.anon* [[__CONTEXT]], %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK4-NEXT: [[TMP0:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR]], align 8
|
||||
// CHECK4-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_ANON:%.*]], %struct.anon* [[TMP0]], i32 0, i32 0
|
||||
// CHECK4-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 8
|
||||
// CHECK4-NEXT: store i32* [[SIVAR]], i32** [[SIVAR_ADDR]], align 8
|
||||
// CHECK4-NEXT: [[TMP0:%.*]] = load i32*, i32** [[SIVAR_ADDR]], align 8
|
||||
// CHECK4-NEXT: store i32 0, i32* [[DOTOMP_SECTIONS_LB_]], align 4
|
||||
// CHECK4-NEXT: store i32 1, i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK4-NEXT: store i32 1, i32* [[DOTOMP_SECTIONS_ST_]], align 4
|
||||
// CHECK4-NEXT: store i32 0, i32* [[DOTOMP_SECTIONS_IL_]], align 4
|
||||
// CHECK4-NEXT: [[TMP3:%.*]] = load volatile i32, i32* @g, align 4
|
||||
// CHECK4-NEXT: store i32 [[TMP3]], i32* [[G]], align 4
|
||||
// CHECK4-NEXT: [[TMP4:%.*]] = load i32, i32* [[TMP2]], align 4
|
||||
// CHECK4-NEXT: store i32 [[TMP4]], i32* [[SIVAR]], align 4
|
||||
// CHECK4-NEXT: [[TMP5:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK4-NEXT: [[TMP6:%.*]] = load i32, i32* [[TMP5]], align 4
|
||||
// CHECK4-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 [[TMP6]], i32 34, i32* [[DOTOMP_SECTIONS_IL_]], i32* [[DOTOMP_SECTIONS_LB_]], i32* [[DOTOMP_SECTIONS_UB_]], i32* [[DOTOMP_SECTIONS_ST_]], i32 1, i32 1)
|
||||
// CHECK4-NEXT: [[TMP7:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK4-NEXT: [[TMP8:%.*]] = icmp slt i32 [[TMP7]], 1
|
||||
// CHECK4-NEXT: [[TMP9:%.*]] = select i1 [[TMP8]], i32 [[TMP7]], i32 1
|
||||
// CHECK4-NEXT: store i32 [[TMP9]], i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK4-NEXT: [[TMP10:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_LB_]], align 4
|
||||
// CHECK4-NEXT: store i32 [[TMP10]], i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK4-NEXT: [[TMP1:%.*]] = load volatile i32, i32* @g, align 4
|
||||
// CHECK4-NEXT: store i32 [[TMP1]], i32* [[G]], align 4
|
||||
// CHECK4-NEXT: [[TMP2:%.*]] = load i32, i32* [[TMP0]], align 4
|
||||
// CHECK4-NEXT: store i32 [[TMP2]], i32* [[SIVAR1]], align 4
|
||||
// CHECK4-NEXT: [[TMP3:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
|
||||
// CHECK4-NEXT: [[TMP4:%.*]] = load i32, i32* [[TMP3]], align 4
|
||||
// CHECK4-NEXT: call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB1:[0-9]+]], i32 [[TMP4]], i32 34, i32* [[DOTOMP_SECTIONS_IL_]], i32* [[DOTOMP_SECTIONS_LB_]], i32* [[DOTOMP_SECTIONS_UB_]], i32* [[DOTOMP_SECTIONS_ST_]], i32 1, i32 1)
|
||||
// CHECK4-NEXT: [[TMP5:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK4-NEXT: [[TMP6:%.*]] = icmp slt i32 [[TMP5]], 1
|
||||
// CHECK4-NEXT: [[TMP7:%.*]] = select i1 [[TMP6]], i32 [[TMP5]], i32 1
|
||||
// CHECK4-NEXT: store i32 [[TMP7]], i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK4-NEXT: [[TMP8:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_LB_]], align 4
|
||||
// CHECK4-NEXT: store i32 [[TMP8]], i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK4-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
|
||||
// CHECK4: omp.inner.for.cond:
|
||||
// CHECK4-NEXT: [[TMP11:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK4-NEXT: [[TMP12:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK4-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP11]], [[TMP12]]
|
||||
// CHECK4-NEXT: [[TMP9:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK4-NEXT: [[TMP10:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_UB_]], align 4
|
||||
// CHECK4-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP9]], [[TMP10]]
|
||||
// CHECK4-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
|
||||
// CHECK4: omp.inner.for.body:
|
||||
// CHECK4-NEXT: [[TMP13:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK4-NEXT: switch i32 [[TMP13]], label [[DOTOMP_SECTIONS_EXIT:%.*]] [
|
||||
// CHECK4-NEXT: [[TMP11:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK4-NEXT: switch i32 [[TMP11]], label [[DOTOMP_SECTIONS_EXIT:%.*]] [
|
||||
// CHECK4-NEXT: i32 0, label [[DOTOMP_SECTIONS_CASE:%.*]]
|
||||
// CHECK4-NEXT: i32 1, label [[DOTOMP_SECTIONS_CASE1:%.*]]
|
||||
// CHECK4-NEXT: i32 1, label [[DOTOMP_SECTIONS_CASE2:%.*]]
|
||||
// CHECK4-NEXT: ]
|
||||
// CHECK4: .omp.sections.case:
|
||||
// CHECK4-NEXT: store i32 1, i32* [[G]], align 4
|
||||
// CHECK4-NEXT: store i32 10, i32* [[SIVAR]], align 4
|
||||
// CHECK4-NEXT: store i32 10, i32* [[SIVAR1]], align 4
|
||||
// CHECK4-NEXT: br label [[DOTOMP_SECTIONS_EXIT]]
|
||||
// CHECK4: .omp.sections.case1:
|
||||
// CHECK4: .omp.sections.case2:
|
||||
// CHECK4-NEXT: [[BLOCK_ISA:%.*]] = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i32, i32 }>, <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i32, i32 }>* [[BLOCK]], i32 0, i32 0
|
||||
// CHECK4-NEXT: store i8* bitcast (i8** @_NSConcreteStackBlock to i8*), i8** [[BLOCK_ISA]], align 8
|
||||
// CHECK4-NEXT: [[BLOCK_FLAGS:%.*]] = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i32, i32 }>, <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i32, i32 }>* [[BLOCK]], i32 0, i32 1
|
||||
|
@ -1694,29 +1671,29 @@ int main() {
|
|||
// CHECK4-NEXT: [[BLOCK_DESCRIPTOR:%.*]] = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i32, i32 }>, <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i32, i32 }>* [[BLOCK]], i32 0, i32 4
|
||||
// CHECK4-NEXT: store %struct.__block_descriptor* bitcast ({ i64, i64, i8*, i8* }* @__block_descriptor_tmp to %struct.__block_descriptor*), %struct.__block_descriptor** [[BLOCK_DESCRIPTOR]], align 8
|
||||
// CHECK4-NEXT: [[BLOCK_CAPTURED:%.*]] = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i32, i32 }>, <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i32, i32 }>* [[BLOCK]], i32 0, i32 5
|
||||
// CHECK4-NEXT: [[TMP14:%.*]] = load volatile i32, i32* [[G]], align 4
|
||||
// CHECK4-NEXT: store volatile i32 [[TMP14]], i32* [[BLOCK_CAPTURED]], align 8
|
||||
// CHECK4-NEXT: [[BLOCK_CAPTURED2:%.*]] = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i32, i32 }>, <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i32, i32 }>* [[BLOCK]], i32 0, i32 6
|
||||
// CHECK4-NEXT: [[TMP15:%.*]] = load i32, i32* [[SIVAR]], align 4
|
||||
// CHECK4-NEXT: store i32 [[TMP15]], i32* [[BLOCK_CAPTURED2]], align 4
|
||||
// CHECK4-NEXT: [[TMP16:%.*]] = bitcast <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i32, i32 }>* [[BLOCK]] to void ()*
|
||||
// CHECK4-NEXT: [[BLOCK_LITERAL:%.*]] = bitcast void ()* [[TMP16]] to %struct.__block_literal_generic*
|
||||
// CHECK4-NEXT: [[TMP17:%.*]] = getelementptr inbounds [[STRUCT___BLOCK_LITERAL_GENERIC:%.*]], %struct.__block_literal_generic* [[BLOCK_LITERAL]], i32 0, i32 3
|
||||
// CHECK4-NEXT: [[TMP18:%.*]] = bitcast %struct.__block_literal_generic* [[BLOCK_LITERAL]] to i8*
|
||||
// CHECK4-NEXT: [[TMP19:%.*]] = load i8*, i8** [[TMP17]], align 8
|
||||
// CHECK4-NEXT: [[TMP20:%.*]] = bitcast i8* [[TMP19]] to void (i8*)*
|
||||
// CHECK4-NEXT: call void [[TMP20]](i8* [[TMP18]])
|
||||
// CHECK4-NEXT: [[TMP12:%.*]] = load volatile i32, i32* [[G]], align 4
|
||||
// CHECK4-NEXT: store volatile i32 [[TMP12]], i32* [[BLOCK_CAPTURED]], align 8
|
||||
// CHECK4-NEXT: [[BLOCK_CAPTURED3:%.*]] = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i32, i32 }>, <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i32, i32 }>* [[BLOCK]], i32 0, i32 6
|
||||
// CHECK4-NEXT: [[TMP13:%.*]] = load i32, i32* [[SIVAR1]], align 4
|
||||
// CHECK4-NEXT: store i32 [[TMP13]], i32* [[BLOCK_CAPTURED3]], align 4
|
||||
// CHECK4-NEXT: [[TMP14:%.*]] = bitcast <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i32, i32 }>* [[BLOCK]] to void ()*
|
||||
// CHECK4-NEXT: [[BLOCK_LITERAL:%.*]] = bitcast void ()* [[TMP14]] to %struct.__block_literal_generic*
|
||||
// CHECK4-NEXT: [[TMP15:%.*]] = getelementptr inbounds [[STRUCT___BLOCK_LITERAL_GENERIC:%.*]], %struct.__block_literal_generic* [[BLOCK_LITERAL]], i32 0, i32 3
|
||||
// CHECK4-NEXT: [[TMP16:%.*]] = bitcast %struct.__block_literal_generic* [[BLOCK_LITERAL]] to i8*
|
||||
// CHECK4-NEXT: [[TMP17:%.*]] = load i8*, i8** [[TMP15]], align 8
|
||||
// CHECK4-NEXT: [[TMP18:%.*]] = bitcast i8* [[TMP17]] to void (i8*)*
|
||||
// CHECK4-NEXT: call void [[TMP18]](i8* [[TMP16]])
|
||||
// CHECK4-NEXT: br label [[DOTOMP_SECTIONS_EXIT]]
|
||||
// CHECK4: .omp.sections.exit:
|
||||
// CHECK4-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
|
||||
// CHECK4: omp.inner.for.inc:
|
||||
// CHECK4-NEXT: [[TMP21:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK4-NEXT: [[INC:%.*]] = add nsw i32 [[TMP21]], 1
|
||||
// CHECK4-NEXT: [[TMP19:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK4-NEXT: [[INC:%.*]] = add nsw i32 [[TMP19]], 1
|
||||
// CHECK4-NEXT: store i32 [[INC]], i32* [[DOTOMP_SECTIONS_IV_]], align 4
|
||||
// CHECK4-NEXT: br label [[OMP_INNER_FOR_COND]]
|
||||
// CHECK4: omp.inner.for.end:
|
||||
// CHECK4-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB1]], i32 [[TMP6]])
|
||||
// CHECK4-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 [[TMP6]])
|
||||
// CHECK4-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB1]], i32 [[TMP4]])
|
||||
// CHECK4-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 [[TMP4]])
|
||||
// CHECK4-NEXT: ret void
|
||||
//
|
||||
//
|
||||
|
@ -1743,3 +1720,4 @@ int main() {
|
|||
// CHECK4-NEXT: call void @__cxx_global_var_init.2()
|
||||
// CHECK4-NEXT: ret void
|
||||
//
|
||||
//
|
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue