// Initialize and update is allowed for code outside of the current function
// set, but only if it is part of module slice we are allowed to look at.
- // Only exception is AAIsDeadFunction whose initialization is prevented
- // directly, since we don't to compute it twice.
if (FnScope && !Functions.count(const_cast<Function *>(FnScope))) {
if (!getInfoCache().isInModuleSlice(*FnScope)) {
AA.getState().indicatePessimisticFixpoint();
if (!State.isValidState())
continue;
+ if (AA->getCtxI() && !isRunOn(*AA->getAnchorScope()))
+ continue;
+
// Skip dead code.
bool UsedAssumedInformation = false;
if (isAssumedDead(*AA, nullptr, UsedAssumedInformation,
NewV = Entry.first;
} while (true);
+ Instruction *I = dyn_cast<Instruction>(U->getUser());
+ assert((!I || isRunOn(*I->getFunction())) &&
+ "Cannot replace an invoke outside the current SCC!");
+
// Do not replace uses in returns if the value is a must-tail call we will
// not delete.
- if (auto *RI = dyn_cast<ReturnInst>(U->getUser())) {
+ if (auto *RI = dyn_cast_or_null<ReturnInst>(I)) {
if (auto *CI = dyn_cast<CallInst>(OldV->stripPointerCasts()))
- if (CI->isMustTailCall() &&
- (!ToBeDeletedInsts.count(CI) || !isRunOn(*CI->getCaller())))
+ if (CI->isMustTailCall() && !ToBeDeletedInsts.count(CI))
return;
// If we rewrite a return and the new value is not an argument, strip the
// `returned` attribute as it is wrong now.
}
// Do not perform call graph altering changes outside the SCC.
- if (auto *CB = dyn_cast<CallBase>(U->getUser()))
- if (CB->isCallee(U) && !isRunOn(*CB->getCaller()))
+ if (auto *CB = dyn_cast_or_null<CallBase>(I))
+ if (CB->isCallee(U))
return;
LLVM_DEBUG(dbgs() << "Use " << *NewV << " in " << *U->getUser()
}
}
for (Instruction *I : TerminatorsToFold) {
- if (!isRunOn(*I->getFunction()))
- continue;
+ assert(isRunOn(*I->getFunction()) &&
+ "Cannot replace a terminator outside the current SCC!");
CGModifiedFunctions.insert(I->getFunction());
ConstantFoldTerminator(I->getParent());
}
for (auto &V : ToBeChangedToUnreachableInsts)
if (Instruction *I = dyn_cast_or_null<Instruction>(V)) {
- if (!isRunOn(*I->getFunction()))
- continue;
+ assert(isRunOn(*I->getFunction()) &&
+ "Cannot replace an instruction outside the current SCC!");
CGModifiedFunctions.insert(I->getFunction());
changeToUnreachable(I);
}
for (auto &V : ToBeDeletedInsts) {
if (Instruction *I = dyn_cast_or_null<Instruction>(V)) {
if (auto *CB = dyn_cast<CallBase>(I)) {
- if (!isRunOn(*I->getFunction()))
- continue;
+ assert(isRunOn(*I->getFunction()) &&
+ "Cannot delete an instruction outside the current SCC!");
if (!isa<IntrinsicInst>(CB))
CGUpdater.removeCallSite(*CB);
}
}
}
- llvm::erase_if(DeadInsts, [&](WeakTrackingVH I) {
- return !I || !isRunOn(*cast<Instruction>(I)->getFunction());
- });
+ llvm::erase_if(DeadInsts, [&](WeakTrackingVH I) { return !I; });
LLVM_DEBUG({
dbgs() << "[Attributor] DeadInsts size: " << DeadInsts.size() << "\n";
ARIs[OldArgNum]) {
if (ARI->CalleeRepairCB)
ARI->CalleeRepairCB(*ARI, *NewFn, NewFnArgIt);
+ if (ARI->ReplacementTypes.empty())
+ OldFnArgIt->replaceAllUsesWith(
+ PoisonValue::get(OldFnArgIt->getType()));
NewFnArgIt += ARI->ReplacementTypes.size();
} else {
NewFnArgIt->takeName(&*OldFnArgIt);
struct AAIsDeadValueImpl : public AAIsDead {
AAIsDeadValueImpl(const IRPosition &IRP, Attributor &A) : AAIsDead(IRP, A) {}
+ /// See AbstractAttribute::initialize(...).
+ void initialize(Attributor &A) override {
+ if (auto *Scope = getAnchorScope())
+ if (!A.isRunOn(*Scope))
+ indicatePessimisticFixpoint();
+ }
+
/// See AAIsDead::isAssumedDead().
bool isAssumedDead() const override { return isAssumed(IS_DEAD); }
/// Check if all uses are assumed dead.
bool areAllUsesAssumedDead(Attributor &A, Value &V) {
// Callers might not check the type, void has no uses.
- if (V.getType()->isVoidTy())
+ if (V.getType()->isVoidTy() || V.use_empty())
return true;
// If we replace a value with a constant there are no uses left afterwards.
if (!isa<Constant>(V)) {
+ if (auto *I = dyn_cast<Instruction>(&V))
+ if (!A.isRunOn(*I->getFunction()))
+ return false;
bool UsedAssumedInformation = false;
Optional<Constant *> C =
A.getAssumedConstant(V, *this, UsedAssumedInformation);
/// See AbstractAttribute::initialize(...).
void initialize(Attributor &A) override {
+ AAIsDeadValueImpl::initialize(A);
+
if (isa<UndefValue>(getAssociatedValue())) {
indicatePessimisticFixpoint();
return;
return ChangeStatus::CHANGED;
}
}
- if (V.use_empty())
- return ChangeStatus::UNCHANGED;
-
- bool UsedAssumedInformation = false;
- Optional<Constant *> C =
- A.getAssumedConstant(V, *this, UsedAssumedInformation);
- if (C.hasValue() && C.getValue())
- return ChangeStatus::UNCHANGED;
-
- // Replace the value with undef as it is dead but keep droppable uses around
- // as they provide information we don't want to give up on just yet.
- UndefValue &UV = *UndefValue::get(V.getType());
- bool AnyChange =
- A.changeValueAfterManifest(V, UV, /* ChangeDropppable */ false);
- return AnyChange ? ChangeStatus::CHANGED : ChangeStatus::UNCHANGED;
+ return ChangeStatus::UNCHANGED;
}
/// See AbstractAttribute::trackStatistics()
/// See AbstractAttribute::initialize(...).
void initialize(Attributor &A) override {
+ AAIsDeadFloating::initialize(A);
if (!A.isFunctionIPOAmendable(*getAnchorScope()))
indicatePessimisticFixpoint();
}
/// See AbstractAttribute::manifest(...).
ChangeStatus manifest(Attributor &A) override {
- ChangeStatus Changed = AAIsDeadFloating::manifest(A);
Argument &Arg = *getAssociatedArgument();
if (A.isValidFunctionSignatureRewrite(Arg, /* ReplacementTypes */ {}))
if (A.registerFunctionSignatureRewrite(
Arg, /* ReplacementTypes */ {},
Attributor::ArgumentReplacementInfo::CalleeRepairCBTy{},
Attributor::ArgumentReplacementInfo::ACSRepairCBTy{})) {
- Arg.dropDroppableUses();
return ChangeStatus::CHANGED;
}
- return Changed;
+ return ChangeStatus::UNCHANGED;
}
/// See AbstractAttribute::trackStatistics()
/// See AbstractAttribute::initialize(...).
void initialize(Attributor &A) override {
+ AAIsDeadValueImpl::initialize(A);
if (isa<UndefValue>(getAssociatedValue()))
indicatePessimisticFixpoint();
}
/// See AbstractAttribute::initialize(...).
void initialize(Attributor &A) override {
+ AAIsDeadFloating::initialize(A);
if (isa<UndefValue>(getAssociatedValue())) {
indicatePessimisticFixpoint();
return;
/// See AbstractAttribute::initialize(...).
void initialize(Attributor &A) override {
- const Function *F = getAnchorScope();
- if (F && !F->isDeclaration()) {
- // We only want to compute liveness once. If the function is not part of
- // the SCC, skip it.
- if (A.isRunOn(*const_cast<Function *>(F))) {
- ToBeExploredFrom.insert(&F->getEntryBlock().front());
- assumeLive(A, F->getEntryBlock());
- } else {
- indicatePessimisticFixpoint();
- }
+ Function *F = getAnchorScope();
+ if (!F || F->isDeclaration() || !A.isRunOn(*F)) {
+ indicatePessimisticFixpoint();
+ return;
}
+ ToBeExploredFrom.insert(&F->getEntryBlock().front());
+ assumeLive(A, F->getEntryBlock());
}
/// See AbstractAttribute::getAsStr().
ChangeStatus manifest(Attributor &A) override {
ChangeStatus Changed = ChangeStatus::UNCHANGED;
- if (!A.isRunOn(*getAnchorScope()))
- return Changed;
-
assert(!hasCallBaseContext() && "Should never manifest a simplified "
"function return with call base context!");
; IS________OPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[X]], align 4
; IS________OPM-NEXT: ret i32 [[TMP2]]
;
-; IS__TUNIT_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@deref
-; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: [[X_PRIV:%.*]] = alloca i32, align 4
-; IS__TUNIT_NPM-NEXT: store i32 [[TMP0]], i32* [[X_PRIV]], align 4
-; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[X_PRIV]], align 4
-; IS__TUNIT_NPM-NEXT: ret i32 [[TMP2]]
-;
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@deref
-; IS__CGSCC_NPM-SAME: (i32 returned [[TMP0:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: [[X_PRIV:%.*]] = alloca i32, align 4
-; IS__CGSCC_NPM-NEXT: store i32 [[TMP0]], i32* [[X_PRIV]], align 4
-; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[X_PRIV]], align 4
-; IS__CGSCC_NPM-NEXT: ret i32 [[TMP2]]
+; IS________NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
+; IS________NPM-LABEL: define {{[^@]+}}@deref
+; IS________NPM-SAME: (i32 [[TMP0:%.*]]) #[[ATTR0:[0-9]+]] {
+; IS________NPM-NEXT: entry:
+; IS________NPM-NEXT: [[X_PRIV:%.*]] = alloca i32, align 4
+; IS________NPM-NEXT: store i32 [[TMP0]], i32* [[X_PRIV]], align 4
+; IS________NPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[X_PRIV]], align 4
+; IS________NPM-NEXT: ret i32 [[TMP2]]
;
entry:
%tmp2 = load i32, i32* %x, align 4
;
; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f
-; IS__CGSCC_NPM-SAME: (i32 returned [[X:%.*]]) #[[ATTR0]] {
+; IS__CGSCC_NPM-SAME: (i32 returned [[X:%.*]]) #[[ATTR1:[0-9]+]] {
; IS__CGSCC_NPM-NEXT: entry:
; IS__CGSCC_NPM-NEXT: [[X_ADDR:%.*]] = alloca i32, align 4
; IS__CGSCC_NPM-NEXT: store i32 [[X]], i32* [[X_ADDR]], align 4
;.
; IS__CGSCC_OPM: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
; IS__CGSCC_OPM: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__CGSCC_OPM: attributes #[[ATTR2]] = { nosync nounwind readonly willreturn }
+; IS__CGSCC_OPM: attributes #[[ATTR2]] = { nounwind readonly willreturn }
;.
-; IS__CGSCC_NPM: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; IS__CGSCC_NPM: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
+; IS__CGSCC_NPM: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
;.
; IS__TUNIT____: attributes #[[ATTR1]] = { nofree nosync nounwind readonly willreturn }
;.
; IS__CGSCC____: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
-; IS__CGSCC____: attributes #[[ATTR1]] = { nosync nounwind readonly willreturn }
+; IS__CGSCC____: attributes #[[ATTR1]] = { readonly willreturn }
;.
; IS__CGSCC____: attributes #[[ATTR1:[0-9]+]] = { argmemonly nofree nosync nounwind willreturn uwtable }
; IS__CGSCC____: attributes #[[ATTR2:[0-9]+]] = { argmemonly nofree nounwind willreturn writeonly }
; IS__CGSCC____: attributes #[[ATTR3:[0-9]+]] = { willreturn writeonly }
-; IS__CGSCC____: attributes #[[ATTR4:[0-9]+]] = { nosync nounwind willreturn }
+; IS__CGSCC____: attributes #[[ATTR4:[0-9]+]] = { nounwind willreturn }
;.
; IS__CGSCC____: attributes #[[ATTR4:[0-9]+]] = { argmemonly inlinehint nofree norecurse nosync nounwind willreturn uwtable "min-legal-vector-width"="256" "prefer-vector-width"="256" "target-features"="+avx2" }
; IS__CGSCC____: attributes #[[ATTR5:[0-9]+]] = { argmemonly nofree nounwind willreturn writeonly }
; IS__CGSCC____: attributes #[[ATTR6:[0-9]+]] = { willreturn writeonly }
-; IS__CGSCC____: attributes #[[ATTR7:[0-9]+]] = { nosync nounwind willreturn }
+; IS__CGSCC____: attributes #[[ATTR7:[0-9]+]] = { nounwind willreturn }
;.
; This is here to ensure @internalfun is live.
define void @exportedfun(%struct.a* %a) {
-; CHECK-LABEL: define {{[^@]+}}@exportedfun
-; CHECK-SAME: (%struct.a* nocapture nofree readnone [[A:%.*]]) {
-; CHECK-NEXT: [[INALLOCA_SAVE:%.*]] = tail call i8* @llvm.stacksave() #[[ATTR1:[0-9]+]]
-; CHECK-NEXT: [[ARGMEM:%.*]] = alloca inalloca <{ [[STRUCT_A:%.*]] }>, align 4
-; CHECK-NEXT: call x86_thiscallcc void @internalfun(%struct.a* noalias nocapture nofree readnone undef, <{ [[STRUCT_A]] }>* noundef nonnull inalloca(<{ [[STRUCT_A]] }>) align 4 dereferenceable(1) [[ARGMEM]])
-; CHECK-NEXT: call void @llvm.stackrestore(i8* nofree [[INALLOCA_SAVE]])
-; CHECK-NEXT: ret void
+; IS__TUNIT____-LABEL: define {{[^@]+}}@exportedfun
+; IS__TUNIT____-SAME: (%struct.a* nocapture nofree readnone [[A:%.*]]) {
+; IS__TUNIT____-NEXT: [[INALLOCA_SAVE:%.*]] = tail call i8* @llvm.stacksave() #[[ATTR1:[0-9]+]]
+; IS__TUNIT____-NEXT: [[ARGMEM:%.*]] = alloca inalloca <{ [[STRUCT_A:%.*]] }>, align 4
+; IS__TUNIT____-NEXT: call x86_thiscallcc void @internalfun(%struct.a* noalias nocapture nofree readnone undef, <{ [[STRUCT_A]] }>* noundef nonnull inalloca(<{ [[STRUCT_A]] }>) align 4 dereferenceable(1) [[ARGMEM]])
+; IS__TUNIT____-NEXT: call void @llvm.stackrestore(i8* nofree [[INALLOCA_SAVE]])
+; IS__TUNIT____-NEXT: ret void
+;
+; IS__CGSCC____-LABEL: define {{[^@]+}}@exportedfun
+; IS__CGSCC____-SAME: (%struct.a* nocapture nofree readnone [[A:%.*]]) {
+; IS__CGSCC____-NEXT: [[INALLOCA_SAVE:%.*]] = tail call i8* @llvm.stacksave() #[[ATTR1:[0-9]+]]
+; IS__CGSCC____-NEXT: [[ARGMEM:%.*]] = alloca inalloca <{ [[STRUCT_A:%.*]] }>, align 4
+; IS__CGSCC____-NEXT: call x86_thiscallcc void @internalfun(%struct.a* noalias nocapture nofree readnone [[A]], <{ [[STRUCT_A]] }>* noundef nonnull inalloca(<{ [[STRUCT_A]] }>) align 4 dereferenceable(1) [[ARGMEM]])
+; IS__CGSCC____-NEXT: call void @llvm.stackrestore(i8* nofree [[INALLOCA_SAVE]])
+; IS__CGSCC____-NEXT: ret void
;
%inalloca.save = tail call i8* @llvm.stacksave()
%argmem = alloca inalloca <{ %struct.a }>, align 4
declare void @llvm.stackrestore(i8*)
;.
; CHECK: attributes #[[ATTR0:[0-9]+]] = { nofree nosync nounwind willreturn }
-; CHECK: attributes #[[ATTR1]] = { willreturn }
+; CHECK: attributes #[[ATTR1:[0-9]+]] = { willreturn }
;.
; IS__CGSCC____-LABEL: define {{[^@]+}}@test
; IS__CGSCC____-SAME: () #[[ATTR0:[0-9]+]] {
; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: ret i32 undef
+; IS__CGSCC____-NEXT: ret i32 42
;
entry:
%a.gep = getelementptr %T, %T* %p, i64 0, i32 3
; IS__CGSCC____-SAME: () #[[ATTR0:[0-9]+]] {
; IS__CGSCC____-NEXT: br label [[RETURN1:%.*]]
; IS__CGSCC____: Return1:
-; IS__CGSCC____-NEXT: ret i32 undef
+; IS__CGSCC____-NEXT: ret i32 3
; IS__CGSCC____: Return2:
; IS__CGSCC____-NEXT: unreachable
;
; IS__CGSCC____-LABEL: define {{[^@]+}}@caller
; IS__CGSCC____-SAME: () #[[ATTR0]] {
; IS__CGSCC____-NEXT: [[B:%.*]] = alloca i64, align 8
-; IS__CGSCC____-NEXT: ret i32 undef
+; IS__CGSCC____-NEXT: ret i32 3
;
%B = alloca i64
store i64 1, i64* %B
; IS________OPM-NEXT: call void @use(i32 [[L]])
; IS________OPM-NEXT: ret i32 [[L]]
;
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@foo
-; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]]) {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: [[ARG_PRIV:%.*]] = alloca i32, align 4, addrspace(7)
-; IS__TUNIT_NPM-NEXT: store i32 [[TMP0]], i32 addrspace(7)* [[ARG_PRIV]], align 4
-; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = addrspacecast i32 addrspace(7)* [[ARG_PRIV]] to i32*
-; IS__TUNIT_NPM-NEXT: [[L:%.*]] = load i32, i32* [[TMP1]], align 4
-; IS__TUNIT_NPM-NEXT: call void @use(i32 [[L]])
-; IS__TUNIT_NPM-NEXT: ret i32 [[L]]
-;
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@foo
-; IS__CGSCC_NPM-SAME: (i32 returned [[TMP0:%.*]]) {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: [[ARG_PRIV:%.*]] = alloca i32, align 4, addrspace(7)
-; IS__CGSCC_NPM-NEXT: store i32 [[TMP0]], i32 addrspace(7)* [[ARG_PRIV]], align 4
-; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = addrspacecast i32 addrspace(7)* [[ARG_PRIV]] to i32*
-; IS__CGSCC_NPM-NEXT: [[L:%.*]] = load i32, i32* [[TMP1]], align 4
-; IS__CGSCC_NPM-NEXT: call void @use(i32 [[TMP0]])
-; IS__CGSCC_NPM-NEXT: ret i32 [[TMP0]]
+; IS________NPM-LABEL: define {{[^@]+}}@foo
+; IS________NPM-SAME: (i32 [[TMP0:%.*]]) {
+; IS________NPM-NEXT: entry:
+; IS________NPM-NEXT: [[ARG_PRIV:%.*]] = alloca i32, align 4, addrspace(7)
+; IS________NPM-NEXT: store i32 [[TMP0]], i32 addrspace(7)* [[ARG_PRIV]], align 4
+; IS________NPM-NEXT: [[TMP1:%.*]] = addrspacecast i32 addrspace(7)* [[ARG_PRIV]] to i32*
+; IS________NPM-NEXT: [[L:%.*]] = load i32, i32* [[TMP1]], align 4
+; IS________NPM-NEXT: call void @use(i32 [[L]])
+; IS________NPM-NEXT: ret i32 [[L]]
;
entry:
%l = load i32, i32* %arg
; IS________OPM-NEXT: call void @use(i32* noalias nocapture noundef nonnull readonly align 4 dereferenceable(12) [[ARG]])
; IS________OPM-NEXT: ret void
;
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@callee
-; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]], i32 [[TMP2:%.*]]) {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: [[ARG_PRIV:%.*]] = alloca [3 x i32], align 4
-; IS__TUNIT_NPM-NEXT: [[ARG_PRIV_CAST:%.*]] = bitcast [3 x i32]* [[ARG_PRIV]] to i32*
-; IS__TUNIT_NPM-NEXT: store i32 [[TMP0]], i32* [[ARG_PRIV_CAST]], align 4
-; IS__TUNIT_NPM-NEXT: [[ARG_PRIV_0_1:%.*]] = getelementptr [3 x i32], [3 x i32]* [[ARG_PRIV]], i64 0, i64 1
-; IS__TUNIT_NPM-NEXT: store i32 [[TMP1]], i32* [[ARG_PRIV_0_1]], align 4
-; IS__TUNIT_NPM-NEXT: [[ARG_PRIV_0_2:%.*]] = getelementptr [3 x i32], [3 x i32]* [[ARG_PRIV]], i64 0, i64 2
-; IS__TUNIT_NPM-NEXT: store i32 [[TMP2]], i32* [[ARG_PRIV_0_2]], align 4
-; IS__TUNIT_NPM-NEXT: [[TMP3:%.*]] = bitcast [3 x i32]* [[ARG_PRIV]] to i32*
-; IS__TUNIT_NPM-NEXT: call void @use(i32* noalias nocapture noundef nonnull readonly align 4 dereferenceable(12) [[TMP3]])
-; IS__TUNIT_NPM-NEXT: ret void
-;
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@callee
-; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]], i32 [[TMP2:%.*]]) {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: [[ARG_PRIV:%.*]] = alloca [3 x i32], align 4
-; IS__CGSCC_NPM-NEXT: [[ARG_PRIV_CAST:%.*]] = bitcast [3 x i32]* [[ARG_PRIV]] to i32*
-; IS__CGSCC_NPM-NEXT: store i32 undef, i32* [[ARG_PRIV_CAST]], align 4
-; IS__CGSCC_NPM-NEXT: [[ARG_PRIV_0_1:%.*]] = getelementptr [3 x i32], [3 x i32]* [[ARG_PRIV]], i64 0, i64 1
-; IS__CGSCC_NPM-NEXT: store i32 undef, i32* [[ARG_PRIV_0_1]], align 4
-; IS__CGSCC_NPM-NEXT: [[ARG_PRIV_0_2:%.*]] = getelementptr [3 x i32], [3 x i32]* [[ARG_PRIV]], i64 0, i64 2
-; IS__CGSCC_NPM-NEXT: store i32 undef, i32* [[ARG_PRIV_0_2]], align 4
-; IS__CGSCC_NPM-NEXT: [[TMP3:%.*]] = bitcast [3 x i32]* [[ARG_PRIV]] to i32*
-; IS__CGSCC_NPM-NEXT: call void @use(i32* noalias nocapture noundef nonnull readonly align 4 dereferenceable(12) [[TMP3]])
-; IS__CGSCC_NPM-NEXT: ret void
+; IS________NPM-LABEL: define {{[^@]+}}@callee
+; IS________NPM-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]], i32 [[TMP2:%.*]]) {
+; IS________NPM-NEXT: entry:
+; IS________NPM-NEXT: [[ARG_PRIV:%.*]] = alloca [3 x i32], align 4
+; IS________NPM-NEXT: [[ARG_PRIV_CAST:%.*]] = bitcast [3 x i32]* [[ARG_PRIV]] to i32*
+; IS________NPM-NEXT: store i32 [[TMP0]], i32* [[ARG_PRIV_CAST]], align 4
+; IS________NPM-NEXT: [[ARG_PRIV_0_1:%.*]] = getelementptr [3 x i32], [3 x i32]* [[ARG_PRIV]], i64 0, i64 1
+; IS________NPM-NEXT: store i32 [[TMP1]], i32* [[ARG_PRIV_0_1]], align 4
+; IS________NPM-NEXT: [[ARG_PRIV_0_2:%.*]] = getelementptr [3 x i32], [3 x i32]* [[ARG_PRIV]], i64 0, i64 2
+; IS________NPM-NEXT: store i32 [[TMP2]], i32* [[ARG_PRIV_0_2]], align 4
+; IS________NPM-NEXT: [[TMP3:%.*]] = bitcast [3 x i32]* [[ARG_PRIV]] to i32*
+; IS________NPM-NEXT: call void @use(i32* noalias nocapture noundef nonnull readonly align 4 dereferenceable(12) [[TMP3]])
+; IS________NPM-NEXT: ret void
;
entry:
call void @use(i32* %arg)
; IS________OPM-NEXT: [[A:%.*]] = add i32 [[L]], [[TMP2]]
; IS________OPM-NEXT: ret i32 [[A]]
;
-; IS__TUNIT_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@f
-; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]], i32 [[TMP2:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: [[X_PRIV:%.*]] = alloca i32, align 4
-; IS__TUNIT_NPM-NEXT: store i32 [[TMP2]], i32* [[X_PRIV]], align 4
-; IS__TUNIT_NPM-NEXT: [[B_PRIV:%.*]] = alloca [[STRUCT_SS:%.*]], align 8
-; IS__TUNIT_NPM-NEXT: [[B_PRIV_CAST:%.*]] = bitcast %struct.ss* [[B_PRIV]] to i32*
-; IS__TUNIT_NPM-NEXT: store i32 [[TMP0]], i32* [[B_PRIV_CAST]], align 4
-; IS__TUNIT_NPM-NEXT: [[B_PRIV_0_1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B_PRIV]], i64 0, i32 1
-; IS__TUNIT_NPM-NEXT: store i64 [[TMP1]], i64* [[B_PRIV_0_1]], align 4
-; IS__TUNIT_NPM-NEXT: [[TMP:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B_PRIV]], i32 0, i32 0
-; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP]], align 8
-; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = add i32 [[TMP1]], 1
-; IS__TUNIT_NPM-NEXT: store i32 [[TMP2]], i32* [[TMP]], align 8
-; IS__TUNIT_NPM-NEXT: store i32 0, i32* [[X_PRIV]], align 4
-; IS__TUNIT_NPM-NEXT: [[L:%.*]] = load i32, i32* [[X_PRIV]], align 4
-; IS__TUNIT_NPM-NEXT: [[A:%.*]] = add i32 [[L]], [[TMP2]]
-; IS__TUNIT_NPM-NEXT: ret i32 [[A]]
-;
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f
-; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]], i32 [[TMP2:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: [[X_PRIV:%.*]] = alloca i32, align 4
-; IS__CGSCC_NPM-NEXT: [[B_PRIV:%.*]] = alloca [[STRUCT_SS:%.*]], align 8
-; IS__CGSCC_NPM-NEXT: [[B_PRIV_CAST:%.*]] = bitcast %struct.ss* [[B_PRIV]] to i32*
-; IS__CGSCC_NPM-NEXT: [[B_PRIV_0_1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B_PRIV]], i64 0, i32 1
-; IS__CGSCC_NPM-NEXT: [[TMP:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B_PRIV]], i32 0, i32 0
-; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP]], align 8
-; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = add i32 1, 1
-; IS__CGSCC_NPM-NEXT: [[L:%.*]] = load i32, i32* [[X_PRIV]], align 4
-; IS__CGSCC_NPM-NEXT: [[A:%.*]] = add i32 0, 2
-; IS__CGSCC_NPM-NEXT: ret i32 undef
+; IS________NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
+; IS________NPM-LABEL: define {{[^@]+}}@f
+; IS________NPM-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]], i32 [[TMP2:%.*]]) #[[ATTR0:[0-9]+]] {
+; IS________NPM-NEXT: entry:
+; IS________NPM-NEXT: [[X_PRIV:%.*]] = alloca i32, align 4
+; IS________NPM-NEXT: store i32 [[TMP2]], i32* [[X_PRIV]], align 4
+; IS________NPM-NEXT: [[B_PRIV:%.*]] = alloca [[STRUCT_SS:%.*]], align 8
+; IS________NPM-NEXT: [[B_PRIV_CAST:%.*]] = bitcast %struct.ss* [[B_PRIV]] to i32*
+; IS________NPM-NEXT: store i32 [[TMP0]], i32* [[B_PRIV_CAST]], align 4
+; IS________NPM-NEXT: [[B_PRIV_0_1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B_PRIV]], i64 0, i32 1
+; IS________NPM-NEXT: store i64 [[TMP1]], i64* [[B_PRIV_0_1]], align 4
+; IS________NPM-NEXT: [[TMP:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B_PRIV]], i32 0, i32 0
+; IS________NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP]], align 8
+; IS________NPM-NEXT: [[TMP2:%.*]] = add i32 [[TMP1]], 1
+; IS________NPM-NEXT: store i32 [[TMP2]], i32* [[TMP]], align 8
+; IS________NPM-NEXT: store i32 0, i32* [[X_PRIV]], align 4
+; IS________NPM-NEXT: [[L:%.*]] = load i32, i32* [[X_PRIV]], align 4
+; IS________NPM-NEXT: [[A:%.*]] = add i32 [[L]], [[TMP2]]
+; IS________NPM-NEXT: ret i32 [[A]]
;
entry:
; IS__CGSCC_OPM-NEXT: [[C:%.*]] = call i32 @f(%struct.ss* noalias nocapture nofree noundef nonnull readonly byval([[STRUCT_SS]]) align 8 dereferenceable(12) [[S]], i32* noalias nocapture nofree noundef nonnull readonly byval(i32) align 4 dereferenceable(4) [[X]]) #[[ATTR1:[0-9]+]]
; IS__CGSCC_OPM-NEXT: ret i32 [[C]]
;
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test
-; IS__CGSCC_NPM-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(4) [[X:%.*]]) #[[ATTR0]] {
+; IS__CGSCC_NPM-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[X:%.*]]) #[[ATTR0]] {
; IS__CGSCC_NPM-NEXT: entry:
; IS__CGSCC_NPM-NEXT: [[S:%.*]] = alloca [[STRUCT_SS:%.*]], align 8
; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 0
; IS__CGSCC_OPM: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn }
; IS__CGSCC_OPM: attributes #[[ATTR1]] = { nounwind willreturn }
;.
-; IS__CGSCC_NPM: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; IS__CGSCC_NPM: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn }
;.
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
; IS__CGSCC____-LABEL: define {{[^@]+}}@test
; IS__CGSCC____-SAME: () #[[ATTR0:[0-9]+]] {
-; IS__CGSCC____-NEXT: ret i32 undef
+; IS__CGSCC____-NEXT: ret i32 3
;
%A = load i32, i32* %X
%B = load i32, i32* %Y
; IS__CGSCC____-LABEL: define {{[^@]+}}@caller
; IS__CGSCC____-SAME: () #[[ATTR0]] {
; IS__CGSCC____-NEXT: [[A:%.*]] = alloca i32, align 4
-; IS__CGSCC____-NEXT: ret i32 undef
+; IS__CGSCC____-NEXT: ret i32 3
;
%A = alloca i32
store i32 1, i32* %A
; IS________OPM-NEXT: store i32 0, i32* [[X]], align 4
; IS________OPM-NEXT: ret void
;
-; IS__TUNIT_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@f
-; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]], i32 [[TMP2:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: [[X_PRIV:%.*]] = alloca i32, align 4
-; IS__TUNIT_NPM-NEXT: store i32 [[TMP2]], i32* [[X_PRIV]], align 4
-; IS__TUNIT_NPM-NEXT: [[B_PRIV:%.*]] = alloca [[STRUCT_SS:%.*]], align 8
-; IS__TUNIT_NPM-NEXT: [[B_PRIV_CAST:%.*]] = bitcast %struct.ss* [[B_PRIV]] to i32*
-; IS__TUNIT_NPM-NEXT: store i32 [[TMP0]], i32* [[B_PRIV_CAST]], align 4
-; IS__TUNIT_NPM-NEXT: [[B_PRIV_0_1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B_PRIV]], i64 0, i32 1
-; IS__TUNIT_NPM-NEXT: store i64 [[TMP1]], i64* [[B_PRIV_0_1]], align 4
-; IS__TUNIT_NPM-NEXT: [[TMP:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B_PRIV]], i32 0, i32 0
-; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP]], align 8
-; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = add i32 [[TMP1]], 1
-; IS__TUNIT_NPM-NEXT: store i32 [[TMP2]], i32* [[TMP]], align 8
-; IS__TUNIT_NPM-NEXT: store i32 0, i32* [[X_PRIV]], align 4
-; IS__TUNIT_NPM-NEXT: ret void
-;
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f
-; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]], i32 [[TMP2:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: [[X_PRIV:%.*]] = alloca i32, align 4
-; IS__CGSCC_NPM-NEXT: [[B_PRIV:%.*]] = alloca [[STRUCT_SS:%.*]], align 8
-; IS__CGSCC_NPM-NEXT: [[B_PRIV_CAST:%.*]] = bitcast %struct.ss* [[B_PRIV]] to i32*
-; IS__CGSCC_NPM-NEXT: [[B_PRIV_0_1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B_PRIV]], i64 0, i32 1
-; IS__CGSCC_NPM-NEXT: [[TMP:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B_PRIV]], i32 0, i32 0
-; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP]], align 8
-; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = add i32 1, 1
-; IS__CGSCC_NPM-NEXT: ret void
+; IS________NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
+; IS________NPM-LABEL: define {{[^@]+}}@f
+; IS________NPM-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]], i32 [[TMP2:%.*]]) #[[ATTR0:[0-9]+]] {
+; IS________NPM-NEXT: entry:
+; IS________NPM-NEXT: [[X_PRIV:%.*]] = alloca i32, align 4
+; IS________NPM-NEXT: store i32 [[TMP2]], i32* [[X_PRIV]], align 4
+; IS________NPM-NEXT: [[B_PRIV:%.*]] = alloca [[STRUCT_SS:%.*]], align 8
+; IS________NPM-NEXT: [[B_PRIV_CAST:%.*]] = bitcast %struct.ss* [[B_PRIV]] to i32*
+; IS________NPM-NEXT: store i32 [[TMP0]], i32* [[B_PRIV_CAST]], align 4
+; IS________NPM-NEXT: [[B_PRIV_0_1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B_PRIV]], i64 0, i32 1
+; IS________NPM-NEXT: store i64 [[TMP1]], i64* [[B_PRIV_0_1]], align 4
+; IS________NPM-NEXT: [[TMP:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B_PRIV]], i32 0, i32 0
+; IS________NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP]], align 8
+; IS________NPM-NEXT: [[TMP2:%.*]] = add i32 [[TMP1]], 1
+; IS________NPM-NEXT: store i32 [[TMP2]], i32* [[TMP]], align 8
+; IS________NPM-NEXT: store i32 0, i32* [[X_PRIV]], align 4
+; IS________NPM-NEXT: ret void
;
entry:
%tmp = getelementptr %struct.ss, %struct.ss* %b, i32 0, i32 0
; IS__CGSCC_OPM-NEXT: call void @f(%struct.ss* noalias nocapture nofree noundef nonnull readonly byval([[STRUCT_SS]]) align 8 dereferenceable(12) [[S]], i32* noalias nocapture nofree noundef nonnull readonly byval(i32) align 4 dereferenceable(4) [[X]]) #[[ATTR1:[0-9]+]]
; IS__CGSCC_OPM-NEXT: ret i32 0
;
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test
-; IS__CGSCC_NPM-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(4) [[X:%.*]]) #[[ATTR0]] {
+; IS__CGSCC_NPM-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[X:%.*]]) #[[ATTR0]] {
; IS__CGSCC_NPM-NEXT: entry:
; IS__CGSCC_NPM-NEXT: [[S:%.*]] = alloca [[STRUCT_SS:%.*]], align 8
; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 0
; IS__CGSCC_OPM: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn }
; IS__CGSCC_OPM: attributes #[[ATTR1]] = { nounwind willreturn }
;.
-; IS__CGSCC_NPM: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; IS__CGSCC_NPM: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn }
;.
%struct.ss = type { i32, i64 }
define internal i32 @f(%struct.ss* byval(%struct.ss) %b) nounwind {
-; IS__TUNIT_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@f
-; IS__TUNIT_OPM-SAME: (%struct.ss* noalias nocapture nofree noundef nonnull byval([[STRUCT_SS:%.*]]) align 8 dereferenceable(12) [[B:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS__TUNIT_OPM-NEXT: entry:
-; IS__TUNIT_OPM-NEXT: [[TMP:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B]], i32 0, i32 0
-; IS__TUNIT_OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP]], align 8
-; IS__TUNIT_OPM-NEXT: [[TMP2:%.*]] = add i32 [[TMP1]], 1
-; IS__TUNIT_OPM-NEXT: store i32 [[TMP2]], i32* [[TMP]], align 8
-; IS__TUNIT_OPM-NEXT: ret i32 [[TMP1]]
-;
-; IS__TUNIT_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@f
-; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: [[B_PRIV:%.*]] = alloca [[STRUCT_SS:%.*]], align 4
-; IS__TUNIT_NPM-NEXT: [[B_PRIV_CAST:%.*]] = bitcast %struct.ss* [[B_PRIV]] to i32*
-; IS__TUNIT_NPM-NEXT: store i32 [[TMP0]], i32* [[B_PRIV_CAST]], align 4
-; IS__TUNIT_NPM-NEXT: [[B_PRIV_0_1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B_PRIV]], i64 0, i32 1
-; IS__TUNIT_NPM-NEXT: store i64 [[TMP1]], i64* [[B_PRIV_0_1]], align 4
-; IS__TUNIT_NPM-NEXT: [[TMP:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B_PRIV]], i32 0, i32 0
-; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP]], align 8
-; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = add i32 [[TMP1]], 1
-; IS__TUNIT_NPM-NEXT: store i32 [[TMP2]], i32* [[TMP]], align 8
-; IS__TUNIT_NPM-NEXT: ret i32 [[TMP1]]
-;
-; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
-; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@f
-; IS__CGSCC_OPM-SAME: (%struct.ss* noalias nocapture nofree noundef nonnull byval([[STRUCT_SS:%.*]]) align 32 dereferenceable(12) [[B:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS__CGSCC_OPM-NEXT: entry:
-; IS__CGSCC_OPM-NEXT: [[TMP:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B]], i32 0, i32 0
-; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP]], align 32
-; IS__CGSCC_OPM-NEXT: [[TMP2:%.*]] = add i32 [[TMP1]], 1
-; IS__CGSCC_OPM-NEXT: store i32 [[TMP2]], i32* [[TMP]], align 32
-; IS__CGSCC_OPM-NEXT: ret i32 [[TMP1]]
+; IS________OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
+; IS________OPM-LABEL: define {{[^@]+}}@f
+; IS________OPM-SAME: (%struct.ss* noalias nocapture nofree noundef nonnull byval([[STRUCT_SS:%.*]]) align 8 dereferenceable(12) [[B:%.*]]) #[[ATTR0:[0-9]+]] {
+; IS________OPM-NEXT: entry:
+; IS________OPM-NEXT: [[TMP:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B]], i32 0, i32 0
+; IS________OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP]], align 8
+; IS________OPM-NEXT: [[TMP2:%.*]] = add i32 [[TMP1]], 1
+; IS________OPM-NEXT: store i32 [[TMP2]], i32* [[TMP]], align 8
+; IS________OPM-NEXT: ret i32 [[TMP1]]
;
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f
-; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: [[B_PRIV:%.*]] = alloca [[STRUCT_SS:%.*]], align 4
-; IS__CGSCC_NPM-NEXT: [[B_PRIV_CAST:%.*]] = bitcast %struct.ss* [[B_PRIV]] to i32*
-; IS__CGSCC_NPM-NEXT: [[B_PRIV_0_1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B_PRIV]], i64 0, i32 1
-; IS__CGSCC_NPM-NEXT: [[TMP:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B_PRIV]], i32 0, i32 0
-; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP]], align 8
-; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = add i32 1, 1
-; IS__CGSCC_NPM-NEXT: ret i32 undef
+; IS________NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
+; IS________NPM-LABEL: define {{[^@]+}}@f
+; IS________NPM-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]]) #[[ATTR0:[0-9]+]] {
+; IS________NPM-NEXT: entry:
+; IS________NPM-NEXT: [[B_PRIV:%.*]] = alloca [[STRUCT_SS:%.*]], align 4
+; IS________NPM-NEXT: [[B_PRIV_CAST:%.*]] = bitcast %struct.ss* [[B_PRIV]] to i32*
+; IS________NPM-NEXT: store i32 [[TMP0]], i32* [[B_PRIV_CAST]], align 4
+; IS________NPM-NEXT: [[B_PRIV_0_1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B_PRIV]], i64 0, i32 1
+; IS________NPM-NEXT: store i64 [[TMP1]], i64* [[B_PRIV_0_1]], align 4
+; IS________NPM-NEXT: [[TMP:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B_PRIV]], i32 0, i32 0
+; IS________NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP]], align 8
+; IS________NPM-NEXT: [[TMP2:%.*]] = add i32 [[TMP1]], 1
+; IS________NPM-NEXT: store i32 [[TMP2]], i32* [[TMP]], align 8
+; IS________NPM-NEXT: ret i32 [[TMP1]]
;
entry:
%tmp = getelementptr %struct.ss, %struct.ss* %b, i32 0, i32 0
define internal i32 @g(%struct.ss* byval(%struct.ss) align 32 %b) nounwind {
; IS________OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
; IS________OPM-LABEL: define {{[^@]+}}@g
-; IS________OPM-SAME: (%struct.ss* noalias nocapture nofree noundef nonnull byval([[STRUCT_SS:%.*]]) align 32 dereferenceable(12) [[B:%.*]]) #[[ATTR0:[0-9]+]] {
+; IS________OPM-SAME: (%struct.ss* noalias nocapture nofree noundef nonnull byval([[STRUCT_SS:%.*]]) align 32 dereferenceable(12) [[B:%.*]]) #[[ATTR0]] {
; IS________OPM-NEXT: entry:
; IS________OPM-NEXT: [[TMP:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B]], i32 0, i32 0
; IS________OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP]], align 32
; IS________OPM-NEXT: store i32 [[TMP2]], i32* [[TMP]], align 32
; IS________OPM-NEXT: ret i32 [[TMP2]]
;
-; IS__TUNIT_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@g
-; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]]) #[[ATTR0]] {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: [[B_PRIV:%.*]] = alloca [[STRUCT_SS:%.*]], align 4
-; IS__TUNIT_NPM-NEXT: [[B_PRIV_CAST:%.*]] = bitcast %struct.ss* [[B_PRIV]] to i32*
-; IS__TUNIT_NPM-NEXT: store i32 [[TMP0]], i32* [[B_PRIV_CAST]], align 4
-; IS__TUNIT_NPM-NEXT: [[B_PRIV_0_1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B_PRIV]], i64 0, i32 1
-; IS__TUNIT_NPM-NEXT: store i64 [[TMP1]], i64* [[B_PRIV_0_1]], align 4
-; IS__TUNIT_NPM-NEXT: [[TMP:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B_PRIV]], i32 0, i32 0
-; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP]], align 32
-; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = add i32 [[TMP1]], 1
-; IS__TUNIT_NPM-NEXT: store i32 [[TMP2]], i32* [[TMP]], align 32
-; IS__TUNIT_NPM-NEXT: ret i32 [[TMP2]]
-;
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@g
-; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]]) #[[ATTR0]] {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: [[B_PRIV:%.*]] = alloca [[STRUCT_SS:%.*]], align 4
-; IS__CGSCC_NPM-NEXT: [[B_PRIV_CAST:%.*]] = bitcast %struct.ss* [[B_PRIV]] to i32*
-; IS__CGSCC_NPM-NEXT: [[B_PRIV_0_1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B_PRIV]], i64 0, i32 1
-; IS__CGSCC_NPM-NEXT: [[TMP:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B_PRIV]], i32 0, i32 0
-; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP]], align 32
-; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = add i32 1, 1
-; IS__CGSCC_NPM-NEXT: ret i32 undef
+; IS________NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
+; IS________NPM-LABEL: define {{[^@]+}}@g
+; IS________NPM-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]]) #[[ATTR0]] {
+; IS________NPM-NEXT: entry:
+; IS________NPM-NEXT: [[B_PRIV:%.*]] = alloca [[STRUCT_SS:%.*]], align 4
+; IS________NPM-NEXT: [[B_PRIV_CAST:%.*]] = bitcast %struct.ss* [[B_PRIV]] to i32*
+; IS________NPM-NEXT: store i32 [[TMP0]], i32* [[B_PRIV_CAST]], align 4
+; IS________NPM-NEXT: [[B_PRIV_0_1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B_PRIV]], i64 0, i32 1
+; IS________NPM-NEXT: store i64 [[TMP1]], i64* [[B_PRIV_0_1]], align 4
+; IS________NPM-NEXT: [[TMP:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B_PRIV]], i32 0, i32 0
+; IS________NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP]], align 32
+; IS________NPM-NEXT: [[TMP2:%.*]] = add i32 [[TMP1]], 1
+; IS________NPM-NEXT: store i32 [[TMP2]], i32* [[TMP]], align 32
+; IS________NPM-NEXT: ret i32 [[TMP2]]
;
entry:
%tmp = getelementptr %struct.ss, %struct.ss* %b, i32 0, i32 0
;
; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@main
-; IS__CGSCC_NPM-SAME: () #[[ATTR0]] {
+; IS__CGSCC_NPM-SAME: () #[[ATTR1:[0-9]+]] {
; IS__CGSCC_NPM-NEXT: entry:
; IS__CGSCC_NPM-NEXT: [[S:%.*]] = alloca [[STRUCT_SS:%.*]], align 4
; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 0
; IS__CGSCC_OPM: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
; IS__CGSCC_OPM: attributes #[[ATTR2]] = { nounwind willreturn }
;.
-; IS__CGSCC_NPM: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; IS__CGSCC_NPM: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn }
+; IS__CGSCC_NPM: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
;.
; IS__CGSCC____-LABEL: define {{[^@]+}}@test
; IS__CGSCC____-SAME: () #[[ATTR0:[0-9]+]] {
; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: ret i32 undef
+; IS__CGSCC____-NEXT: ret i32 0
;
entry:
%y = load i32*, i32** %x
; IS__TUNIT____: attributes #[[ATTR1]] = { nofree nosync nounwind readonly willreturn }
;.
; IS__CGSCC____: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
-; IS__CGSCC____: attributes #[[ATTR1]] = { nosync nounwind readonly willreturn }
+; IS__CGSCC____: attributes #[[ATTR1]] = { readonly willreturn }
;.
; IS__CGSCC____: T:
; IS__CGSCC____-NEXT: unreachable
; IS__CGSCC____: F:
-; IS__CGSCC____-NEXT: ret i32 undef
+; IS__CGSCC____-NEXT: ret i32 17
;
br i1 %C, label %T, label %F
}
define internal i1 @eggs(i8* %arg) {
-; IS__CGSCC____: Function Attrs: norecurse
; IS__CGSCC____-LABEL: define {{[^@]+}}@eggs
-; IS__CGSCC____-SAME: (i8* [[ARG:%.*]]) #[[ATTR1:[0-9]+]] {
+; IS__CGSCC____-SAME: (i8* [[ARG:%.*]]) {
; IS__CGSCC____-NEXT: bb:
; IS__CGSCC____-NEXT: [[TMP:%.*]] = call zeroext i1 @barney()
; IS__CGSCC____-NEXT: unreachable
define internal i1 @barney(i8* %arg) {
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
; IS__CGSCC____-LABEL: define {{[^@]+}}@barney
-; IS__CGSCC____-SAME: () #[[ATTR2:[0-9]+]] {
+; IS__CGSCC____-SAME: () #[[ATTR1:[0-9]+]] {
; IS__CGSCC____-NEXT: bb:
; IS__CGSCC____-NEXT: ret i1 undef
;
;
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
; IS__CGSCC____-LABEL: define {{[^@]+}}@test_inf_promote_caller
-; IS__CGSCC____-SAME: (i32 [[ARG:%.*]]) #[[ATTR2]] {
+; IS__CGSCC____-SAME: (i32 [[ARG:%.*]]) #[[ATTR1]] {
; IS__CGSCC____-NEXT: bb:
; IS__CGSCC____-NEXT: [[TMP:%.*]] = alloca [[S:%.*]], align 8
; IS__CGSCC____-NEXT: [[TMP1:%.*]] = alloca [[S]], align 8
}
define internal i32 @test_inf_promote_callee(%S* %arg, %S* %arg1) {
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
; IS__CGSCC____-LABEL: define {{[^@]+}}@test_inf_promote_callee
-; IS__CGSCC____-SAME: () #[[ATTR2]] {
+; IS__CGSCC____-SAME: () #[[ATTR2:[0-9]+]] {
; IS__CGSCC____-NEXT: bb:
; IS__CGSCC____-NEXT: ret i32 undef
;
; IS__TUNIT____: attributes #[[ATTR2]] = { noreturn nounwind readnone }
;.
; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse noreturn nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR1]] = { norecurse }
-; IS__CGSCC____: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind readnone willreturn }
+; IS__CGSCC____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
+; IS__CGSCC____: attributes #[[ATTR2]] = { nofree nosync nounwind readnone willreturn }
; IS__CGSCC____: attributes #[[ATTR3]] = { noreturn nounwind readnone }
;.
;.
define void @run() {
;
-; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; CHECK-LABEL: define {{[^@]+}}@run
-; CHECK-SAME: () #[[ATTR0:[0-9]+]] {
-; CHECK-NEXT: entry:
-; CHECK-NEXT: unreachable
+; NOT_CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@run
+; NOT_CGSCC_NPM-SAME: () #[[ATTR0:[0-9]+]] {
+; NOT_CGSCC_NPM-NEXT: entry:
+; NOT_CGSCC_NPM-NEXT: unreachable
+;
+; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn
+; IS__CGSCC____-LABEL: define {{[^@]+}}@run
+; IS__CGSCC____-SAME: () #[[ATTR0:[0-9]+]] {
+; IS__CGSCC____-NEXT: entry:
+; IS__CGSCC____-NEXT: [[TMP0:%.*]] = load i32, i32* getelementptr inbounds ([[STRUCT_FOO:%.*]], %struct.Foo* @a, i32 0, i32 0), align 8
+; IS__CGSCC____-NEXT: [[A_0_1:%.*]] = getelementptr [[STRUCT_FOO]], %struct.Foo* @a, i64 0, i32 1
+; IS__CGSCC____-NEXT: [[TMP1:%.*]] = load i64, i64* [[A_0_1]], align 8
+; IS__CGSCC____-NEXT: unreachable
;
entry:
tail call i8 @UseLongDoubleUnsafely(%union.u* byval(%union.u) align 16 bitcast (%struct.s* @b to %union.u*))
define internal i8 @UseLongDoubleUnsafely(%union.u* byval(%union.u) align 16 %arg) {
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
; IS__CGSCC____-LABEL: define {{[^@]+}}@UseLongDoubleUnsafely
-; IS__CGSCC____-SAME: () #[[ATTR0]] {
+; IS__CGSCC____-SAME: () #[[ATTR1:[0-9]+]] {
; IS__CGSCC____-NEXT: entry:
; IS__CGSCC____-NEXT: ret i8 undef
;
define internal x86_fp80 @UseLongDoubleSafely(%union.u* byval(%union.u) align 16 %arg) {
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
; IS__CGSCC____-LABEL: define {{[^@]+}}@UseLongDoubleSafely
-; IS__CGSCC____-SAME: () #[[ATTR0]] {
+; IS__CGSCC____-SAME: () #[[ATTR1]] {
; IS__CGSCC____-NEXT: ret x86_fp80 undef
;
%gep = getelementptr inbounds %union.u, %union.u* %arg, i64 0, i32 0
define internal i64 @AccessPaddingOfStruct(%struct.Foo* byval(%struct.Foo) %a) {
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
; IS__CGSCC____-LABEL: define {{[^@]+}}@AccessPaddingOfStruct
-; IS__CGSCC____-SAME: () #[[ATTR0]] {
+; IS__CGSCC____-SAME: () #[[ATTR1]] {
; IS__CGSCC____-NEXT: ret i64 undef
;
%p = bitcast %struct.Foo* %a to i64*
;
; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone
; IS__CGSCC____-LABEL: define {{[^@]+}}@CaptureAStruct
-; IS__CGSCC____-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]]) #[[ATTR1:[0-9]+]] {
+; IS__CGSCC____-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]]) #[[ATTR2:[0-9]+]] {
; IS__CGSCC____-NEXT: entry:
; IS__CGSCC____-NEXT: [[A_PRIV:%.*]] = alloca [[STRUCT_FOO:%.*]], align 8
; IS__CGSCC____-NEXT: [[A_PRIV_CAST:%.*]] = bitcast %struct.Foo* [[A_PRIV]] to i32*
+; IS__CGSCC____-NEXT: store i32 [[TMP0]], i32* [[A_PRIV_CAST]], align 4
; IS__CGSCC____-NEXT: [[A_PRIV_0_1:%.*]] = getelementptr [[STRUCT_FOO]], %struct.Foo* [[A_PRIV]], i64 0, i32 1
+; IS__CGSCC____-NEXT: store i64 [[TMP1]], i64* [[A_PRIV_0_1]], align 8
; IS__CGSCC____-NEXT: [[A_PTR:%.*]] = alloca %struct.Foo*, align 8
; IS__CGSCC____-NEXT: br label [[LOOP:%.*]]
; IS__CGSCC____: loop:
;.
; NOT_CGSCC_NPM: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
;.
-; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR1]] = { nofree norecurse noreturn nosync nounwind readnone }
+; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readonly willreturn }
+; IS__CGSCC____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
+; IS__CGSCC____: attributes #[[ATTR2]] = { nofree norecurse noreturn nosync nounwind readnone }
;.
;.
; IS__CGSCC____: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
; IS__CGSCC____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR2]] = { nosync nounwind readonly willreturn }
+; IS__CGSCC____: attributes #[[ATTR2]] = { readonly willreturn }
;.
; IS__CGSCC____-SAME: () #[[ATTR1:[0-9]+]] {
; IS__CGSCC____-NEXT: [[A:%.*]] = alloca i32, align 4
; IS__CGSCC____-NEXT: [[C:%.*]] = call i32 @test(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[A]]) #[[ATTR2:[0-9]+]]
-; IS__CGSCC____-NEXT: ret i32 undef
+; IS__CGSCC____-NEXT: ret i32 0
;
%A = alloca i32
store i32 1, i32* %A
}
define internal i32 @caller(i32* %B) {
-; CHECK: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
-; CHECK-LABEL: define {{[^@]+}}@caller
-; CHECK-SAME: (i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B:%.*]]) #[[ATTR0]] {
-; CHECK-NEXT: [[A:%.*]] = alloca i32, align 4
-; CHECK-NEXT: [[C:%.*]] = call i32 @test(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B]]) #[[ATTR2:[0-9]+]]
-; CHECK-NEXT: ret i32 undef
+; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; IS__TUNIT____-LABEL: define {{[^@]+}}@caller
+; IS__TUNIT____-SAME: (i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B:%.*]]) #[[ATTR0]] {
+; IS__TUNIT____-NEXT: [[A:%.*]] = alloca i32, align 4
+; IS__TUNIT____-NEXT: [[C:%.*]] = call i32 @test(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B]]) #[[ATTR2:[0-9]+]]
+; IS__TUNIT____-NEXT: ret i32 undef
+;
+; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; IS__CGSCC____-LABEL: define {{[^@]+}}@caller
+; IS__CGSCC____-SAME: (i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B:%.*]]) #[[ATTR0]] {
+; IS__CGSCC____-NEXT: [[A:%.*]] = alloca i32, align 4
+; IS__CGSCC____-NEXT: [[C:%.*]] = call i32 @test(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B]]) #[[ATTR2:[0-9]+]]
+; IS__CGSCC____-NEXT: ret i32 0
;
%A = alloca i32
store i32 1, i32* %A
; IS__CGSCC____: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
; IS__CGSCC____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
; IS__CGSCC____: attributes #[[ATTR2]] = { nofree nosync nounwind willreturn writeonly }
-; IS__CGSCC____: attributes #[[ATTR3]] = { nosync nounwind willreturn writeonly }
+; IS__CGSCC____: attributes #[[ATTR3]] = { nounwind willreturn writeonly }
;.
}
define internal i32 @test2(%T* %p, i32 %p2) {
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
; IS__CGSCC____-LABEL: define {{[^@]+}}@test2
-; IS__CGSCC____-SAME: (%T* noalias nocapture nofree readnone [[P:%.*]], i32 [[P2:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: ret i32 undef
+; IS__CGSCC____-SAME: (%T* nocapture nofree readonly [[P:%.*]], i32 [[P2:%.*]]) #[[ATTR0]] {
+; IS__CGSCC____-NEXT: ret i32 0
;
%a.gep = getelementptr %T, %T* %p, i64 0, i32 3
%b.gep = getelementptr %T, %T* %p, i64 0, i32 2
}
define i32 @caller2b(%T* %g) {
-; CHECK: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
-; CHECK-LABEL: define {{[^@]+}}@caller2b
-; CHECK-SAME: (%T* nocapture nofree readonly [[G:%.*]]) #[[ATTR3]] {
-; CHECK-NEXT: [[V:%.*]] = call i32 @test2b(%T* nocapture nofree readonly [[G]], i32 undef) #[[ATTR6:[0-9]+]]
-; CHECK-NEXT: ret i32 0
+; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
+; IS__TUNIT____-LABEL: define {{[^@]+}}@caller2b
+; IS__TUNIT____-SAME: (%T* nocapture nofree readonly [[G:%.*]]) #[[ATTR3]] {
+; IS__TUNIT____-NEXT: [[V:%.*]] = call i32 @test2b(%T* nocapture nofree readonly [[G]], i32 undef) #[[ATTR6:[0-9]+]]
+; IS__TUNIT____-NEXT: ret i32 0
+;
+; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
+; IS__CGSCC____-LABEL: define {{[^@]+}}@caller2b
+; IS__CGSCC____-SAME: (%T* nocapture nofree readonly [[G:%.*]]) #[[ATTR3]] {
+; IS__CGSCC____-NEXT: [[V:%.*]] = call i32 @test2b(%T* nocapture nofree readonly [[G]], i32 noundef 0) #[[ATTR6:[0-9]+]]
+; IS__CGSCC____-NEXT: ret i32 0
;
%v = call i32 @test2b(%T* %g, i32 0)
ret i32 %v
; IS__CGSCC____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
; IS__CGSCC____: attributes #[[ATTR2]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
; IS__CGSCC____: attributes #[[ATTR3]] = { argmemonly nofree norecurse nosync nounwind willreturn }
-; IS__CGSCC____: attributes #[[ATTR4]] = { nosync nounwind readonly willreturn }
+; IS__CGSCC____: attributes #[[ATTR4]] = { readonly willreturn }
; IS__CGSCC____: attributes #[[ATTR5]] = { nounwind willreturn writeonly }
-; IS__CGSCC____: attributes #[[ATTR6]] = { nosync nounwind willreturn }
+; IS__CGSCC____: attributes #[[ATTR6]] = { nounwind willreturn }
;.
define internal void @add({i32, i32}* %this, i32* sret(i32) %r) {
;
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@add
-; IS__TUNIT____-SAME: ({ i32, i32 }* noalias nocapture nofree nonnull readnone align 8 dereferenceable(8) [[THIS:%.*]], i32* noalias nocapture nofree noundef nonnull writeonly sret(i32) align 4 dereferenceable(4) [[R:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@add
-; IS__CGSCC____-SAME: ({ i32, i32 }* noalias nocapture nofree nonnull readnone align 8 dereferenceable(8) [[THIS:%.*]], i32* noalias nocapture nofree nonnull readnone sret(i32) align 4 dereferenceable(4) [[R:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS__CGSCC____-NEXT: ret void
+; CHECK: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; CHECK-LABEL: define {{[^@]+}}@add
+; CHECK-SAME: ({ i32, i32 }* noalias nocapture nofree nonnull readnone align 8 dereferenceable(8) [[THIS:%.*]], i32* noalias nocapture nofree noundef nonnull writeonly sret(i32) align 4 dereferenceable(4) [[R:%.*]]) #[[ATTR0:[0-9]+]] {
+; CHECK-NEXT: ret void
;
%ap = getelementptr {i32, i32}, {i32, i32}* %this, i32 0, i32 0
%bp = getelementptr {i32, i32}, {i32, i32}* %this, i32 0, i32 1
;
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
; IS__CGSCC____-LABEL: define {{[^@]+}}@f
-; IS__CGSCC____-SAME: () #[[ATTR0]] {
+; IS__CGSCC____-SAME: () #[[ATTR1:[0-9]+]] {
; IS__CGSCC____-NEXT: ret void
;
%r = alloca i32
; IS__TUNIT____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
; IS__TUNIT____: attributes #[[ATTR2]] = { nofree nosync nounwind willreturn writeonly }
;.
-; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; IS__CGSCC____: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
+; IS__CGSCC____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
;.
declare i8* @foo(%pair*)
define internal void @bar(%pair* byval(%pair) %Data) {
-; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@bar
-; IS__TUNIT_OPM-SAME: (%pair* noalias nonnull byval([[PAIR:%.*]]) dereferenceable(8) [[DATA:%.*]]) {
-; IS__TUNIT_OPM-NEXT: [[TMP1:%.*]] = tail call i8* @foo(%pair* nonnull dereferenceable(8) [[DATA]])
-; IS__TUNIT_OPM-NEXT: ret void
-;
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@bar
-; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) {
-; IS__TUNIT_NPM-NEXT: [[DATA_PRIV:%.*]] = alloca [[PAIR:%.*]], align 8
-; IS__TUNIT_NPM-NEXT: [[DATA_PRIV_CAST:%.*]] = bitcast %pair* [[DATA_PRIV]] to i32*
-; IS__TUNIT_NPM-NEXT: store i32 [[TMP0]], i32* [[DATA_PRIV_CAST]], align 4
-; IS__TUNIT_NPM-NEXT: [[DATA_PRIV_0_1:%.*]] = getelementptr [[PAIR]], %pair* [[DATA_PRIV]], i64 0, i32 1
-; IS__TUNIT_NPM-NEXT: store i32 [[TMP1]], i32* [[DATA_PRIV_0_1]], align 4
-; IS__TUNIT_NPM-NEXT: [[TMP3:%.*]] = call i8* @foo(%pair* nonnull dereferenceable(8) [[DATA_PRIV]])
-; IS__TUNIT_NPM-NEXT: ret void
+; IS________OPM-LABEL: define {{[^@]+}}@bar
+; IS________OPM-SAME: (%pair* noalias nonnull byval([[PAIR:%.*]]) dereferenceable(8) [[DATA:%.*]]) {
+; IS________OPM-NEXT: [[TMP1:%.*]] = tail call i8* @foo(%pair* nonnull dereferenceable(8) [[DATA]])
+; IS________OPM-NEXT: ret void
;
-; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@bar
-; IS__CGSCC_OPM-SAME: (%pair* noalias noundef nonnull byval([[PAIR:%.*]]) dereferenceable(8) [[DATA:%.*]]) {
-; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = tail call i8* @foo(%pair* noundef nonnull dereferenceable(8) [[DATA]])
-; IS__CGSCC_OPM-NEXT: ret void
-;
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@bar
-; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) {
-; IS__CGSCC_NPM-NEXT: [[DATA_PRIV:%.*]] = alloca [[PAIR:%.*]], align 8
-; IS__CGSCC_NPM-NEXT: [[DATA_PRIV_CAST:%.*]] = bitcast %pair* [[DATA_PRIV]] to i32*
-; IS__CGSCC_NPM-NEXT: store i32 [[TMP0]], i32* [[DATA_PRIV_CAST]], align 8
-; IS__CGSCC_NPM-NEXT: [[DATA_PRIV_0_1:%.*]] = getelementptr [[PAIR]], %pair* [[DATA_PRIV]], i64 0, i32 1
-; IS__CGSCC_NPM-NEXT: store i32 [[TMP1]], i32* [[DATA_PRIV_0_1]], align 4
-; IS__CGSCC_NPM-NEXT: [[TMP3:%.*]] = call i8* @foo(%pair* noundef nonnull align 8 dereferenceable(8) [[DATA_PRIV]])
-; IS__CGSCC_NPM-NEXT: ret void
+; IS________NPM-LABEL: define {{[^@]+}}@bar
+; IS________NPM-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) {
+; IS________NPM-NEXT: [[DATA_PRIV:%.*]] = alloca [[PAIR:%.*]], align 8
+; IS________NPM-NEXT: [[DATA_PRIV_CAST:%.*]] = bitcast %pair* [[DATA_PRIV]] to i32*
+; IS________NPM-NEXT: store i32 [[TMP0]], i32* [[DATA_PRIV_CAST]], align 4
+; IS________NPM-NEXT: [[DATA_PRIV_0_1:%.*]] = getelementptr [[PAIR]], %pair* [[DATA_PRIV]], i64 0, i32 1
+; IS________NPM-NEXT: store i32 [[TMP1]], i32* [[DATA_PRIV_0_1]], align 4
+; IS________NPM-NEXT: [[TMP3:%.*]] = call i8* @foo(%pair* nonnull dereferenceable(8) [[DATA_PRIV]])
+; IS________NPM-NEXT: ret void
;
tail call i8* @foo(%pair* %Data)
ret void
; IS________OPM: return:
; IS________OPM-NEXT: ret void
;
-; IS__TUNIT_NPM: Function Attrs: nounwind
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@vfu1
-; IS__TUNIT_NPM-SAME: (i8 [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: [[U_PRIV:%.*]] = alloca [[STRUCT_MYSTR:%.*]], align 8
-; IS__TUNIT_NPM-NEXT: [[U_PRIV_CAST:%.*]] = bitcast %struct.MYstr* [[U_PRIV]] to i8*
-; IS__TUNIT_NPM-NEXT: store i8 [[TMP0]], i8* [[U_PRIV_CAST]], align 1
-; IS__TUNIT_NPM-NEXT: [[U_PRIV_0_1:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i64 0, i32 1
-; IS__TUNIT_NPM-NEXT: store i32 [[TMP1]], i32* [[U_PRIV_0_1]], align 4
-; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i32 0, i32 1
-; IS__TUNIT_NPM-NEXT: store i32 99, i32* [[TMP2]], align 4
-; IS__TUNIT_NPM-NEXT: [[TMP3:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i32 0, i32 0
-; IS__TUNIT_NPM-NEXT: store i8 97, i8* [[TMP3]], align 8
-; IS__TUNIT_NPM-NEXT: [[L:%.*]] = load i8, i8* [[TMP3]], align 8
-; IS__TUNIT_NPM-NEXT: call void @use(i8 [[L]])
-; IS__TUNIT_NPM-NEXT: br label [[RETURN:%.*]]
-; IS__TUNIT_NPM: return:
-; IS__TUNIT_NPM-NEXT: ret void
-;
-; IS__CGSCC_NPM: Function Attrs: nounwind
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@vfu1
-; IS__CGSCC_NPM-SAME: (i8 [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: [[U_PRIV:%.*]] = alloca [[STRUCT_MYSTR:%.*]], align 8
-; IS__CGSCC_NPM-NEXT: [[U_PRIV_CAST:%.*]] = bitcast %struct.MYstr* [[U_PRIV]] to i8*
-; IS__CGSCC_NPM-NEXT: store i8 [[TMP0]], i8* [[U_PRIV_CAST]], align 8
-; IS__CGSCC_NPM-NEXT: [[U_PRIV_0_1:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i64 0, i32 1
-; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i32 0, i32 1
-; IS__CGSCC_NPM-NEXT: [[TMP3:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i32 0, i32 0
-; IS__CGSCC_NPM-NEXT: store i8 97, i8* [[TMP3]], align 8
-; IS__CGSCC_NPM-NEXT: [[L:%.*]] = load i8, i8* [[TMP3]], align 8
-; IS__CGSCC_NPM-NEXT: call void @use(i8 [[L]])
-; IS__CGSCC_NPM-NEXT: br label [[RETURN:%.*]]
-; IS__CGSCC_NPM: return:
-; IS__CGSCC_NPM-NEXT: ret void
+; IS________NPM: Function Attrs: nounwind
+; IS________NPM-LABEL: define {{[^@]+}}@vfu1
+; IS________NPM-SAME: (i8 [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR0:[0-9]+]] {
+; IS________NPM-NEXT: entry:
+; IS________NPM-NEXT: [[U_PRIV:%.*]] = alloca [[STRUCT_MYSTR:%.*]], align 8
+; IS________NPM-NEXT: [[U_PRIV_CAST:%.*]] = bitcast %struct.MYstr* [[U_PRIV]] to i8*
+; IS________NPM-NEXT: store i8 [[TMP0]], i8* [[U_PRIV_CAST]], align 1
+; IS________NPM-NEXT: [[U_PRIV_0_1:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i64 0, i32 1
+; IS________NPM-NEXT: store i32 [[TMP1]], i32* [[U_PRIV_0_1]], align 4
+; IS________NPM-NEXT: [[TMP2:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i32 0, i32 1
+; IS________NPM-NEXT: store i32 99, i32* [[TMP2]], align 4
+; IS________NPM-NEXT: [[TMP3:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i32 0, i32 0
+; IS________NPM-NEXT: store i8 97, i8* [[TMP3]], align 8
+; IS________NPM-NEXT: [[L:%.*]] = load i8, i8* [[TMP3]], align 8
+; IS________NPM-NEXT: call void @use(i8 [[L]])
+; IS________NPM-NEXT: br label [[RETURN:%.*]]
+; IS________NPM: return:
+; IS________NPM-NEXT: ret void
;
entry:
%0 = getelementptr %struct.MYstr, %struct.MYstr* %u, i32 0, i32 1 ; <i32*> [#uses=1]
; IS________OPM-NEXT: [[TMP5:%.*]] = add i32 [[TMP4]], [[TMP1]]
; IS________OPM-NEXT: ret i32 [[TMP5]]
;
-; IS__TUNIT_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@vfu2
-; IS__TUNIT_NPM-SAME: (i8 [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR1:[0-9]+]] {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: [[U_PRIV:%.*]] = alloca [[STRUCT_MYSTR:%.*]], align 8
-; IS__TUNIT_NPM-NEXT: [[U_PRIV_CAST:%.*]] = bitcast %struct.MYstr* [[U_PRIV]] to i8*
-; IS__TUNIT_NPM-NEXT: store i8 [[TMP0]], i8* [[U_PRIV_CAST]], align 1
-; IS__TUNIT_NPM-NEXT: [[U_PRIV_0_1:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i64 0, i32 1
-; IS__TUNIT_NPM-NEXT: store i32 [[TMP1]], i32* [[U_PRIV_0_1]], align 4
-; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i32 0, i32 1
-; IS__TUNIT_NPM-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP2]], align 4
-; IS__TUNIT_NPM-NEXT: [[TMP4:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i32 0, i32 0
-; IS__TUNIT_NPM-NEXT: [[TMP5:%.*]] = load i8, i8* [[TMP4]], align 8
-; IS__TUNIT_NPM-NEXT: [[TMP6:%.*]] = zext i8 [[TMP5]] to i32
-; IS__TUNIT_NPM-NEXT: [[TMP7:%.*]] = add i32 [[TMP6]], [[TMP3]]
-; IS__TUNIT_NPM-NEXT: ret i32 [[TMP7]]
-;
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@vfu2
-; IS__CGSCC_NPM-SAME: (i8 [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR1:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: [[U_PRIV:%.*]] = alloca [[STRUCT_MYSTR:%.*]], align 8
-; IS__CGSCC_NPM-NEXT: [[U_PRIV_CAST:%.*]] = bitcast %struct.MYstr* [[U_PRIV]] to i8*
-; IS__CGSCC_NPM-NEXT: store i8 [[TMP0]], i8* [[U_PRIV_CAST]], align 8
-; IS__CGSCC_NPM-NEXT: [[U_PRIV_0_1:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i64 0, i32 1
-; IS__CGSCC_NPM-NEXT: store i32 [[TMP1]], i32* [[U_PRIV_0_1]], align 4
-; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i32 0, i32 1
-; IS__CGSCC_NPM-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP2]], align 4
-; IS__CGSCC_NPM-NEXT: [[TMP4:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i32 0, i32 0
-; IS__CGSCC_NPM-NEXT: [[TMP5:%.*]] = load i8, i8* [[TMP4]], align 8
-; IS__CGSCC_NPM-NEXT: [[TMP6:%.*]] = zext i8 [[TMP5]] to i32
-; IS__CGSCC_NPM-NEXT: [[TMP7:%.*]] = add i32 [[TMP6]], [[TMP3]]
-; IS__CGSCC_NPM-NEXT: ret i32 [[TMP7]]
+; IS________NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
+; IS________NPM-LABEL: define {{[^@]+}}@vfu2
+; IS________NPM-SAME: (i8 [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR1:[0-9]+]] {
+; IS________NPM-NEXT: entry:
+; IS________NPM-NEXT: [[U_PRIV:%.*]] = alloca [[STRUCT_MYSTR:%.*]], align 8
+; IS________NPM-NEXT: [[U_PRIV_CAST:%.*]] = bitcast %struct.MYstr* [[U_PRIV]] to i8*
+; IS________NPM-NEXT: store i8 [[TMP0]], i8* [[U_PRIV_CAST]], align 1
+; IS________NPM-NEXT: [[U_PRIV_0_1:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i64 0, i32 1
+; IS________NPM-NEXT: store i32 [[TMP1]], i32* [[U_PRIV_0_1]], align 4
+; IS________NPM-NEXT: [[TMP2:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i32 0, i32 1
+; IS________NPM-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP2]], align 4
+; IS________NPM-NEXT: [[TMP4:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i32 0, i32 0
+; IS________NPM-NEXT: [[TMP5:%.*]] = load i8, i8* [[TMP4]], align 8
+; IS________NPM-NEXT: [[TMP6:%.*]] = zext i8 [[TMP5]] to i32
+; IS________NPM-NEXT: [[TMP7:%.*]] = add i32 [[TMP6]], [[TMP3]]
+; IS________NPM-NEXT: ret i32 [[TMP7]]
;
entry:
%0 = getelementptr %struct.MYstr, %struct.MYstr* %u, i32 0, i32 1 ; <i32*> [#uses=1]
; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@unions
; IS__TUNIT_NPM-SAME: () #[[ATTR0]] {
; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: [[MYSTR_CAST1:%.*]] = bitcast %struct.MYstr* @mystr to i8*
-; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = load i8, i8* [[MYSTR_CAST1]], align 8
-; IS__TUNIT_NPM-NEXT: [[MYSTR_0_12:%.*]] = getelementptr [[STRUCT_MYSTR:%.*]], %struct.MYstr* @mystr, i64 0, i32 1
-; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[MYSTR_0_12]], align 8
-; IS__TUNIT_NPM-NEXT: call void @vfu1(i8 [[TMP0]], i32 [[TMP1]]) #[[ATTR0]]
; IS__TUNIT_NPM-NEXT: [[MYSTR_CAST:%.*]] = bitcast %struct.MYstr* @mystr to i8*
-; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = load i8, i8* [[MYSTR_CAST]], align 8
-; IS__TUNIT_NPM-NEXT: [[MYSTR_0_1:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* @mystr, i64 0, i32 1
-; IS__TUNIT_NPM-NEXT: [[TMP3:%.*]] = load i32, i32* [[MYSTR_0_1]], align 8
+; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = load i8, i8* [[MYSTR_CAST]], align 8
+; IS__TUNIT_NPM-NEXT: [[MYSTR_0_1:%.*]] = getelementptr [[STRUCT_MYSTR:%.*]], %struct.MYstr* @mystr, i64 0, i32 1
+; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[MYSTR_0_1]], align 8
+; IS__TUNIT_NPM-NEXT: call void @vfu1(i8 [[TMP0]], i32 [[TMP1]]) #[[ATTR0]]
+; IS__TUNIT_NPM-NEXT: [[MYSTR_CAST1:%.*]] = bitcast %struct.MYstr* @mystr to i8*
+; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = load i8, i8* [[MYSTR_CAST1]], align 8
+; IS__TUNIT_NPM-NEXT: [[MYSTR_0_12:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* @mystr, i64 0, i32 1
+; IS__TUNIT_NPM-NEXT: [[TMP3:%.*]] = load i32, i32* [[MYSTR_0_12]], align 8
; IS__TUNIT_NPM-NEXT: [[RESULT:%.*]] = call i32 @vfu2(i8 [[TMP2]], i32 [[TMP3]]) #[[ATTR2:[0-9]+]]
; IS__TUNIT_NPM-NEXT: ret i32 [[RESULT]]
;
; IS__CGSCC_NPM-SAME: () #[[ATTR0]] {
; IS__CGSCC_NPM-NEXT: entry:
; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = load i8, i8* getelementptr inbounds ([[STRUCT_MYSTR:%.*]], %struct.MYstr* @mystr, i32 0, i32 0), align 8
-; IS__CGSCC_NPM-NEXT: call void @vfu1(i8 [[TMP0]], i32 undef) #[[ATTR0]]
-; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = load i8, i8* getelementptr inbounds ([[STRUCT_MYSTR]], %struct.MYstr* @mystr, i32 0, i32 0), align 8
+; IS__CGSCC_NPM-NEXT: [[MYSTR_0_1:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* @mystr, i64 0, i32 1
+; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[MYSTR_0_1]], align 8
+; IS__CGSCC_NPM-NEXT: call void @vfu1(i8 [[TMP0]], i32 [[TMP1]]) #[[ATTR0]]
+; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = load i8, i8* getelementptr inbounds ([[STRUCT_MYSTR]], %struct.MYstr* @mystr, i32 0, i32 0), align 8
; IS__CGSCC_NPM-NEXT: [[MYSTR_0_12:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* @mystr, i64 0, i32 1
-; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[MYSTR_0_12]], align 8
-; IS__CGSCC_NPM-NEXT: [[RESULT:%.*]] = call i32 @vfu2(i8 [[TMP1]], i32 [[TMP2]]) #[[ATTR0]]
+; IS__CGSCC_NPM-NEXT: [[TMP3:%.*]] = load i32, i32* [[MYSTR_0_12]], align 8
+; IS__CGSCC_NPM-NEXT: [[RESULT:%.*]] = call i32 @vfu2(i8 [[TMP2]], i32 [[TMP3]]) #[[ATTR0]]
; IS__CGSCC_NPM-NEXT: ret i32 [[RESULT]]
;
entry:
; IS________OPM-NEXT: [[TMP5:%.*]] = add i32 [[TMP4]], [[TMP1]]
; IS________OPM-NEXT: ret i32 [[TMP5]]
;
-; IS__TUNIT_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@vfu2_v2
-; IS__TUNIT_NPM-SAME: (i8 [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR1]] {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: [[U_PRIV:%.*]] = alloca [[STRUCT_MYSTR:%.*]], align 8
-; IS__TUNIT_NPM-NEXT: [[U_PRIV_CAST:%.*]] = bitcast %struct.MYstr* [[U_PRIV]] to i8*
-; IS__TUNIT_NPM-NEXT: store i8 [[TMP0]], i8* [[U_PRIV_CAST]], align 1
-; IS__TUNIT_NPM-NEXT: [[U_PRIV_0_1:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i64 0, i32 1
-; IS__TUNIT_NPM-NEXT: store i32 [[TMP1]], i32* [[U_PRIV_0_1]], align 4
-; IS__TUNIT_NPM-NEXT: [[Z:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i32 0, i32 1
-; IS__TUNIT_NPM-NEXT: store i32 99, i32* [[Z]], align 4
-; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i32 0, i32 1
-; IS__TUNIT_NPM-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP2]], align 4
-; IS__TUNIT_NPM-NEXT: [[TMP4:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i32 0, i32 0
-; IS__TUNIT_NPM-NEXT: [[TMP5:%.*]] = load i8, i8* [[TMP4]], align 8
-; IS__TUNIT_NPM-NEXT: [[TMP6:%.*]] = zext i8 [[TMP5]] to i32
-; IS__TUNIT_NPM-NEXT: [[TMP7:%.*]] = add i32 [[TMP6]], [[TMP3]]
-; IS__TUNIT_NPM-NEXT: ret i32 [[TMP7]]
-;
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@vfu2_v2
-; IS__CGSCC_NPM-SAME: (i8 [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR1]] {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: [[U_PRIV:%.*]] = alloca [[STRUCT_MYSTR:%.*]], align 8
-; IS__CGSCC_NPM-NEXT: [[U_PRIV_CAST:%.*]] = bitcast %struct.MYstr* [[U_PRIV]] to i8*
-; IS__CGSCC_NPM-NEXT: [[U_PRIV_0_1:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i64 0, i32 1
-; IS__CGSCC_NPM-NEXT: [[Z:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i32 0, i32 1
-; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i32 0, i32 1
-; IS__CGSCC_NPM-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP2]], align 4
-; IS__CGSCC_NPM-NEXT: [[TMP4:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i32 0, i32 0
-; IS__CGSCC_NPM-NEXT: [[TMP5:%.*]] = load i8, i8* [[TMP4]], align 8
-; IS__CGSCC_NPM-NEXT: [[TMP6:%.*]] = zext i8 0 to i32
-; IS__CGSCC_NPM-NEXT: [[TMP7:%.*]] = add i32 0, 99
-; IS__CGSCC_NPM-NEXT: ret i32 undef
+; IS________NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
+; IS________NPM-LABEL: define {{[^@]+}}@vfu2_v2
+; IS________NPM-SAME: (i8 [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR1]] {
+; IS________NPM-NEXT: entry:
+; IS________NPM-NEXT: [[U_PRIV:%.*]] = alloca [[STRUCT_MYSTR:%.*]], align 8
+; IS________NPM-NEXT: [[U_PRIV_CAST:%.*]] = bitcast %struct.MYstr* [[U_PRIV]] to i8*
+; IS________NPM-NEXT: store i8 [[TMP0]], i8* [[U_PRIV_CAST]], align 1
+; IS________NPM-NEXT: [[U_PRIV_0_1:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i64 0, i32 1
+; IS________NPM-NEXT: store i32 [[TMP1]], i32* [[U_PRIV_0_1]], align 4
+; IS________NPM-NEXT: [[Z:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i32 0, i32 1
+; IS________NPM-NEXT: store i32 99, i32* [[Z]], align 4
+; IS________NPM-NEXT: [[TMP2:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i32 0, i32 1
+; IS________NPM-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP2]], align 4
+; IS________NPM-NEXT: [[TMP4:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i32 0, i32 0
+; IS________NPM-NEXT: [[TMP5:%.*]] = load i8, i8* [[TMP4]], align 8
+; IS________NPM-NEXT: [[TMP6:%.*]] = zext i8 [[TMP5]] to i32
+; IS________NPM-NEXT: [[TMP7:%.*]] = add i32 [[TMP6]], [[TMP3]]
+; IS________NPM-NEXT: ret i32 [[TMP7]]
;
entry:
%z = getelementptr %struct.MYstr, %struct.MYstr* %u, i32 0, i32 1
; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@unions_v2
; IS__TUNIT_NPM-SAME: () #[[ATTR0]] {
; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: [[MYSTR_CAST1:%.*]] = bitcast %struct.MYstr* @mystr to i8*
-; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = load i8, i8* [[MYSTR_CAST1]], align 8
-; IS__TUNIT_NPM-NEXT: [[MYSTR_0_12:%.*]] = getelementptr [[STRUCT_MYSTR:%.*]], %struct.MYstr* @mystr, i64 0, i32 1
-; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[MYSTR_0_12]], align 8
-; IS__TUNIT_NPM-NEXT: call void @vfu1(i8 [[TMP0]], i32 [[TMP1]]) #[[ATTR0]]
; IS__TUNIT_NPM-NEXT: [[MYSTR_CAST:%.*]] = bitcast %struct.MYstr* @mystr to i8*
-; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = load i8, i8* [[MYSTR_CAST]], align 8
-; IS__TUNIT_NPM-NEXT: [[MYSTR_0_1:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* @mystr, i64 0, i32 1
-; IS__TUNIT_NPM-NEXT: [[TMP3:%.*]] = load i32, i32* [[MYSTR_0_1]], align 8
+; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = load i8, i8* [[MYSTR_CAST]], align 8
+; IS__TUNIT_NPM-NEXT: [[MYSTR_0_1:%.*]] = getelementptr [[STRUCT_MYSTR:%.*]], %struct.MYstr* @mystr, i64 0, i32 1
+; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[MYSTR_0_1]], align 8
+; IS__TUNIT_NPM-NEXT: call void @vfu1(i8 [[TMP0]], i32 [[TMP1]]) #[[ATTR0]]
+; IS__TUNIT_NPM-NEXT: [[MYSTR_CAST1:%.*]] = bitcast %struct.MYstr* @mystr to i8*
+; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = load i8, i8* [[MYSTR_CAST1]], align 8
+; IS__TUNIT_NPM-NEXT: [[MYSTR_0_12:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* @mystr, i64 0, i32 1
+; IS__TUNIT_NPM-NEXT: [[TMP3:%.*]] = load i32, i32* [[MYSTR_0_12]], align 8
; IS__TUNIT_NPM-NEXT: [[RESULT:%.*]] = call i32 @vfu2_v2(i8 [[TMP2]], i32 [[TMP3]]) #[[ATTR2]]
; IS__TUNIT_NPM-NEXT: ret i32 [[RESULT]]
;
; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@unions_v2
; IS__CGSCC_NPM-SAME: () #[[ATTR0]] {
; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: call void @vfu1(i8 noundef 0, i32 undef) #[[ATTR0]]
+; IS__CGSCC_NPM-NEXT: call void @vfu1(i8 noundef 0, i32 noundef 0) #[[ATTR0]]
; IS__CGSCC_NPM-NEXT: ret i32 99
;
entry:
; IS__TUNIT____: attributes #[[ATTR1:[0-9]+]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
; IS__TUNIT____: attributes #[[ATTR2:[0-9]+]] = { nounwind readonly }
;.
-; IS__CGSCC_OPM: attributes #[[ATTR0]] = { nounwind }
-; IS__CGSCC_OPM: attributes #[[ATTR1]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
-;.
-; IS__CGSCC_NPM: attributes #[[ATTR0]] = { nounwind }
-; IS__CGSCC_NPM: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
+; IS__CGSCC____: attributes #[[ATTR0:[0-9]+]] = { nounwind }
+; IS__CGSCC____: attributes #[[ATTR1:[0-9]+]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
;.
define i64 @fn2() {
;
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@fn2
-; IS__TUNIT____-SAME: () #[[ATTR0:[0-9]+]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: ret i64 poison
-;
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@fn2
-; IS__CGSCC____-SAME: () #[[ATTR0:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[CONV:%.*]] = sext i32 undef to i64
-; IS__CGSCC____-NEXT: [[DIV:%.*]] = sdiv i64 8, 0
-; IS__CGSCC____-NEXT: ret i64 poison
+; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CHECK-LABEL: define {{[^@]+}}@fn2
+; CHECK-SAME: () #[[ATTR0:[0-9]+]] {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: ret i64 poison
;
entry:
%conv = sext i32 undef to i64
;
; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
; CHECK-LABEL: define {{[^@]+}}@fn2b
-; CHECK-SAME: (i32 [[ARG:%.*]]) #[[ATTR0:[0-9]+]] {
+; CHECK-SAME: (i32 [[ARG:%.*]]) #[[ATTR0]] {
; CHECK-NEXT: entry:
; CHECK-NEXT: [[CONV:%.*]] = sext i32 [[ARG]] to i64
; CHECK-NEXT: [[DIV:%.*]] = sdiv i64 8, [[CONV]]
}
define i64 @fn2c() {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@fn2c
-; IS__TUNIT____-SAME: () #[[ATTR0]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: ret i64 42
-;
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@fn2c
-; IS__CGSCC____-SAME: () #[[ATTR0]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[CONV:%.*]] = sext i32 undef to i64
-; IS__CGSCC____-NEXT: [[ADD:%.*]] = add i64 42, 0
-; IS__CGSCC____-NEXT: ret i64 42
+; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CHECK-LABEL: define {{[^@]+}}@fn2c
+; CHECK-SAME: () #[[ATTR0]] {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: ret i64 42
;
entry:
%conv = sext i32 undef to i64
define internal i64 @fn1(i64 %p1) {
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
; IS__CGSCC____-LABEL: define {{[^@]+}}@fn1
-; IS__CGSCC____-SAME: (i64 [[P1:%.*]]) #[[ATTR0]] {
+; IS__CGSCC____-SAME: (i64 returned [[P1:%.*]]) #[[ATTR0]] {
; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: ret i64 undef
+; IS__CGSCC____-NEXT: ret i64 [[P1]]
;
entry:
%tobool = icmp ne i64 %p1, 0
define internal i32 @fn1(i32 %p1) {
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
; IS__CGSCC____-LABEL: define {{[^@]+}}@fn1
-; IS__CGSCC____-SAME: (i32 [[P1:%.*]]) #[[ATTR1:[0-9]+]] {
+; IS__CGSCC____-SAME: (i32 returned [[P1:%.*]]) #[[ATTR1:[0-9]+]] {
; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: ret i32 undef
+; IS__CGSCC____-NEXT: ret i32 [[P1]]
;
entry:
%tobool = icmp ne i32 %p1, 0
define internal i32 @fn0(i32 %p1) {
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
; IS__CGSCC____-LABEL: define {{[^@]+}}@fn0
-; IS__CGSCC____-SAME: (i32 [[P1:%.*]]) #[[ATTR1]] {
+; IS__CGSCC____-SAME: (i32 returned [[P1:%.*]]) #[[ATTR1]] {
; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: ret i32 undef
+; IS__CGSCC____-NEXT: ret i32 [[P1]]
;
entry:
%tobool = icmp ne i32 %p1, 0
; FIXME we should recognize this as UB and make it an unreachable.
define dso_local i16 @foo(i16 %a) {
-; NOT_CGSCC_NPM: Function Attrs: norecurse
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@foo
-; NOT_CGSCC_NPM-SAME: (i16 [[A:%.*]]) #[[ATTR0:[0-9]+]] {
-; NOT_CGSCC_NPM-NEXT: [[CALL:%.*]] = call i16 bitcast (i16 (i16, i16)* @bar to i16 (i16)*)(i16 [[A]])
-; NOT_CGSCC_NPM-NEXT: ret i16 [[CALL]]
+; IS__TUNIT____: Function Attrs: norecurse
+; IS__TUNIT____-LABEL: define {{[^@]+}}@foo
+; IS__TUNIT____-SAME: (i16 [[A:%.*]]) #[[ATTR0:[0-9]+]] {
+; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i16 bitcast (i16 (i16, i16)* @bar to i16 (i16)*)(i16 [[A]])
+; IS__TUNIT____-NEXT: ret i16 [[CALL]]
;
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone
+; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@foo
+; IS__CGSCC_OPM-SAME: (i16 [[A:%.*]]) {
+; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call i16 bitcast (i16 (i16, i16)* @bar to i16 (i16)*)(i16 [[A]])
+; IS__CGSCC_OPM-NEXT: ret i16 [[CALL]]
+;
+; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone
; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@foo
; IS__CGSCC_NPM-SAME: (i16 [[A:%.*]]) #[[ATTR0:[0-9]+]] {
; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call i16 bitcast (i16 (i16, i16)* @bar to i16 (i16)*)(i16 [[A]])
}
define internal i16 @bar(i16 %p1, i16 %p2) {
-; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; CHECK-LABEL: define {{[^@]+}}@bar
-; CHECK-SAME: (i16 [[P1:%.*]], i16 [[P2:%.*]]) #[[ATTR1:[0-9]+]] {
-; CHECK-NEXT: ret i16 0
+; NOT_CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@bar
+; NOT_CGSCC_OPM-SAME: (i16 [[P1:%.*]], i16 [[P2:%.*]]) #[[ATTR1:[0-9]+]] {
+; NOT_CGSCC_OPM-NEXT: ret i16 0
+;
+; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@bar
+; IS__CGSCC_OPM-SAME: (i16 [[P1:%.*]], i16 [[P2:%.*]]) #[[ATTR0:[0-9]+]] {
+; IS__CGSCC_OPM-NEXT: ret i16 0
;
ret i16 0
}
define dso_local i16 @foo2(i16 %a) {
-; NOT_CGSCC_NPM: Function Attrs: norecurse
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@foo2
-; NOT_CGSCC_NPM-SAME: (i16 [[A:%.*]]) #[[ATTR0]] {
-; NOT_CGSCC_NPM-NEXT: [[CALL:%.*]] = call i16 bitcast (i16 (i16, i16)* @bar2 to i16 (i16)*)(i16 [[A]])
-; NOT_CGSCC_NPM-NEXT: ret i16 [[CALL]]
+; IS__TUNIT____: Function Attrs: norecurse
+; IS__TUNIT____-LABEL: define {{[^@]+}}@foo2
+; IS__TUNIT____-SAME: (i16 [[A:%.*]]) #[[ATTR0]] {
+; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i16 bitcast (i16 (i16, i16)* @bar2 to i16 (i16)*)(i16 [[A]])
+; IS__TUNIT____-NEXT: ret i16 [[CALL]]
;
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone
+; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@foo2
+; IS__CGSCC_OPM-SAME: (i16 [[A:%.*]]) {
+; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call i16 bitcast (i16 (i16, i16)* @bar2 to i16 (i16)*)(i16 [[A]])
+; IS__CGSCC_OPM-NEXT: ret i16 [[CALL]]
+;
+; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone
; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@foo2
; IS__CGSCC_NPM-SAME: (i16 [[A:%.*]]) #[[ATTR0]] {
; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call i16 bitcast (i16 (i16, i16)* @bar2 to i16 (i16)*)(i16 [[A]])
}
define internal i16 @bar2(i16 %p1, i16 %p2) {
-; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; CHECK-LABEL: define {{[^@]+}}@bar2
-; CHECK-SAME: (i16 [[P1:%.*]], i16 [[P2:%.*]]) #[[ATTR1]] {
-; CHECK-NEXT: [[A:%.*]] = add i16 [[P1]], [[P2]]
-; CHECK-NEXT: ret i16 [[A]]
+; NOT_CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@bar2
+; NOT_CGSCC_OPM-SAME: (i16 [[P1:%.*]], i16 [[P2:%.*]]) #[[ATTR1]] {
+; NOT_CGSCC_OPM-NEXT: [[A:%.*]] = add i16 [[P1]], [[P2]]
+; NOT_CGSCC_OPM-NEXT: ret i16 [[A]]
+;
+; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@bar2
+; IS__CGSCC_OPM-SAME: (i16 [[P1:%.*]], i16 [[P2:%.*]]) #[[ATTR0]] {
+; IS__CGSCC_OPM-NEXT: [[A:%.*]] = add i16 [[P1]], [[P2]]
+; IS__CGSCC_OPM-NEXT: ret i16 [[A]]
;
%a = add i16 %p1, %p2
ret i16 %a
; been provided),
define dso_local i16 @vararg_tests(i16 %a) {
-; NOT_CGSCC_NPM: Function Attrs: norecurse
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@vararg_tests
-; NOT_CGSCC_NPM-SAME: (i16 [[A:%.*]]) #[[ATTR0]] {
-; NOT_CGSCC_NPM-NEXT: [[CALL2:%.*]] = call i16 bitcast (i16 (i16, i16, ...)* @vararg_no_prop to i16 (i16)*)(i16 noundef 7)
-; NOT_CGSCC_NPM-NEXT: [[ADD:%.*]] = add i16 7, [[CALL2]]
-; NOT_CGSCC_NPM-NEXT: ret i16 [[ADD]]
+; IS__TUNIT____: Function Attrs: norecurse
+; IS__TUNIT____-LABEL: define {{[^@]+}}@vararg_tests
+; IS__TUNIT____-SAME: (i16 [[A:%.*]]) #[[ATTR0]] {
+; IS__TUNIT____-NEXT: [[CALL2:%.*]] = call i16 bitcast (i16 (i16, i16, ...)* @vararg_no_prop to i16 (i16)*)(i16 noundef 7)
+; IS__TUNIT____-NEXT: [[ADD:%.*]] = add i16 7, [[CALL2]]
+; IS__TUNIT____-NEXT: ret i16 [[ADD]]
+;
+; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@vararg_tests
+; IS__CGSCC_OPM-SAME: (i16 [[A:%.*]]) {
+; IS__CGSCC_OPM-NEXT: [[CALL2:%.*]] = call i16 bitcast (i16 (i16, i16, ...)* @vararg_no_prop to i16 (i16)*)(i16 7)
+; IS__CGSCC_OPM-NEXT: [[ADD:%.*]] = add i16 7, [[CALL2]]
+; IS__CGSCC_OPM-NEXT: ret i16 [[ADD]]
;
; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone
; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@vararg_tests
-; IS__CGSCC_NPM-SAME: (i16 [[A:%.*]]) #[[ATTR2:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: [[CALL2:%.*]] = call i16 bitcast (i16 (i16, i16, ...)* @vararg_no_prop to i16 (i16)*)(i16 noundef 7)
+; IS__CGSCC_NPM-SAME: (i16 [[A:%.*]]) #[[ATTR0]] {
+; IS__CGSCC_NPM-NEXT: [[CALL2:%.*]] = call i16 bitcast (i16 (i16, i16, ...)* @vararg_no_prop to i16 (i16)*)(i16 7)
; IS__CGSCC_NPM-NEXT: [[ADD:%.*]] = add i16 7, [[CALL2]]
; IS__CGSCC_NPM-NEXT: ret i16 [[ADD]]
;
}
define internal i16 @vararg_prop(i16 %p1, ...) {
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@vararg_prop
-; IS__CGSCC____-SAME: (i16 [[P1:%.*]], ...) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: ret i16 undef
+; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@vararg_prop
+; IS__CGSCC_OPM-SAME: (i16 [[P1:%.*]], ...) #[[ATTR0]] {
+; IS__CGSCC_OPM-NEXT: ret i16 7
+;
+; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@vararg_prop
+; IS__CGSCC_NPM-SAME: (i16 [[P1:%.*]], ...) #[[ATTR1]] {
+; IS__CGSCC_NPM-NEXT: ret i16 7
;
ret i16 %p1
}
define internal i16 @vararg_no_prop(i16 %p1, i16 %p2, ...) {
-; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; CHECK-LABEL: define {{[^@]+}}@vararg_no_prop
-; CHECK-SAME: (i16 [[P1:%.*]], i16 [[P2:%.*]], ...) #[[ATTR1]] {
-; CHECK-NEXT: ret i16 7
+; NOT_CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@vararg_no_prop
+; NOT_CGSCC_OPM-SAME: (i16 [[P1:%.*]], i16 [[P2:%.*]], ...) #[[ATTR1]] {
+; NOT_CGSCC_OPM-NEXT: ret i16 7
+;
+; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@vararg_no_prop
+; IS__CGSCC_OPM-SAME: (i16 [[P1:%.*]], i16 [[P2:%.*]], ...) #[[ATTR0]] {
+; IS__CGSCC_OPM-NEXT: ret i16 7
;
ret i16 %p1
}
;.
-; NOT_CGSCC_NPM: attributes #[[ATTR0]] = { norecurse }
-; NOT_CGSCC_NPM: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
+; IS__TUNIT____: attributes #[[ATTR0]] = { norecurse }
+; IS__TUNIT____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
+;.
+; IS__CGSCC_OPM: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
;.
-; IS__CGSCC_NPM: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone }
+; IS__CGSCC_NPM: attributes #[[ATTR0]] = { nofree nosync nounwind readnone }
; IS__CGSCC_NPM: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR2]] = { nofree nosync nounwind readnone }
;.
; IS__CGSCC_OPM-NEXT: [[C2:%.*]] = icmp eq i8 [[V]], 1
; IS__CGSCC_OPM-NEXT: br i1 [[C2]], label [[C2_TRUE:%.*]], label [[C2_FALSE:%.*]]
; IS__CGSCC_OPM: c2_true:
-; IS__CGSCC_OPM-NEXT: ret i8* undef
+; IS__CGSCC_OPM-NEXT: ret i8* null
; IS__CGSCC_OPM: c2_false:
-; IS__CGSCC_OPM-NEXT: [[CA2:%.*]] = musttail call i8* @dont_zap_me(i8 undef)
+; IS__CGSCC_OPM-NEXT: [[CA2:%.*]] = musttail call i8* @dont_zap_me(i8 [[V]])
; IS__CGSCC_OPM-NEXT: ret i8* [[CA2]]
;
; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@start
; IS__CGSCC_NPM-NEXT: [[C2:%.*]] = icmp eq i8 [[V]], 1
; IS__CGSCC_NPM-NEXT: br i1 [[C2]], label [[C2_TRUE:%.*]], label [[C2_FALSE:%.*]]
; IS__CGSCC_NPM: c2_true:
-; IS__CGSCC_NPM-NEXT: ret i8* undef
+; IS__CGSCC_NPM-NEXT: ret i8* null
; IS__CGSCC_NPM: c2_false:
-; IS__CGSCC_NPM-NEXT: [[CA2:%.*]] = musttail call i8* @dont_zap_me(i8 undef)
+; IS__CGSCC_NPM-NEXT: [[CA2:%.*]] = musttail call i8* @dont_zap_me(i8 [[V]])
; IS__CGSCC_NPM-NEXT: ret i8* [[CA2]]
;
%c1 = icmp eq i8 %v, 0
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
; IS__CGSCC____-LABEL: define {{[^@]+}}@no_side_effects
; IS__CGSCC____-SAME: (i8 [[V:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS__CGSCC____-NEXT: ret i8* undef
+; IS__CGSCC____-NEXT: ret i8* null
;
ret i8* null
}
define internal i8* @dont_zap_me(i8 %v) {
-; CHECK-LABEL: define {{[^@]+}}@dont_zap_me
-; CHECK-SAME: (i8 [[V:%.*]]) {
-; CHECK-NEXT: [[I1:%.*]] = call i32 @external()
-; CHECK-NEXT: ret i8* undef
+; IS__TUNIT____-LABEL: define {{[^@]+}}@dont_zap_me
+; IS__TUNIT____-SAME: (i8 [[V:%.*]]) {
+; IS__TUNIT____-NEXT: [[I1:%.*]] = call i32 @external()
+; IS__TUNIT____-NEXT: ret i8* undef
+;
+; IS__CGSCC____-LABEL: define {{[^@]+}}@dont_zap_me
+; IS__CGSCC____-SAME: (i8 [[V:%.*]]) {
+; IS__CGSCC____-NEXT: [[I1:%.*]] = call i32 @external()
+; IS__CGSCC____-NEXT: ret i8* null
;
%i1 = call i32 @external()
ret i8* null
; IS__CGSCC_OPM-NEXT: [[N_ADDR:%.*]] = alloca i32, align 4
; IS__CGSCC_OPM-NEXT: [[P:%.*]] = alloca float, align 4
; IS__CGSCC_OPM-NEXT: store i32 [[N]], i32* [[N_ADDR]], align 4
+; IS__CGSCC_OPM-NEXT: store float 3.000000e+00, float* [[P]], align 4
; IS__CGSCC_OPM-NEXT: store i32 7, i32* [[N_ADDR]], align 4
; IS__CGSCC_OPM-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 3, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*, float*, i64)* @.omp_outlined. to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[N_ADDR]], float* noalias nocapture nofree noundef nonnull readnone align 4 dereferenceable(4) [[P]], i64 noundef 4617315517961601024)
; IS__CGSCC_OPM-NEXT: ret void
; IS__CGSCC_NPM-NEXT: [[N_ADDR:%.*]] = alloca i32, align 4
; IS__CGSCC_NPM-NEXT: [[P:%.*]] = alloca float, align 4
; IS__CGSCC_NPM-NEXT: store i32 [[N]], i32* [[N_ADDR]], align 4
+; IS__CGSCC_NPM-NEXT: store float 3.000000e+00, float* [[P]], align 4
; IS__CGSCC_NPM-NEXT: store i32 7, i32* [[N_ADDR]], align 4
; IS__CGSCC_NPM-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 3, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*, float*, i64)* @.omp_outlined. to void (i32*, i32*, ...)*), i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[N_ADDR]], float* noalias nocapture nofree noundef nonnull readnone align 4 dereferenceable(4) [[P]], i64 noundef 4617315517961601024)
; IS__CGSCC_NPM-NEXT: ret void
; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32 @pthread_create(i64* noundef nonnull align 8 dereferenceable(8) [[THREAD]], %union.pthread_attr_t* noalias nocapture noundef align 4294967296 null, i8* (i8*)* noundef nonnull @foo, i8* noalias nocapture nofree noundef readnone align 4294967296 null)
; IS__CGSCC____-NEXT: [[CALL1:%.*]] = call i32 @pthread_create(i64* noundef nonnull align 8 dereferenceable(8) [[THREAD]], %union.pthread_attr_t* noalias nocapture noundef align 4294967296 null, i8* (i8*)* noundef nonnull @bar, i8* noalias nocapture nofree noundef nonnull readnone align 8 dereferenceable(8) bitcast (i8** @GlobalVPtr to i8*))
; IS__CGSCC____-NEXT: [[CALL2:%.*]] = call i32 @pthread_create(i64* noundef nonnull align 8 dereferenceable(8) [[THREAD]], %union.pthread_attr_t* noalias nocapture noundef align 4294967296 null, i8* (i8*)* noundef nonnull @baz, i8* noalias nocapture nofree noundef nonnull readnone align 8 dereferenceable(1) [[ALLOC1]])
-; IS__CGSCC____-NEXT: [[CALL3:%.*]] = call i32 @pthread_create(i64* noundef nonnull align 8 dereferenceable(8) [[THREAD]], %union.pthread_attr_t* noalias nocapture noundef align 4294967296 null, i8* (i8*)* noundef nonnull @buz, i8* noalias nofree noundef nonnull readnone align 8 dereferenceable(1) "no-capture-maybe-returned" [[ALLOC2]])
+; IS__CGSCC____-NEXT: [[CALL3:%.*]] = call i32 @pthread_create(i64* noundef nonnull align 8 dereferenceable(8) [[THREAD]], %union.pthread_attr_t* noalias nocapture noundef align 4294967296 null, i8* (i8*)* noundef nonnull @buz, i8* noalias nofree noundef nonnull readnone align 8 dereferenceable(1) [[ALLOC2]])
; IS__CGSCC____-NEXT: ret i32 0
;
entry:
; CHECK-NOT: %X
define internal i32 @foo(i32 %X) {
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
; IS__CGSCC____-LABEL: define {{[^@]+}}@foo
; IS__CGSCC____-SAME: () #[[ATTR0:[0-9]+]] {
; IS__CGSCC____-NEXT: ret i32 undef
}
define void @bar() {
-; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; CHECK-LABEL: define {{[^@]+}}@bar
-; CHECK-SAME: () #[[ATTR0:[0-9]+]] {
-; CHECK-NEXT: ret void
+; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; IS__TUNIT____-LABEL: define {{[^@]+}}@bar
+; IS__TUNIT____-SAME: () #[[ATTR0:[0-9]+]] {
+; IS__TUNIT____-NEXT: ret void
+;
+; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; IS__CGSCC____-LABEL: define {{[^@]+}}@bar
+; IS__CGSCC____-SAME: () #[[ATTR1:[0-9]+]] {
+; IS__CGSCC____-NEXT: ret void
;
call i32 @foo( i32 17 ) ; <i32>:1 [#uses=0]
ret void
}
;.
-; CHECK: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; IS__TUNIT____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+;.
+; IS__CGSCC____: attributes #[[ATTR0]] = { nofree nosync nounwind readnone willreturn }
+; IS__CGSCC____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
;.
; IS__CGSCC____-NEXT: i64 10, label [[RETURN]]
; IS__CGSCC____-NEXT: ]
; IS__CGSCC____: sw.default:
-; IS__CGSCC____-NEXT: ret i32 undef
+; IS__CGSCC____-NEXT: ret i32 123
; IS__CGSCC____: return:
; IS__CGSCC____-NEXT: unreachable
;
;; This function returns its second argument on all return statements
define internal i32* @incdec(i1 %C, i32* %V) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@incdec
-; IS__TUNIT____-SAME: (i1 [[C:%.*]], i32* noalias nofree noundef nonnull returned align 4 dereferenceable(4) "no-capture-maybe-returned" [[V:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS__TUNIT____-NEXT: [[X:%.*]] = load i32, i32* [[V]], align 4
-; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
-; IS__TUNIT____: T:
-; IS__TUNIT____-NEXT: [[X1:%.*]] = add i32 [[X]], 1
-; IS__TUNIT____-NEXT: store i32 [[X1]], i32* [[V]], align 4
-; IS__TUNIT____-NEXT: ret i32* [[V]]
-; IS__TUNIT____: F:
-; IS__TUNIT____-NEXT: [[X2:%.*]] = sub i32 [[X]], 1
-; IS__TUNIT____-NEXT: store i32 [[X2]], i32* [[V]], align 4
-; IS__TUNIT____-NEXT: ret i32* [[V]]
-;
-; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@incdec
-; IS__CGSCC____-SAME: (i1 [[C:%.*]], i32* noalias nofree noundef nonnull align 4 dereferenceable(4) "no-capture-maybe-returned" [[V:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS__CGSCC____-NEXT: [[X:%.*]] = load i32, i32* [[V]], align 4
-; IS__CGSCC____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
-; IS__CGSCC____: T:
-; IS__CGSCC____-NEXT: [[X1:%.*]] = add i32 [[X]], 1
-; IS__CGSCC____-NEXT: store i32 [[X1]], i32* [[V]], align 4
-; IS__CGSCC____-NEXT: ret i32* undef
-; IS__CGSCC____: F:
-; IS__CGSCC____-NEXT: [[X2:%.*]] = sub i32 [[X]], 1
-; IS__CGSCC____-NEXT: store i32 [[X2]], i32* [[V]], align 4
-; IS__CGSCC____-NEXT: ret i32* undef
+; CHECK: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
+; CHECK-LABEL: define {{[^@]+}}@incdec
+; CHECK-SAME: (i1 [[C:%.*]], i32* noalias nofree noundef nonnull returned align 4 dereferenceable(4) "no-capture-maybe-returned" [[V:%.*]]) #[[ATTR0:[0-9]+]] {
+; CHECK-NEXT: [[X:%.*]] = load i32, i32* [[V]], align 4
+; CHECK-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; CHECK: T:
+; CHECK-NEXT: [[X1:%.*]] = add i32 [[X]], 1
+; CHECK-NEXT: store i32 [[X1]], i32* [[V]], align 4
+; CHECK-NEXT: ret i32* [[V]]
+; CHECK: F:
+; CHECK-NEXT: [[X2:%.*]] = sub i32 [[X]], 1
+; CHECK-NEXT: store i32 [[X2]], i32* [[V]], align 4
+; CHECK-NEXT: ret i32* [[V]]
;
%X = load i32, i32* %V
br i1 %C, label %T, label %F
; IS__CGSCC____-LABEL: define {{[^@]+}}@caller
; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR1]] personality i32 (...)* @__gxx_personality_v0 {
; IS__CGSCC____-NEXT: [[Q:%.*]] = alloca i32, align 4
-; IS__CGSCC____-NEXT: [[W:%.*]] = call i32* @incdec(i1 [[C]], i32* noalias nofree noundef nonnull align 4 dereferenceable(4) "no-capture-maybe-returned" [[Q]]) #[[ATTR2:[0-9]+]]
+; IS__CGSCC____-NEXT: [[W:%.*]] = call align 4 i32* @incdec(i1 [[C]], i32* noalias nofree noundef nonnull align 4 dereferenceable(4) "no-capture-maybe-returned" [[Q]]) #[[ATTR2:[0-9]+]]
; IS__CGSCC____-NEXT: [[S1:%.*]] = call { i32, i32 } @foo(i32 noundef 1, i32 noundef 2) #[[ATTR3:[0-9]+]]
; IS__CGSCC____-NEXT: [[X1:%.*]] = extractvalue { i32, i32 } [[S1]], 0
-; IS__CGSCC____-NEXT: [[S2:%.*]] = call { i32, i32 } @foo(i32 noundef 3, i32 noundef 4) #[[ATTR3]]
+; IS__CGSCC____-NEXT: [[S2:%.*]] = call { i32, i32 } @foo(i32 noundef 3, i32 noundef 4) #[[ATTR4:[0-9]+]]
; IS__CGSCC____-NEXT: br label [[OK:%.*]]
; IS__CGSCC____: OK:
; IS__CGSCC____-NEXT: [[X2:%.*]] = extractvalue { i32, i32 } [[S2]], 0
;.
; IS__CGSCC____: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn }
; IS__CGSCC____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR2]] = { nosync nounwind willreturn }
-; IS__CGSCC____: attributes #[[ATTR3]] = { nosync nounwind readnone willreturn }
+; IS__CGSCC____: attributes #[[ATTR2]] = { nounwind willreturn }
+; IS__CGSCC____: attributes #[[ATTR3]] = { readnone willreturn }
+; IS__CGSCC____: attributes #[[ATTR4]] = { nounwind readnone willreturn }
;.
}
define internal i32 @foo(i1 %C) {
-; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; CHECK-LABEL: define {{[^@]+}}@foo
-; CHECK-SAME: (i1 [[C:%.*]]) #[[ATTR0]] {
-; CHECK-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
-; CHECK: T:
-; CHECK-NEXT: ret i32 undef
-; CHECK: F:
-; CHECK-NEXT: ret i32 undef
+; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; IS__TUNIT____-LABEL: define {{[^@]+}}@foo
+; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR0]] {
+; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; IS__TUNIT____: T:
+; IS__TUNIT____-NEXT: ret i32 undef
+; IS__TUNIT____: F:
+; IS__TUNIT____-NEXT: ret i32 undef
+;
+; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; IS__CGSCC____-LABEL: define {{[^@]+}}@foo
+; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR0]] {
+; IS__CGSCC____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; IS__CGSCC____: T:
+; IS__CGSCC____-NEXT: ret i32 52
+; IS__CGSCC____: F:
+; IS__CGSCC____-NEXT: ret i32 52
;
br i1 %C, label %T, label %F
; IS__CGSCC____: if.then:
; IS__CGSCC____-NEXT: unreachable
; IS__CGSCC____: if.end:
-; IS__CGSCC____-NEXT: ret i32 undef
+; IS__CGSCC____-NEXT: ret i32 10
;
entry:
br i1 %c, label %if.cond, label %if.end
; IS__CGSCC____: if.then:
; IS__CGSCC____-NEXT: br label [[RET1:%.*]]
; IS__CGSCC____: ret1:
-; IS__CGSCC____-NEXT: ret i32 undef
+; IS__CGSCC____-NEXT: ret i32 99
; IS__CGSCC____: ret2:
; IS__CGSCC____-NEXT: unreachable
;
; Function Attrs: nounwind readnone ssp uwtable
define internal i8* @f1(i8* readnone %0) local_unnamed_addr #0 {
-; IS__CGSCC_OPM: Function Attrs: nofree noinline norecurse nosync nounwind readnone willreturn uwtable
-; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@f1
-; IS__CGSCC_OPM-SAME: (i8* noalias nocapture nofree nonnull readnone align 8 dereferenceable(1) [[TMP0:%.*]]) local_unnamed_addr #[[ATTR0]] {
-; IS__CGSCC_OPM-NEXT: br label [[TMP3:%.*]]
-; IS__CGSCC_OPM: 2:
-; IS__CGSCC_OPM-NEXT: unreachable
-; IS__CGSCC_OPM: 3:
-; IS__CGSCC_OPM-NEXT: ret i8* undef
-;
-; IS__CGSCC_NPM: Function Attrs: nofree noinline norecurse nosync nounwind readnone willreturn uwtable
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f1
-; IS__CGSCC_NPM-SAME: () local_unnamed_addr #[[ATTR0]] {
-; IS__CGSCC_NPM-NEXT: br label [[TMP2:%.*]]
-; IS__CGSCC_NPM: 1:
-; IS__CGSCC_NPM-NEXT: unreachable
-; IS__CGSCC_NPM: 2:
-; IS__CGSCC_NPM-NEXT: ret i8* undef
+; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone willreturn uwtable
+; IS__CGSCC____-LABEL: define {{[^@]+}}@f1
+; IS__CGSCC____-SAME: (i8* noalias nofree noundef nonnull readnone returned align 8 dereferenceable(1) "no-capture-maybe-returned" [[TMP0:%.*]]) local_unnamed_addr #[[ATTR0]] {
+; IS__CGSCC____-NEXT: br label [[TMP3:%.*]]
+; IS__CGSCC____: 2:
+; IS__CGSCC____-NEXT: unreachable
+; IS__CGSCC____: 3:
+; IS__CGSCC____-NEXT: ret i8* [[TMP0]]
;
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@f2
; IS__CGSCC_OPM-SAME: (i8* readnone [[TMP0:%.*]]) local_unnamed_addr #[[ATTR2:[0-9]+]] {
; IS__CGSCC_OPM-NEXT: [[TMP2:%.*]] = icmp eq i8* [[TMP0]], null
-; IS__CGSCC_OPM-NEXT: br i1 [[TMP2]], label [[TMP4:%.*]], label [[TMP3:%.*]]
+; IS__CGSCC_OPM-NEXT: br i1 [[TMP2]], label [[TMP5:%.*]], label [[TMP3:%.*]]
; IS__CGSCC_OPM: 3:
-; IS__CGSCC_OPM-NEXT: br label [[TMP6:%.*]]
-; IS__CGSCC_OPM: 4:
-; IS__CGSCC_OPM-NEXT: [[TMP5:%.*]] = tail call i8* @f3(i8* nonnull @a2)
-; IS__CGSCC_OPM-NEXT: br label [[TMP6]]
-; IS__CGSCC_OPM: 6:
-; IS__CGSCC_OPM-NEXT: [[TMP7:%.*]] = phi i8* [ undef, [[TMP3]] ], [ [[TMP5]], [[TMP4]] ]
-; IS__CGSCC_OPM-NEXT: ret i8* [[TMP7]]
-;
-; IS__CGSCC_NPM: Function Attrs: noinline norecurse nounwind uwtable
+; IS__CGSCC_OPM-NEXT: [[TMP4:%.*]] = tail call i8* @f1(i8* noalias noundef nonnull readnone align 4294967296 dereferenceable(4294967295) [[TMP0]])
+; IS__CGSCC_OPM-NEXT: br label [[TMP7:%.*]]
+; IS__CGSCC_OPM: 5:
+; IS__CGSCC_OPM-NEXT: [[TMP6:%.*]] = tail call i8* @f3(i8* nonnull @a2)
+; IS__CGSCC_OPM-NEXT: br label [[TMP7]]
+; IS__CGSCC_OPM: 7:
+; IS__CGSCC_OPM-NEXT: [[TMP8:%.*]] = phi i8* [ [[TMP4]], [[TMP3]] ], [ [[TMP6]], [[TMP5]] ]
+; IS__CGSCC_OPM-NEXT: ret i8* [[TMP8]]
+;
+; IS__CGSCC_NPM: Function Attrs: noinline nounwind uwtable
; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f2
; IS__CGSCC_NPM-SAME: (i8* readnone [[TMP0:%.*]]) local_unnamed_addr #[[ATTR1:[0-9]+]] {
; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = icmp eq i8* [[TMP0]], null
-; IS__CGSCC_NPM-NEXT: br i1 [[TMP2]], label [[TMP4:%.*]], label [[TMP3:%.*]]
+; IS__CGSCC_NPM-NEXT: br i1 [[TMP2]], label [[TMP5:%.*]], label [[TMP3:%.*]]
; IS__CGSCC_NPM: 3:
-; IS__CGSCC_NPM-NEXT: br label [[TMP6:%.*]]
-; IS__CGSCC_NPM: 4:
-; IS__CGSCC_NPM-NEXT: [[TMP5:%.*]] = tail call i8* @f3()
-; IS__CGSCC_NPM-NEXT: br label [[TMP6]]
-; IS__CGSCC_NPM: 6:
-; IS__CGSCC_NPM-NEXT: [[TMP7:%.*]] = phi i8* [ undef, [[TMP3]] ], [ @a1, [[TMP4]] ]
-; IS__CGSCC_NPM-NEXT: ret i8* [[TMP7]]
+; IS__CGSCC_NPM-NEXT: [[TMP4:%.*]] = tail call i8* @f1(i8* noalias noundef nonnull readnone align 4294967296 dereferenceable(4294967295) [[TMP0]])
+; IS__CGSCC_NPM-NEXT: br label [[TMP7:%.*]]
+; IS__CGSCC_NPM: 5:
+; IS__CGSCC_NPM-NEXT: [[TMP6:%.*]] = tail call i8* @f3()
+; IS__CGSCC_NPM-NEXT: br label [[TMP7]]
+; IS__CGSCC_NPM: 7:
+; IS__CGSCC_NPM-NEXT: [[TMP8:%.*]] = phi i8* [ [[TMP4]], [[TMP3]] ], [ [[TMP6]], [[TMP5]] ]
+; IS__CGSCC_NPM-NEXT: ret i8* [[TMP8]]
;
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@f3
; IS__CGSCC_OPM-SAME: (i8* readnone [[TMP0:%.*]]) local_unnamed_addr #[[ATTR2]] {
; IS__CGSCC_OPM-NEXT: [[TMP2:%.*]] = icmp eq i8* [[TMP0]], null
-; IS__CGSCC_OPM-NEXT: br i1 [[TMP2]], label [[TMP3:%.*]], label [[TMP4:%.*]]
+; IS__CGSCC_OPM-NEXT: br i1 [[TMP2]], label [[TMP3:%.*]], label [[TMP5:%.*]]
; IS__CGSCC_OPM: 3:
-; IS__CGSCC_OPM-NEXT: br label [[TMP4]]
-; IS__CGSCC_OPM: 4:
-; IS__CGSCC_OPM-NEXT: [[TMP5:%.*]] = phi i8* [ @a2, [[TMP3]] ], [ @a1, [[TMP1:%.*]] ]
-; IS__CGSCC_OPM-NEXT: ret i8* [[TMP5]]
+; IS__CGSCC_OPM-NEXT: [[TMP4:%.*]] = tail call i8* @f1(i8* noalias noundef nonnull readnone align 16 dereferenceable(1) @a2)
+; IS__CGSCC_OPM-NEXT: br label [[TMP5]]
+; IS__CGSCC_OPM: 5:
+; IS__CGSCC_OPM-NEXT: [[TMP6:%.*]] = phi i8* [ [[TMP4]], [[TMP3]] ], [ @a1, [[TMP1:%.*]] ]
+; IS__CGSCC_OPM-NEXT: ret i8* [[TMP6]]
;
; IS__CGSCC_NPM: Function Attrs: nofree noinline norecurse nosync nounwind readnone willreturn uwtable
; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f3
; IS__CGSCC_NPM: 1:
; IS__CGSCC_NPM-NEXT: unreachable
; IS__CGSCC_NPM: 2:
-; IS__CGSCC_NPM-NEXT: ret i8* undef
+; IS__CGSCC_NPM-NEXT: ret i8* @a1
;
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
; IS__CGSCC_OPM-NEXT: [[TMP7:%.*]] = phi i8* [ undef, [[TMP3]] ], [ [[TMP5]], [[TMP4]] ]
; IS__CGSCC_OPM-NEXT: ret i8* [[TMP7]]
;
-; IS__CGSCC_NPM: Function Attrs: noinline norecurse nounwind uwtable
+; IS__CGSCC_NPM: Function Attrs: noinline nounwind uwtable
; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f2b
; IS__CGSCC_NPM-SAME: (i8* readnone [[TMP0:%.*]]) local_unnamed_addr #[[ATTR1]] {
; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = icmp eq i8* [[TMP0]], null
; IS__CGSCC_NPM-NEXT: [[TMP5:%.*]] = tail call i8* @f3b()
; IS__CGSCC_NPM-NEXT: br label [[TMP6]]
; IS__CGSCC_NPM: 6:
-; IS__CGSCC_NPM-NEXT: [[TMP7:%.*]] = phi i8* [ undef, [[TMP3]] ], [ @a1, [[TMP4]] ]
+; IS__CGSCC_NPM-NEXT: [[TMP7:%.*]] = phi i8* [ undef, [[TMP3]] ], [ [[TMP5]], [[TMP4]] ]
; IS__CGSCC_NPM-NEXT: ret i8* [[TMP7]]
;
%2 = icmp eq i8* %0, null
; IS__CGSCC_NPM: 1:
; IS__CGSCC_NPM-NEXT: unreachable
; IS__CGSCC_NPM: 2:
-; IS__CGSCC_NPM-NEXT: ret i8* undef
+; IS__CGSCC_NPM-NEXT: ret i8* @a1
;
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
; IS__CGSCC_OPM: attributes #[[ATTR13]] = { readnone willreturn }
;.
; IS__CGSCC_NPM: attributes #[[ATTR0]] = { nofree noinline norecurse nosync nounwind readnone willreturn uwtable }
-; IS__CGSCC_NPM: attributes #[[ATTR1]] = { noinline norecurse nounwind uwtable }
+; IS__CGSCC_NPM: attributes #[[ATTR1]] = { noinline nounwind uwtable }
; IS__CGSCC_NPM: attributes #[[ATTR2]] = { nounwind }
; IS__CGSCC_NPM: attributes #[[ATTR3]] = { nofree nosync nounwind }
; IS__CGSCC_NPM: attributes #[[ATTR4]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
; IS__CGSCC_OPM: attributes #[[ATTR4]] = { argmemonly nofree norecurse nosync nounwind }
; IS__CGSCC_OPM: attributes #[[ATTR5]] = { argmemonly nofree nosync nounwind writeonly }
; IS__CGSCC_OPM: attributes #[[ATTR6:[0-9]+]] = { inaccessiblememonly nofree nosync nounwind willreturn }
-; IS__CGSCC_OPM: attributes #[[ATTR7]] = { nosync nounwind writeonly }
+; IS__CGSCC_OPM: attributes #[[ATTR7]] = { nounwind writeonly }
; IS__CGSCC_OPM: attributes #[[ATTR8]] = { nofree nosync nounwind writeonly }
; IS__CGSCC_OPM: attributes #[[ATTR9]] = { willreturn }
; IS__CGSCC_OPM: attributes #[[ATTR10]] = { nounwind }
; IS__CGSCC_NPM: attributes #[[ATTR3]] = { argmemonly nofree norecurse nosync nounwind willreturn }
; IS__CGSCC_NPM: attributes #[[ATTR4]] = { argmemonly nofree nosync nounwind writeonly }
; IS__CGSCC_NPM: attributes #[[ATTR5:[0-9]+]] = { inaccessiblememonly nofree nosync nounwind willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR6]] = { nosync nounwind willreturn writeonly }
+; IS__CGSCC_NPM: attributes #[[ATTR6]] = { nounwind willreturn writeonly }
; IS__CGSCC_NPM: attributes #[[ATTR7]] = { nofree nosync nounwind writeonly }
; IS__CGSCC_NPM: attributes #[[ATTR8]] = { willreturn }
; IS__CGSCC_NPM: attributes #[[ATTR9]] = { nounwind }
; IS__CGSCC____-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
; IS__CGSCC____-NEXT: [[TMP1:%.*]] = load i32, i32* [[B]], align 4
; IS__CGSCC____-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP0]], [[TMP1]]
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32 @noalias_args_argmem(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) #[[ATTR5:[0-9]+]]
+; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32 @noalias_args_argmem(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) #[[ATTR4]]
; IS__CGSCC____-NEXT: [[ADD2:%.*]] = add nsw i32 [[ADD]], [[CALL]]
; IS__CGSCC____-NEXT: ret i32 [[ADD2]]
;
; IS__CGSCC____-NEXT: entry:
; IS__CGSCC____-NEXT: [[B:%.*]] = alloca i32, align 4
; IS__CGSCC____-NEXT: store i32 5, i32* [[B]], align 4
-; IS__CGSCC____-NEXT: [[CALL1:%.*]] = call i32 @noalias_args(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT: [[CALL2:%.*]] = call i32 @noalias_args_argmem(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) #[[ATTR5]]
+; IS__CGSCC____-NEXT: [[CALL1:%.*]] = call i32 @noalias_args(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]]) #[[ATTR4]]
+; IS__CGSCC____-NEXT: [[CALL2:%.*]] = call i32 @noalias_args_argmem(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]], i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]])
; IS__CGSCC____-NEXT: [[ADD:%.*]] = add nsw i32 [[CALL1]], [[CALL2]]
; IS__CGSCC____-NEXT: ret i32 [[ADD]]
;
; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone willreturn uwtable
; IS__CGSCC____-LABEL: define {{[^@]+}}@noalias_args_argmem_ro
; IS__CGSCC____-SAME: () #[[ATTR2:[0-9]+]] {
-; IS__CGSCC____-NEXT: ret i32 undef
+; IS__CGSCC____-NEXT: ret i32 10
;
%t0 = load i32, i32* %A, align 4
%t1 = load i32, i32* %B, align 4
}
define internal i32 @noalias_args_argmem_rn(i32* %A, i32* %B) #1 {
-; IS__TUNIT____: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind willreturn uwtable
-; IS__TUNIT____-LABEL: define {{[^@]+}}@noalias_args_argmem_rn
-; IS__TUNIT____-SAME: (i32* noalias nocapture nofree noundef nonnull align 4 dereferenceable(4) [[B:%.*]]) #[[ATTR1]] {
-; IS__TUNIT____-NEXT: [[T0:%.*]] = load i32, i32* [[B]], align 4
-; IS__TUNIT____-NEXT: ret i32 [[T0]]
-;
-; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone willreturn uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@noalias_args_argmem_rn
-; IS__CGSCC____-SAME: (i32* noalias nocapture nofree nonnull readnone align 4 dereferenceable(4) [[B:%.*]]) #[[ATTR2]] {
-; IS__CGSCC____-NEXT: [[T0:%.*]] = load i32, i32* undef, align 4
-; IS__CGSCC____-NEXT: ret i32 undef
+; CHECK: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind willreturn uwtable
+; CHECK-LABEL: define {{[^@]+}}@noalias_args_argmem_rn
+; CHECK-SAME: (i32* noalias nocapture nofree noundef nonnull align 4 dereferenceable(4) [[B:%.*]]) #[[ATTR1:[0-9]+]] {
+; CHECK-NEXT: [[T0:%.*]] = load i32, i32* [[B]], align 4
+; CHECK-NEXT: ret i32 [[T0]]
;
%t0 = load i32, i32* %B, align 4
store i32 0, i32* %B
; IS__CGSCC____: attributes #[[ATTR1]] = { argmemonly nofree noinline norecurse nosync nounwind willreturn uwtable }
; IS__CGSCC____: attributes #[[ATTR2]] = { nofree noinline norecurse nosync nounwind readnone willreturn uwtable }
; IS__CGSCC____: attributes #[[ATTR3]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR4]] = { nounwind readonly }
-; IS__CGSCC____: attributes #[[ATTR5]] = { nosync nounwind readonly }
+; IS__CGSCC____: attributes #[[ATTR4]] = { readonly }
;.
define i32 @volatile_load(i32*) norecurse nounwind uwtable {
; NOT_CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nounwind willreturn uwtable
; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@volatile_load
-; NOT_CGSCC_NPM-SAME: (i32* nofree align 4 [[TMP0:%.*]]) #[[ATTR6:[0-9]+]] {
+; NOT_CGSCC_NPM-SAME: (i32* nofree noundef align 4 [[TMP0:%.*]]) #[[ATTR6:[0-9]+]] {
; NOT_CGSCC_NPM-NEXT: [[TMP2:%.*]] = load volatile i32, i32* [[TMP0]], align 4
; NOT_CGSCC_NPM-NEXT: ret i32 [[TMP2]]
;
; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nounwind willreturn uwtable
; IS__CGSCC____-LABEL: define {{[^@]+}}@volatile_load
-; IS__CGSCC____-SAME: (i32* nofree align 4 [[TMP0:%.*]]) #[[ATTR7:[0-9]+]] {
+; IS__CGSCC____-SAME: (i32* nofree noundef align 4 [[TMP0:%.*]]) #[[ATTR7:[0-9]+]] {
; IS__CGSCC____-NEXT: [[TMP2:%.*]] = load volatile i32, i32* [[TMP0]], align 4
; IS__CGSCC____-NEXT: ret i32 [[TMP2]]
;
; IS__CGSCC____-NEXT: ]
; IS__CGSCC____: sw.default:
; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]]
-; IS__CGSCC____-NEXT: ret i32 undef
+; IS__CGSCC____-NEXT: ret i32 123
; IS__CGSCC____: return:
; IS__CGSCC____-NEXT: unreachable
;
; IS__CGSCC____-NEXT: i64 10, label [[RETURN]]
; IS__CGSCC____-NEXT: ]
; IS__CGSCC____: sw.default:
-; IS__CGSCC____-NEXT: ret i32 undef
+; IS__CGSCC____-NEXT: ret i32 123
; IS__CGSCC____: return:
; IS__CGSCC____-NEXT: unreachable
;
}
define internal void @call_via_pointer_with_dead_args_internal_a(i32* %a, i32* %b, void (i32*, i32*, i32*, i64, i32**)* %fp) {
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@call_via_pointer_with_dead_args_internal_a
-; NOT_CGSCC_NPM-SAME: (i32* [[A:%.*]], i32* noundef nonnull align 128 dereferenceable(4) [[B:%.*]]) {
-; NOT_CGSCC_NPM-NEXT: call void @called_via_pointer(i32* [[A]], i32* nonnull align 128 dereferenceable(4) [[B]], i32* [[A]], i64 -1, i32** null)
-; NOT_CGSCC_NPM-NEXT: ret void
-;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@call_via_pointer_with_dead_args_internal_a
-; IS__CGSCC____-SAME: (i32* [[A:%.*]], i32* noalias nocapture nofree nonnull readnone align 128 dereferenceable(4) [[B:%.*]]) {
-; IS__CGSCC____-NEXT: call void @called_via_pointer(i32* [[A]], i32* noalias nocapture nofree nonnull readnone align 128 dereferenceable(4) undef, i32* noalias nocapture nofree readnone undef, i64 undef, i32** noalias nocapture nofree readnone align 4294967296 undef)
-; IS__CGSCC____-NEXT: ret void
+; CHECK-LABEL: define {{[^@]+}}@call_via_pointer_with_dead_args_internal_a
+; CHECK-SAME: (i32* [[A:%.*]], i32* noundef nonnull align 128 dereferenceable(4) [[B:%.*]]) {
+; CHECK-NEXT: call void poison(i32* [[A]], i32* nonnull align 128 dereferenceable(4) [[B]], i32* [[A]], i64 -1, i32** null)
+; CHECK-NEXT: ret void
;
call void %fp(i32* %a, i32* %b, i32* %a, i64 -1, i32** null)
ret void
}
define internal void @call_via_pointer_with_dead_args_internal_b(i32* %a, i32* %b, void (i32*, i32*, i32*, i64, i32**)* %fp) {
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@call_via_pointer_with_dead_args_internal_b
-; NOT_CGSCC_NPM-SAME: (i32* [[A:%.*]], i32* noundef nonnull align 128 dereferenceable(4) [[B:%.*]]) {
-; NOT_CGSCC_NPM-NEXT: call void @called_via_pointer_internal_2(i32* [[A]], i32* nonnull align 128 dereferenceable(4) [[B]], i32* [[A]], i64 -1, i32** null)
-; NOT_CGSCC_NPM-NEXT: ret void
-;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@call_via_pointer_with_dead_args_internal_b
-; IS__CGSCC____-SAME: (i32* [[A:%.*]], i32* noalias nocapture nofree nonnull readnone align 128 dereferenceable(4) [[B:%.*]]) {
-; IS__CGSCC____-NEXT: call void @called_via_pointer_internal_2(i32* [[A]])
-; IS__CGSCC____-NEXT: ret void
+; CHECK-LABEL: define {{[^@]+}}@call_via_pointer_with_dead_args_internal_b
+; CHECK-SAME: (i32* [[A:%.*]], i32* noundef nonnull align 128 dereferenceable(4) [[B:%.*]]) {
+; CHECK-NEXT: call void poison(i32* [[A]], i32* nonnull align 128 dereferenceable(4) [[B]], i32* [[A]], i64 -1, i32** null)
+; CHECK-NEXT: ret void
;
call void %fp(i32* %a, i32* %b, i32* %a, i64 -1, i32** null)
ret void
; IS__CGSCC____-SAME: (i32* [[A:%.*]], i32* [[B:%.*]]) {
; IS__CGSCC____-NEXT: [[PTR1:%.*]] = alloca i32, align 128
; IS__CGSCC____-NEXT: [[PTR2:%.*]] = alloca i32, align 128
+; IS__CGSCC____-NEXT: [[PTR3:%.*]] = alloca i32, align 128
+; IS__CGSCC____-NEXT: [[PTR4:%.*]] = alloca i32, align 128
; IS__CGSCC____-NEXT: call void @call_via_pointer_with_dead_args(i32* [[A]], i32* noundef nonnull align 128 dereferenceable(4) [[PTR1]], void (i32*, i32*, i32*, i64, i32**)* nocapture nofree noundef nonnull @called_via_pointer)
; IS__CGSCC____-NEXT: call void @call_via_pointer_with_dead_args(i32* [[A]], i32* noundef nonnull align 128 dereferenceable(4) [[PTR2]], void (i32*, i32*, i32*, i64, i32**)* nocapture nofree noundef nonnull @called_via_pointer_internal_1)
-; IS__CGSCC____-NEXT: call void @call_via_pointer_with_dead_args_internal_a(i32* [[B]], i32* noalias nocapture nofree nonnull readnone align 128 dereferenceable(4) undef)
-; IS__CGSCC____-NEXT: call void @call_via_pointer_with_dead_args_internal_b(i32* [[B]], i32* noalias nocapture nofree nonnull readnone align 128 dereferenceable(4) undef)
+; IS__CGSCC____-NEXT: call void @call_via_pointer_with_dead_args_internal_a(i32* [[B]], i32* noundef nonnull align 128 dereferenceable(4) [[PTR3]])
+; IS__CGSCC____-NEXT: call void @call_via_pointer_with_dead_args_internal_b(i32* [[B]], i32* noundef nonnull align 128 dereferenceable(4) [[PTR4]])
; IS__CGSCC____-NEXT: ret void
;
%ptr1 = alloca i32, align 128
}
; FIXME: Figure out why the MODULE has the unused arguments still
define internal void @called_via_pointer_internal_2(i32* %a, i32* %b, i32* %c, i64 %d, i32** %e) {
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@called_via_pointer_internal_2
-; NOT_CGSCC_NPM-SAME: (i32* [[A:%.*]], i32* nocapture nofree readnone [[B:%.*]], i32* nocapture nofree readnone [[C:%.*]], i64 [[D:%.*]], i32** nocapture nofree readnone [[E:%.*]]) {
-; NOT_CGSCC_NPM-NEXT: entry:
-; NOT_CGSCC_NPM-NEXT: tail call void @use_i32p(i32* [[A]])
-; NOT_CGSCC_NPM-NEXT: tail call void @use_i32p(i32* [[A]])
-; NOT_CGSCC_NPM-NEXT: ret void
-;
; IS__CGSCC____-LABEL: define {{[^@]+}}@called_via_pointer_internal_2
-; IS__CGSCC____-SAME: (i32* [[A:%.*]]) {
+; IS__CGSCC____-SAME: (i32* [[A:%.*]], i32* [[B:%.*]], i32* [[C:%.*]], i64 [[D:%.*]], i32** [[E:%.*]]) {
; IS__CGSCC____-NEXT: entry:
; IS__CGSCC____-NEXT: tail call void @use_i32p(i32* [[A]])
; IS__CGSCC____-NEXT: tail call void @use_i32p(i32* [[A]])
define internal i8* @internal_only_rec_static_malloc_noescape(i32 %arg) {
; FIXME: This is actually inaccessiblememonly because the malloced memory does not escape
-; IS__TUNIT____-LABEL: define {{[^@]+}}@internal_only_rec_static_malloc_noescape
-; IS__TUNIT____-SAME: (i32 [[ARG:%.*]]) {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[REM:%.*]] = srem i32 [[ARG]], 2
-; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp eq i32 [[REM]], 1
-; IS__TUNIT____-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
-; IS__TUNIT____: if.then:
-; IS__TUNIT____-NEXT: [[DIV:%.*]] = sdiv i32 [[ARG]], 2
-; IS__TUNIT____-NEXT: [[CALL:%.*]] = call noalias i8* @internal_only_rec(i32 [[DIV]])
-; IS__TUNIT____-NEXT: br label [[RETURN:%.*]]
-; IS__TUNIT____: if.end:
-; IS__TUNIT____-NEXT: [[CONV:%.*]] = sext i32 [[ARG]] to i64
-; IS__TUNIT____-NEXT: [[CALL1:%.*]] = call noalias i8* @malloc(i64 [[CONV]])
-; IS__TUNIT____-NEXT: br label [[RETURN]]
-; IS__TUNIT____: return:
-; IS__TUNIT____-NEXT: [[RETVAL_0:%.*]] = phi i8* [ [[CALL]], [[IF_THEN]] ], [ null, [[IF_END]] ]
-; IS__TUNIT____-NEXT: ret i8* [[RETVAL_0]]
-;
-; IS__CGSCC____: Function Attrs: inaccessiblememonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@internal_only_rec_static_malloc_noescape
-; IS__CGSCC____-SAME: (i32 [[ARG:%.*]]) #[[ATTR0]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[REM:%.*]] = srem i32 [[ARG]], 2
-; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp eq i32 [[REM]], 1
-; IS__CGSCC____-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
-; IS__CGSCC____: if.then:
-; IS__CGSCC____-NEXT: [[DIV:%.*]] = sdiv i32 [[ARG]], 2
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call noalias i8* @internal_only_rec(i32 [[DIV]])
-; IS__CGSCC____-NEXT: br label [[RETURN:%.*]]
-; IS__CGSCC____: if.end:
-; IS__CGSCC____-NEXT: [[CONV:%.*]] = sext i32 [[ARG]] to i64
-; IS__CGSCC____-NEXT: [[CALL1:%.*]] = call noalias i8* @malloc(i64 [[CONV]])
-; IS__CGSCC____-NEXT: br label [[RETURN]]
-; IS__CGSCC____: return:
-; IS__CGSCC____-NEXT: [[RETVAL_0:%.*]] = phi i8* [ [[CALL]], [[IF_THEN]] ], [ null, [[IF_END]] ]
-; IS__CGSCC____-NEXT: ret i8* [[RETVAL_0]]
+; CHECK-LABEL: define {{[^@]+}}@internal_only_rec_static_malloc_noescape
+; CHECK-SAME: (i32 [[ARG:%.*]]) {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[REM:%.*]] = srem i32 [[ARG]], 2
+; CHECK-NEXT: [[CMP:%.*]] = icmp eq i32 [[REM]], 1
+; CHECK-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
+; CHECK: if.then:
+; CHECK-NEXT: [[DIV:%.*]] = sdiv i32 [[ARG]], 2
+; CHECK-NEXT: [[CALL:%.*]] = call noalias i8* @internal_only_rec(i32 [[DIV]])
+; CHECK-NEXT: br label [[RETURN:%.*]]
+; CHECK: if.end:
+; CHECK-NEXT: [[CONV:%.*]] = sext i32 [[ARG]] to i64
+; CHECK-NEXT: [[CALL1:%.*]] = call noalias i8* @malloc(i64 [[CONV]])
+; CHECK-NEXT: br label [[RETURN]]
+; CHECK: return:
+; CHECK-NEXT: [[RETVAL_0:%.*]] = phi i8* [ [[CALL]], [[IF_THEN]] ], [ null, [[IF_END]] ]
+; CHECK-NEXT: ret i8* [[RETVAL_0]]
;
entry:
%rem = srem i32 %arg, 2
}
define internal i8* @internal_argmem_only_rec_1(i32* %arg) {
-; IS__TUNIT____: Function Attrs: inaccessiblemem_or_argmemonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@internal_argmem_only_rec_1
-; IS__TUNIT____-SAME: (i32* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[ARG:%.*]]) #[[ATTR1]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[TMP:%.*]] = load i32, i32* [[ARG]], align 4
-; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp eq i32 [[TMP]], 0
-; IS__TUNIT____-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
-; IS__TUNIT____: if.then:
-; IS__TUNIT____-NEXT: br label [[RETURN:%.*]]
-; IS__TUNIT____: if.end:
-; IS__TUNIT____-NEXT: [[TMP1:%.*]] = load i32, i32* [[ARG]], align 4
-; IS__TUNIT____-NEXT: [[CMP1:%.*]] = icmp eq i32 [[TMP1]], 1
-; IS__TUNIT____-NEXT: br i1 [[CMP1]], label [[IF_THEN2:%.*]], label [[IF_END3:%.*]]
-; IS__TUNIT____: if.then2:
-; IS__TUNIT____-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds i32, i32* [[ARG]], i64 -1
-; IS__TUNIT____-NEXT: [[CALL:%.*]] = call noalias i8* @internal_argmem_only_rec_2(i32* nocapture nofree nonnull align 4 dereferenceable(4) [[ADD_PTR]])
-; IS__TUNIT____-NEXT: br label [[RETURN]]
-; IS__TUNIT____: if.end3:
-; IS__TUNIT____-NEXT: [[TMP2:%.*]] = load i32, i32* [[ARG]], align 4
-; IS__TUNIT____-NEXT: [[CONV:%.*]] = sext i32 [[TMP2]] to i64
-; IS__TUNIT____-NEXT: [[CALL4:%.*]] = call noalias i8* @malloc(i64 [[CONV]])
-; IS__TUNIT____-NEXT: br label [[RETURN]]
-; IS__TUNIT____: return:
-; IS__TUNIT____-NEXT: [[RETVAL_0:%.*]] = phi i8* [ null, [[IF_THEN]] ], [ [[CALL]], [[IF_THEN2]] ], [ [[CALL4]], [[IF_END3]] ]
-; IS__TUNIT____-NEXT: ret i8* [[RETVAL_0]]
-;
-; IS__CGSCC____: Function Attrs: inaccessiblemem_or_argmemonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@internal_argmem_only_rec_1
-; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[ARG:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[TMP:%.*]] = load i32, i32* [[ARG]], align 4
-; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp eq i32 [[TMP]], 0
-; IS__CGSCC____-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
-; IS__CGSCC____: if.then:
-; IS__CGSCC____-NEXT: br label [[RETURN:%.*]]
-; IS__CGSCC____: if.end:
-; IS__CGSCC____-NEXT: [[TMP1:%.*]] = load i32, i32* [[ARG]], align 4
-; IS__CGSCC____-NEXT: [[CMP1:%.*]] = icmp eq i32 [[TMP1]], 1
-; IS__CGSCC____-NEXT: br i1 [[CMP1]], label [[IF_THEN2:%.*]], label [[IF_END3:%.*]]
-; IS__CGSCC____: if.then2:
-; IS__CGSCC____-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds i32, i32* [[ARG]], i64 -1
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call noalias i8* @internal_argmem_only_rec_2(i32* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[ADD_PTR]])
-; IS__CGSCC____-NEXT: br label [[RETURN]]
-; IS__CGSCC____: if.end3:
-; IS__CGSCC____-NEXT: [[TMP2:%.*]] = load i32, i32* [[ARG]], align 4
-; IS__CGSCC____-NEXT: [[CONV:%.*]] = sext i32 [[TMP2]] to i64
-; IS__CGSCC____-NEXT: [[CALL4:%.*]] = call noalias i8* @malloc(i64 [[CONV]])
-; IS__CGSCC____-NEXT: br label [[RETURN]]
-; IS__CGSCC____: return:
-; IS__CGSCC____-NEXT: [[RETVAL_0:%.*]] = phi i8* [ null, [[IF_THEN]] ], [ [[CALL]], [[IF_THEN2]] ], [ [[CALL4]], [[IF_END3]] ]
-; IS__CGSCC____-NEXT: ret i8* [[RETVAL_0]]
+; CHECK: Function Attrs: inaccessiblemem_or_argmemonly
+; CHECK-LABEL: define {{[^@]+}}@internal_argmem_only_rec_1
+; CHECK-SAME: (i32* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[ARG:%.*]]) #[[ATTR1]] {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[TMP:%.*]] = load i32, i32* [[ARG]], align 4
+; CHECK-NEXT: [[CMP:%.*]] = icmp eq i32 [[TMP]], 0
+; CHECK-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
+; CHECK: if.then:
+; CHECK-NEXT: br label [[RETURN:%.*]]
+; CHECK: if.end:
+; CHECK-NEXT: [[TMP1:%.*]] = load i32, i32* [[ARG]], align 4
+; CHECK-NEXT: [[CMP1:%.*]] = icmp eq i32 [[TMP1]], 1
+; CHECK-NEXT: br i1 [[CMP1]], label [[IF_THEN2:%.*]], label [[IF_END3:%.*]]
+; CHECK: if.then2:
+; CHECK-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds i32, i32* [[ARG]], i64 -1
+; CHECK-NEXT: [[CALL:%.*]] = call noalias i8* @internal_argmem_only_rec_2(i32* nocapture nofree nonnull align 4 dereferenceable(4) [[ADD_PTR]])
+; CHECK-NEXT: br label [[RETURN]]
+; CHECK: if.end3:
+; CHECK-NEXT: [[TMP2:%.*]] = load i32, i32* [[ARG]], align 4
+; CHECK-NEXT: [[CONV:%.*]] = sext i32 [[TMP2]] to i64
+; CHECK-NEXT: [[CALL4:%.*]] = call noalias i8* @malloc(i64 [[CONV]])
+; CHECK-NEXT: br label [[RETURN]]
+; CHECK: return:
+; CHECK-NEXT: [[RETVAL_0:%.*]] = phi i8* [ null, [[IF_THEN]] ], [ [[CALL]], [[IF_THEN2]] ], [ [[CALL4]], [[IF_END3]] ]
+; CHECK-NEXT: ret i8* [[RETVAL_0]]
;
entry:
%tmp = load i32, i32* %arg, align 4
}
define internal i8 @recursive_not_readnone_internal(i8* %ptr, i1 %c) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind writeonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@recursive_not_readnone_internal
-; IS__TUNIT____-SAME: (i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[PTR:%.*]], i1 [[C:%.*]]) #[[ATTR8]] {
-; IS__TUNIT____-NEXT: [[ALLOC:%.*]] = alloca i8, align 1
-; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
-; IS__TUNIT____: t:
-; IS__TUNIT____-NEXT: [[TMP1:%.*]] = call i8 @recursive_not_readnone_internal(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[ALLOC]], i1 noundef false) #[[ATTR11]]
-; IS__TUNIT____-NEXT: ret i8 1
-; IS__TUNIT____: f:
-; IS__TUNIT____-NEXT: ret i8 0
-;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@recursive_not_readnone_internal
-; IS__CGSCC____-SAME: (i8* noalias nocapture nofree nonnull readnone dereferenceable(1) [[PTR:%.*]], i1 [[C:%.*]]) #[[ATTR5]] {
-; IS__CGSCC____-NEXT: [[ALLOC:%.*]] = alloca i8, align 1
-; IS__CGSCC____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
-; IS__CGSCC____: t:
-; IS__CGSCC____-NEXT: [[TMP1:%.*]] = call i8 @recursive_not_readnone_internal(i8* noalias nocapture nofree nonnull readnone dereferenceable(1) undef, i1 noundef false) #[[ATTR12:[0-9]+]], !range [[RNG0:![0-9]+]]
-; IS__CGSCC____-NEXT: ret i8 1
-; IS__CGSCC____: f:
-; IS__CGSCC____-NEXT: ret i8 0
+; CHECK: Function Attrs: argmemonly nofree nosync nounwind writeonly
+; CHECK-LABEL: define {{[^@]+}}@recursive_not_readnone_internal
+; CHECK-SAME: (i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[PTR:%.*]], i1 [[C:%.*]]) #[[ATTR8]] {
+; CHECK-NEXT: [[ALLOC:%.*]] = alloca i8, align 1
+; CHECK-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; CHECK: t:
+; CHECK-NEXT: [[TMP1:%.*]] = call i8 @recursive_not_readnone_internal(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[ALLOC]], i1 noundef false) #[[ATTR11]]
+; CHECK-NEXT: ret i8 1
+; CHECK: f:
+; CHECK-NEXT: ret i8 0
;
%alloc = alloca i8
br i1 %c, label %t, label %f
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone
; IS__CGSCC____-LABEL: define {{[^@]+}}@readnone_caller
; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR9:[0-9]+]] {
-; IS__CGSCC____-NEXT: [[R:%.*]] = call noundef i8 @recursive_not_readnone_internal(i8* noalias nocapture nofree nonnull readnone dereferenceable(1) undef, i1 [[C]]) #[[ATTR13:[0-9]+]], !range [[RNG0]]
+; IS__CGSCC____-NEXT: [[A:%.*]] = alloca i8, align 1
+; IS__CGSCC____-NEXT: [[R:%.*]] = call noundef i8 @recursive_not_readnone_internal(i8* noalias nocapture nofree noundef nonnull readnone dereferenceable(1) [[A]], i1 [[C]]) #[[ATTR12:[0-9]+]], !range [[RNG0:![0-9]+]]
; IS__CGSCC____-NEXT: ret i8 [[R]]
;
%a = alloca i8
}
define internal i8 @recursive_readnone_internal2(i8* %ptr, i1 %c) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind writeonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@recursive_readnone_internal2
-; IS__TUNIT____-SAME: (i8* nocapture nofree nonnull writeonly [[PTR:%.*]], i1 [[C:%.*]]) #[[ATTR8]] {
-; IS__TUNIT____-NEXT: [[ALLOC:%.*]] = alloca i8, align 1
-; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
-; IS__TUNIT____: t:
-; IS__TUNIT____-NEXT: [[TMP1:%.*]] = call i8 @recursive_readnone_internal2(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[ALLOC]], i1 noundef false) #[[ATTR11]]
-; IS__TUNIT____-NEXT: ret i8 1
-; IS__TUNIT____: f:
-; IS__TUNIT____-NEXT: ret i8 0
-;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@recursive_readnone_internal2
-; IS__CGSCC____-SAME: (i8* noalias nocapture nofree nonnull readnone [[PTR:%.*]], i1 [[C:%.*]]) #[[ATTR5]] {
-; IS__CGSCC____-NEXT: [[ALLOC:%.*]] = alloca i8, align 1
-; IS__CGSCC____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
-; IS__CGSCC____: t:
-; IS__CGSCC____-NEXT: [[TMP1:%.*]] = call i8 @recursive_readnone_internal2(i8* noalias nocapture nofree nonnull readnone dereferenceable(1) undef, i1 noundef false) #[[ATTR12]], !range [[RNG0]]
-; IS__CGSCC____-NEXT: ret i8 1
-; IS__CGSCC____: f:
-; IS__CGSCC____-NEXT: ret i8 0
+; CHECK: Function Attrs: argmemonly nofree nosync nounwind writeonly
+; CHECK-LABEL: define {{[^@]+}}@recursive_readnone_internal2
+; CHECK-SAME: (i8* nocapture nofree nonnull writeonly [[PTR:%.*]], i1 [[C:%.*]]) #[[ATTR8]] {
+; CHECK-NEXT: [[ALLOC:%.*]] = alloca i8, align 1
+; CHECK-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; CHECK: t:
+; CHECK-NEXT: [[TMP1:%.*]] = call i8 @recursive_readnone_internal2(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[ALLOC]], i1 noundef false) #[[ATTR11]]
+; CHECK-NEXT: ret i8 1
+; CHECK: f:
+; CHECK-NEXT: ret i8 0
;
%alloc = alloca i8
br i1 %c, label %t, label %f
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone
; IS__CGSCC____-LABEL: define {{[^@]+}}@readnone_caller2
; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR9]] {
-; IS__CGSCC____-NEXT: [[R:%.*]] = call noundef i8 @recursive_readnone_internal2(i8* undef, i1 [[C]]) #[[ATTR13]], !range [[RNG0]]
+; IS__CGSCC____-NEXT: [[R:%.*]] = call noundef i8 @recursive_readnone_internal2(i8* undef, i1 [[C]]) #[[ATTR12]], !range [[RNG0]]
; IS__CGSCC____-NEXT: ret i8 [[R]]
;
%r = call i8 @recursive_readnone_internal2(i8* undef, i1 %c)
}
define internal i8 @recursive_not_readnone_internal3(i8* %ptr, i1 %c) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind writeonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@recursive_not_readnone_internal3
-; IS__TUNIT____-SAME: (i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[PTR:%.*]], i1 [[C:%.*]]) #[[ATTR8]] {
-; IS__TUNIT____-NEXT: [[ALLOC:%.*]] = alloca i8, align 1
-; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
-; IS__TUNIT____: t:
-; IS__TUNIT____-NEXT: [[TMP1:%.*]] = call i8 @recursive_not_readnone_internal3(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[ALLOC]], i1 noundef false) #[[ATTR11]]
-; IS__TUNIT____-NEXT: ret i8 1
-; IS__TUNIT____: f:
-; IS__TUNIT____-NEXT: ret i8 0
-;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@recursive_not_readnone_internal3
-; IS__CGSCC____-SAME: (i8* noalias nocapture nofree nonnull readnone dereferenceable(1) [[PTR:%.*]], i1 [[C:%.*]]) #[[ATTR5]] {
-; IS__CGSCC____-NEXT: [[ALLOC:%.*]] = alloca i8, align 1
-; IS__CGSCC____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
-; IS__CGSCC____: t:
-; IS__CGSCC____-NEXT: [[TMP1:%.*]] = call i8 @recursive_not_readnone_internal3(i8* noalias nocapture nofree nonnull readnone dereferenceable(1) undef, i1 noundef false) #[[ATTR12]], !range [[RNG0]]
-; IS__CGSCC____-NEXT: ret i8 1
-; IS__CGSCC____: f:
-; IS__CGSCC____-NEXT: ret i8 0
+; CHECK: Function Attrs: argmemonly nofree nosync nounwind writeonly
+; CHECK-LABEL: define {{[^@]+}}@recursive_not_readnone_internal3
+; CHECK-SAME: (i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[PTR:%.*]], i1 [[C:%.*]]) #[[ATTR8]] {
+; CHECK-NEXT: [[ALLOC:%.*]] = alloca i8, align 1
+; CHECK-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; CHECK: t:
+; CHECK-NEXT: [[TMP1:%.*]] = call i8 @recursive_not_readnone_internal3(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[ALLOC]], i1 noundef false) #[[ATTR11]]
+; CHECK-NEXT: ret i8 1
+; CHECK: f:
+; CHECK-NEXT: ret i8 0
;
%alloc = alloca i8
br i1 %c, label %t, label %f
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone
; IS__CGSCC____-LABEL: define {{[^@]+}}@readnone_caller3
; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR9]] {
-; IS__CGSCC____-NEXT: [[R:%.*]] = call noundef i8 @recursive_not_readnone_internal3(i8* noalias nocapture nofree nonnull readnone dereferenceable(1) undef, i1 [[C]]) #[[ATTR13]], !range [[RNG0]]
+; IS__CGSCC____-NEXT: [[ALLOC:%.*]] = alloca i8, align 1
+; IS__CGSCC____-NEXT: [[R:%.*]] = call noundef i8 @recursive_not_readnone_internal3(i8* noalias nocapture nofree noundef nonnull readnone dereferenceable(1) [[ALLOC]], i1 [[C]]) #[[ATTR12]], !range [[RNG0]]
; IS__CGSCC____-NEXT: ret i8 [[R]]
;
%alloc = alloca i8
; IS__CGSCC____: attributes #[[ATTR9]] = { nofree norecurse nosync nounwind readnone }
; IS__CGSCC____: attributes #[[ATTR10]] = { nounwind willreturn writeonly }
; IS__CGSCC____: attributes #[[ATTR11]] = { nofree nosync nounwind writeonly }
-; IS__CGSCC____: attributes #[[ATTR12]] = { nofree nosync nounwind readnone }
-; IS__CGSCC____: attributes #[[ATTR13]] = { nounwind readnone willreturn }
+; IS__CGSCC____: attributes #[[ATTR12]] = { nounwind readnone }
;.
; CHECK: [[META0:![0-9]+]] = !{i8 0, i8 2}
;.
define i32 @nc1(i32* %q, i32* %p, i1 %b) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@nc1
-; IS__TUNIT____-SAME: (i32* nofree [[Q:%.*]], i32* nocapture nofree [[P:%.*]], i1 [[B:%.*]]) #[[ATTR5:[0-9]+]] {
-; IS__TUNIT____-NEXT: e:
-; IS__TUNIT____-NEXT: br label [[L:%.*]]
-; IS__TUNIT____: l:
-; IS__TUNIT____-NEXT: [[Y:%.*]] = phi i32* [ [[Q]], [[E:%.*]] ]
-; IS__TUNIT____-NEXT: [[TMP2:%.*]] = select i1 [[B]], i32* [[P]], i32* [[Y]]
-; IS__TUNIT____-NEXT: [[VAL:%.*]] = load i32, i32* [[TMP2]], align 4
-; IS__TUNIT____-NEXT: store i32 0, i32* [[P]], align 4
-; IS__TUNIT____-NEXT: store i32* [[Y]], i32** @g, align 8
-; IS__TUNIT____-NEXT: ret i32 [[VAL]]
-;
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@nc1
-; IS__CGSCC____-SAME: (i32* nofree [[Q:%.*]], i32* nocapture nofree align 4 [[P:%.*]], i1 [[B:%.*]]) #[[ATTR5:[0-9]+]] {
-; IS__CGSCC____-NEXT: e:
-; IS__CGSCC____-NEXT: br label [[L:%.*]]
-; IS__CGSCC____: l:
-; IS__CGSCC____-NEXT: [[Y:%.*]] = phi i32* [ [[Q]], [[E:%.*]] ]
-; IS__CGSCC____-NEXT: [[TMP2:%.*]] = select i1 [[B]], i32* [[P]], i32* [[Y]]
-; IS__CGSCC____-NEXT: [[VAL:%.*]] = load i32, i32* [[TMP2]], align 4
-; IS__CGSCC____-NEXT: store i32 0, i32* [[P]], align 4
-; IS__CGSCC____-NEXT: store i32* [[Y]], i32** @g, align 8
-; IS__CGSCC____-NEXT: ret i32 [[VAL]]
+; CHECK: Function Attrs: nofree norecurse nosync nounwind willreturn
+; CHECK-LABEL: define {{[^@]+}}@nc1
+; CHECK-SAME: (i32* nofree [[Q:%.*]], i32* nocapture nofree [[P:%.*]], i1 [[B:%.*]]) #[[ATTR5:[0-9]+]] {
+; CHECK-NEXT: e:
+; CHECK-NEXT: br label [[L:%.*]]
+; CHECK: l:
+; CHECK-NEXT: [[Y:%.*]] = phi i32* [ [[Q]], [[E:%.*]] ]
+; CHECK-NEXT: [[TMP2:%.*]] = select i1 [[B]], i32* [[P]], i32* [[Y]]
+; CHECK-NEXT: [[VAL:%.*]] = load i32, i32* [[TMP2]], align 4
+; CHECK-NEXT: store i32 0, i32* [[P]], align 4
+; CHECK-NEXT: store i32* [[Y]], i32** @g, align 8
+; CHECK-NEXT: ret i32 [[VAL]]
;
e:
br label %l
define i32 @nc1_addrspace(i32* %q, i32 addrspace(1)* %p, i1 %b) {
; CHECK: Function Attrs: nofree norecurse nosync nounwind willreturn
; CHECK-LABEL: define {{[^@]+}}@nc1_addrspace
-; CHECK-SAME: (i32* nofree [[Q:%.*]], i32 addrspace(1)* nocapture nofree [[P:%.*]], i1 [[B:%.*]]) #[[ATTR5:[0-9]+]] {
+; CHECK-SAME: (i32* nofree [[Q:%.*]], i32 addrspace(1)* nocapture nofree [[P:%.*]], i1 [[B:%.*]]) #[[ATTR5]] {
; CHECK-NEXT: e:
; CHECK-NEXT: br label [[L:%.*]]
; CHECK: l:
; IS__CGSCC____-LABEL: define {{[^@]+}}@f2
; IS__CGSCC____-SAME: () #[[ATTR0]] align 2 {
; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[TMP0:%.*]] = bitcast %a* undef to %b*
; IS__CGSCC____-NEXT: ret i64 undef
;
entry:
; IS__CGSCC____-LABEL: define {{[^@]+}}@f3
; IS__CGSCC____-SAME: () #[[ATTR0]] align 2 {
; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[THIS_ADDR:%.*]] = alloca %b*, align 8
-; IS__CGSCC____-NEXT: [[THIS1:%.*]] = load %b*, %b** [[THIS_ADDR]], align 8
; IS__CGSCC____-NEXT: ret void
;
entry:
; IS__CGSCC____-LABEL: define {{[^@]+}}@f4
; IS__CGSCC____-SAME: () #[[ATTR0]] align 2 {
; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[THIS_ADDR:%.*]] = alloca %b*, align 8
-; IS__CGSCC____-NEXT: [[THIS1:%.*]] = load %b*, %b** [[THIS_ADDR]], align 8
; IS__CGSCC____-NEXT: ret i1 undef
;
entry:
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
; IS__CGSCC____-LABEL: define {{[^@]+}}@g2
; IS__CGSCC____-SAME: () #[[ATTR1]] {
-; IS__CGSCC____-NEXT: ret i32* undef
+; IS__CGSCC____-NEXT: ret i32* inttoptr (i64 4 to i32*)
;
ret i32* inttoptr (i64 4 to i32*)
}
; try to come up with a different scheme to verify the `noundef` is dropped if
; signature rewriting is not happening.
define internal void @callee_with_dead_noundef_arg(i1 noundef %create, ...) {
-; CHECK-LABEL: define {{[^@]+}}@callee_with_dead_noundef_arg
-; CHECK-SAME: (i1 [[CREATE:%.*]], ...) {
-; CHECK-NEXT: call void @unknown()
-; CHECK-NEXT: ret void
+; IS__TUNIT____-LABEL: define {{[^@]+}}@callee_with_dead_noundef_arg
+; IS__TUNIT____-SAME: (i1 [[CREATE:%.*]], ...) {
+; IS__TUNIT____-NEXT: call void @unknown()
+; IS__TUNIT____-NEXT: ret void
+;
+; IS__CGSCC____-LABEL: define {{[^@]+}}@callee_with_dead_noundef_arg
+; IS__CGSCC____-SAME: (i1 noundef [[CREATE:%.*]], ...) {
+; IS__CGSCC____-NEXT: call void @unknown()
+; IS__CGSCC____-NEXT: ret void
;
call void @unknown()
ret void
}
define void @caller_with_unused_arg(i1 %c) {
-; CHECK-LABEL: define {{[^@]+}}@caller_with_unused_arg
-; CHECK-SAME: (i1 [[C:%.*]]) {
-; CHECK-NEXT: call void (i1, ...) @callee_with_dead_noundef_arg(i1 undef)
-; CHECK-NEXT: ret void
+; IS__TUNIT____-LABEL: define {{[^@]+}}@caller_with_unused_arg
+; IS__TUNIT____-SAME: (i1 [[C:%.*]]) {
+; IS__TUNIT____-NEXT: call void (i1, ...) @callee_with_dead_noundef_arg(i1 undef)
+; IS__TUNIT____-NEXT: ret void
+;
+; IS__CGSCC____-LABEL: define {{[^@]+}}@caller_with_unused_arg
+; IS__CGSCC____-SAME: (i1 noundef [[C:%.*]]) {
+; IS__CGSCC____-NEXT: call void (i1, ...) @callee_with_dead_noundef_arg(i1 noundef [[C]])
+; IS__CGSCC____-NEXT: ret void
;
call void (i1, ...) @callee_with_dead_noundef_arg(i1 %c)
ret void
; signature rewriting is not happening.
define void @caller_with_noundef_arg() {
;
-; CHECK-LABEL: define {{[^@]+}}@caller_with_noundef_arg() {
-; CHECK-NEXT: call void (i1, ...) @callee_with_dead_arg(i1 undef)
-; CHECK-NEXT: ret void
+; IS__TUNIT____-LABEL: define {{[^@]+}}@caller_with_noundef_arg() {
+; IS__TUNIT____-NEXT: call void (i1, ...) @callee_with_dead_arg(i1 undef)
+; IS__TUNIT____-NEXT: ret void
+;
+; IS__CGSCC____-LABEL: define {{[^@]+}}@caller_with_noundef_arg() {
+; IS__CGSCC____-NEXT: call void (i1, ...) @callee_with_dead_arg(i1 noundef true)
+; IS__CGSCC____-NEXT: ret void
;
call void (i1, ...) @callee_with_dead_arg(i1 noundef true)
ret void
; IS__CGSCC_OPM-NEXT: [[N_ADDR:%.*]] = alloca i32, align 4
; IS__CGSCC_OPM-NEXT: store float* [[A]], float** [[A_ADDR]], align 8
; IS__CGSCC_OPM-NEXT: store float* [[B]], float** [[B_ADDR]], align 8
+; IS__CGSCC_OPM-NEXT: store i32 199, i32* [[N_ADDR]], align 4
; IS__CGSCC_OPM-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB2]], i32 noundef 3, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*, float**, float**)* @.omp_outlined. to void (i32*, i32*, ...)*), i32* noalias nocapture nofree noundef nonnull readnone align 4 dereferenceable(4) [[N_ADDR]], float** nocapture nofree noundef nonnull readonly align 8 dereferenceable(8) [[A_ADDR]], float** nocapture nofree noundef nonnull readonly align 8 dereferenceable(8) [[B_ADDR]])
; IS__CGSCC_OPM-NEXT: ret void
;
; IS__CGSCC_NPM-NEXT: [[N_ADDR:%.*]] = alloca i32, align 4
; IS__CGSCC_NPM-NEXT: store float* [[A]], float** [[A_ADDR]], align 8
; IS__CGSCC_NPM-NEXT: store float* [[B]], float** [[B_ADDR]], align 8
+; IS__CGSCC_NPM-NEXT: store i32 199, i32* [[N_ADDR]], align 4
; IS__CGSCC_NPM-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB2]], i32 noundef 3, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*, float**, float**)* @.omp_outlined. to void (i32*, i32*, ...)*), i32* noalias nocapture nofree noundef nonnull readnone align 4 dereferenceable(4) [[N_ADDR]], float** noalias nocapture nofree noundef nonnull readonly align 8 dereferenceable(8) [[A_ADDR]], float** noalias nocapture nofree noundef nonnull readonly align 8 dereferenceable(8) [[B_ADDR]])
; IS__CGSCC_NPM-NEXT: ret void
;
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
; IS__CGSCC____-LABEL: define {{[^@]+}}@iszero1
; IS__CGSCC____-SAME: () #[[ATTR0:[0-9]+]] {
-; IS__CGSCC____-NEXT: ret i1 undef
+; IS__CGSCC____-NEXT: ret i1 false
;
%cmp = icmp eq i32 %c, 0
ret i1 %cmp
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
; IS__CGSCC____-LABEL: define {{[^@]+}}@iszero2
; IS__CGSCC____-SAME: () #[[ATTR0]] {
-; IS__CGSCC____-NEXT: ret i32 undef
+; IS__CGSCC____-NEXT: ret i32 0
;
%cmp = icmp eq i32 %c, 0
%ret = zext i1 %cmp to i32
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
; IS__CGSCC____-LABEL: define {{[^@]+}}@call_with_two_values
; IS__CGSCC____-SAME: () #[[ATTR0]] {
-; IS__CGSCC____-NEXT: ret i32 undef
+; IS__CGSCC____-NEXT: ret i32 0
;
%csret1 = call i32 @iszero2(i32 %c)
%minusc = sub i32 0, %c
define internal i32 @iszero3(i32 %c) {
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
; IS__CGSCC____-LABEL: define {{[^@]+}}@iszero3
-; IS__CGSCC____-SAME: (i32 [[C:%.*]]) #[[ATTR0]] {
-; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp eq i32 undef, 0
-; IS__CGSCC____-NEXT: [[RET:%.*]] = zext i1 undef to i32
-; IS__CGSCC____-NEXT: ret i32 undef
+; IS__CGSCC____-SAME: (i32 noundef [[C:%.*]]) #[[ATTR0]] {
+; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp eq i32 [[C]], 0
+; IS__CGSCC____-NEXT: [[RET:%.*]] = zext i1 [[CMP]] to i32
+; IS__CGSCC____-NEXT: ret i32 [[RET]]
;
%cmp = icmp eq i32 %c, 0
%ret = zext i1 %cmp to i32
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
; IS__CGSCC____-LABEL: define {{[^@]+}}@less_than_two
; IS__CGSCC____-SAME: (i32 [[C:%.*]]) #[[ATTR0]] {
-; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp slt i32 undef, 2
-; IS__CGSCC____-NEXT: [[RET:%.*]] = zext i1 true to i32
-; IS__CGSCC____-NEXT: ret i32 undef
+; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp slt i32 [[C]], 2
+; IS__CGSCC____-NEXT: [[RET:%.*]] = zext i1 [[CMP]] to i32
+; IS__CGSCC____-NEXT: ret i32 [[RET]]
;
%cmp = icmp slt i32 %c, 2
%ret = zext i1 %cmp to i32
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
; IS__CGSCC____-LABEL: define {{[^@]+}}@return2or4
; IS__CGSCC____-SAME: (i32 [[C:%.*]]) #[[ATTR0]] {
-; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp eq i32 undef, 0
-; IS__CGSCC____-NEXT: [[RET:%.*]] = select i1 undef, i32 2, i32 4
-; IS__CGSCC____-NEXT: ret i32 undef
+; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp eq i32 [[C]], 0
+; IS__CGSCC____-NEXT: [[RET:%.*]] = select i1 [[CMP]], i32 2, i32 4
+; IS__CGSCC____-NEXT: ret i32 [[RET]]
;
%cmp = icmp eq i32 %c, 0
%ret = select i1 %cmp, i32 2, i32 4
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
; IS__CGSCC____-LABEL: define {{[^@]+}}@cmp_with_four
; IS__CGSCC____-SAME: () #[[ATTR0]] {
-; IS__CGSCC____-NEXT: ret i1 undef
+; IS__CGSCC____-NEXT: ret i1 false
;
%cmp = icmp eq i32 %c, 4
ret i1 %cmp
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
; IS__CGSCC____-LABEL: define {{[^@]+}}@wrapper
; IS__CGSCC____-SAME: () #[[ATTR0]] {
-; IS__CGSCC____-NEXT: ret i1 undef
+; IS__CGSCC____-NEXT: ret i1 false
;
%ret = call i1 @cmp_with_four(i32 %c)
ret i1 %ret
; IS__CGSCC____-NEXT: i32 -1, label [[B:%.*]]
; IS__CGSCC____-NEXT: ]
; IS__CGSCC____: a:
-; IS__CGSCC____-NEXT: ret i32 undef
+; IS__CGSCC____-NEXT: ret i32 1
; IS__CGSCC____: b:
-; IS__CGSCC____-NEXT: ret i32 undef
+; IS__CGSCC____-NEXT: ret i32 -1
; IS__CGSCC____: otherwise:
; IS__CGSCC____-NEXT: ret i32 undef
;
}
define i1 @potential_test10(i32 %c) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@potential_test10
-; IS__TUNIT____-SAME: (i32 [[C:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT: ret i1 false
-;
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@potential_test10
-; IS__CGSCC____-SAME: (i32 [[C:%.*]]) #[[ATTR0]] {
-; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp eq i32 undef, 0
-; IS__CGSCC____-NEXT: ret i1 false
+; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CHECK-LABEL: define {{[^@]+}}@potential_test10
+; CHECK-SAME: (i32 [[C:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: ret i1 false
;
%ret = call i32 @may_return_undef(i32 %c)
%cmp = icmp eq i32 %ret, 0
; IS__CGSCC_NPM: 2:
; IS__CGSCC_NPM-NEXT: unreachable
; IS__CGSCC_NPM: f:
-; IS__CGSCC_NPM-NEXT: ret i32 undef
+; IS__CGSCC_NPM-NEXT: ret i32 10
; IS__CGSCC_NPM: 3:
; IS__CGSCC_NPM-NEXT: [[TMP4:%.*]] = phi i32 [ 0, [[TMP0:%.*]] ], [ [[TMP7:%.*]], [[TMP3]] ]
; IS__CGSCC_NPM-NEXT: [[TMP5:%.*]] = phi i32 [ 0, [[TMP0]] ], [ [[TMP6:%.*]], [[TMP3]] ]
ret i32 %call
}
define internal i32 @rec(i32 %depth) {
-; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@rec
-; IS__TUNIT_OPM-SAME: (i32 [[DEPTH:%.*]]) {
-; IS__TUNIT_OPM-NEXT: entry:
-; IS__TUNIT_OPM-NEXT: [[CALL:%.*]] = call i32 @foo(i32 [[DEPTH]])
-; IS__TUNIT_OPM-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[CALL]], 0
-; IS__TUNIT_OPM-NEXT: br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
-; IS__TUNIT_OPM: if.then:
-; IS__TUNIT_OPM-NEXT: br label [[RETURN:%.*]]
-; IS__TUNIT_OPM: if.end:
-; IS__TUNIT_OPM-NEXT: [[CMP:%.*]] = icmp slt i32 [[DEPTH]], 10
-; IS__TUNIT_OPM-NEXT: br i1 [[CMP]], label [[IF_THEN1:%.*]], label [[IF_END3:%.*]]
-; IS__TUNIT_OPM: if.then1:
-; IS__TUNIT_OPM-NEXT: [[ADD:%.*]] = add nsw i32 [[DEPTH]], 1
-; IS__TUNIT_OPM-NEXT: [[CALL2:%.*]] = call i32 @rec(i32 [[ADD]]), !range [[RNG3]]
-; IS__TUNIT_OPM-NEXT: br label [[IF_END3]]
-; IS__TUNIT_OPM: if.end3:
-; IS__TUNIT_OPM-NEXT: br label [[RETURN]]
-; IS__TUNIT_OPM: return:
-; IS__TUNIT_OPM-NEXT: [[RETVAL_0:%.*]] = phi i32 [ 0, [[IF_THEN]] ], [ 1, [[IF_END3]] ]
-; IS__TUNIT_OPM-NEXT: ret i32 [[RETVAL_0]]
-;
-; NOT_TUNIT_OPM-LABEL: define {{[^@]+}}@rec
-; NOT_TUNIT_OPM-SAME: (i32 [[DEPTH:%.*]]) {
-; NOT_TUNIT_OPM-NEXT: entry:
-; NOT_TUNIT_OPM-NEXT: [[CALL:%.*]] = call i32 @foo(i32 [[DEPTH]])
-; NOT_TUNIT_OPM-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[CALL]], 0
-; NOT_TUNIT_OPM-NEXT: br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
-; NOT_TUNIT_OPM: if.then:
-; NOT_TUNIT_OPM-NEXT: br label [[RETURN:%.*]]
-; NOT_TUNIT_OPM: if.end:
-; NOT_TUNIT_OPM-NEXT: [[CMP:%.*]] = icmp slt i32 [[DEPTH]], 10
-; NOT_TUNIT_OPM-NEXT: br i1 [[CMP]], label [[IF_THEN1:%.*]], label [[IF_END3:%.*]]
-; NOT_TUNIT_OPM: if.then1:
-; NOT_TUNIT_OPM-NEXT: [[ADD:%.*]] = add nsw i32 [[DEPTH]], 1
-; NOT_TUNIT_OPM-NEXT: [[CALL2:%.*]] = call i32 @rec(i32 [[ADD]]), !range [[RNG4]]
-; NOT_TUNIT_OPM-NEXT: br label [[IF_END3]]
-; NOT_TUNIT_OPM: if.end3:
-; NOT_TUNIT_OPM-NEXT: br label [[RETURN]]
-; NOT_TUNIT_OPM: return:
-; NOT_TUNIT_OPM-NEXT: [[RETVAL_0:%.*]] = phi i32 [ 0, [[IF_THEN]] ], [ 1, [[IF_END3]] ]
-; NOT_TUNIT_OPM-NEXT: ret i32 [[RETVAL_0]]
+; CHECK-LABEL: define {{[^@]+}}@rec
+; CHECK-SAME: (i32 [[DEPTH:%.*]]) {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[CALL:%.*]] = call i32 @foo(i32 [[DEPTH]])
+; CHECK-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[CALL]], 0
+; CHECK-NEXT: br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
+; CHECK: if.then:
+; CHECK-NEXT: br label [[RETURN:%.*]]
+; CHECK: if.end:
+; CHECK-NEXT: [[CMP:%.*]] = icmp slt i32 [[DEPTH]], 10
+; CHECK-NEXT: br i1 [[CMP]], label [[IF_THEN1:%.*]], label [[IF_END3:%.*]]
+; CHECK: if.then1:
+; CHECK-NEXT: [[ADD:%.*]] = add nsw i32 [[DEPTH]], 1
+; CHECK-NEXT: [[CALL2:%.*]] = call i32 @rec(i32 [[ADD]])
+; CHECK-NEXT: br label [[IF_END3]]
+; CHECK: if.end3:
+; CHECK-NEXT: br label [[RETURN]]
+; CHECK: return:
+; CHECK-NEXT: [[RETVAL_0:%.*]] = phi i32 [ 0, [[IF_THEN]] ], [ 1, [[IF_END3]] ]
+; CHECK-NEXT: ret i32 [[RETVAL_0]]
;
entry:
%call = call i32 @foo(i32 %depth)
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
; IS__CGSCC____-LABEL: define {{[^@]+}}@less_than_65536
; IS__CGSCC____-SAME: (i32 [[ARG:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: [[SHRINKED:%.*]] = udiv i32 undef, 65536
-; IS__CGSCC____-NEXT: ret i32 undef
+; IS__CGSCC____-NEXT: [[SHRINKED:%.*]] = udiv i32 [[ARG]], 65536
+; IS__CGSCC____-NEXT: ret i32 [[SHRINKED]]
;
%shrinked = udiv i32 %arg, 65536
ret i32 %shrinked
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
; IS__CGSCC____-LABEL: define {{[^@]+}}@is_less_than_65536
; IS__CGSCC____-SAME: (i32 [[ARG:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp ult i32 undef, 65536
-; IS__CGSCC____-NEXT: ret i1 undef
+; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp ult i32 [[ARG]], 65536
+; IS__CGSCC____-NEXT: ret i1 [[CMP]]
;
%cmp = icmp ult i32 %arg, 65536
ret i1 %cmp
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
; IS__CGSCC____-LABEL: define {{[^@]+}}@cast_and_return
; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: [[RET:%.*]] = zext i1 undef to i32
-; IS__CGSCC____-NEXT: ret i32 undef
+; IS__CGSCC____-NEXT: [[RET:%.*]] = zext i1 [[C]] to i32
+; IS__CGSCC____-NEXT: ret i32 [[RET]]
;
%ret = zext i1 %c to i32
ret i32 %ret
define internal i1 @is_less_than_3(i32 %c) {
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
; IS__CGSCC____-LABEL: define {{[^@]+}}@is_less_than_3
-; IS__CGSCC____-SAME: () #[[ATTR1]] {
-; IS__CGSCC____-NEXT: ret i1 undef
+; IS__CGSCC____-SAME: (i32 [[C:%.*]]) #[[ATTR1]] {
+; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp slt i32 [[C]], 3
+; IS__CGSCC____-NEXT: ret i1 [[CMP]]
;
%cmp = icmp slt i32 %c, 3
ret i1 %cmp
; IS__CGSCC____-NEXT: i32 6, label [[ONSIX:%.*]]
; IS__CGSCC____-NEXT: ]
; IS__CGSCC____: onzero:
-; IS__CGSCC____-NEXT: ret i32 undef
+; IS__CGSCC____-NEXT: ret i32 0
; IS__CGSCC____: onone:
-; IS__CGSCC____-NEXT: ret i32 undef
+; IS__CGSCC____-NEXT: ret i32 1
; IS__CGSCC____: ontwo:
-; IS__CGSCC____-NEXT: ret i32 undef
+; IS__CGSCC____-NEXT: ret i32 2
; IS__CGSCC____: onthree:
-; IS__CGSCC____-NEXT: ret i32 undef
+; IS__CGSCC____-NEXT: ret i32 3
; IS__CGSCC____: onfour:
-; IS__CGSCC____-NEXT: ret i32 undef
+; IS__CGSCC____-NEXT: ret i32 4
; IS__CGSCC____: onfive:
-; IS__CGSCC____-NEXT: ret i32 undef
+; IS__CGSCC____-NEXT: ret i32 5
; IS__CGSCC____: onsix:
-; IS__CGSCC____-NEXT: ret i32 undef
+; IS__CGSCC____-NEXT: ret i32 6
; IS__CGSCC____: otherwise:
-; IS__CGSCC____-NEXT: ret i32 undef
+; IS__CGSCC____-NEXT: ret i32 99
;
switch i32 %c, label %otherwise [ i32 0, label %onzero
i32 1, label %onone
define internal i1 @is_less_than_100_1(i32 %c) {
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
; IS__CGSCC____-LABEL: define {{[^@]+}}@is_less_than_100_1
-; IS__CGSCC____-SAME: () #[[ATTR1]] {
-; IS__CGSCC____-NEXT: ret i1 undef
+; IS__CGSCC____-SAME: (i32 noundef [[C:%.*]]) #[[ATTR1]] {
+; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp slt i32 [[C]], 100
+; IS__CGSCC____-NEXT: ret i1 [[CMP]]
;
%cmp = icmp slt i32 %c, 100
ret i1 %cmp
; IS__CGSCC____-NEXT: i32 6, label [[ONSIX:%.*]]
; IS__CGSCC____-NEXT: ]
; IS__CGSCC____: onzero:
-; IS__CGSCC____-NEXT: ret i32 undef
+; IS__CGSCC____-NEXT: ret i32 0
; IS__CGSCC____: onone:
-; IS__CGSCC____-NEXT: ret i32 undef
+; IS__CGSCC____-NEXT: ret i32 1
; IS__CGSCC____: ontwo:
-; IS__CGSCC____-NEXT: ret i32 undef
+; IS__CGSCC____-NEXT: ret i32 2
; IS__CGSCC____: onthree:
-; IS__CGSCC____-NEXT: ret i32 undef
+; IS__CGSCC____-NEXT: ret i32 3
; IS__CGSCC____: onfour:
-; IS__CGSCC____-NEXT: ret i32 undef
+; IS__CGSCC____-NEXT: ret i32 4
; IS__CGSCC____: onfive:
-; IS__CGSCC____-NEXT: ret i32 undef
+; IS__CGSCC____-NEXT: ret i32 5
; IS__CGSCC____: onsix:
-; IS__CGSCC____-NEXT: ret i32 undef
+; IS__CGSCC____-NEXT: ret i32 6
; IS__CGSCC____: otherwise:
-; IS__CGSCC____-NEXT: ret i32 undef
+; IS__CGSCC____-NEXT: ret i32 99
;
switch i32 %c, label %otherwise [ i32 0, label %onzero
i32 1, label %onone
;
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
; IS__CGSCC____-LABEL: define {{[^@]+}}@is_less_than_100_2
-; IS__CGSCC____-SAME: (i32 [[C:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp slt i32 undef, 100
-; IS__CGSCC____-NEXT: ret i1 undef
+; IS__CGSCC____-SAME: (i32 noundef [[C:%.*]]) #[[ATTR1]] {
+; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp slt i32 [[C]], 100
+; IS__CGSCC____-NEXT: ret i1 [[CMP]]
;
%cmp = icmp slt i32 %c, 100
ret i1 %cmp
; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@non_zero
; IS__CGSCC_NPM-SAME: () #[[ATTR1]] {
-; IS__CGSCC_NPM-NEXT: ret i1 undef
+; IS__CGSCC_NPM-NEXT: ret i1 true
;
%r = icmp ne i8 %v, 0
ret i1 %r
; IS__CGSCC____-NEXT: entry:
; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @internal_ret0_nw(i32* nofree [[N0]], i32* nofree [[W0]]) #[[ATTR3:[0-9]+]]
; IS__CGSCC____-NEXT: [[CALL1:%.*]] = call i32* @internal_ret1_rrw(i32* nofree align 4 [[R0]], i32* nofree align 4 [[R0]], i32* nofree [[W0]]) #[[ATTR3]]
-; IS__CGSCC____-NEXT: [[CALL2:%.*]] = call i32* @external_sink_ret2_nrw(i32* nofree [[N0]], i32* nocapture nofree readonly align 4 [[R0]], i32* nofree writeonly "no-capture-maybe-returned" [[W0]]) #[[ATTR4:[0-9]+]]
+; IS__CGSCC____-NEXT: [[CALL2:%.*]] = call i32* @external_sink_ret2_nrw(i32* nofree [[N0]], i32* nocapture nofree readonly [[R0]], i32* nofree writeonly "no-capture-maybe-returned" [[W0]]) #[[ATTR4:[0-9]+]]
; IS__CGSCC____-NEXT: [[CALL3:%.*]] = call i32* @internal_ret1_rw(i32* nofree align 4 [[R0]], i32* nofree [[W0]]) #[[ATTR3]]
; IS__CGSCC____-NEXT: ret i32* [[CALL3]]
;
;
; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind
; IS__CGSCC____-LABEL: define {{[^@]+}}@internal_ret0_nw
-; IS__CGSCC____-SAME: (i32* nofree [[N0:%.*]], i32* nofree [[W0:%.*]]) #[[ATTR0]] {
+; IS__CGSCC____-SAME: (i32* nofree returned [[N0:%.*]], i32* nofree [[W0:%.*]]) #[[ATTR0]] {
; IS__CGSCC____-NEXT: entry:
; IS__CGSCC____-NEXT: [[R0:%.*]] = alloca i32, align 4
; IS__CGSCC____-NEXT: [[R1:%.*]] = alloca i32, align 4
; IS__CGSCC____-NEXT: br label [[RETURN]]
; IS__CGSCC____: return:
; IS__CGSCC____-NEXT: [[RETVAL_0:%.*]] = phi i32* [ [[N0]], [[IF_END]] ], [ [[N0]], [[IF_THEN]] ]
-; IS__CGSCC____-NEXT: ret i32* undef
+; IS__CGSCC____-NEXT: ret i32* [[N0]]
;
entry:
%r0 = alloca i32, align 4
; IS__CGSCC____-NEXT: store i32 [[TMP1]], i32* [[W0]], align 4
; IS__CGSCC____-NEXT: [[CALL1:%.*]] = call i32* @internal_ret0_nw(i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) #[[ATTR3]]
; IS__CGSCC____-NEXT: [[CALL2:%.*]] = call i32* @internal_ret0_nw(i32* nofree nonnull align 4 dereferenceable(4) [[W0]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) #[[ATTR3]]
-; IS__CGSCC____-NEXT: [[CALL3:%.*]] = call i32* @external_sink_ret2_nrw(i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[R0]], i32* nofree nonnull writeonly align 4 dereferenceable(4) "no-capture-maybe-returned" [[W0]]) #[[ATTR5:[0-9]+]]
+; IS__CGSCC____-NEXT: [[CALL3:%.*]] = call i32* @external_sink_ret2_nrw(i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[R0]], i32* nofree nonnull writeonly align 4 dereferenceable(4) "no-capture-maybe-returned" [[W0]]) #[[ATTR4]]
; IS__CGSCC____-NEXT: [[CALL4:%.*]] = call i32* @external_ret2_nrw(i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) #[[ATTR3]]
; IS__CGSCC____-NEXT: br label [[RETURN]]
; IS__CGSCC____: return:
; IS__CGSCC____-LABEL: define {{[^@]+}}@external_source_ret2_nrw
; IS__CGSCC____-SAME: (i32* nofree [[N0:%.*]], i32* nofree [[R0:%.*]], i32* nofree [[W0:%.*]]) #[[ATTR2:[0-9]+]] {
; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @external_sink_ret2_nrw(i32* nofree [[N0]], i32* nocapture nofree readonly [[R0]], i32* nofree writeonly "no-capture-maybe-returned" [[W0]]) #[[ATTR5]]
+; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @external_sink_ret2_nrw(i32* nofree [[N0]], i32* nocapture nofree readonly [[R0]], i32* nofree writeonly "no-capture-maybe-returned" [[W0]]) #[[ATTR5:[0-9]+]]
; IS__CGSCC____-NEXT: [[CALL1:%.*]] = call i32* @external_ret2_nrw(i32* nofree [[N0]], i32* nofree [[R0]], i32* nofree [[W0]]) #[[ATTR4]]
; IS__CGSCC____-NEXT: ret i32* [[CALL1]]
;
}
define i32 @scc_r1(i32 %a, i32 %r, i32 %b) #0 {
-; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable
-; IS__TUNIT____-LABEL: define {{[^@]+}}@scc_r1
-; IS__TUNIT____-SAME: (i32 [[A:%.*]], i32 returned [[R:%.*]], i32 [[B:%.*]]) #[[ATTR1:[0-9]+]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[CALL1:%.*]] = call i32 @scc_r2(i32 [[R]], i32 [[A]], i32 [[R]]) #[[ATTR10:[0-9]+]]
-; IS__TUNIT____-NEXT: ret i32 [[R]]
-;
-; IS__CGSCC____: Function Attrs: nofree noinline nosync nounwind readnone willreturn uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@scc_r1
-; IS__CGSCC____-SAME: (i32 [[A:%.*]], i32 returned [[R:%.*]], i32 [[B:%.*]]) #[[ATTR1:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[CALL1:%.*]] = call i32 @scc_r2(i32 [[R]], i32 [[A]], i32 [[R]]) #[[ATTR9:[0-9]+]]
-; IS__CGSCC____-NEXT: ret i32 [[R]]
+; CHECK: Function Attrs: nofree noinline nosync nounwind readnone uwtable
+; CHECK-LABEL: define {{[^@]+}}@scc_r1
+; CHECK-SAME: (i32 [[A:%.*]], i32 returned [[R:%.*]], i32 [[B:%.*]]) #[[ATTR1:[0-9]+]] {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[CALL1:%.*]] = call i32 @scc_r2(i32 [[R]], i32 [[A]], i32 [[R]]) #[[ATTR10:[0-9]+]]
+; CHECK-NEXT: ret i32 [[R]]
;
entry:
%call = call i32 @sink_r0(i32 %r)
}
define i32 @scc_r2(i32 %a, i32 %b, i32 %r) #0 {
-; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable
-; IS__TUNIT____-LABEL: define {{[^@]+}}@scc_r2
-; IS__TUNIT____-SAME: (i32 [[A:%.*]], i32 [[B:%.*]], i32 returned [[R:%.*]]) #[[ATTR1]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp sgt i32 [[A]], [[B]]
-; IS__TUNIT____-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
-; IS__TUNIT____: if.then:
-; IS__TUNIT____-NEXT: [[CALL1:%.*]] = call i32 @scc_r2(i32 [[B]], i32 [[A]], i32 [[R]]) #[[ATTR10]]
-; IS__TUNIT____-NEXT: br label [[RETURN:%.*]]
-; IS__TUNIT____: if.end:
-; IS__TUNIT____-NEXT: [[CMP2:%.*]] = icmp slt i32 [[A]], [[B]]
-; IS__TUNIT____-NEXT: br i1 [[CMP2]], label [[IF_THEN3:%.*]], label [[IF_END12:%.*]]
-; IS__TUNIT____: if.then3:
-; IS__TUNIT____-NEXT: [[CALL5:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[B]], i32 undef) #[[ATTR10]]
-; IS__TUNIT____-NEXT: [[CALL6:%.*]] = call i32 @scc_r2(i32 [[R]], i32 [[R]], i32 [[R]]) #[[ATTR10]]
-; IS__TUNIT____-NEXT: [[CALL7:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[R]], i32 undef) #[[ATTR10]]
-; IS__TUNIT____-NEXT: [[CALL8:%.*]] = call i32 @scc_r2(i32 [[A]], i32 [[B]], i32 [[R]]) #[[ATTR10]]
-; IS__TUNIT____-NEXT: [[CALL9:%.*]] = call i32 @scc_r2(i32 [[B]], i32 [[R]], i32 [[R]]) #[[ATTR10]]
-; IS__TUNIT____-NEXT: [[CALL11:%.*]] = call i32 @scc_r1(i32 [[B]], i32 [[R]], i32 undef) #[[ATTR10]]
-; IS__TUNIT____-NEXT: br label [[RETURN]]
-; IS__TUNIT____: if.end12:
-; IS__TUNIT____-NEXT: [[CMP13:%.*]] = icmp eq i32 [[A]], [[B]]
-; IS__TUNIT____-NEXT: br i1 [[CMP13]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
-; IS__TUNIT____: cond.true:
-; IS__TUNIT____-NEXT: br label [[COND_END:%.*]]
-; IS__TUNIT____: cond.false:
-; IS__TUNIT____-NEXT: [[CALL14:%.*]] = call i32 @scc_r2(i32 [[A]], i32 [[B]], i32 [[R]]) #[[ATTR10]]
-; IS__TUNIT____-NEXT: br label [[COND_END]]
-; IS__TUNIT____: cond.end:
-; IS__TUNIT____-NEXT: [[COND:%.*]] = phi i32 [ [[R]], [[COND_TRUE]] ], [ [[R]], [[COND_FALSE]] ]
-; IS__TUNIT____-NEXT: br label [[RETURN]]
-; IS__TUNIT____: return:
-; IS__TUNIT____-NEXT: [[RETVAL_0:%.*]] = phi i32 [ [[R]], [[IF_THEN]] ], [ [[R]], [[IF_THEN3]] ], [ [[COND]], [[COND_END]] ]
-; IS__TUNIT____-NEXT: ret i32 [[R]]
-;
-; IS__CGSCC____: Function Attrs: nofree noinline nosync nounwind readnone willreturn uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@scc_r2
-; IS__CGSCC____-SAME: (i32 [[A:%.*]], i32 [[B:%.*]], i32 returned [[R:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp sgt i32 [[A]], [[B]]
-; IS__CGSCC____-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
-; IS__CGSCC____: if.then:
-; IS__CGSCC____-NEXT: [[CALL1:%.*]] = call i32 @scc_r2(i32 [[B]], i32 [[A]], i32 [[R]]) #[[ATTR9]]
-; IS__CGSCC____-NEXT: br label [[RETURN:%.*]]
-; IS__CGSCC____: if.end:
-; IS__CGSCC____-NEXT: [[CMP2:%.*]] = icmp slt i32 [[A]], [[B]]
-; IS__CGSCC____-NEXT: br i1 [[CMP2]], label [[IF_THEN3:%.*]], label [[IF_END12:%.*]]
-; IS__CGSCC____: if.then3:
-; IS__CGSCC____-NEXT: [[CALL5:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[B]], i32 undef) #[[ATTR9]]
-; IS__CGSCC____-NEXT: [[CALL6:%.*]] = call i32 @scc_r2(i32 [[R]], i32 [[R]], i32 [[R]]) #[[ATTR9]]
-; IS__CGSCC____-NEXT: [[CALL7:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[R]], i32 undef) #[[ATTR9]]
-; IS__CGSCC____-NEXT: [[CALL8:%.*]] = call i32 @scc_r2(i32 [[A]], i32 [[B]], i32 [[R]]) #[[ATTR9]]
-; IS__CGSCC____-NEXT: [[CALL9:%.*]] = call i32 @scc_r2(i32 [[B]], i32 [[R]], i32 [[R]]) #[[ATTR9]]
-; IS__CGSCC____-NEXT: [[CALL11:%.*]] = call i32 @scc_r1(i32 [[B]], i32 [[R]], i32 undef) #[[ATTR9]]
-; IS__CGSCC____-NEXT: br label [[RETURN]]
-; IS__CGSCC____: if.end12:
-; IS__CGSCC____-NEXT: [[CMP13:%.*]] = icmp eq i32 [[A]], [[B]]
-; IS__CGSCC____-NEXT: br i1 [[CMP13]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
-; IS__CGSCC____: cond.true:
-; IS__CGSCC____-NEXT: br label [[COND_END:%.*]]
-; IS__CGSCC____: cond.false:
-; IS__CGSCC____-NEXT: [[CALL14:%.*]] = call i32 @scc_r2(i32 [[A]], i32 [[B]], i32 [[R]]) #[[ATTR9]]
-; IS__CGSCC____-NEXT: br label [[COND_END]]
-; IS__CGSCC____: cond.end:
-; IS__CGSCC____-NEXT: [[COND:%.*]] = phi i32 [ [[R]], [[COND_TRUE]] ], [ [[R]], [[COND_FALSE]] ]
-; IS__CGSCC____-NEXT: br label [[RETURN]]
-; IS__CGSCC____: return:
-; IS__CGSCC____-NEXT: [[RETVAL_0:%.*]] = phi i32 [ [[R]], [[IF_THEN]] ], [ [[R]], [[IF_THEN3]] ], [ [[COND]], [[COND_END]] ]
-; IS__CGSCC____-NEXT: ret i32 [[R]]
+; CHECK: Function Attrs: nofree noinline nosync nounwind readnone uwtable
+; CHECK-LABEL: define {{[^@]+}}@scc_r2
+; CHECK-SAME: (i32 [[A:%.*]], i32 [[B:%.*]], i32 returned [[R:%.*]]) #[[ATTR1]] {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[CMP:%.*]] = icmp sgt i32 [[A]], [[B]]
+; CHECK-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
+; CHECK: if.then:
+; CHECK-NEXT: [[CALL1:%.*]] = call i32 @scc_r2(i32 [[B]], i32 [[A]], i32 [[R]]) #[[ATTR10]]
+; CHECK-NEXT: br label [[RETURN:%.*]]
+; CHECK: if.end:
+; CHECK-NEXT: [[CMP2:%.*]] = icmp slt i32 [[A]], [[B]]
+; CHECK-NEXT: br i1 [[CMP2]], label [[IF_THEN3:%.*]], label [[IF_END12:%.*]]
+; CHECK: if.then3:
+; CHECK-NEXT: [[CALL5:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[B]], i32 undef) #[[ATTR10]]
+; CHECK-NEXT: [[CALL6:%.*]] = call i32 @scc_r2(i32 [[R]], i32 [[R]], i32 [[R]]) #[[ATTR10]]
+; CHECK-NEXT: [[CALL7:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[R]], i32 undef) #[[ATTR10]]
+; CHECK-NEXT: [[CALL8:%.*]] = call i32 @scc_r2(i32 [[A]], i32 [[B]], i32 [[R]]) #[[ATTR10]]
+; CHECK-NEXT: [[CALL9:%.*]] = call i32 @scc_r2(i32 [[B]], i32 [[R]], i32 [[R]]) #[[ATTR10]]
+; CHECK-NEXT: [[CALL11:%.*]] = call i32 @scc_r1(i32 [[B]], i32 [[R]], i32 undef) #[[ATTR10]]
+; CHECK-NEXT: br label [[RETURN]]
+; CHECK: if.end12:
+; CHECK-NEXT: [[CMP13:%.*]] = icmp eq i32 [[A]], [[B]]
+; CHECK-NEXT: br i1 [[CMP13]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
+; CHECK: cond.true:
+; CHECK-NEXT: br label [[COND_END:%.*]]
+; CHECK: cond.false:
+; CHECK-NEXT: [[CALL14:%.*]] = call i32 @scc_r2(i32 [[A]], i32 [[B]], i32 [[R]]) #[[ATTR10]]
+; CHECK-NEXT: br label [[COND_END]]
+; CHECK: cond.end:
+; CHECK-NEXT: [[COND:%.*]] = phi i32 [ [[R]], [[COND_TRUE]] ], [ [[R]], [[COND_FALSE]] ]
+; CHECK-NEXT: br label [[RETURN]]
+; CHECK: return:
+; CHECK-NEXT: [[RETVAL_0:%.*]] = phi i32 [ [[R]], [[IF_THEN]] ], [ [[R]], [[IF_THEN3]] ], [ [[COND]], [[COND_END]] ]
+; CHECK-NEXT: ret i32 [[R]]
;
entry:
%cmp = icmp sgt i32 %a, %b
; IS__TUNIT____-NEXT: [[RETVAL_0:%.*]] = phi i32 [ [[R]], [[IF_THEN]] ], [ [[B]], [[IF_THEN3]] ], [ [[COND]], [[COND_END]] ]
; IS__TUNIT____-NEXT: ret i32 [[RETVAL_0]]
;
-; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone willreturn uwtable
+; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable
; IS__CGSCC____-LABEL: define {{[^@]+}}@scc_rX
-; IS__CGSCC____-SAME: (i32 [[A:%.*]], i32 [[B:%.*]], i32 [[R:%.*]]) #[[ATTR0]] {
+; IS__CGSCC____-SAME: (i32 [[A:%.*]], i32 [[B:%.*]], i32 [[R:%.*]]) #[[ATTR2:[0-9]+]] {
; IS__CGSCC____-NEXT: entry:
; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp sgt i32 [[A]], [[B]]
; IS__CGSCC____-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
; IS__CGSCC____: if.then:
+; IS__CGSCC____-NEXT: [[CALL1:%.*]] = call i32 @scc_r2(i32 [[B]], i32 [[A]], i32 [[R]]) #[[ATTR11:[0-9]+]]
; IS__CGSCC____-NEXT: br label [[RETURN:%.*]]
; IS__CGSCC____: if.end:
; IS__CGSCC____-NEXT: [[CMP2:%.*]] = icmp slt i32 [[A]], [[B]]
; IS__CGSCC____-NEXT: br i1 [[CMP2]], label [[IF_THEN3:%.*]], label [[IF_END12:%.*]]
; IS__CGSCC____: if.then3:
+; IS__CGSCC____-NEXT: [[CALL5:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[B]], i32 [[R]]) #[[ATTR11]]
+; IS__CGSCC____-NEXT: [[CALL6:%.*]] = call i32 @scc_r2(i32 [[R]], i32 [[R]], i32 [[R]]) #[[ATTR11]]
+; IS__CGSCC____-NEXT: [[CALL7:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[R]], i32 [[R]]) #[[ATTR11]]
+; IS__CGSCC____-NEXT: [[CALL8:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[B]], i32 [[R]]) #[[ATTR11]]
+; IS__CGSCC____-NEXT: [[CALL9:%.*]] = call i32 @scc_r2(i32 [[B]], i32 [[R]], i32 [[B]]) #[[ATTR11]]
+; IS__CGSCC____-NEXT: [[CALL10:%.*]] = call i32 @scc_r1(i32 [[A]], i32 [[B]], i32 [[R]]) #[[ATTR11]]
+; IS__CGSCC____-NEXT: [[CALL11:%.*]] = call i32 @scc_r1(i32 [[B]], i32 [[B]], i32 [[B]]) #[[ATTR11]]
; IS__CGSCC____-NEXT: br label [[RETURN]]
; IS__CGSCC____: if.end12:
; IS__CGSCC____-NEXT: [[CMP13:%.*]] = icmp eq i32 [[A]], [[B]]
; IS__CGSCC____: cond.true:
; IS__CGSCC____-NEXT: br label [[COND_END:%.*]]
; IS__CGSCC____: cond.false:
+; IS__CGSCC____-NEXT: [[CALL14:%.*]] = call i32 @scc_r2(i32 [[A]], i32 [[B]], i32 [[R]]) #[[ATTR11]]
; IS__CGSCC____-NEXT: br label [[COND_END]]
; IS__CGSCC____: cond.end:
; IS__CGSCC____-NEXT: [[COND:%.*]] = phi i32 [ [[R]], [[COND_TRUE]] ], [ [[R]], [[COND_FALSE]] ]
}
define double* @ptr_scc_r1(double* %a, double* %r, double* %b) #0 {
-; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable
-; IS__TUNIT____-LABEL: define {{[^@]+}}@ptr_scc_r1
-; IS__TUNIT____-SAME: (double* nocapture nofree readnone [[A:%.*]], double* nofree readnone returned "no-capture-maybe-returned" [[R:%.*]], double* nocapture nofree readnone [[B:%.*]]) #[[ATTR1]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[CALL1:%.*]] = call double* @ptr_scc_r2(double* noalias nocapture nofree readnone [[R]], double* noalias nocapture nofree readnone [[A]], double* noalias nofree readnone "no-capture-maybe-returned" [[R]]) #[[ATTR10]]
-; IS__TUNIT____-NEXT: ret double* [[R]]
-;
-; IS__CGSCC____: Function Attrs: nofree noinline nosync nounwind readnone uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@ptr_scc_r1
-; IS__CGSCC____-SAME: (double* nocapture nofree readnone [[A:%.*]], double* nofree readnone returned "no-capture-maybe-returned" [[R:%.*]], double* nocapture nofree readnone [[B:%.*]]) #[[ATTR2:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[CALL1:%.*]] = call double* @ptr_scc_r2(double* noalias nocapture nofree readnone [[R]], double* noalias nocapture nofree readnone [[A]], double* noalias nofree readnone "no-capture-maybe-returned" [[R]]) #[[ATTR9]]
-; IS__CGSCC____-NEXT: ret double* [[R]]
+; CHECK: Function Attrs: nofree noinline nosync nounwind readnone uwtable
+; CHECK-LABEL: define {{[^@]+}}@ptr_scc_r1
+; CHECK-SAME: (double* nocapture nofree readnone [[A:%.*]], double* nofree readnone returned "no-capture-maybe-returned" [[R:%.*]], double* nocapture nofree readnone [[B:%.*]]) #[[ATTR1]] {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[CALL1:%.*]] = call double* @ptr_scc_r2(double* noalias nocapture nofree readnone [[R]], double* noalias nocapture nofree readnone [[A]], double* noalias nofree readnone "no-capture-maybe-returned" [[R]]) #[[ATTR10]]
+; CHECK-NEXT: ret double* [[R]]
;
entry:
%call = call double* @ptr_sink_r0(double* %r)
}
define double* @ptr_scc_r2(double* %a, double* %b, double* %r) #0 {
-; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable
-; IS__TUNIT____-LABEL: define {{[^@]+}}@ptr_scc_r2
-; IS__TUNIT____-SAME: (double* nocapture nofree readnone [[A:%.*]], double* nocapture nofree readnone [[B:%.*]], double* nofree readnone returned "no-capture-maybe-returned" [[R:%.*]]) #[[ATTR1]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp ugt double* [[A]], [[B]]
-; IS__TUNIT____-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
-; IS__TUNIT____: if.then:
-; IS__TUNIT____-NEXT: [[CALL1:%.*]] = call double* @ptr_scc_r2(double* noalias nocapture nofree readnone [[B]], double* noalias nocapture nofree readnone [[A]], double* noalias nofree readnone "no-capture-maybe-returned" [[R]]) #[[ATTR10]]
-; IS__TUNIT____-NEXT: br label [[RETURN:%.*]]
-; IS__TUNIT____: if.end:
-; IS__TUNIT____-NEXT: [[CMP2:%.*]] = icmp ult double* [[A]], [[B]]
-; IS__TUNIT____-NEXT: br i1 [[CMP2]], label [[IF_THEN3:%.*]], label [[IF_END12:%.*]]
-; IS__TUNIT____: if.then3:
-; IS__TUNIT____-NEXT: [[CALL5:%.*]] = call double* @ptr_scc_r1(double* noalias nocapture nofree readnone [[A]], double* noalias nofree readnone "no-capture-maybe-returned" [[B]], double* noalias nocapture nofree readnone undef) #[[ATTR10]]
-; IS__TUNIT____-NEXT: [[CALL6:%.*]] = call double* @ptr_scc_r2(double* noalias nocapture nofree readnone [[R]], double* noalias nocapture nofree readnone [[R]], double* noalias nofree readnone "no-capture-maybe-returned" [[R]]) #[[ATTR10]]
-; IS__TUNIT____-NEXT: [[CALL7:%.*]] = call double* @ptr_scc_r1(double* noalias nocapture nofree readnone [[A]], double* noalias nofree readnone "no-capture-maybe-returned" [[R]], double* noalias nocapture nofree readnone undef) #[[ATTR10]]
-; IS__TUNIT____-NEXT: [[CALL8:%.*]] = call double* @ptr_scc_r2(double* noalias nocapture nofree readnone [[A]], double* noalias nocapture nofree readnone [[B]], double* noalias nofree readnone "no-capture-maybe-returned" [[R]]) #[[ATTR10]]
-; IS__TUNIT____-NEXT: [[CALL9:%.*]] = call double* @ptr_scc_r2(double* noalias nocapture nofree readnone [[B]], double* noalias nocapture nofree readnone [[R]], double* noalias nofree readnone "no-capture-maybe-returned" [[R]]) #[[ATTR10]]
-; IS__TUNIT____-NEXT: [[CALL11:%.*]] = call double* @ptr_scc_r1(double* noalias nocapture nofree readnone [[B]], double* noalias nofree readnone "no-capture-maybe-returned" [[R]], double* noalias nocapture nofree readnone undef) #[[ATTR10]]
-; IS__TUNIT____-NEXT: br label [[RETURN]]
-; IS__TUNIT____: if.end12:
-; IS__TUNIT____-NEXT: [[CMP13:%.*]] = icmp eq double* [[A]], [[B]]
-; IS__TUNIT____-NEXT: br i1 [[CMP13]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
-; IS__TUNIT____: cond.true:
-; IS__TUNIT____-NEXT: br label [[COND_END:%.*]]
-; IS__TUNIT____: cond.false:
-; IS__TUNIT____-NEXT: [[CALL14:%.*]] = call double* @ptr_scc_r2(double* noalias nocapture nofree readnone [[A]], double* noalias nocapture nofree readnone [[B]], double* noalias nofree readnone "no-capture-maybe-returned" [[R]]) #[[ATTR10]]
-; IS__TUNIT____-NEXT: br label [[COND_END]]
-; IS__TUNIT____: cond.end:
-; IS__TUNIT____-NEXT: [[COND:%.*]] = phi double* [ [[R]], [[COND_TRUE]] ], [ [[R]], [[COND_FALSE]] ]
-; IS__TUNIT____-NEXT: br label [[RETURN]]
-; IS__TUNIT____: return:
-; IS__TUNIT____-NEXT: [[RETVAL_0:%.*]] = phi double* [ [[R]], [[IF_THEN]] ], [ [[R]], [[IF_THEN3]] ], [ [[COND]], [[COND_END]] ]
-; IS__TUNIT____-NEXT: ret double* [[R]]
-;
-; IS__CGSCC____: Function Attrs: nofree noinline nosync nounwind readnone uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@ptr_scc_r2
-; IS__CGSCC____-SAME: (double* nocapture nofree readnone [[A:%.*]], double* nocapture nofree readnone [[B:%.*]], double* nofree readnone returned "no-capture-maybe-returned" [[R:%.*]]) #[[ATTR2]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp ugt double* [[A]], [[B]]
-; IS__CGSCC____-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
-; IS__CGSCC____: if.then:
-; IS__CGSCC____-NEXT: [[CALL1:%.*]] = call double* @ptr_scc_r2(double* noalias nocapture nofree readnone [[B]], double* noalias nocapture nofree readnone [[A]], double* noalias nofree readnone "no-capture-maybe-returned" [[R]]) #[[ATTR9]]
-; IS__CGSCC____-NEXT: br label [[RETURN:%.*]]
-; IS__CGSCC____: if.end:
-; IS__CGSCC____-NEXT: [[CMP2:%.*]] = icmp ult double* [[A]], [[B]]
-; IS__CGSCC____-NEXT: br i1 [[CMP2]], label [[IF_THEN3:%.*]], label [[IF_END12:%.*]]
-; IS__CGSCC____: if.then3:
-; IS__CGSCC____-NEXT: [[CALL5:%.*]] = call double* @ptr_scc_r1(double* noalias nocapture nofree readnone [[A]], double* noalias nofree readnone "no-capture-maybe-returned" [[B]], double* noalias nocapture nofree readnone undef) #[[ATTR9]]
-; IS__CGSCC____-NEXT: [[CALL6:%.*]] = call double* @ptr_scc_r2(double* noalias nocapture nofree readnone [[R]], double* noalias nocapture nofree readnone [[R]], double* noalias nofree readnone "no-capture-maybe-returned" [[R]]) #[[ATTR9]]
-; IS__CGSCC____-NEXT: [[CALL7:%.*]] = call double* @ptr_scc_r1(double* noalias nocapture nofree readnone [[A]], double* noalias nofree readnone "no-capture-maybe-returned" [[R]], double* noalias nocapture nofree readnone undef) #[[ATTR9]]
-; IS__CGSCC____-NEXT: [[CALL8:%.*]] = call double* @ptr_scc_r2(double* noalias nocapture nofree readnone [[A]], double* noalias nocapture nofree readnone [[B]], double* noalias nofree readnone "no-capture-maybe-returned" [[R]]) #[[ATTR9]]
-; IS__CGSCC____-NEXT: [[CALL9:%.*]] = call double* @ptr_scc_r2(double* noalias nocapture nofree readnone [[B]], double* noalias nocapture nofree readnone [[R]], double* noalias nofree readnone "no-capture-maybe-returned" [[R]]) #[[ATTR9]]
-; IS__CGSCC____-NEXT: [[CALL11:%.*]] = call double* @ptr_scc_r1(double* noalias nocapture nofree readnone [[B]], double* noalias nofree readnone "no-capture-maybe-returned" [[R]], double* noalias nocapture nofree readnone undef) #[[ATTR9]]
-; IS__CGSCC____-NEXT: br label [[RETURN]]
-; IS__CGSCC____: if.end12:
-; IS__CGSCC____-NEXT: [[CMP13:%.*]] = icmp eq double* [[A]], [[B]]
-; IS__CGSCC____-NEXT: br i1 [[CMP13]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
-; IS__CGSCC____: cond.true:
-; IS__CGSCC____-NEXT: br label [[COND_END:%.*]]
-; IS__CGSCC____: cond.false:
-; IS__CGSCC____-NEXT: [[CALL14:%.*]] = call double* @ptr_scc_r2(double* noalias nocapture nofree readnone [[A]], double* noalias nocapture nofree readnone [[B]], double* noalias nofree readnone "no-capture-maybe-returned" [[R]]) #[[ATTR9]]
-; IS__CGSCC____-NEXT: br label [[COND_END]]
-; IS__CGSCC____: cond.end:
-; IS__CGSCC____-NEXT: [[COND:%.*]] = phi double* [ [[R]], [[COND_TRUE]] ], [ [[R]], [[COND_FALSE]] ]
-; IS__CGSCC____-NEXT: br label [[RETURN]]
-; IS__CGSCC____: return:
-; IS__CGSCC____-NEXT: [[RETVAL_0:%.*]] = phi double* [ [[R]], [[IF_THEN]] ], [ [[R]], [[IF_THEN3]] ], [ [[COND]], [[COND_END]] ]
-; IS__CGSCC____-NEXT: ret double* [[R]]
+; CHECK: Function Attrs: nofree noinline nosync nounwind readnone uwtable
+; CHECK-LABEL: define {{[^@]+}}@ptr_scc_r2
+; CHECK-SAME: (double* nocapture nofree readnone [[A:%.*]], double* nocapture nofree readnone [[B:%.*]], double* nofree readnone returned "no-capture-maybe-returned" [[R:%.*]]) #[[ATTR1]] {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[CMP:%.*]] = icmp ugt double* [[A]], [[B]]
+; CHECK-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
+; CHECK: if.then:
+; CHECK-NEXT: [[CALL1:%.*]] = call double* @ptr_scc_r2(double* noalias nocapture nofree readnone [[B]], double* noalias nocapture nofree readnone [[A]], double* noalias nofree readnone "no-capture-maybe-returned" [[R]]) #[[ATTR10]]
+; CHECK-NEXT: br label [[RETURN:%.*]]
+; CHECK: if.end:
+; CHECK-NEXT: [[CMP2:%.*]] = icmp ult double* [[A]], [[B]]
+; CHECK-NEXT: br i1 [[CMP2]], label [[IF_THEN3:%.*]], label [[IF_END12:%.*]]
+; CHECK: if.then3:
+; CHECK-NEXT: [[CALL5:%.*]] = call double* @ptr_scc_r1(double* noalias nocapture nofree readnone [[A]], double* noalias nofree readnone "no-capture-maybe-returned" [[B]], double* noalias nocapture nofree readnone undef) #[[ATTR10]]
+; CHECK-NEXT: [[CALL6:%.*]] = call double* @ptr_scc_r2(double* noalias nocapture nofree readnone [[R]], double* noalias nocapture nofree readnone [[R]], double* noalias nofree readnone "no-capture-maybe-returned" [[R]]) #[[ATTR10]]
+; CHECK-NEXT: [[CALL7:%.*]] = call double* @ptr_scc_r1(double* noalias nocapture nofree readnone [[A]], double* noalias nofree readnone "no-capture-maybe-returned" [[R]], double* noalias nocapture nofree readnone undef) #[[ATTR10]]
+; CHECK-NEXT: [[CALL8:%.*]] = call double* @ptr_scc_r2(double* noalias nocapture nofree readnone [[A]], double* noalias nocapture nofree readnone [[B]], double* noalias nofree readnone "no-capture-maybe-returned" [[R]]) #[[ATTR10]]
+; CHECK-NEXT: [[CALL9:%.*]] = call double* @ptr_scc_r2(double* noalias nocapture nofree readnone [[B]], double* noalias nocapture nofree readnone [[R]], double* noalias nofree readnone "no-capture-maybe-returned" [[R]]) #[[ATTR10]]
+; CHECK-NEXT: [[CALL11:%.*]] = call double* @ptr_scc_r1(double* noalias nocapture nofree readnone [[B]], double* noalias nofree readnone "no-capture-maybe-returned" [[R]], double* noalias nocapture nofree readnone undef) #[[ATTR10]]
+; CHECK-NEXT: br label [[RETURN]]
+; CHECK: if.end12:
+; CHECK-NEXT: [[CMP13:%.*]] = icmp eq double* [[A]], [[B]]
+; CHECK-NEXT: br i1 [[CMP13]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
+; CHECK: cond.true:
+; CHECK-NEXT: br label [[COND_END:%.*]]
+; CHECK: cond.false:
+; CHECK-NEXT: [[CALL14:%.*]] = call double* @ptr_scc_r2(double* noalias nocapture nofree readnone [[A]], double* noalias nocapture nofree readnone [[B]], double* noalias nofree readnone "no-capture-maybe-returned" [[R]]) #[[ATTR10]]
+; CHECK-NEXT: br label [[COND_END]]
+; CHECK: cond.end:
+; CHECK-NEXT: [[COND:%.*]] = phi double* [ [[R]], [[COND_TRUE]] ], [ [[R]], [[COND_FALSE]] ]
+; CHECK-NEXT: br label [[RETURN]]
+; CHECK: return:
+; CHECK-NEXT: [[RETVAL_0:%.*]] = phi double* [ [[R]], [[IF_THEN]] ], [ [[R]], [[IF_THEN3]] ], [ [[COND]], [[COND_END]] ]
+; CHECK-NEXT: ret double* [[R]]
;
entry:
%cmp = icmp ugt double* %a, %b
; IS__CGSCC____-LABEL: define {{[^@]+}}@rt0
; IS__CGSCC____-SAME: (i32* nofree noundef nonnull readonly returned align 4 dereferenceable(4) "no-capture-maybe-returned" [[A:%.*]]) #[[ATTR3:[0-9]+]] {
; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @rt0(i32* nofree noundef nonnull readonly align 4 dereferenceable(4) "no-capture-maybe-returned" [[A]]) #[[ATTR10:[0-9]+]]
+; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @rt0(i32* nofree noundef nonnull readonly align 4 dereferenceable(4) "no-capture-maybe-returned" [[A]]) #[[ATTR12:[0-9]+]]
; IS__CGSCC____-NEXT: ret i32* [[A]]
;
entry:
; }
;
define i32* @rt1(i32* %a) #0 {
-; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone willreturn uwtable
-; IS__TUNIT____-LABEL: define {{[^@]+}}@rt1
-; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR4:[0-9]+]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: ret i32* undef
-;
-; IS__CGSCC____: Function Attrs: nofree noinline nosync nounwind readnone willreturn uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@rt1
-; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: ret i32* undef
+; CHECK: Function Attrs: nofree noinline nosync nounwind readnone willreturn uwtable
+; CHECK-LABEL: define {{[^@]+}}@rt1
+; CHECK-SAME: (i32* nocapture nofree nonnull readnone align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR4:[0-9]+]] {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: ret i32* undef
;
entry:
%v = load i32, i32* %a, align 4
; TEST another SCC test
;
define i32* @rt2_helper(i32* %a) #0 {
-; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable
-; IS__TUNIT____-LABEL: define {{[^@]+}}@rt2_helper
-; IS__TUNIT____-SAME: (i32* nofree readnone returned [[A:%.*]]) #[[ATTR1]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32* @rt2(i32* noalias nofree readnone [[A]], i32* noalias nofree readnone "no-capture-maybe-returned" [[A]]) #[[ATTR10]]
-; IS__TUNIT____-NEXT: ret i32* [[A]]
-;
-; IS__CGSCC____: Function Attrs: nofree noinline nosync nounwind readnone uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@rt2_helper
-; IS__CGSCC____-SAME: (i32* nofree readnone returned [[A:%.*]]) #[[ATTR2]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @rt2(i32* noalias nofree readnone [[A]], i32* noalias nofree readnone "no-capture-maybe-returned" [[A]]) #[[ATTR9]]
-; IS__CGSCC____-NEXT: ret i32* [[A]]
+; CHECK: Function Attrs: nofree noinline nosync nounwind readnone uwtable
+; CHECK-LABEL: define {{[^@]+}}@rt2_helper
+; CHECK-SAME: (i32* nofree readnone returned [[A:%.*]]) #[[ATTR1]] {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[CALL:%.*]] = call i32* @rt2(i32* noalias nofree readnone [[A]], i32* noalias nofree readnone "no-capture-maybe-returned" [[A]]) #[[ATTR10]]
+; CHECK-NEXT: ret i32* [[A]]
;
entry:
%call = call i32* @rt2(i32* %a, i32* %a)
}
define i32* @rt2(i32* %a, i32 *%b) #0 {
-; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable
-; IS__TUNIT____-LABEL: define {{[^@]+}}@rt2
-; IS__TUNIT____-SAME: (i32* nofree readnone [[A:%.*]], i32* nofree readnone "no-capture-maybe-returned" [[B:%.*]]) #[[ATTR1]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp eq i32* [[A]], null
-; IS__TUNIT____-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
-; IS__TUNIT____: if.then:
-; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32* @rt2_helper(i32* noalias nofree readnone [[A]]) #[[ATTR10]]
-; IS__TUNIT____-NEXT: br label [[IF_END]]
-; IS__TUNIT____: if.end:
-; IS__TUNIT____-NEXT: [[SEL:%.*]] = phi i32* [ [[B]], [[ENTRY:%.*]] ], [ [[A]], [[IF_THEN]] ]
-; IS__TUNIT____-NEXT: ret i32* [[SEL]]
-;
-; IS__CGSCC____: Function Attrs: nofree noinline nosync nounwind readnone uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@rt2
-; IS__CGSCC____-SAME: (i32* nofree readnone [[A:%.*]], i32* nofree readnone "no-capture-maybe-returned" [[B:%.*]]) #[[ATTR2]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp eq i32* [[A]], null
-; IS__CGSCC____-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
-; IS__CGSCC____: if.then:
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @rt2_helper(i32* noalias nofree readnone [[A]]) #[[ATTR9]]
-; IS__CGSCC____-NEXT: br label [[IF_END]]
-; IS__CGSCC____: if.end:
-; IS__CGSCC____-NEXT: [[SEL:%.*]] = phi i32* [ [[B]], [[ENTRY:%.*]] ], [ [[A]], [[IF_THEN]] ]
-; IS__CGSCC____-NEXT: ret i32* [[SEL]]
+; CHECK: Function Attrs: nofree noinline nosync nounwind readnone uwtable
+; CHECK-LABEL: define {{[^@]+}}@rt2
+; CHECK-SAME: (i32* nofree readnone [[A:%.*]], i32* nofree readnone "no-capture-maybe-returned" [[B:%.*]]) #[[ATTR1]] {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[CMP:%.*]] = icmp eq i32* [[A]], null
+; CHECK-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
+; CHECK: if.then:
+; CHECK-NEXT: [[CALL:%.*]] = call i32* @rt2_helper(i32* noalias nofree readnone [[A]]) #[[ATTR10]]
+; CHECK-NEXT: br label [[IF_END]]
+; CHECK: if.end:
+; CHECK-NEXT: [[SEL:%.*]] = phi i32* [ [[B]], [[ENTRY:%.*]] ], [ [[A]], [[IF_THEN]] ]
+; CHECK-NEXT: ret i32* [[SEL]]
;
entry:
%cmp = icmp eq i32* %a, null
; TEST another SCC test
;
define i32* @rt3_helper(i32* %a, i32* %b) #0 {
-; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable
-; IS__TUNIT____-LABEL: define {{[^@]+}}@rt3_helper
-; IS__TUNIT____-SAME: (i32* nocapture nofree readnone [[A:%.*]], i32* nofree readnone returned "no-capture-maybe-returned" [[B:%.*]]) #[[ATTR1]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32* @rt3(i32* noalias nocapture nofree readnone [[A]], i32* noalias nofree readnone "no-capture-maybe-returned" [[B]]) #[[ATTR10]]
-; IS__TUNIT____-NEXT: ret i32* [[B]]
-;
-; IS__CGSCC____: Function Attrs: nofree noinline nosync nounwind readnone uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@rt3_helper
-; IS__CGSCC____-SAME: (i32* nocapture nofree readnone [[A:%.*]], i32* nofree readnone returned "no-capture-maybe-returned" [[B:%.*]]) #[[ATTR2]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @rt3(i32* noalias nocapture nofree readnone [[A]], i32* noalias nofree readnone "no-capture-maybe-returned" [[B]]) #[[ATTR9]]
-; IS__CGSCC____-NEXT: ret i32* [[B]]
+; CHECK: Function Attrs: nofree noinline nosync nounwind readnone uwtable
+; CHECK-LABEL: define {{[^@]+}}@rt3_helper
+; CHECK-SAME: (i32* nocapture nofree readnone [[A:%.*]], i32* nofree readnone returned "no-capture-maybe-returned" [[B:%.*]]) #[[ATTR1]] {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[CALL:%.*]] = call i32* @rt3(i32* noalias nocapture nofree readnone [[A]], i32* noalias nofree readnone "no-capture-maybe-returned" [[B]]) #[[ATTR10]]
+; CHECK-NEXT: ret i32* [[B]]
;
entry:
%call = call i32* @rt3(i32* %a, i32* %b)
}
define i32* @rt3(i32* %a, i32 *%b) #0 {
-; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable
-; IS__TUNIT____-LABEL: define {{[^@]+}}@rt3
-; IS__TUNIT____-SAME: (i32* nocapture nofree readnone [[A:%.*]], i32* nofree readnone returned "no-capture-maybe-returned" [[B:%.*]]) #[[ATTR1]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp eq i32* [[A]], null
-; IS__TUNIT____-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
-; IS__TUNIT____: if.then:
-; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32* @rt3_helper(i32* noalias nocapture nofree readnone [[A]], i32* noalias nofree readnone "no-capture-maybe-returned" [[B]]) #[[ATTR10]]
-; IS__TUNIT____-NEXT: br label [[IF_END]]
-; IS__TUNIT____: if.end:
-; IS__TUNIT____-NEXT: [[SEL:%.*]] = phi i32* [ [[B]], [[ENTRY:%.*]] ], [ [[B]], [[IF_THEN]] ]
-; IS__TUNIT____-NEXT: ret i32* [[B]]
-;
-; IS__CGSCC____: Function Attrs: nofree noinline nosync nounwind readnone uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@rt3
-; IS__CGSCC____-SAME: (i32* nocapture nofree readnone [[A:%.*]], i32* nofree readnone returned "no-capture-maybe-returned" [[B:%.*]]) #[[ATTR2]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp eq i32* [[A]], null
-; IS__CGSCC____-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
-; IS__CGSCC____: if.then:
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @rt3_helper(i32* noalias nocapture nofree readnone [[A]], i32* noalias nofree readnone "no-capture-maybe-returned" [[B]]) #[[ATTR9]]
-; IS__CGSCC____-NEXT: br label [[IF_END]]
-; IS__CGSCC____: if.end:
-; IS__CGSCC____-NEXT: [[SEL:%.*]] = phi i32* [ [[B]], [[ENTRY:%.*]] ], [ [[B]], [[IF_THEN]] ]
-; IS__CGSCC____-NEXT: ret i32* [[B]]
+; CHECK: Function Attrs: nofree noinline nosync nounwind readnone uwtable
+; CHECK-LABEL: define {{[^@]+}}@rt3
+; CHECK-SAME: (i32* nocapture nofree readnone [[A:%.*]], i32* nofree readnone returned "no-capture-maybe-returned" [[B:%.*]]) #[[ATTR1]] {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[CMP:%.*]] = icmp eq i32* [[A]], null
+; CHECK-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
+; CHECK: if.then:
+; CHECK-NEXT: [[CALL:%.*]] = call i32* @rt3_helper(i32* noalias nocapture nofree readnone [[A]], i32* noalias nofree readnone "no-capture-maybe-returned" [[B]]) #[[ATTR10]]
+; CHECK-NEXT: br label [[IF_END]]
+; CHECK: if.end:
+; CHECK-NEXT: [[SEL:%.*]] = phi i32* [ [[B]], [[ENTRY:%.*]] ], [ [[B]], [[IF_THEN]] ]
+; CHECK-NEXT: ret i32* [[B]]
;
entry:
%cmp = icmp eq i32* %a, null
;
; IS__CGSCC____: Function Attrs: noinline nounwind uwtable
; IS__CGSCC____-LABEL: define {{[^@]+}}@calls_unknown_fn
-; IS__CGSCC____-SAME: (i32* nofree readnone returned "no-capture-maybe-returned" [[R:%.*]]) #[[ATTR4:[0-9]+]] {
-; IS__CGSCC____-NEXT: tail call void @unknown_fn(i32* (i32*)* noundef nonnull @calls_unknown_fn) #[[ATTR11:[0-9]+]]
+; IS__CGSCC____-SAME: (i32* nofree readnone returned "no-capture-maybe-returned" [[R:%.*]]) #[[ATTR5:[0-9]+]] {
+; IS__CGSCC____-NEXT: tail call void @unknown_fn(i32* (i32*)* noundef nonnull @calls_unknown_fn) #[[ATTR13:[0-9]+]]
; IS__CGSCC____-NEXT: ret i32* [[R]]
;
tail call void @unknown_fn(i32* (i32*)* nonnull @calls_unknown_fn)
; Verify the maybe-redefined function is not annotated:
;
define linkonce_odr i32* @maybe_redefined_fn(i32* %r) #0 {
-; IS__TUNIT____: Function Attrs: noinline nounwind uwtable
-; IS__TUNIT____-LABEL: define {{[^@]+}}@maybe_redefined_fn
-; IS__TUNIT____-SAME: (i32* [[R:%.*]]) #[[ATTR5]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: ret i32* [[R]]
-;
-; IS__CGSCC____: Function Attrs: noinline nounwind uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@maybe_redefined_fn
-; IS__CGSCC____-SAME: (i32* [[R:%.*]]) #[[ATTR4]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: ret i32* [[R]]
+; CHECK: Function Attrs: noinline nounwind uwtable
+; CHECK-LABEL: define {{[^@]+}}@maybe_redefined_fn
+; CHECK-SAME: (i32* [[R:%.*]]) #[[ATTR5:[0-9]+]] {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: ret i32* [[R]]
;
entry:
ret i32* %r
;
; IS__CGSCC____: Function Attrs: noinline norecurse nounwind uwtable
; IS__CGSCC____-LABEL: define {{[^@]+}}@calls_maybe_redefined_fn
-; IS__CGSCC____-SAME: (i32* returned [[R:%.*]]) #[[ATTR5:[0-9]+]] {
+; IS__CGSCC____-SAME: (i32* returned [[R:%.*]]) #[[ATTR6:[0-9]+]] {
; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @maybe_redefined_fn(i32* [[R]]) #[[ATTR11]]
+; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @maybe_redefined_fn(i32* [[R]]) #[[ATTR13]]
; IS__CGSCC____-NEXT: ret i32* [[R]]
;
entry:
; Verify the maybe-redefined function is not annotated:
;
define linkonce_odr i32* @maybe_redefined_fn2(i32* %r) #0 {
-; IS__TUNIT____: Function Attrs: noinline nounwind uwtable
-; IS__TUNIT____-LABEL: define {{[^@]+}}@maybe_redefined_fn2
-; IS__TUNIT____-SAME: (i32* [[R:%.*]]) #[[ATTR5]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: ret i32* [[R]]
-;
-; IS__CGSCC____: Function Attrs: noinline nounwind uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@maybe_redefined_fn2
-; IS__CGSCC____-SAME: (i32* [[R:%.*]]) #[[ATTR4]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: ret i32* [[R]]
+; CHECK: Function Attrs: noinline nounwind uwtable
+; CHECK-LABEL: define {{[^@]+}}@maybe_redefined_fn2
+; CHECK-SAME: (i32* [[R:%.*]]) #[[ATTR5]] {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: ret i32* [[R]]
;
entry:
ret i32* %r
;
; IS__CGSCC____: Function Attrs: noinline norecurse nounwind uwtable
; IS__CGSCC____-LABEL: define {{[^@]+}}@calls_maybe_redefined_fn2
-; IS__CGSCC____-SAME: (i32* [[R:%.*]]) #[[ATTR5]] {
+; IS__CGSCC____-SAME: (i32* [[R:%.*]]) #[[ATTR6]] {
; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @maybe_redefined_fn2(i32* [[R]]) #[[ATTR11]]
+; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @maybe_redefined_fn2(i32* [[R]]) #[[ATTR13]]
; IS__CGSCC____-NEXT: ret i32* [[CALL]]
;
entry:
; }
;
define double @recursion_select_and_phi(i32 %a, double %b) #0 {
-; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable
-; IS__TUNIT____-LABEL: define {{[^@]+}}@recursion_select_and_phi
-; IS__TUNIT____-SAME: (i32 [[A:%.*]], double returned [[B:%.*]]) #[[ATTR1]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[DEC:%.*]] = add nsw i32 [[A]], -1
-; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp sgt i32 [[A]], 0
-; IS__TUNIT____-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
-; IS__TUNIT____: if.then:
-; IS__TUNIT____-NEXT: [[CALL:%.*]] = call double @recursion_select_and_phi(i32 [[DEC]], double [[B]]) #[[ATTR10]]
-; IS__TUNIT____-NEXT: br label [[IF_END]]
-; IS__TUNIT____: if.end:
-; IS__TUNIT____-NEXT: ret double [[B]]
-;
-; IS__CGSCC____: Function Attrs: nofree noinline nosync nounwind readnone uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@recursion_select_and_phi
-; IS__CGSCC____-SAME: (i32 [[A:%.*]], double returned [[B:%.*]]) #[[ATTR2]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[DEC:%.*]] = add nsw i32 [[A]], -1
-; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp sgt i32 [[A]], 0
-; IS__CGSCC____-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
-; IS__CGSCC____: if.then:
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call double @recursion_select_and_phi(i32 [[DEC]], double [[B]]) #[[ATTR9]]
-; IS__CGSCC____-NEXT: br label [[IF_END]]
-; IS__CGSCC____: if.end:
-; IS__CGSCC____-NEXT: ret double [[B]]
+; CHECK: Function Attrs: nofree noinline nosync nounwind readnone uwtable
+; CHECK-LABEL: define {{[^@]+}}@recursion_select_and_phi
+; CHECK-SAME: (i32 [[A:%.*]], double returned [[B:%.*]]) #[[ATTR1]] {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[DEC:%.*]] = add nsw i32 [[A]], -1
+; CHECK-NEXT: [[CMP:%.*]] = icmp sgt i32 [[A]], 0
+; CHECK-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
+; CHECK: if.then:
+; CHECK-NEXT: [[CALL:%.*]] = call double @recursion_select_and_phi(i32 [[DEC]], double [[B]]) #[[ATTR10]]
+; CHECK-NEXT: br label [[IF_END]]
+; CHECK: if.end:
+; CHECK-NEXT: ret double [[B]]
;
entry:
%dec = add nsw i32 %a, -1
declare i32* @unknown(i32*)
define i32* @ret_arg_or_unknown(i32* %b) #0 {
-; IS__TUNIT____: Function Attrs: noinline nounwind uwtable
-; IS__TUNIT____-LABEL: define {{[^@]+}}@ret_arg_or_unknown
-; IS__TUNIT____-SAME: (i32* [[B:%.*]]) #[[ATTR5]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp eq i32* [[B]], null
-; IS__TUNIT____-NEXT: br i1 [[CMP]], label [[RET_ARG:%.*]], label [[RET_UNKNOWN:%.*]]
-; IS__TUNIT____: ret_arg:
-; IS__TUNIT____-NEXT: ret i32* [[B]]
-; IS__TUNIT____: ret_unknown:
-; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32* @unknown(i32* [[B]])
-; IS__TUNIT____-NEXT: ret i32* [[CALL]]
-;
-; IS__CGSCC____: Function Attrs: noinline nounwind uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@ret_arg_or_unknown
-; IS__CGSCC____-SAME: (i32* [[B:%.*]]) #[[ATTR4]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp eq i32* [[B]], null
-; IS__CGSCC____-NEXT: br i1 [[CMP]], label [[RET_ARG:%.*]], label [[RET_UNKNOWN:%.*]]
-; IS__CGSCC____: ret_arg:
-; IS__CGSCC____-NEXT: ret i32* [[B]]
-; IS__CGSCC____: ret_unknown:
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @unknown(i32* [[B]])
-; IS__CGSCC____-NEXT: ret i32* [[CALL]]
+; CHECK: Function Attrs: noinline nounwind uwtable
+; CHECK-LABEL: define {{[^@]+}}@ret_arg_or_unknown
+; CHECK-SAME: (i32* [[B:%.*]]) #[[ATTR5]] {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[CMP:%.*]] = icmp eq i32* [[B]], null
+; CHECK-NEXT: br i1 [[CMP]], label [[RET_ARG:%.*]], label [[RET_UNKNOWN:%.*]]
+; CHECK: ret_arg:
+; CHECK-NEXT: ret i32* [[B]]
+; CHECK: ret_unknown:
+; CHECK-NEXT: [[CALL:%.*]] = call i32* @unknown(i32* [[B]])
+; CHECK-NEXT: ret i32* [[CALL]]
;
entry:
%cmp = icmp eq i32* %b, null
}
define i32* @ret_arg_or_unknown_through_phi(i32* %b) #0 {
-; IS__TUNIT____: Function Attrs: noinline nounwind uwtable
-; IS__TUNIT____-LABEL: define {{[^@]+}}@ret_arg_or_unknown_through_phi
-; IS__TUNIT____-SAME: (i32* [[B:%.*]]) #[[ATTR5]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp eq i32* [[B]], null
-; IS__TUNIT____-NEXT: br i1 [[CMP]], label [[RET_ARG:%.*]], label [[RET_UNKNOWN:%.*]]
-; IS__TUNIT____: ret_arg:
-; IS__TUNIT____-NEXT: br label [[R:%.*]]
-; IS__TUNIT____: ret_unknown:
-; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32* @unknown(i32* [[B]])
-; IS__TUNIT____-NEXT: br label [[R]]
-; IS__TUNIT____: r:
-; IS__TUNIT____-NEXT: [[PHI:%.*]] = phi i32* [ [[B]], [[RET_ARG]] ], [ [[CALL]], [[RET_UNKNOWN]] ]
-; IS__TUNIT____-NEXT: ret i32* [[PHI]]
-;
-; IS__CGSCC____: Function Attrs: noinline nounwind uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@ret_arg_or_unknown_through_phi
-; IS__CGSCC____-SAME: (i32* [[B:%.*]]) #[[ATTR4]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp eq i32* [[B]], null
-; IS__CGSCC____-NEXT: br i1 [[CMP]], label [[RET_ARG:%.*]], label [[RET_UNKNOWN:%.*]]
-; IS__CGSCC____: ret_arg:
-; IS__CGSCC____-NEXT: br label [[R:%.*]]
-; IS__CGSCC____: ret_unknown:
-; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @unknown(i32* [[B]])
-; IS__CGSCC____-NEXT: br label [[R]]
-; IS__CGSCC____: r:
-; IS__CGSCC____-NEXT: [[PHI:%.*]] = phi i32* [ [[B]], [[RET_ARG]] ], [ [[CALL]], [[RET_UNKNOWN]] ]
-; IS__CGSCC____-NEXT: ret i32* [[PHI]]
+; CHECK: Function Attrs: noinline nounwind uwtable
+; CHECK-LABEL: define {{[^@]+}}@ret_arg_or_unknown_through_phi
+; CHECK-SAME: (i32* [[B:%.*]]) #[[ATTR5]] {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[CMP:%.*]] = icmp eq i32* [[B]], null
+; CHECK-NEXT: br i1 [[CMP]], label [[RET_ARG:%.*]], label [[RET_UNKNOWN:%.*]]
+; CHECK: ret_arg:
+; CHECK-NEXT: br label [[R:%.*]]
+; CHECK: ret_unknown:
+; CHECK-NEXT: [[CALL:%.*]] = call i32* @unknown(i32* [[B]])
+; CHECK-NEXT: br label [[R]]
+; CHECK: r:
+; CHECK-NEXT: [[PHI:%.*]] = phi i32* [ [[B]], [[RET_ARG]] ], [ [[CALL]], [[RET_UNKNOWN]] ]
+; CHECK-NEXT: ret i32* [[PHI]]
;
entry:
%cmp = icmp eq i32* %b, null
declare void @noreturn() noreturn;
define i32 @deadblockphi3(i32 %A, i1 %c) #0 {
-; IS__TUNIT____: Function Attrs: noinline nounwind uwtable
-; IS__TUNIT____-LABEL: define {{[^@]+}}@deadblockphi3
-; IS__TUNIT____-SAME: (i32 returned [[A:%.*]], i1 [[C:%.*]]) #[[ATTR5]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: br i1 [[C]], label [[R:%.*]], label [[UNREACHABLECALL:%.*]]
-; IS__TUNIT____: unreachablecall:
-; IS__TUNIT____-NEXT: call void @noreturn() #[[ATTR7:[0-9]+]]
-; IS__TUNIT____-NEXT: unreachable
-; IS__TUNIT____: unreachableblock2:
-; IS__TUNIT____-NEXT: unreachable
-; IS__TUNIT____: unreachableblock3:
-; IS__TUNIT____-NEXT: unreachable
-; IS__TUNIT____: r:
-; IS__TUNIT____-NEXT: ret i32 [[A]]
-;
-; IS__CGSCC____: Function Attrs: noinline nounwind uwtable
-; IS__CGSCC____-LABEL: define {{[^@]+}}@deadblockphi3
-; IS__CGSCC____-SAME: (i32 returned [[A:%.*]], i1 [[C:%.*]]) #[[ATTR4]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: br i1 [[C]], label [[R:%.*]], label [[UNREACHABLECALL:%.*]]
-; IS__CGSCC____: unreachablecall:
-; IS__CGSCC____-NEXT: call void @noreturn() #[[ATTR6:[0-9]+]]
-; IS__CGSCC____-NEXT: unreachable
-; IS__CGSCC____: unreachableblock2:
-; IS__CGSCC____-NEXT: unreachable
-; IS__CGSCC____: unreachableblock3:
-; IS__CGSCC____-NEXT: unreachable
-; IS__CGSCC____: r:
-; IS__CGSCC____-NEXT: ret i32 [[A]]
+; CHECK: Function Attrs: noinline nounwind uwtable
+; CHECK-LABEL: define {{[^@]+}}@deadblockphi3
+; CHECK-SAME: (i32 returned [[A:%.*]], i1 [[C:%.*]]) #[[ATTR5]] {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: br i1 [[C]], label [[R:%.*]], label [[UNREACHABLECALL:%.*]]
+; CHECK: unreachablecall:
+; CHECK-NEXT: call void @noreturn() #[[ATTR7:[0-9]+]]
+; CHECK-NEXT: unreachable
+; CHECK: unreachableblock2:
+; CHECK-NEXT: unreachable
+; CHECK: unreachableblock3:
+; CHECK-NEXT: unreachable
+; CHECK: r:
+; CHECK-NEXT: ret i32 [[A]]
;
entry:
br i1 %c, label %r, label %unreachablecall
; We can use the return information of the weak function non_exact_4.
; FIXME: %c2 and %c3 should be replaced but not %c0 or %c1!
define i32 @exact(i32* align 8 %a, i32* align 8 %b) {
-; IS__TUNIT____: Function Attrs: norecurse
-; IS__TUNIT____-LABEL: define {{[^@]+}}@exact
-; IS__TUNIT____-SAME: (i32* align 8 [[A:%.*]], i32* align 8 [[B:%.*]]) #[[ATTR8:[0-9]+]] {
-; IS__TUNIT____-NEXT: [[C0:%.*]] = call i32 @non_exact_0()
-; IS__TUNIT____-NEXT: [[C1:%.*]] = call i32 @non_exact_1(i32 noundef 1)
-; IS__TUNIT____-NEXT: [[C2:%.*]] = call i32 @non_exact_2(i32 noundef 2)
-; IS__TUNIT____-NEXT: [[C3:%.*]] = call align 32 i32* @non_exact_3(i32* align 32 [[A]])
-; IS__TUNIT____-NEXT: [[C4:%.*]] = call align 16 i32* @non_exact_4(i32* align 32 [[B]])
-; IS__TUNIT____-NEXT: [[C3L:%.*]] = load i32, i32* [[A]], align 32
-; IS__TUNIT____-NEXT: [[C4L:%.*]] = load i32, i32* [[C4]], align 16
-; IS__TUNIT____-NEXT: [[ADD1:%.*]] = add i32 [[C0]], [[C1]]
-; IS__TUNIT____-NEXT: [[ADD2:%.*]] = add i32 [[ADD1]], 2
-; IS__TUNIT____-NEXT: [[ADD3:%.*]] = add i32 [[ADD2]], [[C3L]]
-; IS__TUNIT____-NEXT: [[ADD4:%.*]] = add i32 [[ADD3]], [[C4L]]
-; IS__TUNIT____-NEXT: ret i32 [[ADD4]]
-;
-; IS__CGSCC____: Function Attrs: norecurse
-; IS__CGSCC____-LABEL: define {{[^@]+}}@exact
-; IS__CGSCC____-SAME: (i32* align 8 [[A:%.*]], i32* align 8 [[B:%.*]]) #[[ATTR7:[0-9]+]] {
-; IS__CGSCC____-NEXT: [[C0:%.*]] = call i32 @non_exact_0()
-; IS__CGSCC____-NEXT: [[C1:%.*]] = call i32 @non_exact_1(i32 noundef 1)
-; IS__CGSCC____-NEXT: [[C2:%.*]] = call i32 @non_exact_2(i32 noundef 2)
-; IS__CGSCC____-NEXT: [[C3:%.*]] = call align 32 i32* @non_exact_3(i32* align 32 [[A]])
-; IS__CGSCC____-NEXT: [[C4:%.*]] = call align 16 i32* @non_exact_4(i32* align 32 [[B]])
-; IS__CGSCC____-NEXT: [[C3L:%.*]] = load i32, i32* [[A]], align 32
-; IS__CGSCC____-NEXT: [[C4L:%.*]] = load i32, i32* [[C4]], align 16
-; IS__CGSCC____-NEXT: [[ADD1:%.*]] = add i32 [[C0]], [[C1]]
-; IS__CGSCC____-NEXT: [[ADD2:%.*]] = add i32 [[ADD1]], 2
-; IS__CGSCC____-NEXT: [[ADD3:%.*]] = add i32 [[ADD2]], [[C3L]]
-; IS__CGSCC____-NEXT: [[ADD4:%.*]] = add i32 [[ADD3]], [[C4L]]
-; IS__CGSCC____-NEXT: ret i32 [[ADD4]]
+; CHECK: Function Attrs: norecurse
+; CHECK-LABEL: define {{[^@]+}}@exact
+; CHECK-SAME: (i32* align 8 [[A:%.*]], i32* align 8 [[B:%.*]]) #[[ATTR8:[0-9]+]] {
+; CHECK-NEXT: [[C0:%.*]] = call i32 @non_exact_0()
+; CHECK-NEXT: [[C1:%.*]] = call i32 @non_exact_1(i32 noundef 1)
+; CHECK-NEXT: [[C2:%.*]] = call i32 @non_exact_2(i32 noundef 2)
+; CHECK-NEXT: [[C3:%.*]] = call align 32 i32* @non_exact_3(i32* align 32 [[A]])
+; CHECK-NEXT: [[C4:%.*]] = call align 16 i32* @non_exact_4(i32* align 32 [[B]])
+; CHECK-NEXT: [[C3L:%.*]] = load i32, i32* [[A]], align 32
+; CHECK-NEXT: [[C4L:%.*]] = load i32, i32* [[C4]], align 16
+; CHECK-NEXT: [[ADD1:%.*]] = add i32 [[C0]], [[C1]]
+; CHECK-NEXT: [[ADD2:%.*]] = add i32 [[ADD1]], 2
+; CHECK-NEXT: [[ADD3:%.*]] = add i32 [[ADD2]], [[C3L]]
+; CHECK-NEXT: [[ADD4:%.*]] = add i32 [[ADD3]], [[C4L]]
+; CHECK-NEXT: ret i32 [[ADD4]]
;
%c0 = call i32 @non_exact_0()
%c1 = call i32 @non_exact_1(i32 1)
; IS__TUNIT____: attributes #[[ATTR13:[0-9]+]] = { nounwind readnone }
;.
; IS__CGSCC____: attributes #[[ATTR0]] = { nofree noinline norecurse nosync nounwind readnone willreturn uwtable }
-; IS__CGSCC____: attributes #[[ATTR1]] = { nofree noinline nosync nounwind readnone willreturn uwtable }
-; IS__CGSCC____: attributes #[[ATTR2]] = { nofree noinline nosync nounwind readnone uwtable }
+; IS__CGSCC____: attributes #[[ATTR1]] = { nofree noinline nosync nounwind readnone uwtable }
+; IS__CGSCC____: attributes #[[ATTR2]] = { nofree noinline norecurse nosync nounwind readnone uwtable }
; IS__CGSCC____: attributes #[[ATTR3]] = { argmemonly nofree noinline nosync nounwind readonly uwtable }
-; IS__CGSCC____: attributes #[[ATTR4]] = { noinline nounwind uwtable }
-; IS__CGSCC____: attributes #[[ATTR5]] = { noinline norecurse nounwind uwtable }
-; IS__CGSCC____: attributes #[[ATTR6]] = { noreturn }
-; IS__CGSCC____: attributes #[[ATTR7]] = { norecurse }
-; IS__CGSCC____: attributes #[[ATTR8:[0-9]+]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR9]] = { nofree nosync nounwind readnone }
-; IS__CGSCC____: attributes #[[ATTR10]] = { nofree nosync nounwind readonly }
-; IS__CGSCC____: attributes #[[ATTR11]] = { nounwind }
+; IS__CGSCC____: attributes #[[ATTR4]] = { nofree noinline nosync nounwind readnone willreturn uwtable }
+; IS__CGSCC____: attributes #[[ATTR5]] = { noinline nounwind uwtable }
+; IS__CGSCC____: attributes #[[ATTR6]] = { noinline norecurse nounwind uwtable }
+; IS__CGSCC____: attributes #[[ATTR7]] = { noreturn }
+; IS__CGSCC____: attributes #[[ATTR8]] = { norecurse }
+; IS__CGSCC____: attributes #[[ATTR9:[0-9]+]] = { nofree norecurse nosync nounwind readnone willreturn }
+; IS__CGSCC____: attributes #[[ATTR10]] = { nofree nosync nounwind readnone }
+; IS__CGSCC____: attributes #[[ATTR11]] = { nounwind readnone }
+; IS__CGSCC____: attributes #[[ATTR12]] = { nofree nosync nounwind readonly }
+; IS__CGSCC____: attributes #[[ATTR13]] = { nounwind }
;.
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
; IS__CGSCC____-LABEL: define {{[^@]+}}@ret_null
; IS__CGSCC____-SAME: () #[[ATTR0]] {
-; IS__CGSCC____-NEXT: ret i32* undef
+; IS__CGSCC____-NEXT: ret i32* null
;
ret i32* null
}
; IS__CGSCC____: T:
; IS__CGSCC____-NEXT: unreachable
; IS__CGSCC____: F:
-; IS__CGSCC____-NEXT: ret i32 undef
+; IS__CGSCC____-NEXT: ret i32 1
;
entry:
%A.0 = load i32, i32* null
; Cases for single and multiple violation at a callsite
define void @arg_nonnull_violation3_1(i1 %c) {
-; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; CHECK-LABEL: define {{[^@]+}}@arg_nonnull_violation3_1
-; CHECK-SAME: (i1 [[C:%.*]]) #[[ATTR0]] {
-; CHECK-NEXT: [[PTR:%.*]] = alloca i32, align 4
-; CHECK-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
-; CHECK: t:
-; CHECK-NEXT: call void @arg_nonnull_12(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]]) #[[ATTR7:[0-9]+]]
-; CHECK-NEXT: call void @arg_nonnull_12(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* noalias nocapture nofree noundef writeonly align 4294967296 null) #[[ATTR7]]
-; CHECK-NEXT: unreachable
-; CHECK: f:
-; CHECK-NEXT: unreachable
-; CHECK: ret:
-; CHECK-NEXT: ret void
+; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; IS__TUNIT____-LABEL: define {{[^@]+}}@arg_nonnull_violation3_1
+; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR0]] {
+; IS__TUNIT____-NEXT: [[PTR:%.*]] = alloca i32, align 4
+; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; IS__TUNIT____: t:
+; IS__TUNIT____-NEXT: call void @arg_nonnull_12(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]]) #[[ATTR7:[0-9]+]]
+; IS__TUNIT____-NEXT: call void @arg_nonnull_12(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* noalias nocapture nofree noundef writeonly align 4294967296 null) #[[ATTR7]]
+; IS__TUNIT____-NEXT: unreachable
+; IS__TUNIT____: f:
+; IS__TUNIT____-NEXT: unreachable
+; IS__TUNIT____: ret:
+; IS__TUNIT____-NEXT: ret void
+;
+; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; IS__CGSCC____-LABEL: define {{[^@]+}}@arg_nonnull_violation3_1
+; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR0]] {
+; IS__CGSCC____-NEXT: [[PTR:%.*]] = alloca i32, align 4
+; IS__CGSCC____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; IS__CGSCC____: t:
+; IS__CGSCC____-NEXT: call void @arg_nonnull_12(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]]) #[[ATTR8:[0-9]+]]
+; IS__CGSCC____-NEXT: call void @arg_nonnull_12(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* noalias nocapture nofree noundef writeonly align 4294967296 null) #[[ATTR8]]
+; IS__CGSCC____-NEXT: unreachable
+; IS__CGSCC____: f:
+; IS__CGSCC____-NEXT: unreachable
+; IS__CGSCC____: ret:
+; IS__CGSCC____-NEXT: ret void
;
%ptr = alloca i32
br i1 %c, label %t, label %f
}
define void @arg_nonnull_violation3_2(i1 %c) {
-; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; CHECK-LABEL: define {{[^@]+}}@arg_nonnull_violation3_2
-; CHECK-SAME: (i1 [[C:%.*]]) #[[ATTR0]] {
-; CHECK-NEXT: [[PTR:%.*]] = alloca i32, align 4
-; CHECK-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
-; CHECK: t:
-; CHECK-NEXT: call void @arg_nonnull_12_noundef_2(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]]) #[[ATTR7]]
-; CHECK-NEXT: call void @arg_nonnull_12_noundef_2(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* noalias nocapture nofree noundef writeonly align 4294967296 null) #[[ATTR7]]
-; CHECK-NEXT: unreachable
-; CHECK: f:
-; CHECK-NEXT: unreachable
-; CHECK: ret:
-; CHECK-NEXT: ret void
+; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; IS__TUNIT____-LABEL: define {{[^@]+}}@arg_nonnull_violation3_2
+; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR0]] {
+; IS__TUNIT____-NEXT: [[PTR:%.*]] = alloca i32, align 4
+; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; IS__TUNIT____: t:
+; IS__TUNIT____-NEXT: call void @arg_nonnull_12_noundef_2(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]]) #[[ATTR7]]
+; IS__TUNIT____-NEXT: call void @arg_nonnull_12_noundef_2(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* noalias nocapture nofree noundef writeonly align 4294967296 null) #[[ATTR7]]
+; IS__TUNIT____-NEXT: unreachable
+; IS__TUNIT____: f:
+; IS__TUNIT____-NEXT: unreachable
+; IS__TUNIT____: ret:
+; IS__TUNIT____-NEXT: ret void
+;
+; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; IS__CGSCC____-LABEL: define {{[^@]+}}@arg_nonnull_violation3_2
+; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR0]] {
+; IS__CGSCC____-NEXT: [[PTR:%.*]] = alloca i32, align 4
+; IS__CGSCC____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; IS__CGSCC____: t:
+; IS__CGSCC____-NEXT: call void @arg_nonnull_12_noundef_2(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]]) #[[ATTR8]]
+; IS__CGSCC____-NEXT: call void @arg_nonnull_12_noundef_2(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* noalias nocapture nofree noundef writeonly align 4294967296 null) #[[ATTR8]]
+; IS__CGSCC____-NEXT: unreachable
+; IS__CGSCC____: f:
+; IS__CGSCC____-NEXT: unreachable
+; IS__CGSCC____: ret:
+; IS__CGSCC____-NEXT: ret void
;
%ptr = alloca i32
br i1 %c, label %t, label %f
}
define internal noundef i32 @assumed_undef_is_ok(i1 %c, i32 %arg) {
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
; IS__CGSCC____-LABEL: define {{[^@]+}}@assumed_undef_is_ok
-; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR0]] {
+; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR7:[0-9]+]] {
; IS__CGSCC____-NEXT: br i1 [[C]], label [[REC:%.*]], label [[RET:%.*]]
; IS__CGSCC____: rec:
; IS__CGSCC____-NEXT: br label [[RET]]
; IS__CGSCC____: ret:
-; IS__CGSCC____-NEXT: ret i32 undef
+; IS__CGSCC____-NEXT: ret i32 0
;
%stack = alloca i32
store i32 %arg, i32* %stack
; IS__CGSCC____: attributes #[[ATTR4]] = { nofree norecurse nounwind null_pointer_is_valid willreturn }
; IS__CGSCC____: attributes #[[ATTR5]] = { nofree norecurse noreturn nosync nounwind readnone willreturn }
; IS__CGSCC____: attributes #[[ATTR6]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
-; IS__CGSCC____: attributes #[[ATTR7]] = { nounwind willreturn writeonly }
+; IS__CGSCC____: attributes #[[ATTR7]] = { nofree nosync nounwind readnone willreturn }
+; IS__CGSCC____: attributes #[[ATTR8]] = { nounwind willreturn writeonly }
;.
; CHECK: @[[UNREACHABLENONKERNEL:[a-zA-Z0-9_$"\\.-]+]] = internal addrspace(3) global i32 0, align 4
;.
define dso_local void @kernel(i32 %C) norecurse "kernel" {
-; IS__TUNIT____: Function Attrs: norecurse nosync nounwind
-; IS__TUNIT____-LABEL: define {{[^@]+}}@kernel
-; IS__TUNIT____-SAME: (i32 [[C:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: call void @level1Kernel(i32 [[C]]) #[[ATTR3:[0-9]+]]
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC____: Function Attrs: norecurse nosync nounwind
-; IS__CGSCC____-LABEL: define {{[^@]+}}@kernel
-; IS__CGSCC____-SAME: (i32 [[C:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: call void @level1Kernel(i32 [[C]]) #[[ATTR4:[0-9]+]]
-; IS__CGSCC____-NEXT: ret void
+; CHECK: Function Attrs: norecurse nosync nounwind
+; CHECK-LABEL: define {{[^@]+}}@kernel
+; CHECK-SAME: (i32 [[C:%.*]]) #[[ATTR0:[0-9]+]] {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: call void @level1Kernel(i32 [[C]]) #[[ATTR3:[0-9]+]]
+; CHECK-NEXT: ret void
;
entry:
call void @level1Kernel(i32 %C)
; IS__CGSCC____-LABEL: define {{[^@]+}}@level1Kernel
; IS__CGSCC____-SAME: (i32 [[C:%.*]]) #[[ATTR1:[0-9]+]] {
; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: call void @level2Kernelall_early() #[[ATTR5:[0-9]+]]
+; IS__CGSCC____-NEXT: call void @level2Kernelall_early() #[[ATTR4:[0-9]+]]
; IS__CGSCC____-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[C]], 0
; IS__CGSCC____-NEXT: br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]]
; IS__CGSCC____: if.then:
-; IS__CGSCC____-NEXT: call void @level2Kernela() #[[ATTR4]]
+; IS__CGSCC____-NEXT: call void @level2Kernela() #[[ATTR3]]
; IS__CGSCC____-NEXT: br label [[IF_END:%.*]]
; IS__CGSCC____: if.else:
-; IS__CGSCC____-NEXT: call void @level2Kernelb() #[[ATTR4]]
+; IS__CGSCC____-NEXT: call void @level2Kernelb() #[[ATTR3]]
; IS__CGSCC____-NEXT: br label [[IF_END]]
; IS__CGSCC____: if.end:
; IS__CGSCC____-NEXT: ret void
; IS__CGSCC____-NEXT: [[TMP0:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @ReachableKernel to i32*), align 4
; IS__CGSCC____-NEXT: [[TMP1:%.*]] = load i32, i32* @ReachableKernelAS0, align 4
; IS__CGSCC____-NEXT: [[TMP2:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @UnreachableKernel to i32*), align 4
-; IS__CGSCC____-NEXT: call void @use(i32 noundef [[TMP0]], i32 noundef [[TMP1]], i32 noundef 42) #[[ATTR4]]
+; IS__CGSCC____-NEXT: call void @use(i32 noundef [[TMP0]], i32 noundef [[TMP1]], i32 noundef [[TMP2]]) #[[ATTR3]]
; IS__CGSCC____-NEXT: ret void
;
entry:
; IS__CGSCC____-NEXT: [[TMP0:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @ReachableKernel to i32*), align 4
; IS__CGSCC____-NEXT: [[TMP1:%.*]] = load i32, i32* @ReachableKernelAS0, align 4
; IS__CGSCC____-NEXT: [[TMP2:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @UnreachableKernel to i32*), align 4
-; IS__CGSCC____-NEXT: call void @use(i32 noundef [[TMP0]], i32 noundef [[TMP1]], i32 noundef 42) #[[ATTR4]]
+; IS__CGSCC____-NEXT: call void @use(i32 noundef [[TMP0]], i32 noundef [[TMP1]], i32 noundef [[TMP2]]) #[[ATTR3]]
; IS__CGSCC____-NEXT: ret void
;
entry:
}
define internal void @level2Kernelall_late() {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@level2Kernelall_late
-; IS__TUNIT____-SAME: () #[[ATTR2]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@level2Kernelall_late
-; IS__CGSCC____-SAME: () #[[ATTR3:[0-9]+]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: ret void
+; CHECK: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; CHECK-LABEL: define {{[^@]+}}@level2Kernelall_late
+; CHECK-SAME: () #[[ATTR2]] {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: ret void
;
entry:
store i32 1, i32 *addrspacecast (i32 addrspace(3)* @UnreachableKernel to i32*), align 4
@UnreachableNonKernel = internal addrspace(3) global i32 0, align 4
define dso_local void @non_kernel(i32 %C) norecurse {
-; IS__TUNIT____: Function Attrs: norecurse nosync nounwind
-; IS__TUNIT____-LABEL: define {{[^@]+}}@non_kernel
-; IS__TUNIT____-SAME: (i32 [[C:%.*]]) #[[ATTR1]] {
-; IS__TUNIT____-NEXT: entry:
-; IS__TUNIT____-NEXT: call void @level1(i32 [[C]]) #[[ATTR3]]
-; IS__TUNIT____-NEXT: ret void
-;
-; IS__CGSCC____: Function Attrs: norecurse nosync nounwind
-; IS__CGSCC____-LABEL: define {{[^@]+}}@non_kernel
-; IS__CGSCC____-SAME: (i32 [[C:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: entry:
-; IS__CGSCC____-NEXT: call void @level1(i32 [[C]]) #[[ATTR4]]
-; IS__CGSCC____-NEXT: ret void
+; CHECK: Function Attrs: norecurse nosync nounwind
+; CHECK-LABEL: define {{[^@]+}}@non_kernel
+; CHECK-SAME: (i32 [[C:%.*]]) #[[ATTR1:[0-9]+]] {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: call void @level1(i32 [[C]]) #[[ATTR3]]
+; CHECK-NEXT: ret void
;
entry:
call void @level1(i32 %C)
; IS__CGSCC_OPM-SAME: (i32 [[C:%.*]]) #[[ATTR1]] {
; IS__CGSCC_OPM-NEXT: entry:
; IS__CGSCC_OPM-NEXT: [[LOCAL:%.*]] = alloca i32, align 4
-; IS__CGSCC_OPM-NEXT: call void @level2all_early(i32* noalias nocapture nofree nonnull readnone align 4 dereferenceable(4) undef) #[[ATTR5]]
+; IS__CGSCC_OPM-NEXT: call void @level2all_early(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[LOCAL]]) #[[ATTR4]]
; IS__CGSCC_OPM-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[C]], 0
; IS__CGSCC_OPM-NEXT: br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]]
; IS__CGSCC_OPM: if.then:
-; IS__CGSCC_OPM-NEXT: call void @level2a(i32* noalias nocapture nofree nonnull readnone align 4 dereferenceable(4) undef) #[[ATTR4]]
+; IS__CGSCC_OPM-NEXT: call void @level2a(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[LOCAL]]) #[[ATTR3]]
; IS__CGSCC_OPM-NEXT: br label [[IF_END:%.*]]
; IS__CGSCC_OPM: if.else:
-; IS__CGSCC_OPM-NEXT: call void @level2b(i32* noalias nocapture nofree nonnull readnone align 4 dereferenceable(4) undef) #[[ATTR4]]
+; IS__CGSCC_OPM-NEXT: call void @level2b(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[LOCAL]]) #[[ATTR3]]
; IS__CGSCC_OPM-NEXT: br label [[IF_END]]
; IS__CGSCC_OPM: if.end:
-; IS__CGSCC_OPM-NEXT: call void @level2all_late(i32* noalias nocapture nofree nonnull readnone align 4 dereferenceable(4) undef) #[[ATTR6:[0-9]+]]
+; IS__CGSCC_OPM-NEXT: call void @level2all_late(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[LOCAL]]) #[[ATTR5:[0-9]+]]
; IS__CGSCC_OPM-NEXT: ret void
;
; IS__CGSCC_NPM: Function Attrs: norecurse nosync nounwind
; IS__CGSCC_NPM-SAME: (i32 [[C:%.*]]) #[[ATTR1]] {
; IS__CGSCC_NPM-NEXT: entry:
; IS__CGSCC_NPM-NEXT: [[LOCAL:%.*]] = alloca i32, align 4
-; IS__CGSCC_NPM-NEXT: call void @level2all_early(i32* noalias nocapture nofree nonnull readnone align 4 dereferenceable(4) undef) #[[ATTR5]]
+; IS__CGSCC_NPM-NEXT: call void @level2all_early(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[LOCAL]]) #[[ATTR4]]
; IS__CGSCC_NPM-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[C]], 0
; IS__CGSCC_NPM-NEXT: br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]]
; IS__CGSCC_NPM: if.then:
-; IS__CGSCC_NPM-NEXT: call void @level2a(i32 undef) #[[ATTR4]]
+; IS__CGSCC_NPM-NEXT: call void @level2a(i32 noundef 17) #[[ATTR3]]
; IS__CGSCC_NPM-NEXT: br label [[IF_END:%.*]]
; IS__CGSCC_NPM: if.else:
-; IS__CGSCC_NPM-NEXT: call void @level2b(i32 undef) #[[ATTR6:[0-9]+]]
+; IS__CGSCC_NPM-NEXT: call void @level2b(i32 17) #[[ATTR3]]
; IS__CGSCC_NPM-NEXT: br label [[IF_END]]
; IS__CGSCC_NPM: if.end:
-; IS__CGSCC_NPM-NEXT: call void @level2all_late(i32* noalias nocapture nofree nonnull readnone align 4 dereferenceable(4) undef) #[[ATTR7:[0-9]+]]
+; IS__CGSCC_NPM-NEXT: call void @level2all_late(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[LOCAL]]) #[[ATTR5:[0-9]+]]
; IS__CGSCC_NPM-NEXT: ret void
;
entry:
;
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
; IS__CGSCC____-LABEL: define {{[^@]+}}@level2all_early
-; IS__CGSCC____-SAME: (i32* noalias nocapture nofree nonnull readnone align 4 dereferenceable(4) [[ADDR:%.*]]) #[[ATTR2]] {
+; IS__CGSCC____-SAME: (i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[ADDR:%.*]]) #[[ATTR2]] {
; IS__CGSCC____-NEXT: entry:
; IS__CGSCC____-NEXT: store i32 1, i32* addrspacecast (i32 addrspace(3)* @ReachableNonKernel to i32*), align 4
+; IS__CGSCC____-NEXT: store i32 17, i32* [[ADDR]], align 4
; IS__CGSCC____-NEXT: ret void
;
entry:
;
; IS__CGSCC_OPM: Function Attrs: norecurse nosync nounwind
; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@level2a
-; IS__CGSCC_OPM-SAME: (i32* noalias nocapture nofree nonnull readnone align 4294967296 dereferenceable(4) [[ADDR:%.*]]) #[[ATTR1]] {
+; IS__CGSCC_OPM-SAME: (i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[ADDR:%.*]]) #[[ATTR1]] {
; IS__CGSCC_OPM-NEXT: entry:
; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @ReachableNonKernel to i32*), align 4
; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @UnreachableNonKernel to i32*), align 4
-; IS__CGSCC_OPM-NEXT: [[TMP2:%.*]] = load i32, i32* undef, align 4294967296
-; IS__CGSCC_OPM-NEXT: call void @use(i32 noundef [[TMP0]], i32 noundef [[TMP1]], i32 17) #[[ATTR4]]
+; IS__CGSCC_OPM-NEXT: [[QQQQ2:%.*]] = load i32, i32* [[ADDR]], align 4
+; IS__CGSCC_OPM-NEXT: call void @use(i32 noundef [[TMP0]], i32 noundef [[TMP1]], i32 [[QQQQ2]]) #[[ATTR3]]
; IS__CGSCC_OPM-NEXT: ret void
;
; IS__CGSCC_NPM: Function Attrs: norecurse nosync nounwind
; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]]) #[[ATTR1]] {
; IS__CGSCC_NPM-NEXT: entry:
; IS__CGSCC_NPM-NEXT: [[ADDR_PRIV:%.*]] = alloca i32, align 4
+; IS__CGSCC_NPM-NEXT: store i32 [[TMP0]], i32* [[ADDR_PRIV]], align 4
; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @ReachableNonKernel to i32*), align 4
; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @UnreachableNonKernel to i32*), align 4
-; IS__CGSCC_NPM-NEXT: [[TMP3:%.*]] = load i32, i32* [[ADDR_PRIV]], align 4
-; IS__CGSCC_NPM-NEXT: call void @use(i32 noundef [[TMP1]], i32 noundef [[TMP2]], i32 17) #[[ATTR4]]
+; IS__CGSCC_NPM-NEXT: [[QQQQ2:%.*]] = load i32, i32* [[ADDR_PRIV]], align 4
+; IS__CGSCC_NPM-NEXT: call void @use(i32 noundef [[TMP1]], i32 noundef [[TMP2]], i32 [[QQQQ2]]) #[[ATTR3]]
; IS__CGSCC_NPM-NEXT: ret void
;
entry:
%0 = load i32, i32* addrspacecast (i32 addrspace(3)* @ReachableNonKernel to i32*), align 4
%1 = load i32, i32* addrspacecast (i32 addrspace(3)* @UnreachableNonKernel to i32*), align 4
- %2 = load i32, i32* %addr
- call void @use(i32 %0, i32 %1, i32 %2)
+ %qqqq2 = load i32, i32* %addr
+ call void @use(i32 %0, i32 %1, i32 %qqqq2)
ret void
}
;
; IS__CGSCC_OPM: Function Attrs: norecurse nosync nounwind
; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@level2b
-; IS__CGSCC_OPM-SAME: (i32* noalias nocapture nofree nonnull readnone align 4294967296 dereferenceable(4) [[ADDR:%.*]]) #[[ATTR1]] {
+; IS__CGSCC_OPM-SAME: (i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[ADDR:%.*]]) #[[ATTR1]] {
; IS__CGSCC_OPM-NEXT: entry:
; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @ReachableNonKernel to i32*), align 4
; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @UnreachableNonKernel to i32*), align 4
-; IS__CGSCC_OPM-NEXT: [[TMP2:%.*]] = load i32, i32* undef, align 4294967296
-; IS__CGSCC_OPM-NEXT: call void @use(i32 noundef [[TMP0]], i32 noundef [[TMP1]], i32 17) #[[ATTR4]]
+; IS__CGSCC_OPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[ADDR]], align 4
+; IS__CGSCC_OPM-NEXT: call void @use(i32 noundef [[TMP0]], i32 noundef [[TMP1]], i32 [[TMP2]]) #[[ATTR3]]
; IS__CGSCC_OPM-NEXT: ret void
;
; IS__CGSCC_NPM: Function Attrs: norecurse nosync nounwind
; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]]) #[[ATTR1]] {
; IS__CGSCC_NPM-NEXT: entry:
; IS__CGSCC_NPM-NEXT: [[ADDR_PRIV:%.*]] = alloca i32, align 4
+; IS__CGSCC_NPM-NEXT: store i32 [[TMP0]], i32* [[ADDR_PRIV]], align 4
; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @ReachableNonKernel to i32*), align 4
; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @UnreachableNonKernel to i32*), align 4
; IS__CGSCC_NPM-NEXT: [[TMP3:%.*]] = load i32, i32* [[ADDR_PRIV]], align 4
-; IS__CGSCC_NPM-NEXT: call void @use(i32 noundef [[TMP1]], i32 noundef [[TMP2]], i32 17) #[[ATTR4]]
+; IS__CGSCC_NPM-NEXT: call void @use(i32 noundef [[TMP1]], i32 noundef [[TMP2]], i32 [[TMP3]]) #[[ATTR3]]
; IS__CGSCC_NPM-NEXT: ret void
;
entry:
;
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
; IS__CGSCC____-LABEL: define {{[^@]+}}@level2all_late
-; IS__CGSCC____-SAME: (i32* noalias nocapture nofree nonnull readnone align 4 dereferenceable(4) [[ADDR:%.*]]) #[[ATTR2]] {
+; IS__CGSCC____-SAME: (i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[ADDR:%.*]]) #[[ATTR2]] {
; IS__CGSCC____-NEXT: entry:
; IS__CGSCC____-NEXT: store i32 1, i32* addrspacecast (i32 addrspace(3)* @UnreachableNonKernel to i32*), align 4
+; IS__CGSCC____-NEXT: store i32 5, i32* [[ADDR]], align 4
; IS__CGSCC____-NEXT: ret void
;
entry:
; IS__TUNIT____: attributes #[[ATTR5]] = { nosync nounwind writeonly }
; IS__TUNIT____: attributes #[[ATTR6]] = { nounwind }
;.
-; IS__CGSCC_OPM: attributes #[[ATTR0]] = { norecurse nosync nounwind "kernel" }
-; IS__CGSCC_OPM: attributes #[[ATTR1]] = { norecurse nosync nounwind }
-; IS__CGSCC_OPM: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind willreturn writeonly }
-; IS__CGSCC_OPM: attributes #[[ATTR3]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__CGSCC_OPM: attributes #[[ATTR4]] = { nounwind }
-; IS__CGSCC_OPM: attributes #[[ATTR5]] = { nounwind willreturn writeonly }
-; IS__CGSCC_OPM: attributes #[[ATTR6]] = { nounwind writeonly }
-;.
-; IS__CGSCC_NPM: attributes #[[ATTR0]] = { norecurse nosync nounwind "kernel" }
-; IS__CGSCC_NPM: attributes #[[ATTR1]] = { norecurse nosync nounwind }
-; IS__CGSCC_NPM: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind willreturn writeonly }
-; IS__CGSCC_NPM: attributes #[[ATTR3]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR4]] = { nounwind }
-; IS__CGSCC_NPM: attributes #[[ATTR5]] = { nounwind willreturn writeonly }
-; IS__CGSCC_NPM: attributes #[[ATTR6]] = { nosync nounwind }
-; IS__CGSCC_NPM: attributes #[[ATTR7]] = { nosync nounwind writeonly }
+; IS__CGSCC____: attributes #[[ATTR0]] = { norecurse nosync nounwind "kernel" }
+; IS__CGSCC____: attributes #[[ATTR1]] = { norecurse nosync nounwind }
+; IS__CGSCC____: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind willreturn writeonly }
+; IS__CGSCC____: attributes #[[ATTR3]] = { nounwind }
+; IS__CGSCC____: attributes #[[ATTR4]] = { nounwind willreturn writeonly }
+; IS__CGSCC____: attributes #[[ATTR5:[0-9]+]] = { nounwind writeonly }
;.
; IS__CGSCC_OPM-NEXT: ret i1 [[R2]]
;
; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@recursive_inst_generator
-; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]]) {
+; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]], i1* nofree [[P:%.*]]) {
; IS__CGSCC_NPM-NEXT: [[A:%.*]] = call i1* @geti1Ptr()
; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
; IS__CGSCC_NPM: t:
; IS__CGSCC_NPM-NEXT: [[R1:%.*]] = call i1 @recursive_inst_comparator(i1* noalias nofree readnone [[A]], i1* noalias nofree readnone [[A]])
; IS__CGSCC_NPM-NEXT: ret i1 [[R1]]
; IS__CGSCC_NPM: f:
-; IS__CGSCC_NPM-NEXT: [[R2:%.*]] = call i1 @recursive_inst_generator(i1 noundef true)
+; IS__CGSCC_NPM-NEXT: [[R2:%.*]] = call i1 @recursive_inst_generator(i1 noundef true, i1* nofree [[A]])
; IS__CGSCC_NPM-NEXT: ret i1 [[R2]]
;
%a = call i1* @geti1Ptr()
; FIXME: This should *not* return true.
define i1 @recursive_inst_generator_caller(i1 %c) {
-; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@recursive_inst_generator_caller
-; NOT_CGSCC_NPM-SAME: (i1 [[C:%.*]]) {
-; NOT_CGSCC_NPM-NEXT: [[CALL:%.*]] = call i1 @recursive_inst_generator(i1 [[C]], i1* undef)
-; NOT_CGSCC_NPM-NEXT: ret i1 [[CALL]]
-;
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@recursive_inst_generator_caller
-; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]]) {
-; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call i1 @recursive_inst_generator(i1 [[C]])
-; IS__CGSCC_NPM-NEXT: ret i1 [[CALL]]
+; CHECK-LABEL: define {{[^@]+}}@recursive_inst_generator_caller
+; CHECK-SAME: (i1 [[C:%.*]]) {
+; CHECK-NEXT: [[CALL:%.*]] = call i1 @recursive_inst_generator(i1 [[C]], i1* undef)
+; CHECK-NEXT: ret i1 [[CALL]]
;
%call = call i1 @recursive_inst_generator(i1 %c, i1* undef)
ret i1 %call
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
; IS__CGSCC____-LABEL: define {{[^@]+}}@const_ptr_return_as3
; IS__CGSCC____-SAME: () #[[ATTR1:[0-9]+]] {
-; IS__CGSCC____-NEXT: ret i32 addrspace(3)* undef
+; IS__CGSCC____-NEXT: ret i32 addrspace(3)* @ConstAS3Ptr
;
ret i32 addrspace(3)* @ConstAS3Ptr
}
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
; IS__CGSCC____-LABEL: define {{[^@]+}}@const_ptr_return
; IS__CGSCC____-SAME: () #[[ATTR1]] {
-; IS__CGSCC____-NEXT: ret i32* undef
+; IS__CGSCC____-NEXT: ret i32* addrspacecast (i32 addrspace(3)* @ConstAS3Ptr to i32*)
;
ret i32* addrspacecast (i32 addrspace(3)* @ConstAS3Ptr to i32*)
}
; IS__CGSCC____-SAME: () #[[ATTR1]] {
; IS__CGSCC____-NEXT: br label [[T:%.*]]
; IS__CGSCC____: t:
-; IS__CGSCC____-NEXT: ret i1 undef
+; IS__CGSCC____-NEXT: ret i1 true
; IS__CGSCC____: f:
; IS__CGSCC____-NEXT: unreachable
;
; IS__CGSCC____-SAME: () #[[ATTR1]] {
; IS__CGSCC____-NEXT: br label [[T:%.*]]
; IS__CGSCC____: t:
-; IS__CGSCC____-NEXT: ret i1 undef
+; IS__CGSCC____-NEXT: ret i1 true
; IS__CGSCC____: f:
; IS__CGSCC____-NEXT: unreachable
;
; IS__CGSCC____-SAME: () #[[ATTR1]] {
; IS__CGSCC____-NEXT: br label [[T:%.*]]
; IS__CGSCC____: t:
-; IS__CGSCC____-NEXT: ret i32 undef
+; IS__CGSCC____-NEXT: ret i32 7
; IS__CGSCC____: f:
; IS__CGSCC____-NEXT: unreachable
;
; IS__CGSCC____-SAME: () #[[ATTR1]] {
; IS__CGSCC____-NEXT: br label [[T:%.*]]
; IS__CGSCC____: t:
-; IS__CGSCC____-NEXT: ret i32 undef
+; IS__CGSCC____-NEXT: ret i32 0
; IS__CGSCC____: f:
; IS__CGSCC____-NEXT: unreachable
;
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
; IS__CGSCC____-LABEL: define {{[^@]+}}@ipccp4ib
; IS__CGSCC____-SAME: () #[[ATTR1]] {
-; IS__CGSCC____-NEXT: [[C:%.*]] = icmp eq i32 7, 7
-; IS__CGSCC____-NEXT: br i1 true, label [[T:%.*]], label [[F:%.*]]
+; IS__CGSCC____-NEXT: br label [[T:%.*]]
; IS__CGSCC____: t:
-; IS__CGSCC____-NEXT: ret i32 undef
+; IS__CGSCC____-NEXT: ret i32 0
; IS__CGSCC____: f:
; IS__CGSCC____-NEXT: unreachable
;
; Do not touch complicated arguments (for now)
%struct.X = type { i8* }
define internal i32* @test_inalloca(i32* inalloca(i32) %a) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test_inalloca
-; IS__TUNIT____-SAME: (i32* noalias nofree nonnull returned writeonly inalloca(i32) dereferenceable(4) "no-capture-maybe-returned" [[A:%.*]]) #[[ATTR1]] {
-; IS__TUNIT____-NEXT: ret i32* [[A]]
-;
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test_inalloca
-; IS__CGSCC____-SAME: (i32* noalias nofree noundef nonnull returned writeonly inalloca(i32) dereferenceable(4) "no-capture-maybe-returned" [[A:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: ret i32* [[A]]
+; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; CHECK-LABEL: define {{[^@]+}}@test_inalloca
+; CHECK-SAME: (i32* noalias nofree nonnull returned writeonly inalloca(i32) dereferenceable(4) "no-capture-maybe-returned" [[A:%.*]]) #[[ATTR1]] {
+; CHECK-NEXT: ret i32* [[A]]
;
ret i32* %a
}
; IS__TUNIT_NPM-NEXT: [[CALL:%.*]] = call noundef nonnull align 4294967296 dereferenceable(4) i32* @test_preallocated(i32* noalias nocapture nofree noundef writeonly preallocated(i32) align 4294967296 null) #[[ATTR4]] [ "preallocated"(token [[C]]) ]
; IS__TUNIT_NPM-NEXT: ret i32* [[CALL]]
;
-; IS__CGSCC_OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@complicated_args_preallocated
-; IS__CGSCC_OPM-SAME: () #[[ATTR0:[0-9]+]] {
-; IS__CGSCC_OPM-NEXT: [[C:%.*]] = call token @llvm.call.preallocated.setup(i32 noundef 1) #[[ATTR5:[0-9]+]]
-; IS__CGSCC_OPM-NEXT: ret i32* null
-;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@complicated_args_preallocated
-; IS__CGSCC_NPM-SAME: () #[[ATTR0:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT: [[C:%.*]] = call token @llvm.call.preallocated.setup(i32 noundef 1) #[[ATTR4:[0-9]+]]
-; IS__CGSCC_NPM-NEXT: ret i32* null
+; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
+; IS__CGSCC____-LABEL: define {{[^@]+}}@complicated_args_preallocated
+; IS__CGSCC____-SAME: () #[[ATTR0:[0-9]+]] {
+; IS__CGSCC____-NEXT: [[C:%.*]] = call token @llvm.call.preallocated.setup(i32 noundef 1) #[[ATTR6:[0-9]+]]
+; IS__CGSCC____-NEXT: ret i32* null
;
%c = call token @llvm.call.preallocated.setup(i32 1)
%call = call i32* @test_preallocated(i32* preallocated(i32) null) ["preallocated"(token %c)]
define internal %struct.X* @test_nest(%struct.X* nest %a) {
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
; IS__CGSCC____-LABEL: define {{[^@]+}}@test_nest
-; IS__CGSCC____-SAME: (%struct.X* nest noalias nocapture nofree readnone align 4294967296 [[A:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT: ret %struct.X* undef
+; IS__CGSCC____-SAME: (%struct.X* nest noalias nofree noundef readnone returned align 4294967296 "no-capture-maybe-returned" [[A:%.*]]) #[[ATTR1]] {
+; IS__CGSCC____-NEXT: ret %struct.X* [[A]]
;
ret %struct.X* %a
}
; IS________OPM-NEXT: store i8* null, i8** [[G0]], align 8
; IS________OPM-NEXT: ret void
;
-; IS__TUNIT_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@test_byval
-; IS__TUNIT_NPM-SAME: (i8* [[TMP0:%.*]]) #[[ATTR2]] {
-; IS__TUNIT_NPM-NEXT: [[A_PRIV:%.*]] = alloca [[STRUCT_X:%.*]], align 8
-; IS__TUNIT_NPM-NEXT: [[A_PRIV_CAST:%.*]] = bitcast %struct.X* [[A_PRIV]] to i8**
-; IS__TUNIT_NPM-NEXT: store i8* [[TMP0]], i8** [[A_PRIV_CAST]], align 8
-; IS__TUNIT_NPM-NEXT: [[G0:%.*]] = getelementptr [[STRUCT_X]], %struct.X* [[A_PRIV]], i32 0, i32 0
-; IS__TUNIT_NPM-NEXT: store i8* null, i8** [[G0]], align 8
-; IS__TUNIT_NPM-NEXT: ret void
-;
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test_byval
-; IS__CGSCC_NPM-SAME: (i8* noalias nocapture nofree readnone [[TMP0:%.*]]) #[[ATTR1]] {
-; IS__CGSCC_NPM-NEXT: [[A_PRIV:%.*]] = alloca [[STRUCT_X:%.*]], align 8
-; IS__CGSCC_NPM-NEXT: [[A_PRIV_CAST:%.*]] = bitcast %struct.X* [[A_PRIV]] to i8**
-; IS__CGSCC_NPM-NEXT: [[G0:%.*]] = getelementptr [[STRUCT_X]], %struct.X* [[A_PRIV]], i32 0, i32 0
-; IS__CGSCC_NPM-NEXT: ret void
+; IS________NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
+; IS________NPM-LABEL: define {{[^@]+}}@test_byval
+; IS________NPM-SAME: (i8* [[TMP0:%.*]]) #[[ATTR2]] {
+; IS________NPM-NEXT: [[A_PRIV:%.*]] = alloca [[STRUCT_X:%.*]], align 8
+; IS________NPM-NEXT: [[A_PRIV_CAST:%.*]] = bitcast %struct.X* [[A_PRIV]] to i8**
+; IS________NPM-NEXT: store i8* [[TMP0]], i8** [[A_PRIV_CAST]], align 8
+; IS________NPM-NEXT: [[G0:%.*]] = getelementptr [[STRUCT_X]], %struct.X* [[A_PRIV]], i32 0, i32 0
+; IS________NPM-NEXT: store i8* null, i8** [[G0]], align 8
+; IS________NPM-NEXT: ret void
;
%g0 = getelementptr %struct.X, %struct.X* %a, i32 0, i32 0
store i8* null, i8** %g0
; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@complicated_args_byval
; IS__CGSCC_OPM-SAME: () #[[ATTR1]] {
-; IS__CGSCC_OPM-NEXT: call void @test_byval(%struct.X* noalias nocapture nofree noundef nonnull readnone byval([[STRUCT_X:%.*]]) align 8 dereferenceable(8) @S) #[[ATTR6:[0-9]+]]
+; IS__CGSCC_OPM-NEXT: call void @test_byval(%struct.X* noalias nocapture nofree noundef nonnull readnone byval([[STRUCT_X:%.*]]) align 8 dereferenceable(8) @S) #[[ATTR7:[0-9]+]]
; IS__CGSCC_OPM-NEXT: ret void
;
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readonly willreturn
; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@complicated_args_byval
-; IS__CGSCC_NPM-SAME: () #[[ATTR1]] {
+; IS__CGSCC_NPM-SAME: () #[[ATTR3:[0-9]+]] {
; IS__CGSCC_NPM-NEXT: ret void
;
call void @test_byval(%struct.X* byval(%struct.X) @S)
; IS________OPM-NEXT: [[L:%.*]] = load i8*, i8** [[G0]], align 8
; IS________OPM-NEXT: ret i8* [[L]]
;
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@test_byval2
-; IS__TUNIT_NPM-SAME: (i8* [[TMP0:%.*]]) {
-; IS__TUNIT_NPM-NEXT: [[A_PRIV:%.*]] = alloca [[STRUCT_X:%.*]], align 8
-; IS__TUNIT_NPM-NEXT: [[A_PRIV_CAST:%.*]] = bitcast %struct.X* [[A_PRIV]] to i8**
-; IS__TUNIT_NPM-NEXT: store i8* [[TMP0]], i8** [[A_PRIV_CAST]], align 8
-; IS__TUNIT_NPM-NEXT: call void @sync()
-; IS__TUNIT_NPM-NEXT: [[G0:%.*]] = getelementptr [[STRUCT_X]], %struct.X* [[A_PRIV]], i32 0, i32 0
-; IS__TUNIT_NPM-NEXT: [[L:%.*]] = load i8*, i8** [[G0]], align 8
-; IS__TUNIT_NPM-NEXT: ret i8* [[L]]
-;
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test_byval2
-; IS__CGSCC_NPM-SAME: (i8* noalias nofree readnone returned "no-capture-maybe-returned" [[TMP0:%.*]]) {
-; IS__CGSCC_NPM-NEXT: [[A_PRIV:%.*]] = alloca [[STRUCT_X:%.*]], align 8
-; IS__CGSCC_NPM-NEXT: [[A_PRIV_CAST:%.*]] = bitcast %struct.X* [[A_PRIV]] to i8**
-; IS__CGSCC_NPM-NEXT: store i8* [[TMP0]], i8** [[A_PRIV_CAST]], align 8
-; IS__CGSCC_NPM-NEXT: call void @sync()
-; IS__CGSCC_NPM-NEXT: [[G0:%.*]] = getelementptr [[STRUCT_X]], %struct.X* [[A_PRIV]], i32 0, i32 0
-; IS__CGSCC_NPM-NEXT: [[L:%.*]] = load i8*, i8** [[G0]], align 8
-; IS__CGSCC_NPM-NEXT: ret i8* [[TMP0]]
+; IS________NPM-LABEL: define {{[^@]+}}@test_byval2
+; IS________NPM-SAME: (i8* [[TMP0:%.*]]) {
+; IS________NPM-NEXT: [[A_PRIV:%.*]] = alloca [[STRUCT_X:%.*]], align 8
+; IS________NPM-NEXT: [[A_PRIV_CAST:%.*]] = bitcast %struct.X* [[A_PRIV]] to i8**
+; IS________NPM-NEXT: store i8* [[TMP0]], i8** [[A_PRIV_CAST]], align 8
+; IS________NPM-NEXT: call void @sync()
+; IS________NPM-NEXT: [[G0:%.*]] = getelementptr [[STRUCT_X]], %struct.X* [[A_PRIV]], i32 0, i32 0
+; IS________NPM-NEXT: [[L:%.*]] = load i8*, i8** [[G0]], align 8
+; IS________NPM-NEXT: ret i8* [[L]]
;
call void @sync()
%g0 = getelementptr %struct.X, %struct.X* %a, i32 0, i32 0
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
; IS__CGSCC____-LABEL: define {{[^@]+}}@callee
; IS__CGSCC____-SAME: () #[[ATTR1]] {
-; IS__CGSCC____-NEXT: ret i8 undef
+; IS__CGSCC____-NEXT: ret i8 49
;
%c = add i8 %a, 7
ret i8 %c
}
define void @user_as3() {
-; NOT_CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
-; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@user_as3
-; NOT_CGSCC_OPM-SAME: () #[[ATTR3:[0-9]+]] {
-; NOT_CGSCC_OPM-NEXT: store i32 0, i32 addrspace(3)* @ConstAS3Ptr, align 4
-; NOT_CGSCC_OPM-NEXT: ret void
-;
-; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
-; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@user_as3
-; IS__CGSCC_OPM-SAME: () #[[ATTR4:[0-9]+]] {
-; IS__CGSCC_OPM-NEXT: store i32 0, i32 addrspace(3)* @ConstAS3Ptr, align 4
-; IS__CGSCC_OPM-NEXT: ret void
+; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; IS__TUNIT____-LABEL: define {{[^@]+}}@user_as3
+; IS__TUNIT____-SAME: () #[[ATTR3:[0-9]+]] {
+; IS__TUNIT____-NEXT: store i32 0, i32 addrspace(3)* @ConstAS3Ptr, align 4
+; IS__TUNIT____-NEXT: ret void
+;
+; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; IS__CGSCC____-LABEL: define {{[^@]+}}@user_as3
+; IS__CGSCC____-SAME: () #[[ATTR4:[0-9]+]] {
+; IS__CGSCC____-NEXT: store i32 0, i32 addrspace(3)* @ConstAS3Ptr, align 4
+; IS__CGSCC____-NEXT: ret void
;
%call = call fastcc i32 addrspace(3)* @const_ptr_return_as3()
store i32 0, i32 addrspace(3)* %call
ret void
}
define void @user() {
-; NOT_CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
-; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@user
-; NOT_CGSCC_OPM-SAME: () #[[ATTR3]] {
-; NOT_CGSCC_OPM-NEXT: store i32 0, i32* addrspacecast (i32 addrspace(3)* @ConstAS3Ptr to i32*), align 4
-; NOT_CGSCC_OPM-NEXT: ret void
-;
-; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
-; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@user
-; IS__CGSCC_OPM-SAME: () #[[ATTR4]] {
-; IS__CGSCC_OPM-NEXT: store i32 0, i32* addrspacecast (i32 addrspace(3)* @ConstAS3Ptr to i32*), align 4
-; IS__CGSCC_OPM-NEXT: ret void
+; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; IS__TUNIT____-LABEL: define {{[^@]+}}@user
+; IS__TUNIT____-SAME: () #[[ATTR3]] {
+; IS__TUNIT____-NEXT: store i32 0, i32* addrspacecast (i32 addrspace(3)* @ConstAS3Ptr to i32*), align 4
+; IS__TUNIT____-NEXT: ret void
+;
+; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; IS__CGSCC____-LABEL: define {{[^@]+}}@user
+; IS__CGSCC____-SAME: () #[[ATTR4]] {
+; IS__CGSCC____-NEXT: store i32 0, i32* addrspacecast (i32 addrspace(3)* @ConstAS3Ptr to i32*), align 4
+; IS__CGSCC____-NEXT: ret void
;
%call = call fastcc i32* @const_ptr_return()
store i32 0, i32* %call
ret i1 %r1
}
define internal i1 @undef_then_null(i1 %c, i32* %i32Aptr, i32* %i32Bptr) {
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
; IS__CGSCC____-LABEL: define {{[^@]+}}@undef_then_null
-; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR1]] {
+; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR5:[0-9]+]] {
; IS__CGSCC____-NEXT: br i1 [[C]], label [[A:%.*]], label [[B:%.*]]
; IS__CGSCC____: a:
-; IS__CGSCC____-NEXT: ret i1 undef
+; IS__CGSCC____-NEXT: ret i1 false
; IS__CGSCC____: b:
-; IS__CGSCC____-NEXT: ret i1 undef
+; IS__CGSCC____-NEXT: ret i1 false
;
%cmp1 = icmp eq i32* %i32Aptr, %i32Bptr
%cmp2 = icmp eq i1 %cmp1, false
}
define internal i1 @undef_then_1(i1 %c, i32 %i32A, i32 %i32B) {
;
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
; IS__CGSCC____-LABEL: define {{[^@]+}}@undef_then_1
-; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR1]] {
+; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR5]] {
; IS__CGSCC____-NEXT: br i1 [[C]], label [[A:%.*]], label [[B:%.*]]
; IS__CGSCC____: a:
-; IS__CGSCC____-NEXT: ret i1 undef
+; IS__CGSCC____-NEXT: ret i1 false
; IS__CGSCC____: b:
-; IS__CGSCC____-NEXT: ret i1 undef
+; IS__CGSCC____-NEXT: ret i1 false
;
%cmp1 = icmp eq i32 %i32A, %i32B
%cmp2 = icmp eq i1 %cmp1, false
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
; IS__CGSCC____-LABEL: define {{[^@]+}}@select
; IS__CGSCC____-SAME: () #[[ATTR1]] {
-; IS__CGSCC____-NEXT: ret i32 undef
+; IS__CGSCC____-NEXT: ret i32 42
;
%s = select i1 %a, i32 %b, i32 %c
ret i32 %s
define internal void @callee_is_undef(void ()* %fn) {
;
; CHECK-LABEL: define {{[^@]+}}@callee_is_undef() {
-; CHECK-NEXT: call void undef()
+; CHECK-NEXT: call void poison()
; CHECK-NEXT: ret void
;
call void %fn()
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
; IS__CGSCC____-LABEL: define {{[^@]+}}@cmp_null_after_cast
; IS__CGSCC____-SAME: () #[[ATTR1]] {
-; IS__CGSCC____-NEXT: ret i1 undef
+; IS__CGSCC____-NEXT: ret i1 true
;
%t = trunc i32 %a to i8
%c = icmp eq i8 %t, %b
; IS__CGSCC_OPM-NEXT: br label [[F]]
; IS__CGSCC_OPM: f:
; IS__CGSCC_OPM-NEXT: [[P:%.*]] = phi i1 [ true, [[ENTRY:%.*]] ], [ false, [[T]] ]
-; IS__CGSCC_OPM-NEXT: [[RC1:%.*]] = call noundef i1 @ret(i1 noundef [[P]]) #[[ATTR7:[0-9]+]]
+; IS__CGSCC_OPM-NEXT: [[RC1:%.*]] = call noundef i1 @ret(i1 noundef [[P]]) #[[ATTR8:[0-9]+]]
; IS__CGSCC_OPM-NEXT: ret i1 [[RC1]]
;
; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
; IS________OPM-NEXT: [[P:%.*]] = phi i1 [ [[C]], [[ENTRY:%.*]] ], [ false, [[T]] ]
; IS________OPM-NEXT: ret i1 [[P]]
;
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@ret
-; IS__TUNIT_NPM-SAME: (i1 noundef [[C:%.*]]) #[[ATTR1]] {
-; IS__TUNIT_NPM-NEXT: entry:
-; IS__TUNIT_NPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
-; IS__TUNIT_NPM: t:
-; IS__TUNIT_NPM-NEXT: br label [[F]]
-; IS__TUNIT_NPM: f:
-; IS__TUNIT_NPM-NEXT: [[P:%.*]] = phi i1 [ [[C]], [[ENTRY:%.*]] ], [ false, [[T]] ]
-; IS__TUNIT_NPM-NEXT: ret i1 false
-;
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@ret
-; IS__CGSCC_NPM-SAME: (i1 noundef [[C:%.*]]) #[[ATTR1]] {
-; IS__CGSCC_NPM-NEXT: entry:
-; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
-; IS__CGSCC_NPM: t:
-; IS__CGSCC_NPM-NEXT: br label [[F]]
-; IS__CGSCC_NPM: f:
-; IS__CGSCC_NPM-NEXT: [[P:%.*]] = phi i1 [ [[C]], [[ENTRY:%.*]] ], [ false, [[T]] ]
-; IS__CGSCC_NPM-NEXT: ret i1 undef
+; IS________NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; IS________NPM-LABEL: define {{[^@]+}}@ret
+; IS________NPM-SAME: (i1 noundef [[C:%.*]]) #[[ATTR1]] {
+; IS________NPM-NEXT: entry:
+; IS________NPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; IS________NPM: t:
+; IS________NPM-NEXT: br label [[F]]
+; IS________NPM: f:
+; IS________NPM-NEXT: [[P:%.*]] = phi i1 [ [[C]], [[ENTRY:%.*]] ], [ false, [[T]] ]
+; IS________NPM-NEXT: ret i1 false
;
entry:
br i1 %c, label %t, label %f
ret i1 %p
}
+declare i8* @unknown()
+define internal i8 @dead_ret() {
+; CHECK-LABEL: define {{[^@]+}}@dead_ret() {
+; CHECK-NEXT: [[R:%.*]] = call i8* @unknown()
+; CHECK-NEXT: ret i8 undef
+;
+ %r = call i8* @unknown()
+ %l = load i8, i8* %r
+ ret i8 %l
+}
+
+define void @dead_ret_caller() {
+; CHECK-LABEL: define {{[^@]+}}@dead_ret_caller() {
+; CHECK-NEXT: [[R:%.*]] = call i8 @dead_ret()
+; CHECK-NEXT: ret void
+;
+ %r = call i8 @dead_ret()
+ ret void
+}
+
;.
; IS__TUNIT_OPM: attributes #[[ATTR0]] = { nofree nosync nounwind willreturn }
; IS__TUNIT_OPM: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
; IS__CGSCC_OPM: attributes #[[ATTR2]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
; IS__CGSCC_OPM: attributes #[[ATTR3]] = { argmemonly nofree norecurse nosync nounwind writeonly }
; IS__CGSCC_OPM: attributes #[[ATTR4]] = { nofree norecurse nosync nounwind willreturn writeonly }
-; IS__CGSCC_OPM: attributes #[[ATTR5]] = { willreturn }
-; IS__CGSCC_OPM: attributes #[[ATTR6]] = { nounwind willreturn writeonly }
-; IS__CGSCC_OPM: attributes #[[ATTR7]] = { readnone willreturn }
+; IS__CGSCC_OPM: attributes #[[ATTR5]] = { nofree nosync nounwind readnone willreturn }
+; IS__CGSCC_OPM: attributes #[[ATTR6]] = { willreturn }
+; IS__CGSCC_OPM: attributes #[[ATTR7]] = { nounwind willreturn writeonly }
+; IS__CGSCC_OPM: attributes #[[ATTR8]] = { readnone willreturn }
;.
; IS__CGSCC_NPM: attributes #[[ATTR0]] = { nofree nosync nounwind willreturn }
; IS__CGSCC_NPM: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
; IS__CGSCC_NPM: attributes #[[ATTR2]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
-; IS__CGSCC_NPM: attributes #[[ATTR3]] = { nofree norecurse nosync nounwind willreturn writeonly }
-; IS__CGSCC_NPM: attributes #[[ATTR4]] = { willreturn }
+; IS__CGSCC_NPM: attributes #[[ATTR3]] = { nofree norecurse nosync nounwind readonly willreturn }
+; IS__CGSCC_NPM: attributes #[[ATTR4]] = { nofree norecurse nosync nounwind willreturn writeonly }
+; IS__CGSCC_NPM: attributes #[[ATTR5]] = { nofree nosync nounwind readnone willreturn }
+; IS__CGSCC_NPM: attributes #[[ATTR6]] = { willreturn }
;.
; CHECK: [[RNG0]] = !{i32 0, i32 -2147483648}
;.