diff --git a/llvm/include/llvm/Transforms/IPO/Attributor.h b/llvm/include/llvm/Transforms/IPO/Attributor.h --- a/llvm/include/llvm/Transforms/IPO/Attributor.h +++ b/llvm/include/llvm/Transforms/IPO/Attributor.h @@ -1015,11 +1015,13 @@ /// the abstract attributes. /// \param CGUpdater Helper to update an underlying call graph. /// \param Allowed If not null, a set limiting the attribute opportunities. + /// \param DeleteFns Whether to delete functions Attributor(SetVector &Functions, InformationCache &InfoCache, CallGraphUpdater &CGUpdater, - DenseSet *Allowed = nullptr) + DenseSet *Allowed = nullptr, bool DeleteFns = true) : Allocator(InfoCache.Allocator), Functions(Functions), - InfoCache(InfoCache), CGUpdater(CGUpdater), Allowed(Allowed) {} + InfoCache(InfoCache), CGUpdater(CGUpdater), Allowed(Allowed), + DeleteFns(DeleteFns) {} ~Attributor(); @@ -1330,7 +1332,10 @@ void deleteAfterManifest(BasicBlock &BB) { ToBeDeletedBlocks.insert(&BB); } /// Record that \p F is deleted after information was manifested. - void deleteAfterManifest(Function &F) { ToBeDeletedFunctions.insert(&F); } + void deleteAfterManifest(Function &F) { + if (DeleteFns) + ToBeDeletedFunctions.insert(&F); + } /// If \p V is assumed to be a constant, return it, if it is unclear yet, /// return None, otherwise return `nullptr`. @@ -1656,6 +1661,9 @@ /// If not null, a set limiting the attribute opportunities. const DenseSet *Allowed; + /// Whether to delete functions. + const bool DeleteFns; + /// A set to remember the functions we already assume to be live and visited. DenseSet VisitedFunctions; diff --git a/llvm/lib/Transforms/IPO/Attributor.cpp b/llvm/lib/Transforms/IPO/Attributor.cpp --- a/llvm/lib/Transforms/IPO/Attributor.cpp +++ b/llvm/lib/Transforms/IPO/Attributor.cpp @@ -1175,6 +1175,10 @@ } void Attributor::identifyDeadInternalFunctions() { + // Early exit if we don't intend to delete functions. + if (!DeleteFns) + return; + // Identify dead internal functions and delete them. This happens outside // the other fixpoint analysis as we might treat potentially dead functions // as live to lower the number of iterations. If they happen to be dead, the @@ -2288,7 +2292,8 @@ static bool runAttributorOnFunctions(InformationCache &InfoCache, SetVector &Functions, AnalysisGetter &AG, - CallGraphUpdater &CGUpdater) { + CallGraphUpdater &CGUpdater, + bool DeleteFns) { if (Functions.empty()) return false; @@ -2297,7 +2302,8 @@ // Create an Attributor and initially empty information cache that is filled // while we identify default attribute opportunities. - Attributor A(Functions, InfoCache, CGUpdater); + Attributor A(Functions, InfoCache, CGUpdater, /* Allowed */ nullptr, + DeleteFns); // Create shallow wrappers for all functions that are not IPO amendable if (AllowShallowWrappers) @@ -2400,7 +2406,8 @@ CallGraphUpdater CGUpdater; BumpPtrAllocator Allocator; InformationCache InfoCache(M, AG, Allocator, /* CGSCC */ nullptr); - if (runAttributorOnFunctions(InfoCache, Functions, AG, CGUpdater)) { + if (runAttributorOnFunctions(InfoCache, Functions, AG, CGUpdater, + /* DeleteFns */ true)) { // FIXME: Think about passes we will preserve and add them here. return PreservedAnalyses::none(); } @@ -2427,7 +2434,8 @@ CGUpdater.initialize(CG, C, AM, UR); BumpPtrAllocator Allocator; InformationCache InfoCache(M, AG, Allocator, /* CGSCC */ &Functions); - if (runAttributorOnFunctions(InfoCache, Functions, AG, CGUpdater)) { + if (runAttributorOnFunctions(InfoCache, Functions, AG, CGUpdater, + /* DeleteFns */ false)) { // FIXME: Think about passes we will preserve and add them here. PreservedAnalyses PA; PA.preserve(); @@ -2502,7 +2510,8 @@ CallGraphUpdater CGUpdater; BumpPtrAllocator Allocator; InformationCache InfoCache(M, AG, Allocator, /* CGSCC */ nullptr); - return runAttributorOnFunctions(InfoCache, Functions, AG, CGUpdater); + return runAttributorOnFunctions(InfoCache, Functions, AG, CGUpdater, + /* DeleteFns*/ true); } void getAnalysisUsage(AnalysisUsage &AU) const override { @@ -2538,7 +2547,8 @@ Module &M = *Functions.back()->getParent(); BumpPtrAllocator Allocator; InformationCache InfoCache(M, AG, Allocator, /* CGSCC */ &Functions); - return runAttributorOnFunctions(InfoCache, Functions, AG, CGUpdater); + return runAttributorOnFunctions(InfoCache, Functions, AG, CGUpdater, + /* DeleteFns */ false); } void getAnalysisUsage(AnalysisUsage &AU) const override { diff --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/live_called_from_dead.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/live_called_from_dead.ll --- a/llvm/test/Transforms/Attributor/ArgumentPromotion/live_called_from_dead.ll +++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/live_called_from_dead.ll @@ -6,6 +6,10 @@ define internal void @dead() { +; IS__CGSCC____-LABEL: define {{[^@]+}}@dead() { +; IS__CGSCC____-NEXT: [[TMP1:%.*]] = call i32 @test(i32* noalias noundef align 536870912 null) +; IS__CGSCC____-NEXT: ret void +; call i32 @test(i32* null, i32* null) ret void } @@ -13,7 +17,7 @@ define internal i32 @test(i32* %X, i32* %Y) { ; IS__CGSCC_OPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test -; IS__CGSCC_OPM-SAME: (i32* noalias nocapture nofree noundef writeonly align 4 [[X:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC_OPM-SAME: (i32* noalias nocapture nofree noundef writeonly align 4 [[X:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: br i1 true, label [[LIVE:%.*]], label [[DEAD:%.*]] ; IS__CGSCC_OPM: live: ; IS__CGSCC_OPM-NEXT: store i32 0, i32* [[X]], align 4 @@ -23,7 +27,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test -; IS__CGSCC_NPM-SAME: (i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[X:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC_NPM-SAME: (i32* noalias nocapture nofree noundef writeonly align 4 [[X:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC_NPM-NEXT: br i1 true, label [[LIVE:%.*]], label [[DEAD:%.*]] ; IS__CGSCC_NPM: live: ; IS__CGSCC_NPM-NEXT: store i32 0, i32* [[X]], align 4 @@ -44,18 +48,18 @@ define internal i32 @caller(i32* %B) { ; IS__CGSCC_OPM: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@caller -; IS__CGSCC_OPM-SAME: () [[ATTR1:#.*]] { +; IS__CGSCC_OPM-SAME: () #[[ATTR1:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: [[A:%.*]] = alloca i32, align 4 ; IS__CGSCC_OPM-NEXT: store i32 1, i32* [[A]], align 4 -; IS__CGSCC_OPM-NEXT: [[C:%.*]] = call i32 @test(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[A]]) [[ATTR3:#.*]] +; IS__CGSCC_OPM-NEXT: [[C:%.*]] = call i32 @test(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[A]]) #[[ATTR3:[0-9]+]] ; IS__CGSCC_OPM-NEXT: ret i32 undef ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@caller -; IS__CGSCC_NPM-SAME: () [[ATTR1:#.*]] { +; IS__CGSCC_NPM-SAME: () #[[ATTR1:[0-9]+]] { ; IS__CGSCC_NPM-NEXT: [[A:%.*]] = alloca i32, align 4 ; IS__CGSCC_NPM-NEXT: store i32 1, i32* [[A]], align 4 -; IS__CGSCC_NPM-NEXT: [[C:%.*]] = call i32 @test(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[A]]) [[ATTR2:#.*]] +; IS__CGSCC_NPM-NEXT: [[C:%.*]] = call i32 @test(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[A]]) #[[ATTR2:[0-9]+]] ; IS__CGSCC_NPM-NEXT: ret i32 undef ; %A = alloca i32 @@ -67,17 +71,24 @@ define i32 @callercaller() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@callercaller -; IS__TUNIT____-SAME: () [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: () #[[ATTR0:[0-9]+]] { ; IS__TUNIT____-NEXT: [[B:%.*]] = alloca i32, align 4 ; IS__TUNIT____-NEXT: store i32 2, i32* [[B]], align 4 ; IS__TUNIT____-NEXT: ret i32 0 ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn -; IS__CGSCC____-LABEL: define {{[^@]+}}@callercaller -; IS__CGSCC____-SAME: () [[ATTR1:#.*]] { -; IS__CGSCC____-NEXT: [[B:%.*]] = alloca i32, align 4 -; IS__CGSCC____-NEXT: store i32 2, i32* [[B]], align 4 -; IS__CGSCC____-NEXT: ret i32 0 +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@callercaller +; IS__CGSCC_OPM-SAME: () #[[ATTR2:[0-9]+]] { +; IS__CGSCC_OPM-NEXT: [[B:%.*]] = alloca i32, align 4 +; IS__CGSCC_OPM-NEXT: store i32 2, i32* [[B]], align 4 +; IS__CGSCC_OPM-NEXT: ret i32 0 +; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@callercaller +; IS__CGSCC_NPM-SAME: () #[[ATTR1]] { +; IS__CGSCC_NPM-NEXT: [[B:%.*]] = alloca i32, align 4 +; IS__CGSCC_NPM-NEXT: store i32 2, i32* [[B]], align 4 +; IS__CGSCC_NPM-NEXT: ret i32 0 ; %B = alloca i32 store i32 2, i32* %B @@ -85,3 +96,13 @@ ret i32 %X } +; IS__TUNIT____: attributes #[[ATTR0]] = { nofree nosync nounwind readnone willreturn } +;. +; IS__CGSCC_OPM: attributes #[[ATTR0]] = { argmemonly nofree nosync nounwind willreturn writeonly } +; IS__CGSCC_OPM: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR3]] = { nofree nosync nounwind willreturn writeonly } +;. +; IS__CGSCC_NPM: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } +; IS__CGSCC_NPM: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR2]] = { nofree nosync nounwind willreturn writeonly } diff --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/live_called_from_dead_2.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/live_called_from_dead_2.ll --- a/llvm/test/Transforms/Attributor/ArgumentPromotion/live_called_from_dead_2.ll +++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/live_called_from_dead_2.ll @@ -6,6 +6,10 @@ define internal void @dead() { +; IS__CGSCC____-LABEL: define {{[^@]+}}@dead() { +; IS__CGSCC____-NEXT: [[TMP1:%.*]] = call i32 @test(i32* noalias noundef align 536870912 null) +; IS__CGSCC____-NEXT: ret void +; call i32 @test(i32* null, i32* null) ret void } @@ -13,7 +17,7 @@ define internal i32 @test(i32* %X, i32* %Y) { ; NOT_CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@test -; NOT_CGSCC_NPM-SAME: (i32* noalias nocapture nofree noundef writeonly align 4 [[X:%.*]]) [[ATTR0:#.*]] { +; NOT_CGSCC_NPM-SAME: (i32* noalias nocapture nofree noundef writeonly align 4 [[X:%.*]]) #[[ATTR0:[0-9]+]] { ; NOT_CGSCC_NPM-NEXT: br i1 true, label [[LIVE:%.*]], label [[DEAD:%.*]] ; NOT_CGSCC_NPM: live: ; NOT_CGSCC_NPM-NEXT: store i32 0, i32* [[X]], align 4 @@ -23,7 +27,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test -; IS__CGSCC_NPM-SAME: (i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[X:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC_NPM-SAME: (i32* noalias nocapture nofree noundef writeonly align 4 [[X:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC_NPM-NEXT: br i1 true, label [[LIVE:%.*]], label [[DEAD:%.*]] ; IS__CGSCC_NPM: live: ; IS__CGSCC_NPM-NEXT: store i32 0, i32* [[X]], align 4 @@ -44,18 +48,18 @@ define internal i32 @caller(i32* %B) { ; NOT_CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@caller -; NOT_CGSCC_NPM-SAME: (i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B:%.*]]) [[ATTR0]] { +; NOT_CGSCC_NPM-SAME: (i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B:%.*]]) #[[ATTR0]] { ; NOT_CGSCC_NPM-NEXT: [[A:%.*]] = alloca i32, align 4 ; NOT_CGSCC_NPM-NEXT: store i32 1, i32* [[A]], align 4 -; NOT_CGSCC_NPM-NEXT: [[C:%.*]] = call i32 @test(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B]]) [[ATTR2:#.*]] +; NOT_CGSCC_NPM-NEXT: [[C:%.*]] = call i32 @test(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B]]) #[[ATTR2:[0-9]+]] ; NOT_CGSCC_NPM-NEXT: ret i32 undef ; ; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@caller -; IS__CGSCC_NPM-SAME: (i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B:%.*]]) [[ATTR0]] { +; IS__CGSCC_NPM-SAME: (i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B:%.*]]) #[[ATTR0]] { ; IS__CGSCC_NPM-NEXT: [[A:%.*]] = alloca i32, align 4 ; IS__CGSCC_NPM-NEXT: store i32 1, i32* [[A]], align 4 -; IS__CGSCC_NPM-NEXT: [[C:%.*]] = call i32 @test(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B]]) [[ATTR2:#.*]] +; IS__CGSCC_NPM-NEXT: [[C:%.*]] = call i32 @test(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B]]) #[[ATTR2:[0-9]+]] ; IS__CGSCC_NPM-NEXT: ret i32 undef ; %A = alloca i32 @@ -67,26 +71,26 @@ define i32 @callercaller() { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@callercaller -; IS__TUNIT____-SAME: () [[ATTR1:#.*]] { +; IS__TUNIT____-SAME: () #[[ATTR1:[0-9]+]] { ; IS__TUNIT____-NEXT: [[B:%.*]] = alloca i32, align 4 ; IS__TUNIT____-NEXT: store i32 2, i32* [[B]], align 4 -; IS__TUNIT____-NEXT: [[X:%.*]] = call i32 @caller(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B]]) [[ATTR2:#.*]] +; IS__TUNIT____-NEXT: [[X:%.*]] = call i32 @caller(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B]]) #[[ATTR2]] ; IS__TUNIT____-NEXT: ret i32 0 ; ; IS__CGSCC_OPM: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@callercaller -; IS__CGSCC_OPM-SAME: () [[ATTR1:#.*]] { +; IS__CGSCC_OPM-SAME: () #[[ATTR1:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: [[B:%.*]] = alloca i32, align 4 ; IS__CGSCC_OPM-NEXT: store i32 2, i32* [[B]], align 4 -; IS__CGSCC_OPM-NEXT: [[X:%.*]] = call i32 @caller(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B]]) [[ATTR3:#.*]] +; IS__CGSCC_OPM-NEXT: [[X:%.*]] = call i32 @caller(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B]]) #[[ATTR3:[0-9]+]] ; IS__CGSCC_OPM-NEXT: ret i32 0 ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@callercaller -; IS__CGSCC_NPM-SAME: () [[ATTR1:#.*]] { +; IS__CGSCC_NPM-SAME: () #[[ATTR1:[0-9]+]] { ; IS__CGSCC_NPM-NEXT: [[B:%.*]] = alloca i32, align 4 ; IS__CGSCC_NPM-NEXT: store i32 2, i32* [[B]], align 4 -; IS__CGSCC_NPM-NEXT: [[X:%.*]] = call i32 @caller(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B]]) [[ATTR3:#.*]] +; IS__CGSCC_NPM-NEXT: [[X:%.*]] = call i32 @caller(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B]]) #[[ATTR3:[0-9]+]] ; IS__CGSCC_NPM-NEXT: ret i32 0 ; %B = alloca i32 @@ -95,3 +99,16 @@ ret i32 %X } +; IS__TUNIT____: attributes #[[ATTR0]] = { argmemonly nofree nosync nounwind willreturn writeonly } +; IS__TUNIT____: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn } +; IS__TUNIT____: attributes #[[ATTR2]] = { nofree nosync nounwind willreturn writeonly } +;. +; IS__CGSCC_OPM: attributes #[[ATTR0]] = { argmemonly nofree nosync nounwind willreturn writeonly } +; IS__CGSCC_OPM: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR2]] = { nofree nosync nounwind willreturn writeonly } +; IS__CGSCC_OPM: attributes #[[ATTR3]] = { nounwind willreturn writeonly } +;. +; IS__CGSCC_NPM: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } +; IS__CGSCC_NPM: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR2]] = { nofree nosync nounwind willreturn writeonly } +; IS__CGSCC_NPM: attributes #[[ATTR3]] = { nounwind willreturn writeonly } diff --git a/llvm/test/Transforms/Attributor/IPConstantProp/dangling-block-address.ll b/llvm/test/Transforms/Attributor/IPConstantProp/dangling-block-address.ll --- a/llvm/test/Transforms/Attributor/IPConstantProp/dangling-block-address.ll +++ b/llvm/test/Transforms/Attributor/IPConstantProp/dangling-block-address.ll @@ -8,8 +8,8 @@ ; IPSCCP should prove that the blocks are dead and delete them, and ; properly handle the dangling blockaddress constants. -; NOT_CGSCC_OPM: @bar.l = internal constant [2 x i8*] [i8* inttoptr (i32 1 to i8*), i8* inttoptr (i32 1 to i8*)] -; IS__CGSCC_OPM: @bar.l = internal constant [2 x i8*] [i8* blockaddress(@bar, %lab0), i8* blockaddress(@bar, %end)] +; NOT_CGSCC____: @bar.l = internal constant [2 x i8*] [i8* inttoptr (i32 1 to i8*), i8* inttoptr (i32 1 to i8*)] +; IS__CGSCC____: @bar.l = internal constant [2 x i8*] [i8* blockaddress(@bar, %lab0), i8* blockaddress(@bar, %end)] @code = global [5 x i32] [i32 0, i32 0, i32 0, i32 0, i32 1], align 4 ; <[5 x i32]*> [#uses=0] @bar.l = internal constant [2 x i8*] [i8* blockaddress(@bar, %lab0), i8* blockaddress(@bar, %end)] ; <[2 x i8*]*> [#uses=1] @@ -17,7 +17,7 @@ define internal void @foo(i32 %x) nounwind readnone { ; IS__CGSCC____: Function Attrs: nounwind readnone ; IS__CGSCC____-LABEL: define {{[^@]+}}@foo -; IS__CGSCC____-SAME: (i32 [[X:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: (i32 [[X:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: [[B:%.*]] = alloca i32, align 4 ; IS__CGSCC____-NEXT: store volatile i32 -1, i32* [[B]], align 4 @@ -32,7 +32,7 @@ define internal void @bar(i32* nocapture %pc) nounwind readonly { ; IS__CGSCC_OPM: Function Attrs: nounwind readonly ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@bar -; IS__CGSCC_OPM-SAME: (i32* nocapture [[PC:%.*]]) [[ATTR1:#.*]] { +; IS__CGSCC_OPM-SAME: (i32* nocapture [[PC:%.*]]) #[[ATTR1:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: entry: ; IS__CGSCC_OPM-NEXT: br label [[INDIRECTGOTO:%.*]] ; IS__CGSCC_OPM: lab0: @@ -48,6 +48,24 @@ ; IS__CGSCC_OPM-NEXT: [[INDIRECT_GOTO_DEST:%.*]] = load i8*, i8** [[INDIRECT_GOTO_DEST_IN]], align 8 ; IS__CGSCC_OPM-NEXT: indirectbr i8* [[INDIRECT_GOTO_DEST]], [label [[LAB0]], label %end] ; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@bar +; IS__CGSCC_NPM-SAME: (i32* noalias nocapture nofree nonnull readonly align 536870912 dereferenceable(4294967295) [[PC:%.*]]) #[[ATTR1:[0-9]+]] { +; IS__CGSCC_NPM-NEXT: entry: +; IS__CGSCC_NPM-NEXT: br label [[INDIRECTGOTO:%.*]] +; IS__CGSCC_NPM: lab0: +; IS__CGSCC_NPM-NEXT: [[INDVAR_NEXT:%.*]] = add i32 [[INDVAR:%.*]], 1 +; IS__CGSCC_NPM-NEXT: br label [[INDIRECTGOTO]] +; IS__CGSCC_NPM: end: +; IS__CGSCC_NPM-NEXT: ret void +; IS__CGSCC_NPM: indirectgoto: +; IS__CGSCC_NPM-NEXT: [[INDVAR]] = phi i32 [ [[INDVAR_NEXT]], [[LAB0:%.*]] ], [ 0, [[ENTRY:%.*]] ] +; IS__CGSCC_NPM-NEXT: [[PC_ADDR_0:%.*]] = getelementptr i32, i32* undef, i32 [[INDVAR]] +; IS__CGSCC_NPM-NEXT: [[TMP1_PN:%.*]] = load i32, i32* [[PC_ADDR_0]], align 4 +; IS__CGSCC_NPM-NEXT: [[INDIRECT_GOTO_DEST_IN:%.*]] = getelementptr inbounds [2 x i8*], [2 x i8*]* @bar.l, i32 0, i32 [[TMP1_PN]] +; IS__CGSCC_NPM-NEXT: [[INDIRECT_GOTO_DEST:%.*]] = load i8*, i8** [[INDIRECT_GOTO_DEST_IN]], align 8 +; IS__CGSCC_NPM-NEXT: indirectbr i8* [[INDIRECT_GOTO_DEST]], [label [[LAB0]], label %end] +; entry: br label %indirectgoto @@ -70,16 +88,25 @@ define i32 @main() nounwind readnone { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@main -; IS__TUNIT____-SAME: () [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: () #[[ATTR0:[0-9]+]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: ret i32 0 ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@main -; IS__CGSCC____-SAME: () [[ATTR1:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR2:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: ret i32 0 ; entry: ret i32 0 } +; IS__TUNIT____: attributes #[[ATTR0]] = { nofree nosync nounwind readnone willreturn } +;. +; IS__CGSCC_OPM: attributes #[[ATTR0]] = { nounwind readnone } +; IS__CGSCC_OPM: attributes #[[ATTR1]] = { nounwind readonly } +; IS__CGSCC_OPM: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind readnone willreturn } +;. +; IS__CGSCC_NPM: attributes #[[ATTR0]] = { nounwind readnone } +; IS__CGSCC_NPM: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone } +; IS__CGSCC_NPM: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind readnone willreturn } diff --git a/llvm/test/Transforms/Attributor/align.ll b/llvm/test/Transforms/Attributor/align.ll --- a/llvm/test/Transforms/Attributor/align.ll +++ b/llvm/test/Transforms/Attributor/align.ll @@ -11,15 +11,16 @@ ; TEST 1 +;; define i32* @test1(i32* align 8 %0) #0 { ; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@test1 -; IS__TUNIT____-SAME: (i32* nofree readnone returned align 8 "no-capture-maybe-returned" [[TMP0:%.*]]) [[ATTR0:#.*]] { +; IS__TUNIT____-SAME: (i32* nofree readnone returned align 8 "no-capture-maybe-returned" [[TMP0:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__TUNIT____-NEXT: ret i32* [[TMP0]] ; ; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@test1 -; IS__CGSCC____-SAME: (i32* nofree readnone returned align 8 "no-capture-maybe-returned" [[TMP0:%.*]]) [[ATTR0:#.*]] { +; IS__CGSCC____-SAME: (i32* nofree readnone returned align 8 "no-capture-maybe-returned" [[TMP0:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: ret i32* [[TMP0]] ; ret i32* %0 @@ -29,12 +30,12 @@ define i32* @test2(i32* %0) #0 { ; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@test2 -; IS__TUNIT____-SAME: (i32* nofree readnone returned "no-capture-maybe-returned" [[TMP0:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i32* nofree readnone returned "no-capture-maybe-returned" [[TMP0:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: ret i32* [[TMP0]] ; ; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@test2 -; IS__CGSCC____-SAME: (i32* nofree readnone returned "no-capture-maybe-returned" [[TMP0:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32* nofree readnone returned "no-capture-maybe-returned" [[TMP0:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: ret i32* [[TMP0]] ; ret i32* %0 @@ -44,13 +45,13 @@ define i32* @test3(i32* align 8 %0, i32* align 4 %1, i1 %2) #0 { ; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@test3 -; IS__TUNIT____-SAME: (i32* nofree readnone align 8 "no-capture-maybe-returned" [[TMP0:%.*]], i32* nofree readnone align 4 "no-capture-maybe-returned" [[TMP1:%.*]], i1 [[TMP2:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i32* nofree readnone align 8 "no-capture-maybe-returned" [[TMP0:%.*]], i32* nofree readnone align 4 "no-capture-maybe-returned" [[TMP1:%.*]], i1 [[TMP2:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: [[RET:%.*]] = select i1 [[TMP2]], i32* [[TMP0]], i32* [[TMP1]] ; IS__TUNIT____-NEXT: ret i32* [[RET]] ; ; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@test3 -; IS__CGSCC____-SAME: (i32* nofree readnone align 8 "no-capture-maybe-returned" [[TMP0:%.*]], i32* nofree readnone align 4 "no-capture-maybe-returned" [[TMP1:%.*]], i1 [[TMP2:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32* nofree readnone align 8 "no-capture-maybe-returned" [[TMP0:%.*]], i32* nofree readnone align 4 "no-capture-maybe-returned" [[TMP1:%.*]], i1 [[TMP2:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: [[RET:%.*]] = select i1 [[TMP2]], i32* [[TMP0]], i32* [[TMP1]] ; IS__CGSCC____-NEXT: ret i32* [[RET]] ; @@ -62,13 +63,13 @@ define i32* @test4(i32* align 32 %0, i32* align 32 %1, i1 %2) #0 { ; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@test4 -; IS__TUNIT____-SAME: (i32* nofree readnone align 32 "no-capture-maybe-returned" [[TMP0:%.*]], i32* nofree readnone align 32 "no-capture-maybe-returned" [[TMP1:%.*]], i1 [[TMP2:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i32* nofree readnone align 32 "no-capture-maybe-returned" [[TMP0:%.*]], i32* nofree readnone align 32 "no-capture-maybe-returned" [[TMP1:%.*]], i1 [[TMP2:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: [[RET:%.*]] = select i1 [[TMP2]], i32* [[TMP0]], i32* [[TMP1]] ; IS__TUNIT____-NEXT: ret i32* [[RET]] ; ; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@test4 -; IS__CGSCC____-SAME: (i32* nofree readnone align 32 "no-capture-maybe-returned" [[TMP0:%.*]], i32* nofree readnone align 32 "no-capture-maybe-returned" [[TMP1:%.*]], i1 [[TMP2:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32* nofree readnone align 32 "no-capture-maybe-returned" [[TMP0:%.*]], i32* nofree readnone align 32 "no-capture-maybe-returned" [[TMP1:%.*]], i1 [[TMP2:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: [[RET:%.*]] = select i1 [[TMP2]], i32* [[TMP0]], i32* [[TMP1]] ; IS__CGSCC____-NEXT: ret i32* [[RET]] ; @@ -102,34 +103,46 @@ ; TEST 6 ; SCC define i32* @test6_1() #0 { -; NOT_CGSCC_OPM: Function Attrs: nofree noinline noreturn nosync nounwind readnone uwtable -; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@test6_1 -; NOT_CGSCC_OPM-SAME: () [[ATTR1:#.*]] { -; NOT_CGSCC_OPM-NEXT: [[RET:%.*]] = tail call i32* @test6_2() [[ATTR11:#.*]] -; NOT_CGSCC_OPM-NEXT: unreachable +; IS__TUNIT____: Function Attrs: nofree noinline noreturn nosync nounwind readnone uwtable +; IS__TUNIT____-LABEL: define {{[^@]+}}@test6_1 +; IS__TUNIT____-SAME: () #[[ATTR1:[0-9]+]] { +; IS__TUNIT____-NEXT: [[RET:%.*]] = tail call i32* @test6_2() #[[ATTR11:[0-9]+]] +; IS__TUNIT____-NEXT: unreachable ; ; IS__CGSCC_OPM: Function Attrs: nofree noinline noreturn nosync nounwind readnone uwtable ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test6_1 -; IS__CGSCC_OPM-SAME: () [[ATTR1:#.*]] { -; IS__CGSCC_OPM-NEXT: [[RET:%.*]] = tail call i32* @test6_2() [[ATTR12:#.*]] +; IS__CGSCC_OPM-SAME: () #[[ATTR1:[0-9]+]] { +; IS__CGSCC_OPM-NEXT: [[RET:%.*]] = tail call i32* @test6_2() #[[ATTR13:[0-9]+]] ; IS__CGSCC_OPM-NEXT: unreachable +; +; IS__CGSCC_NPM: Function Attrs: nofree noinline noreturn nosync nounwind readnone uwtable +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test6_1 +; IS__CGSCC_NPM-SAME: () #[[ATTR1:[0-9]+]] { +; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = tail call i32* @test6_2() #[[ATTR12:[0-9]+]] +; IS__CGSCC_NPM-NEXT: unreachable ; %ret = tail call i32* @test6_2() ret i32* %ret } define i32* @test6_2() #0 { -; NOT_CGSCC_OPM: Function Attrs: nofree noinline noreturn nosync nounwind readnone uwtable -; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@test6_2 -; NOT_CGSCC_OPM-SAME: () [[ATTR1]] { -; NOT_CGSCC_OPM-NEXT: [[RET:%.*]] = tail call i32* @test6_1() [[ATTR11]] -; NOT_CGSCC_OPM-NEXT: unreachable +; IS__TUNIT____: Function Attrs: nofree noinline noreturn nosync nounwind readnone uwtable +; IS__TUNIT____-LABEL: define {{[^@]+}}@test6_2 +; IS__TUNIT____-SAME: () #[[ATTR1]] { +; IS__TUNIT____-NEXT: [[RET:%.*]] = tail call i32* @test6_1() #[[ATTR11]] +; IS__TUNIT____-NEXT: unreachable ; ; IS__CGSCC_OPM: Function Attrs: nofree noinline noreturn nosync nounwind readnone uwtable ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test6_2 -; IS__CGSCC_OPM-SAME: () [[ATTR1]] { -; IS__CGSCC_OPM-NEXT: [[RET:%.*]] = tail call i32* @test6_1() [[ATTR12]] +; IS__CGSCC_OPM-SAME: () #[[ATTR1]] { +; IS__CGSCC_OPM-NEXT: [[RET:%.*]] = tail call i32* @test6_1() #[[ATTR13]] ; IS__CGSCC_OPM-NEXT: unreachable +; +; IS__CGSCC_NPM: Function Attrs: nofree noinline noreturn nosync nounwind readnone uwtable +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test6_2 +; IS__CGSCC_NPM-SAME: () #[[ATTR1]] { +; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = tail call i32* @test6_1() #[[ATTR12]] +; IS__CGSCC_NPM-NEXT: unreachable ; %ret = tail call i32* @test6_1() ret i32* %ret @@ -157,7 +170,7 @@ define internal i8* @f1(i8* readnone %0) local_unnamed_addr #0 { ; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@f1 -; IS__TUNIT____-SAME: (i8* noalias nofree nonnull readnone returned align 8 dereferenceable(1) "no-capture-maybe-returned" [[TMP0:%.*]]) local_unnamed_addr [[ATTR0]] { +; IS__TUNIT____-SAME: (i8* noalias nofree nonnull readnone returned align 8 dereferenceable(1) "no-capture-maybe-returned" [[TMP0:%.*]]) local_unnamed_addr #[[ATTR0]] { ; IS__TUNIT____-NEXT: br label [[TMP3:%.*]] ; IS__TUNIT____: 2: ; IS__TUNIT____-NEXT: unreachable @@ -166,16 +179,16 @@ ; ; IS__CGSCC_OPM: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@f1 -; IS__CGSCC_OPM-SAME: (i8* noalias nofree nonnull readnone returned align 8 dereferenceable(1) "no-capture-maybe-returned" [[TMP0:%.*]]) local_unnamed_addr [[ATTR2:#.*]] { +; IS__CGSCC_OPM-SAME: (i8* noalias nofree nonnull readnone returned align 8 dereferenceable(1) "no-capture-maybe-returned" [[TMP0:%.*]]) local_unnamed_addr #[[ATTR2:[0-9]+]] { ; 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_OPM-NEXT: ret i8* @a1 ; ; IS__CGSCC_NPM: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f1 -; IS__CGSCC_NPM-SAME: () local_unnamed_addr [[ATTR0:#.*]] { +; IS__CGSCC_NPM-SAME: () local_unnamed_addr #[[ATTR0]] { ; IS__CGSCC_NPM-NEXT: br label [[TMP2:%.*]] ; IS__CGSCC_NPM: 1: ; IS__CGSCC_NPM-NEXT: unreachable @@ -197,6 +210,30 @@ ; Function Attrs: nounwind readnone ssp uwtable define internal i8* @f2(i8* readnone %0) local_unnamed_addr #0 { +; IS__CGSCC_OPM: Function Attrs: noinline nounwind uwtable +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@f2 +; IS__CGSCC_OPM-SAME: (i8* nonnull readnone [[TMP0:%.*]]) local_unnamed_addr #[[ATTR3:[0-9]+]] { +; IS__CGSCC_OPM-NEXT: br label [[TMP2:%.*]] +; IS__CGSCC_OPM: 2: +; IS__CGSCC_OPM-NEXT: [[TMP3:%.*]] = tail call i8* @f1(i8* noalias nonnull readnone align 536870912 dereferenceable(4294967295) undef) +; IS__CGSCC_OPM-NEXT: br label [[TMP5:%.*]] +; IS__CGSCC_OPM: 4: +; IS__CGSCC_OPM-NEXT: unreachable +; IS__CGSCC_OPM: 5: +; IS__CGSCC_OPM-NEXT: ret i8* [[TMP3]] +; +; IS__CGSCC_NPM: Function Attrs: noinline nounwind uwtable +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f2 +; IS__CGSCC_NPM-SAME: (i8* nonnull readnone [[TMP0:%.*]]) local_unnamed_addr #[[ATTR2:[0-9]+]] { +; IS__CGSCC_NPM-NEXT: br label [[TMP2:%.*]] +; IS__CGSCC_NPM: 2: +; IS__CGSCC_NPM-NEXT: [[TMP3:%.*]] = tail call i8* @f1() +; IS__CGSCC_NPM-NEXT: br label [[TMP5:%.*]] +; IS__CGSCC_NPM: 4: +; IS__CGSCC_NPM-NEXT: unreachable +; IS__CGSCC_NPM: 5: +; IS__CGSCC_NPM-NEXT: ret i8* @a1 +; %2 = icmp eq i8* %0, null br i1 %2, label %5, label %3 @@ -216,6 +253,24 @@ ; Function Attrs: nounwind readnone ssp uwtable define internal i8* @f3(i8* readnone %0) local_unnamed_addr #0 { +; IS__CGSCC_OPM: Function Attrs: noinline nounwind uwtable +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@f3 +; IS__CGSCC_OPM-SAME: (i8* nonnull readnone [[TMP0:%.*]]) local_unnamed_addr #[[ATTR3]] { +; 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* @a1 +; +; IS__CGSCC_NPM: Function Attrs: noinline nounwind uwtable +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f3 +; IS__CGSCC_NPM-SAME: (i8* nonnull readnone [[TMP0:%.*]]) local_unnamed_addr #[[ATTR2]] { +; IS__CGSCC_NPM-NEXT: br label [[TMP3:%.*]] +; IS__CGSCC_NPM: 2: +; IS__CGSCC_NPM-NEXT: unreachable +; IS__CGSCC_NPM: 3: +; IS__CGSCC_NPM-NEXT: ret i8* @a1 +; %2 = icmp eq i8* %0, null br i1 %2, label %3, label %5 @@ -233,13 +288,13 @@ define align 4 i8* @test7() #0 { ; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@test7 -; IS__TUNIT____-SAME: () [[ATTR0]] { -; IS__TUNIT____-NEXT: [[C:%.*]] = tail call i8* @f1(i8* noalias nofree noundef nonnull readnone align 8 dereferenceable(1) "no-capture-maybe-returned" @a1) [[ATTR9:#.*]] +; IS__TUNIT____-SAME: () #[[ATTR0]] { +; IS__TUNIT____-NEXT: [[C:%.*]] = tail call i8* @f1(i8* noalias nofree noundef nonnull readnone align 8 dereferenceable(1) "no-capture-maybe-returned" @a1) #[[ATTR9:[0-9]+]] ; IS__TUNIT____-NEXT: ret i8* [[C]] ; ; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@test7 -; IS__CGSCC____-SAME: () [[ATTR0]] { +; IS__CGSCC____-SAME: () #[[ATTR0]] { ; IS__CGSCC____-NEXT: ret i8* @a1 ; %c = tail call i8* @f1(i8* align 8 dereferenceable(1) @a1) @@ -251,16 +306,16 @@ define internal i8* @f1b(i8* readnone %0) local_unnamed_addr #0 { ; IS__CGSCC_OPM: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@f1b -; IS__CGSCC_OPM-SAME: (i8* noalias nofree nonnull readnone returned align 8 dereferenceable(1) "no-capture-maybe-returned" [[TMP0:%.*]]) local_unnamed_addr [[ATTR2]] { +; IS__CGSCC_OPM-SAME: (i8* noalias nofree nonnull readnone returned align 8 dereferenceable(1) "no-capture-maybe-returned" [[TMP0:%.*]]) local_unnamed_addr #[[ATTR2]] { ; 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_OPM-NEXT: ret i8* @a1 ; ; IS__CGSCC_NPM: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f1b -; IS__CGSCC_NPM-SAME: () local_unnamed_addr [[ATTR0]] { +; IS__CGSCC_NPM-SAME: () local_unnamed_addr #[[ATTR0]] { ; IS__CGSCC_NPM-NEXT: br label [[TMP2:%.*]] ; IS__CGSCC_NPM: 1: ; IS__CGSCC_NPM-NEXT: unreachable @@ -283,6 +338,30 @@ ; Function Attrs: nounwind readnone ssp uwtable define internal i8* @f2b(i8* readnone %0) local_unnamed_addr #0 { +; +; IS__CGSCC_OPM: Function Attrs: noinline nounwind uwtable +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@f2b +; IS__CGSCC_OPM-SAME: (i8* nonnull readnone [[TMP0:%.*]]) local_unnamed_addr #[[ATTR3]] { +; IS__CGSCC_OPM-NEXT: br label [[TMP2:%.*]] +; IS__CGSCC_OPM: 2: +; IS__CGSCC_OPM-NEXT: [[TMP3:%.*]] = tail call i8* @f1b(i8* noalias nonnull readnone align 536870912 dereferenceable(4294967295) undef) +; IS__CGSCC_OPM-NEXT: br label [[TMP5:%.*]] +; IS__CGSCC_OPM: 4: +; IS__CGSCC_OPM-NEXT: unreachable +; IS__CGSCC_OPM: 5: +; IS__CGSCC_OPM-NEXT: ret i8* [[TMP3]] +; +; IS__CGSCC_NPM: Function Attrs: noinline nounwind uwtable +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f2b +; IS__CGSCC_NPM-SAME: (i8* nonnull readnone [[TMP0:%.*]]) local_unnamed_addr #[[ATTR2]] { +; IS__CGSCC_NPM-NEXT: br label [[TMP2:%.*]] +; IS__CGSCC_NPM: 2: +; IS__CGSCC_NPM-NEXT: [[TMP3:%.*]] = tail call i8* @f1b() +; IS__CGSCC_NPM-NEXT: br label [[TMP5:%.*]] +; IS__CGSCC_NPM: 4: +; IS__CGSCC_NPM-NEXT: unreachable +; IS__CGSCC_NPM: 5: +; IS__CGSCC_NPM-NEXT: ret i8* @a1 ; %2 = icmp eq i8* %0, null br i1 %2, label %5, label %3 @@ -303,6 +382,24 @@ ; Function Attrs: nounwind readnone ssp uwtable define internal i8* @f3b(i8* readnone %0) local_unnamed_addr #0 { +; +; IS__CGSCC_OPM: Function Attrs: noinline nounwind uwtable +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@f3b +; IS__CGSCC_OPM-SAME: (i8* nonnull readnone [[TMP0:%.*]]) local_unnamed_addr #[[ATTR3]] { +; 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* @a1 +; +; IS__CGSCC_NPM: Function Attrs: noinline nounwind uwtable +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f3b +; IS__CGSCC_NPM-SAME: (i8* nonnull readnone [[TMP0:%.*]]) local_unnamed_addr #[[ATTR2]] { +; IS__CGSCC_NPM-NEXT: br label [[TMP3:%.*]] +; IS__CGSCC_NPM: 2: +; IS__CGSCC_NPM-NEXT: unreachable +; IS__CGSCC_NPM: 3: +; IS__CGSCC_NPM-NEXT: ret i8* @a1 ; %2 = icmp eq i8* %0, null br i1 %2, label %3, label %5 @@ -319,12 +416,12 @@ define align 4 i32* @test7b(i32* align 32 %p) #0 { ; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@test7b -; IS__TUNIT____-SAME: (i32* nofree readnone returned align 32 "no-capture-maybe-returned" [[P:%.*]]) [[ATTR0]] { +; IS__TUNIT____-SAME: (i32* nofree readnone returned align 32 "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: ret i32* [[P]] ; ; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@test7b -; IS__CGSCC____-SAME: (i32* nofree readnone returned align 32 "no-capture-maybe-returned" [[P:%.*]]) [[ATTR0]] { +; IS__CGSCC____-SAME: (i32* nofree readnone returned align 32 "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: ret i32* [[P]] ; tail call i8* @f1b(i8* align 8 dereferenceable(1) @a1) @@ -333,23 +430,32 @@ ; TEST 8 define void @test8_helper() { -; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@test8_helper() { -; NOT_CGSCC_OPM-NEXT: [[PTR0:%.*]] = tail call i32* @unknown() -; NOT_CGSCC_OPM-NEXT: [[PTR1:%.*]] = tail call align 4 i32* @unknown() -; NOT_CGSCC_OPM-NEXT: [[PTR2:%.*]] = tail call align 8 i32* @unknown() -; NOT_CGSCC_OPM-NEXT: tail call void @test8(i32* noalias nocapture readnone align 4 [[PTR1]], i32* noalias nocapture readnone align 4 [[PTR1]], i32* noalias nocapture readnone [[PTR0]]) [[ATTR2:#.*]] -; NOT_CGSCC_OPM-NEXT: tail call void @test8(i32* noalias nocapture readnone align 8 [[PTR2]], i32* noalias nocapture readnone align 4 [[PTR1]], i32* noalias nocapture readnone align 4 [[PTR1]]) [[ATTR2]] -; NOT_CGSCC_OPM-NEXT: tail call void @test8(i32* noalias nocapture readnone align 8 [[PTR2]], i32* noalias nocapture readnone align 4 [[PTR1]], i32* noalias nocapture readnone align 4 [[PTR1]]) [[ATTR2]] -; NOT_CGSCC_OPM-NEXT: ret void +; IS__TUNIT____-LABEL: define {{[^@]+}}@test8_helper() { +; IS__TUNIT____-NEXT: [[PTR0:%.*]] = tail call i32* @unknown() +; IS__TUNIT____-NEXT: [[PTR1:%.*]] = tail call align 4 i32* @unknown() +; IS__TUNIT____-NEXT: [[PTR2:%.*]] = tail call align 8 i32* @unknown() +; IS__TUNIT____-NEXT: tail call void @test8(i32* noalias nocapture readnone align 4 [[PTR1]], i32* noalias nocapture readnone align 4 [[PTR1]], i32* noalias nocapture readnone [[PTR0]]) #[[ATTR2:[0-9]+]] +; IS__TUNIT____-NEXT: tail call void @test8(i32* noalias nocapture readnone align 8 [[PTR2]], i32* noalias nocapture readnone align 4 [[PTR1]], i32* noalias nocapture readnone align 4 [[PTR1]]) #[[ATTR2]] +; IS__TUNIT____-NEXT: tail call void @test8(i32* noalias nocapture readnone align 8 [[PTR2]], i32* noalias nocapture readnone align 4 [[PTR1]], i32* noalias nocapture readnone align 4 [[PTR1]]) #[[ATTR2]] +; IS__TUNIT____-NEXT: ret void ; ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test8_helper() { ; IS__CGSCC_OPM-NEXT: [[PTR0:%.*]] = tail call i32* @unknown() ; IS__CGSCC_OPM-NEXT: [[PTR1:%.*]] = tail call align 4 i32* @unknown() ; IS__CGSCC_OPM-NEXT: [[PTR2:%.*]] = tail call align 8 i32* @unknown() -; IS__CGSCC_OPM-NEXT: tail call void @test8(i32* noalias nocapture readnone align 4 [[PTR1]], i32* noalias nocapture readnone align 4 [[PTR1]], i32* noalias nocapture readnone [[PTR0]]) [[ATTR3:#.*]] -; IS__CGSCC_OPM-NEXT: tail call void @test8(i32* noalias nocapture readnone align 8 [[PTR2]], i32* noalias nocapture readnone align 4 [[PTR1]], i32* noalias nocapture readnone align 4 [[PTR1]]) [[ATTR3]] -; IS__CGSCC_OPM-NEXT: tail call void @test8(i32* noalias nocapture readnone align 8 [[PTR2]], i32* noalias nocapture readnone align 4 [[PTR1]], i32* noalias nocapture readnone align 4 [[PTR1]]) [[ATTR3]] +; IS__CGSCC_OPM-NEXT: tail call void @test8(i32* noalias nocapture readnone align 4 [[PTR1]], i32* noalias nocapture readnone align 4 [[PTR1]], i32* noalias nocapture readnone [[PTR0]]) #[[ATTR4:[0-9]+]] +; IS__CGSCC_OPM-NEXT: tail call void @test8(i32* noalias nocapture readnone align 8 [[PTR2]], i32* noalias nocapture readnone align 4 [[PTR1]], i32* noalias nocapture readnone align 4 [[PTR1]]) #[[ATTR4]] +; IS__CGSCC_OPM-NEXT: tail call void @test8(i32* noalias nocapture readnone align 8 [[PTR2]], i32* noalias nocapture readnone align 4 [[PTR1]], i32* noalias nocapture readnone align 4 [[PTR1]]) #[[ATTR4]] ; IS__CGSCC_OPM-NEXT: ret void +; +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test8_helper() { +; IS__CGSCC_NPM-NEXT: [[PTR0:%.*]] = tail call i32* @unknown() +; IS__CGSCC_NPM-NEXT: [[PTR1:%.*]] = tail call align 4 i32* @unknown() +; IS__CGSCC_NPM-NEXT: [[PTR2:%.*]] = tail call align 8 i32* @unknown() +; IS__CGSCC_NPM-NEXT: tail call void @test8(i32* noalias nocapture readnone align 4 [[PTR1]], i32* noalias nocapture readnone align 4 [[PTR1]], i32* noalias nocapture readnone [[PTR0]]) #[[ATTR3:[0-9]+]] +; IS__CGSCC_NPM-NEXT: tail call void @test8(i32* noalias nocapture readnone align 8 [[PTR2]], i32* noalias nocapture readnone align 4 [[PTR1]], i32* noalias nocapture readnone align 4 [[PTR1]]) #[[ATTR3]] +; IS__CGSCC_NPM-NEXT: tail call void @test8(i32* noalias nocapture readnone align 8 [[PTR2]], i32* noalias nocapture readnone align 4 [[PTR1]], i32* noalias nocapture readnone align 4 [[PTR1]]) #[[ATTR3]] +; IS__CGSCC_NPM-NEXT: ret void ; %ptr0 = tail call i32* @unknown() %ptr1 = tail call align 4 i32* @unknown() @@ -363,21 +469,29 @@ declare void @user_i32_ptr(i32* nocapture readnone) nounwind define internal void @test8(i32* %a, i32* %b, i32* %c) { -; NOT_CGSCC_OPM: Function Attrs: nounwind -; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@test8 -; NOT_CGSCC_OPM-SAME: (i32* noalias nocapture readnone align 4 [[A:%.*]], i32* noalias nocapture readnone align 4 [[B:%.*]], i32* noalias nocapture readnone [[C:%.*]]) [[ATTR2]] { -; NOT_CGSCC_OPM-NEXT: call void @user_i32_ptr(i32* noalias nocapture readnone align 4 [[A]]) [[ATTR2]] -; NOT_CGSCC_OPM-NEXT: call void @user_i32_ptr(i32* noalias nocapture readnone align 4 [[B]]) [[ATTR2]] -; NOT_CGSCC_OPM-NEXT: call void @user_i32_ptr(i32* noalias nocapture readnone [[C]]) [[ATTR2]] -; NOT_CGSCC_OPM-NEXT: ret void +; IS__TUNIT____: Function Attrs: nounwind +; IS__TUNIT____-LABEL: define {{[^@]+}}@test8 +; IS__TUNIT____-SAME: (i32* noalias nocapture readnone align 4 [[A:%.*]], i32* noalias nocapture readnone align 4 [[B:%.*]], i32* noalias nocapture readnone [[C:%.*]]) #[[ATTR2]] { +; IS__TUNIT____-NEXT: call void @user_i32_ptr(i32* noalias nocapture readnone align 4 [[A]]) #[[ATTR2]] +; IS__TUNIT____-NEXT: call void @user_i32_ptr(i32* noalias nocapture readnone align 4 [[B]]) #[[ATTR2]] +; IS__TUNIT____-NEXT: call void @user_i32_ptr(i32* noalias nocapture readnone [[C]]) #[[ATTR2]] +; IS__TUNIT____-NEXT: ret void ; ; IS__CGSCC_OPM: Function Attrs: nounwind ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test8 -; IS__CGSCC_OPM-SAME: (i32* noalias nocapture readnone align 4 [[A:%.*]], i32* noalias nocapture readnone align 4 [[B:%.*]], i32* noalias nocapture readnone [[C:%.*]]) [[ATTR3]] { -; IS__CGSCC_OPM-NEXT: call void @user_i32_ptr(i32* noalias nocapture readnone align 4 [[A]]) [[ATTR3]] -; IS__CGSCC_OPM-NEXT: call void @user_i32_ptr(i32* noalias nocapture readnone align 4 [[B]]) [[ATTR3]] -; IS__CGSCC_OPM-NEXT: call void @user_i32_ptr(i32* noalias nocapture readnone [[C]]) [[ATTR3]] +; IS__CGSCC_OPM-SAME: (i32* noalias nocapture readnone align 4 [[A:%.*]], i32* noalias nocapture readnone align 4 [[B:%.*]], i32* noalias nocapture readnone [[C:%.*]]) #[[ATTR4]] { +; IS__CGSCC_OPM-NEXT: call void @user_i32_ptr(i32* noalias nocapture readnone align 4 [[A]]) #[[ATTR4]] +; IS__CGSCC_OPM-NEXT: call void @user_i32_ptr(i32* noalias nocapture readnone align 4 [[B]]) #[[ATTR4]] +; IS__CGSCC_OPM-NEXT: call void @user_i32_ptr(i32* noalias nocapture readnone [[C]]) #[[ATTR4]] ; IS__CGSCC_OPM-NEXT: ret void +; +; IS__CGSCC_NPM: Function Attrs: nounwind +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test8 +; IS__CGSCC_NPM-SAME: (i32* noalias nocapture readnone align 4 [[A:%.*]], i32* noalias nocapture readnone align 4 [[B:%.*]], i32* noalias nocapture readnone [[C:%.*]]) #[[ATTR3]] { +; IS__CGSCC_NPM-NEXT: call void @user_i32_ptr(i32* noalias nocapture readnone align 4 [[A]]) #[[ATTR3]] +; IS__CGSCC_NPM-NEXT: call void @user_i32_ptr(i32* noalias nocapture readnone align 4 [[B]]) #[[ATTR3]] +; IS__CGSCC_NPM-NEXT: call void @user_i32_ptr(i32* noalias nocapture readnone [[C]]) #[[ATTR3]] +; IS__CGSCC_NPM-NEXT: ret void ; call void @user_i32_ptr(i32* %a) call void @user_i32_ptr(i32* %b) @@ -405,33 +519,33 @@ ; FIXME: This will work with an upcoming patch (D66618 or similar) ; store i32 -1, i32* %g1, align 32 define i32* @test10a(i32* align 32 %p) { -; NOT_CGSCC_OPM: Function Attrs: nofree nosync nounwind -; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@test10a -; NOT_CGSCC_OPM-SAME: (i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P:%.*]]) [[ATTR3:#.*]] { -; NOT_CGSCC_OPM-NEXT: [[L:%.*]] = load i32, i32* [[P]], align 32 -; NOT_CGSCC_OPM-NEXT: [[C:%.*]] = icmp eq i32 [[L]], 0 -; NOT_CGSCC_OPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] -; NOT_CGSCC_OPM: t: -; NOT_CGSCC_OPM-NEXT: [[R:%.*]] = call align 32 i32* @test10a(i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P]]) [[ATTR3]] -; NOT_CGSCC_OPM-NEXT: store i32 1, i32* [[R]], align 32 -; NOT_CGSCC_OPM-NEXT: [[G0:%.*]] = getelementptr i32, i32* [[P]], i32 8 -; NOT_CGSCC_OPM-NEXT: br label [[E:%.*]] -; NOT_CGSCC_OPM: f: -; NOT_CGSCC_OPM-NEXT: [[G1:%.*]] = getelementptr i32, i32* [[P]], i32 8 -; NOT_CGSCC_OPM-NEXT: store i32 -1, i32* [[G1]], align 32 -; NOT_CGSCC_OPM-NEXT: br label [[E]] -; NOT_CGSCC_OPM: e: -; NOT_CGSCC_OPM-NEXT: [[PHI:%.*]] = phi i32* [ [[G0]], [[T]] ], [ [[G1]], [[F]] ] -; NOT_CGSCC_OPM-NEXT: ret i32* [[PHI]] +; IS__TUNIT____: Function Attrs: nofree nosync nounwind +; IS__TUNIT____-LABEL: define {{[^@]+}}@test10a +; IS__TUNIT____-SAME: (i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR3:[0-9]+]] { +; IS__TUNIT____-NEXT: [[L:%.*]] = load i32, i32* [[P]], align 32 +; IS__TUNIT____-NEXT: [[C:%.*]] = icmp eq i32 [[L]], 0 +; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] +; IS__TUNIT____: t: +; IS__TUNIT____-NEXT: [[R:%.*]] = call align 32 i32* @test10a(i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P]]) #[[ATTR3]] +; IS__TUNIT____-NEXT: store i32 1, i32* [[R]], align 32 +; IS__TUNIT____-NEXT: [[G0:%.*]] = getelementptr i32, i32* [[P]], i32 8 +; IS__TUNIT____-NEXT: br label [[E:%.*]] +; IS__TUNIT____: f: +; IS__TUNIT____-NEXT: [[G1:%.*]] = getelementptr i32, i32* [[P]], i32 8 +; IS__TUNIT____-NEXT: store i32 -1, i32* [[G1]], align 32 +; IS__TUNIT____-NEXT: br label [[E]] +; IS__TUNIT____: e: +; IS__TUNIT____-NEXT: [[PHI:%.*]] = phi i32* [ [[G0]], [[T]] ], [ [[G1]], [[F]] ] +; IS__TUNIT____-NEXT: ret i32* [[PHI]] ; ; IS__CGSCC_OPM: Function Attrs: nofree nosync nounwind ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test10a -; IS__CGSCC_OPM-SAME: (i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P:%.*]]) [[ATTR4:#.*]] { +; IS__CGSCC_OPM-SAME: (i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR5:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: [[L:%.*]] = load i32, i32* [[P]], align 32 ; IS__CGSCC_OPM-NEXT: [[C:%.*]] = icmp eq i32 [[L]], 0 ; IS__CGSCC_OPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__CGSCC_OPM: t: -; IS__CGSCC_OPM-NEXT: [[R:%.*]] = call align 32 i32* @test10a(i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P]]) [[ATTR4]] +; IS__CGSCC_OPM-NEXT: [[R:%.*]] = call align 32 i32* @test10a(i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P]]) #[[ATTR5]] ; IS__CGSCC_OPM-NEXT: store i32 1, i32* [[R]], align 32 ; IS__CGSCC_OPM-NEXT: [[G0:%.*]] = getelementptr i32, i32* [[P]], i32 8 ; IS__CGSCC_OPM-NEXT: br label [[E:%.*]] @@ -442,6 +556,25 @@ ; IS__CGSCC_OPM: e: ; IS__CGSCC_OPM-NEXT: [[PHI:%.*]] = phi i32* [ [[G0]], [[T]] ], [ [[G1]], [[F]] ] ; IS__CGSCC_OPM-NEXT: ret i32* [[PHI]] +; +; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test10a +; IS__CGSCC_NPM-SAME: (i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR4:[0-9]+]] { +; IS__CGSCC_NPM-NEXT: [[L:%.*]] = load i32, i32* [[P]], align 32 +; IS__CGSCC_NPM-NEXT: [[C:%.*]] = icmp eq i32 [[L]], 0 +; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] +; IS__CGSCC_NPM: t: +; IS__CGSCC_NPM-NEXT: [[R:%.*]] = call align 32 i32* @test10a(i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P]]) #[[ATTR4]] +; IS__CGSCC_NPM-NEXT: store i32 1, i32* [[R]], align 32 +; IS__CGSCC_NPM-NEXT: [[G0:%.*]] = getelementptr i32, i32* [[P]], i32 8 +; IS__CGSCC_NPM-NEXT: br label [[E:%.*]] +; IS__CGSCC_NPM: f: +; IS__CGSCC_NPM-NEXT: [[G1:%.*]] = getelementptr i32, i32* [[P]], i32 8 +; IS__CGSCC_NPM-NEXT: store i32 -1, i32* [[G1]], align 32 +; IS__CGSCC_NPM-NEXT: br label [[E]] +; IS__CGSCC_NPM: e: +; IS__CGSCC_NPM-NEXT: [[PHI:%.*]] = phi i32* [ [[G0]], [[T]] ], [ [[G1]], [[F]] ] +; IS__CGSCC_NPM-NEXT: ret i32* [[PHI]] ; %l = load i32, i32* %p %c = icmp eq i32 %l, 0 @@ -467,33 +600,33 @@ ; FIXME: This will work with an upcoming patch (D66618 or similar) ; store i32 -1, i32* %g1, align 32 define i32* @test10b(i32* align 32 %p) { -; NOT_CGSCC_OPM: Function Attrs: nofree nosync nounwind -; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@test10b -; NOT_CGSCC_OPM-SAME: (i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P:%.*]]) [[ATTR3]] { -; NOT_CGSCC_OPM-NEXT: [[L:%.*]] = load i32, i32* [[P]], align 32 -; NOT_CGSCC_OPM-NEXT: [[C:%.*]] = icmp eq i32 [[L]], 0 -; NOT_CGSCC_OPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] -; NOT_CGSCC_OPM: t: -; NOT_CGSCC_OPM-NEXT: [[R:%.*]] = call align 32 i32* @test10b(i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P]]) [[ATTR3]] -; NOT_CGSCC_OPM-NEXT: store i32 1, i32* [[R]], align 32 -; NOT_CGSCC_OPM-NEXT: [[G0:%.*]] = getelementptr i32, i32* [[P]], i32 8 -; NOT_CGSCC_OPM-NEXT: br label [[E:%.*]] -; NOT_CGSCC_OPM: f: -; NOT_CGSCC_OPM-NEXT: [[G1:%.*]] = getelementptr i32, i32* [[P]], i32 -8 -; NOT_CGSCC_OPM-NEXT: store i32 -1, i32* [[G1]], align 32 -; NOT_CGSCC_OPM-NEXT: br label [[E]] -; NOT_CGSCC_OPM: e: -; NOT_CGSCC_OPM-NEXT: [[PHI:%.*]] = phi i32* [ [[G0]], [[T]] ], [ [[G1]], [[F]] ] -; NOT_CGSCC_OPM-NEXT: ret i32* [[PHI]] +; IS__TUNIT____: Function Attrs: nofree nosync nounwind +; IS__TUNIT____-LABEL: define {{[^@]+}}@test10b +; IS__TUNIT____-SAME: (i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR3]] { +; IS__TUNIT____-NEXT: [[L:%.*]] = load i32, i32* [[P]], align 32 +; IS__TUNIT____-NEXT: [[C:%.*]] = icmp eq i32 [[L]], 0 +; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] +; IS__TUNIT____: t: +; IS__TUNIT____-NEXT: [[R:%.*]] = call align 32 i32* @test10b(i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P]]) #[[ATTR3]] +; IS__TUNIT____-NEXT: store i32 1, i32* [[R]], align 32 +; IS__TUNIT____-NEXT: [[G0:%.*]] = getelementptr i32, i32* [[P]], i32 8 +; IS__TUNIT____-NEXT: br label [[E:%.*]] +; IS__TUNIT____: f: +; IS__TUNIT____-NEXT: [[G1:%.*]] = getelementptr i32, i32* [[P]], i32 -8 +; IS__TUNIT____-NEXT: store i32 -1, i32* [[G1]], align 32 +; IS__TUNIT____-NEXT: br label [[E]] +; IS__TUNIT____: e: +; IS__TUNIT____-NEXT: [[PHI:%.*]] = phi i32* [ [[G0]], [[T]] ], [ [[G1]], [[F]] ] +; IS__TUNIT____-NEXT: ret i32* [[PHI]] ; ; IS__CGSCC_OPM: Function Attrs: nofree nosync nounwind ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test10b -; IS__CGSCC_OPM-SAME: (i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P:%.*]]) [[ATTR4]] { +; IS__CGSCC_OPM-SAME: (i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR5]] { ; IS__CGSCC_OPM-NEXT: [[L:%.*]] = load i32, i32* [[P]], align 32 ; IS__CGSCC_OPM-NEXT: [[C:%.*]] = icmp eq i32 [[L]], 0 ; IS__CGSCC_OPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__CGSCC_OPM: t: -; IS__CGSCC_OPM-NEXT: [[R:%.*]] = call align 32 i32* @test10b(i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P]]) [[ATTR4]] +; IS__CGSCC_OPM-NEXT: [[R:%.*]] = call align 32 i32* @test10b(i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P]]) #[[ATTR5]] ; IS__CGSCC_OPM-NEXT: store i32 1, i32* [[R]], align 32 ; IS__CGSCC_OPM-NEXT: [[G0:%.*]] = getelementptr i32, i32* [[P]], i32 8 ; IS__CGSCC_OPM-NEXT: br label [[E:%.*]] @@ -504,6 +637,25 @@ ; IS__CGSCC_OPM: e: ; IS__CGSCC_OPM-NEXT: [[PHI:%.*]] = phi i32* [ [[G0]], [[T]] ], [ [[G1]], [[F]] ] ; IS__CGSCC_OPM-NEXT: ret i32* [[PHI]] +; +; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test10b +; IS__CGSCC_NPM-SAME: (i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR4]] { +; IS__CGSCC_NPM-NEXT: [[L:%.*]] = load i32, i32* [[P]], align 32 +; IS__CGSCC_NPM-NEXT: [[C:%.*]] = icmp eq i32 [[L]], 0 +; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] +; IS__CGSCC_NPM: t: +; IS__CGSCC_NPM-NEXT: [[R:%.*]] = call align 32 i32* @test10b(i32* nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P]]) #[[ATTR4]] +; IS__CGSCC_NPM-NEXT: store i32 1, i32* [[R]], align 32 +; IS__CGSCC_NPM-NEXT: [[G0:%.*]] = getelementptr i32, i32* [[P]], i32 8 +; IS__CGSCC_NPM-NEXT: br label [[E:%.*]] +; IS__CGSCC_NPM: f: +; IS__CGSCC_NPM-NEXT: [[G1:%.*]] = getelementptr i32, i32* [[P]], i32 -8 +; IS__CGSCC_NPM-NEXT: store i32 -1, i32* [[G1]], align 32 +; IS__CGSCC_NPM-NEXT: br label [[E]] +; IS__CGSCC_NPM: e: +; IS__CGSCC_NPM-NEXT: [[PHI:%.*]] = phi i32* [ [[G0]], [[T]] ], [ [[G1]], [[F]] ] +; IS__CGSCC_NPM-NEXT: ret i32* [[PHI]] ; %l = load i32, i32* %p %c = icmp eq i32 %l, 0 @@ -526,17 +678,24 @@ define i64 @test11(i32* %p) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@test11 -; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readonly align 8 dereferenceable(8) [[P:%.*]]) [[ATTR4:#.*]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readonly align 8 dereferenceable(8) [[P:%.*]]) #[[ATTR4:[0-9]+]] { ; IS__TUNIT____-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* ; IS__TUNIT____-NEXT: [[RET:%.*]] = load i64, i64* [[P_CAST]], align 8 ; IS__TUNIT____-NEXT: ret i64 [[RET]] ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn -; IS__CGSCC____-LABEL: define {{[^@]+}}@test11 -; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readonly align 8 dereferenceable(8) [[P:%.*]]) [[ATTR4:#.*]] { -; IS__CGSCC____-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* -; IS__CGSCC____-NEXT: [[RET:%.*]] = load i64, i64* [[P_CAST]], align 8 -; IS__CGSCC____-NEXT: ret i64 [[RET]] +; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test11 +; IS__CGSCC_OPM-SAME: (i32* nocapture nofree nonnull readonly align 8 dereferenceable(8) [[P:%.*]]) #[[ATTR6:[0-9]+]] { +; IS__CGSCC_OPM-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* +; IS__CGSCC_OPM-NEXT: [[RET:%.*]] = load i64, i64* [[P_CAST]], align 8 +; IS__CGSCC_OPM-NEXT: ret i64 [[RET]] +; +; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test11 +; IS__CGSCC_NPM-SAME: (i32* nocapture nofree nonnull readonly align 8 dereferenceable(8) [[P:%.*]]) #[[ATTR5:[0-9]+]] { +; IS__CGSCC_NPM-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* +; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = load i64, i64* [[P_CAST]], align 8 +; IS__CGSCC_NPM-NEXT: ret i64 [[RET]] ; %p-cast = bitcast i32* %p to i64* %ret = load i64, i64* %p-cast, align 8 @@ -550,21 +709,30 @@ define i64 @test12-1(i32* align 4 %p) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@test12-1 -; IS__TUNIT____-SAME: (i32* nocapture nofree readonly align 16 [[P:%.*]]) [[ATTR4]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree readonly align 16 [[P:%.*]]) #[[ATTR4]] { ; IS__TUNIT____-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* ; IS__TUNIT____-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 1 ; IS__TUNIT____-NEXT: [[ARRAYIDX1:%.*]] = getelementptr i64, i64* [[ARRAYIDX0]], i64 3 ; IS__TUNIT____-NEXT: [[RET:%.*]] = load i64, i64* [[ARRAYIDX1]], align 16 ; IS__TUNIT____-NEXT: ret i64 [[RET]] ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn -; IS__CGSCC____-LABEL: define {{[^@]+}}@test12-1 -; IS__CGSCC____-SAME: (i32* nocapture nofree readonly align 16 [[P:%.*]]) [[ATTR4]] { -; IS__CGSCC____-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* -; IS__CGSCC____-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 1 -; IS__CGSCC____-NEXT: [[ARRAYIDX1:%.*]] = getelementptr i64, i64* [[ARRAYIDX0]], i64 3 -; IS__CGSCC____-NEXT: [[RET:%.*]] = load i64, i64* [[ARRAYIDX1]], align 16 -; IS__CGSCC____-NEXT: ret i64 [[RET]] +; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test12-1 +; IS__CGSCC_OPM-SAME: (i32* nocapture nofree readonly align 16 [[P:%.*]]) #[[ATTR6]] { +; IS__CGSCC_OPM-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* +; IS__CGSCC_OPM-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 1 +; IS__CGSCC_OPM-NEXT: [[ARRAYIDX1:%.*]] = getelementptr i64, i64* [[ARRAYIDX0]], i64 3 +; IS__CGSCC_OPM-NEXT: [[RET:%.*]] = load i64, i64* [[ARRAYIDX1]], align 16 +; IS__CGSCC_OPM-NEXT: ret i64 [[RET]] +; +; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test12-1 +; IS__CGSCC_NPM-SAME: (i32* nocapture nofree readonly align 16 [[P:%.*]]) #[[ATTR5]] { +; IS__CGSCC_NPM-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* +; IS__CGSCC_NPM-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 1 +; IS__CGSCC_NPM-NEXT: [[ARRAYIDX1:%.*]] = getelementptr i64, i64* [[ARRAYIDX0]], i64 3 +; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = load i64, i64* [[ARRAYIDX1]], align 16 +; IS__CGSCC_NPM-NEXT: ret i64 [[RET]] ; %p-cast = bitcast i32* %p to i64* %arrayidx0 = getelementptr i64, i64* %p-cast, i64 1 @@ -576,19 +744,27 @@ define i64 @test12-2(i32* align 4 %p) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@test12-2 -; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readonly align 16 dereferenceable(8) [[P:%.*]]) [[ATTR4]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readonly align 16 dereferenceable(8) [[P:%.*]]) #[[ATTR4]] { ; IS__TUNIT____-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* ; IS__TUNIT____-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 0 ; IS__TUNIT____-NEXT: [[RET:%.*]] = load i64, i64* [[ARRAYIDX0]], align 16 ; IS__TUNIT____-NEXT: ret i64 [[RET]] ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn -; IS__CGSCC____-LABEL: define {{[^@]+}}@test12-2 -; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readonly align 16 dereferenceable(8) [[P:%.*]]) [[ATTR4]] { -; IS__CGSCC____-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* -; IS__CGSCC____-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 0 -; IS__CGSCC____-NEXT: [[RET:%.*]] = load i64, i64* [[ARRAYIDX0]], align 16 -; IS__CGSCC____-NEXT: ret i64 [[RET]] +; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test12-2 +; IS__CGSCC_OPM-SAME: (i32* nocapture nofree nonnull readonly align 16 dereferenceable(8) [[P:%.*]]) #[[ATTR6]] { +; IS__CGSCC_OPM-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* +; IS__CGSCC_OPM-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 0 +; IS__CGSCC_OPM-NEXT: [[RET:%.*]] = load i64, i64* [[ARRAYIDX0]], align 16 +; IS__CGSCC_OPM-NEXT: ret i64 [[RET]] +; +; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test12-2 +; IS__CGSCC_NPM-SAME: (i32* nocapture nofree nonnull readonly align 16 dereferenceable(8) [[P:%.*]]) #[[ATTR5]] { +; IS__CGSCC_NPM-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* +; IS__CGSCC_NPM-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 0 +; IS__CGSCC_NPM-NEXT: [[RET:%.*]] = load i64, i64* [[ARRAYIDX0]], align 16 +; IS__CGSCC_NPM-NEXT: ret i64 [[RET]] ; %p-cast = bitcast i32* %p to i64* %arrayidx0 = getelementptr i64, i64* %p-cast, i64 0 @@ -600,21 +776,30 @@ define void @test12-3(i32* align 4 %p) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; IS__TUNIT____-LABEL: define {{[^@]+}}@test12-3 -; IS__TUNIT____-SAME: (i32* nocapture nofree writeonly align 16 [[P:%.*]]) [[ATTR5:#.*]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree writeonly align 16 [[P:%.*]]) #[[ATTR5:[0-9]+]] { ; IS__TUNIT____-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* ; IS__TUNIT____-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 1 ; IS__TUNIT____-NEXT: [[ARRAYIDX1:%.*]] = getelementptr i64, i64* [[ARRAYIDX0]], i64 3 ; IS__TUNIT____-NEXT: store i64 0, i64* [[ARRAYIDX1]], align 16 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly -; IS__CGSCC____-LABEL: define {{[^@]+}}@test12-3 -; IS__CGSCC____-SAME: (i32* nocapture nofree writeonly align 16 [[P:%.*]]) [[ATTR5:#.*]] { -; IS__CGSCC____-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* -; IS__CGSCC____-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 1 -; IS__CGSCC____-NEXT: [[ARRAYIDX1:%.*]] = getelementptr i64, i64* [[ARRAYIDX0]], i64 3 -; IS__CGSCC____-NEXT: store i64 0, i64* [[ARRAYIDX1]], align 16 -; IS__CGSCC____-NEXT: ret void +; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test12-3 +; IS__CGSCC_OPM-SAME: (i32* nocapture nofree writeonly align 16 [[P:%.*]]) #[[ATTR7:[0-9]+]] { +; IS__CGSCC_OPM-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* +; IS__CGSCC_OPM-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 1 +; IS__CGSCC_OPM-NEXT: [[ARRAYIDX1:%.*]] = getelementptr i64, i64* [[ARRAYIDX0]], i64 3 +; IS__CGSCC_OPM-NEXT: store i64 0, i64* [[ARRAYIDX1]], align 16 +; IS__CGSCC_OPM-NEXT: ret void +; +; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test12-3 +; IS__CGSCC_NPM-SAME: (i32* nocapture nofree writeonly align 16 [[P:%.*]]) #[[ATTR6:[0-9]+]] { +; IS__CGSCC_NPM-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* +; IS__CGSCC_NPM-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 1 +; IS__CGSCC_NPM-NEXT: [[ARRAYIDX1:%.*]] = getelementptr i64, i64* [[ARRAYIDX0]], i64 3 +; IS__CGSCC_NPM-NEXT: store i64 0, i64* [[ARRAYIDX1]], align 16 +; IS__CGSCC_NPM-NEXT: ret void ; %p-cast = bitcast i32* %p to i64* %arrayidx0 = getelementptr i64, i64* %p-cast, i64 1 @@ -626,19 +811,27 @@ define void @test12-4(i32* align 4 %p) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; IS__TUNIT____-LABEL: define {{[^@]+}}@test12-4 -; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull writeonly align 16 dereferenceable(8) [[P:%.*]]) [[ATTR5]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull writeonly align 16 dereferenceable(8) [[P:%.*]]) #[[ATTR5]] { ; IS__TUNIT____-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* ; IS__TUNIT____-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 0 ; IS__TUNIT____-NEXT: store i64 0, i64* [[ARRAYIDX0]], align 16 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly -; IS__CGSCC____-LABEL: define {{[^@]+}}@test12-4 -; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull writeonly align 16 dereferenceable(8) [[P:%.*]]) [[ATTR5]] { -; IS__CGSCC____-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* -; IS__CGSCC____-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 0 -; IS__CGSCC____-NEXT: store i64 0, i64* [[ARRAYIDX0]], align 16 -; IS__CGSCC____-NEXT: ret void +; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test12-4 +; IS__CGSCC_OPM-SAME: (i32* nocapture nofree nonnull writeonly align 16 dereferenceable(8) [[P:%.*]]) #[[ATTR7]] { +; IS__CGSCC_OPM-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* +; IS__CGSCC_OPM-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 0 +; IS__CGSCC_OPM-NEXT: store i64 0, i64* [[ARRAYIDX0]], align 16 +; IS__CGSCC_OPM-NEXT: ret void +; +; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test12-4 +; IS__CGSCC_NPM-SAME: (i32* nocapture nofree nonnull writeonly align 16 dereferenceable(8) [[P:%.*]]) #[[ATTR6]] { +; IS__CGSCC_NPM-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* +; IS__CGSCC_NPM-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 0 +; IS__CGSCC_NPM-NEXT: store i64 0, i64* [[ARRAYIDX0]], align 16 +; IS__CGSCC_NPM-NEXT: ret void ; %p-cast = bitcast i32* %p to i64* %arrayidx0 = getelementptr i64, i64* %p-cast, i64 0 @@ -649,23 +842,32 @@ declare void @use(i64*) willreturn nounwind define void @test12-5(i32* align 4 %p) { -; NOT_CGSCC_OPM: Function Attrs: nounwind willreturn -; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@test12-5 -; NOT_CGSCC_OPM-SAME: (i32* align 16 [[P:%.*]]) [[ATTR6:#.*]] { -; NOT_CGSCC_OPM-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* -; NOT_CGSCC_OPM-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 1 -; NOT_CGSCC_OPM-NEXT: [[ARRAYIDX1:%.*]] = getelementptr i64, i64* [[ARRAYIDX0]], i64 3 -; NOT_CGSCC_OPM-NEXT: tail call void @use(i64* align 16 [[ARRAYIDX1]]) [[ATTR6]] -; NOT_CGSCC_OPM-NEXT: ret void +; IS__TUNIT____: Function Attrs: nounwind willreturn +; IS__TUNIT____-LABEL: define {{[^@]+}}@test12-5 +; IS__TUNIT____-SAME: (i32* align 16 [[P:%.*]]) #[[ATTR6:[0-9]+]] { +; IS__TUNIT____-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* +; IS__TUNIT____-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 1 +; IS__TUNIT____-NEXT: [[ARRAYIDX1:%.*]] = getelementptr i64, i64* [[ARRAYIDX0]], i64 3 +; IS__TUNIT____-NEXT: tail call void @use(i64* align 16 [[ARRAYIDX1]]) #[[ATTR6]] +; IS__TUNIT____-NEXT: ret void ; ; IS__CGSCC_OPM: Function Attrs: nounwind willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test12-5 -; IS__CGSCC_OPM-SAME: (i32* align 16 [[P:%.*]]) [[ATTR7:#.*]] { +; IS__CGSCC_OPM-SAME: (i32* align 16 [[P:%.*]]) #[[ATTR8:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* ; IS__CGSCC_OPM-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 1 ; IS__CGSCC_OPM-NEXT: [[ARRAYIDX1:%.*]] = getelementptr i64, i64* [[ARRAYIDX0]], i64 3 -; IS__CGSCC_OPM-NEXT: tail call void @use(i64* align 16 [[ARRAYIDX1]]) [[ATTR7]] +; IS__CGSCC_OPM-NEXT: tail call void @use(i64* align 16 [[ARRAYIDX1]]) #[[ATTR8]] ; IS__CGSCC_OPM-NEXT: ret void +; +; IS__CGSCC_NPM: Function Attrs: nounwind willreturn +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test12-5 +; IS__CGSCC_NPM-SAME: (i32* align 16 [[P:%.*]]) #[[ATTR7:[0-9]+]] { +; IS__CGSCC_NPM-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* +; IS__CGSCC_NPM-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 1 +; IS__CGSCC_NPM-NEXT: [[ARRAYIDX1:%.*]] = getelementptr i64, i64* [[ARRAYIDX0]], i64 3 +; IS__CGSCC_NPM-NEXT: tail call void @use(i64* align 16 [[ARRAYIDX1]]) #[[ATTR7]] +; IS__CGSCC_NPM-NEXT: ret void ; %p-cast = bitcast i32* %p to i64* %arrayidx0 = getelementptr i64, i64* %p-cast, i64 1 @@ -675,21 +877,29 @@ } define void @test12-6(i32* align 4 %p) { -; NOT_CGSCC_OPM: Function Attrs: nounwind willreturn -; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@test12-6 -; NOT_CGSCC_OPM-SAME: (i32* align 16 [[P:%.*]]) [[ATTR6]] { -; NOT_CGSCC_OPM-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* -; NOT_CGSCC_OPM-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 0 -; NOT_CGSCC_OPM-NEXT: tail call void @use(i64* align 16 [[ARRAYIDX0]]) [[ATTR6]] -; NOT_CGSCC_OPM-NEXT: ret void +; IS__TUNIT____: Function Attrs: nounwind willreturn +; IS__TUNIT____-LABEL: define {{[^@]+}}@test12-6 +; IS__TUNIT____-SAME: (i32* align 16 [[P:%.*]]) #[[ATTR6]] { +; IS__TUNIT____-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* +; IS__TUNIT____-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 0 +; IS__TUNIT____-NEXT: tail call void @use(i64* align 16 [[ARRAYIDX0]]) #[[ATTR6]] +; IS__TUNIT____-NEXT: ret void ; ; IS__CGSCC_OPM: Function Attrs: nounwind willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test12-6 -; IS__CGSCC_OPM-SAME: (i32* align 16 [[P:%.*]]) [[ATTR7]] { +; IS__CGSCC_OPM-SAME: (i32* align 16 [[P:%.*]]) #[[ATTR8]] { ; IS__CGSCC_OPM-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* ; IS__CGSCC_OPM-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 0 -; IS__CGSCC_OPM-NEXT: tail call void @use(i64* align 16 [[ARRAYIDX0]]) [[ATTR7]] +; IS__CGSCC_OPM-NEXT: tail call void @use(i64* align 16 [[ARRAYIDX0]]) #[[ATTR8]] ; IS__CGSCC_OPM-NEXT: ret void +; +; IS__CGSCC_NPM: Function Attrs: nounwind willreturn +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test12-6 +; IS__CGSCC_NPM-SAME: (i32* align 16 [[P:%.*]]) #[[ATTR7]] { +; IS__CGSCC_NPM-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64* +; IS__CGSCC_NPM-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 0 +; IS__CGSCC_NPM-NEXT: tail call void @use(i64* align 16 [[ARRAYIDX0]]) #[[ATTR7]] +; IS__CGSCC_NPM-NEXT: ret void ; %p-cast = bitcast i32* %p to i64* %arrayidx0 = getelementptr i64, i64* %p-cast, i64 0 @@ -700,7 +910,7 @@ define void @test13(i1 %c, i32* align 32 %dst) #0 { ; IS__TUNIT____: Function Attrs: argmemonly nofree noinline nosync nounwind uwtable willreturn writeonly ; IS__TUNIT____-LABEL: define {{[^@]+}}@test13 -; IS__TUNIT____-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) [[ATTR7:#.*]] { +; IS__TUNIT____-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR7:[0-9]+]] { ; IS__TUNIT____-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] ; IS__TUNIT____: truebb: ; IS__TUNIT____-NEXT: br label [[END:%.*]] @@ -711,18 +921,31 @@ ; IS__TUNIT____-NEXT: store i32 0, i32* [[PTR]], align 32 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind uwtable willreturn writeonly -; IS__CGSCC____-LABEL: define {{[^@]+}}@test13 -; IS__CGSCC____-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) [[ATTR7:#.*]] { -; IS__CGSCC____-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] -; IS__CGSCC____: truebb: -; IS__CGSCC____-NEXT: br label [[END:%.*]] -; IS__CGSCC____: falsebb: -; IS__CGSCC____-NEXT: br label [[END]] -; IS__CGSCC____: end: -; IS__CGSCC____-NEXT: [[PTR:%.*]] = phi i32* [ [[DST]], [[TRUEBB]] ], [ null, [[FALSEBB]] ] -; IS__CGSCC____-NEXT: store i32 0, i32* [[PTR]], align 32 -; IS__CGSCC____-NEXT: ret void +; IS__CGSCC_OPM: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind uwtable willreturn writeonly +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test13 +; IS__CGSCC_OPM-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR9:[0-9]+]] { +; IS__CGSCC_OPM-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] +; IS__CGSCC_OPM: truebb: +; IS__CGSCC_OPM-NEXT: br label [[END:%.*]] +; IS__CGSCC_OPM: falsebb: +; IS__CGSCC_OPM-NEXT: br label [[END]] +; IS__CGSCC_OPM: end: +; IS__CGSCC_OPM-NEXT: [[PTR:%.*]] = phi i32* [ [[DST]], [[TRUEBB]] ], [ null, [[FALSEBB]] ] +; IS__CGSCC_OPM-NEXT: store i32 0, i32* [[PTR]], align 32 +; IS__CGSCC_OPM-NEXT: ret void +; +; IS__CGSCC_NPM: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind uwtable willreturn writeonly +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test13 +; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR8:[0-9]+]] { +; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] +; IS__CGSCC_NPM: truebb: +; IS__CGSCC_NPM-NEXT: br label [[END:%.*]] +; IS__CGSCC_NPM: falsebb: +; IS__CGSCC_NPM-NEXT: br label [[END]] +; IS__CGSCC_NPM: end: +; IS__CGSCC_NPM-NEXT: [[PTR:%.*]] = phi i32* [ [[DST]], [[TRUEBB]] ], [ null, [[FALSEBB]] ] +; IS__CGSCC_NPM-NEXT: store i32 0, i32* [[PTR]], align 32 +; IS__CGSCC_NPM-NEXT: ret void ; br i1 %c, label %truebb, label %falsebb truebb: @@ -738,7 +961,7 @@ define void @test13-1(i1 %c, i32* align 32 %dst) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly ; IS__TUNIT____-LABEL: define {{[^@]+}}@test13-1 -; IS__TUNIT____-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) [[ATTR8:#.*]] { +; IS__TUNIT____-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR8:[0-9]+]] { ; IS__TUNIT____-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] ; IS__TUNIT____: truebb: ; IS__TUNIT____-NEXT: br label [[END:%.*]] @@ -749,18 +972,31 @@ ; IS__TUNIT____-NEXT: store i32 0, i32* [[PTR]], align 16 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly -; IS__CGSCC____-LABEL: define {{[^@]+}}@test13-1 -; IS__CGSCC____-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) [[ATTR8:#.*]] { -; IS__CGSCC____-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] -; IS__CGSCC____: truebb: -; IS__CGSCC____-NEXT: br label [[END:%.*]] -; IS__CGSCC____: falsebb: -; IS__CGSCC____-NEXT: br label [[END]] -; IS__CGSCC____: end: -; IS__CGSCC____-NEXT: [[PTR:%.*]] = phi i32* [ [[DST]], [[TRUEBB]] ], [ inttoptr (i64 48 to i32*), [[FALSEBB]] ] -; IS__CGSCC____-NEXT: store i32 0, i32* [[PTR]], align 16 -; IS__CGSCC____-NEXT: ret void +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test13-1 +; IS__CGSCC_OPM-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR10:[0-9]+]] { +; IS__CGSCC_OPM-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] +; IS__CGSCC_OPM: truebb: +; IS__CGSCC_OPM-NEXT: br label [[END:%.*]] +; IS__CGSCC_OPM: falsebb: +; IS__CGSCC_OPM-NEXT: br label [[END]] +; IS__CGSCC_OPM: end: +; IS__CGSCC_OPM-NEXT: [[PTR:%.*]] = phi i32* [ [[DST]], [[TRUEBB]] ], [ inttoptr (i64 48 to i32*), [[FALSEBB]] ] +; IS__CGSCC_OPM-NEXT: store i32 0, i32* [[PTR]], align 16 +; IS__CGSCC_OPM-NEXT: ret void +; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test13-1 +; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR9:[0-9]+]] { +; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] +; IS__CGSCC_NPM: truebb: +; IS__CGSCC_NPM-NEXT: br label [[END:%.*]] +; IS__CGSCC_NPM: falsebb: +; IS__CGSCC_NPM-NEXT: br label [[END]] +; IS__CGSCC_NPM: end: +; IS__CGSCC_NPM-NEXT: [[PTR:%.*]] = phi i32* [ [[DST]], [[TRUEBB]] ], [ inttoptr (i64 48 to i32*), [[FALSEBB]] ] +; IS__CGSCC_NPM-NEXT: store i32 0, i32* [[PTR]], align 16 +; IS__CGSCC_NPM-NEXT: ret void ; br i1 %c, label %truebb, label %falsebb truebb: @@ -776,7 +1012,7 @@ define void @test13-2(i1 %c, i32* align 32 %dst) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly ; IS__TUNIT____-LABEL: define {{[^@]+}}@test13-2 -; IS__TUNIT____-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) [[ATTR8]] { +; IS__TUNIT____-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR8]] { ; IS__TUNIT____-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] ; IS__TUNIT____: truebb: ; IS__TUNIT____-NEXT: br label [[END:%.*]] @@ -787,18 +1023,31 @@ ; IS__TUNIT____-NEXT: store i32 0, i32* [[PTR]], align 32 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly -; IS__CGSCC____-LABEL: define {{[^@]+}}@test13-2 -; IS__CGSCC____-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) [[ATTR8]] { -; IS__CGSCC____-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] -; IS__CGSCC____: truebb: -; IS__CGSCC____-NEXT: br label [[END:%.*]] -; IS__CGSCC____: falsebb: -; IS__CGSCC____-NEXT: br label [[END]] -; IS__CGSCC____: end: -; IS__CGSCC____-NEXT: [[PTR:%.*]] = phi i32* [ [[DST]], [[TRUEBB]] ], [ inttoptr (i64 160 to i32*), [[FALSEBB]] ] -; IS__CGSCC____-NEXT: store i32 0, i32* [[PTR]], align 32 -; IS__CGSCC____-NEXT: ret void +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test13-2 +; IS__CGSCC_OPM-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR10]] { +; IS__CGSCC_OPM-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] +; IS__CGSCC_OPM: truebb: +; IS__CGSCC_OPM-NEXT: br label [[END:%.*]] +; IS__CGSCC_OPM: falsebb: +; IS__CGSCC_OPM-NEXT: br label [[END]] +; IS__CGSCC_OPM: end: +; IS__CGSCC_OPM-NEXT: [[PTR:%.*]] = phi i32* [ [[DST]], [[TRUEBB]] ], [ inttoptr (i64 160 to i32*), [[FALSEBB]] ] +; IS__CGSCC_OPM-NEXT: store i32 0, i32* [[PTR]], align 32 +; IS__CGSCC_OPM-NEXT: ret void +; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test13-2 +; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR9]] { +; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] +; IS__CGSCC_NPM: truebb: +; IS__CGSCC_NPM-NEXT: br label [[END:%.*]] +; IS__CGSCC_NPM: falsebb: +; IS__CGSCC_NPM-NEXT: br label [[END]] +; IS__CGSCC_NPM: end: +; IS__CGSCC_NPM-NEXT: [[PTR:%.*]] = phi i32* [ [[DST]], [[TRUEBB]] ], [ inttoptr (i64 160 to i32*), [[FALSEBB]] ] +; IS__CGSCC_NPM-NEXT: store i32 0, i32* [[PTR]], align 32 +; IS__CGSCC_NPM-NEXT: ret void ; br i1 %c, label %truebb, label %falsebb truebb: @@ -814,7 +1063,7 @@ define void @test13-3(i1 %c, i32* align 32 %dst) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly ; IS__TUNIT____-LABEL: define {{[^@]+}}@test13-3 -; IS__TUNIT____-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) [[ATTR8]] { +; IS__TUNIT____-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR8]] { ; IS__TUNIT____-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] ; IS__TUNIT____: truebb: ; IS__TUNIT____-NEXT: br label [[END:%.*]] @@ -825,18 +1074,31 @@ ; IS__TUNIT____-NEXT: store i32 0, i32* [[PTR]], align 32 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly -; IS__CGSCC____-LABEL: define {{[^@]+}}@test13-3 -; IS__CGSCC____-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) [[ATTR8]] { -; IS__CGSCC____-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] -; IS__CGSCC____: truebb: -; IS__CGSCC____-NEXT: br label [[END:%.*]] -; IS__CGSCC____: falsebb: -; IS__CGSCC____-NEXT: br label [[END]] -; IS__CGSCC____: end: -; IS__CGSCC____-NEXT: [[PTR:%.*]] = phi i32* [ [[DST]], [[TRUEBB]] ], [ inttoptr (i64 128 to i32*), [[FALSEBB]] ] -; IS__CGSCC____-NEXT: store i32 0, i32* [[PTR]], align 32 -; IS__CGSCC____-NEXT: ret void +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test13-3 +; IS__CGSCC_OPM-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR10]] { +; IS__CGSCC_OPM-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] +; IS__CGSCC_OPM: truebb: +; IS__CGSCC_OPM-NEXT: br label [[END:%.*]] +; IS__CGSCC_OPM: falsebb: +; IS__CGSCC_OPM-NEXT: br label [[END]] +; IS__CGSCC_OPM: end: +; IS__CGSCC_OPM-NEXT: [[PTR:%.*]] = phi i32* [ [[DST]], [[TRUEBB]] ], [ inttoptr (i64 128 to i32*), [[FALSEBB]] ] +; IS__CGSCC_OPM-NEXT: store i32 0, i32* [[PTR]], align 32 +; IS__CGSCC_OPM-NEXT: ret void +; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test13-3 +; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR9]] { +; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] +; IS__CGSCC_NPM: truebb: +; IS__CGSCC_NPM-NEXT: br label [[END:%.*]] +; IS__CGSCC_NPM: falsebb: +; IS__CGSCC_NPM-NEXT: br label [[END]] +; IS__CGSCC_NPM: end: +; IS__CGSCC_NPM-NEXT: [[PTR:%.*]] = phi i32* [ [[DST]], [[TRUEBB]] ], [ inttoptr (i64 128 to i32*), [[FALSEBB]] ] +; IS__CGSCC_NPM-NEXT: store i32 0, i32* [[PTR]], align 32 +; IS__CGSCC_NPM-NEXT: ret void ; br i1 %c, label %truebb, label %falsebb truebb: @@ -853,15 +1115,21 @@ define i64 @ptr2int(i32* %p) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@ptr2int -; IS__TUNIT____-SAME: (i32* nofree readnone [[P:%.*]]) [[ATTR9]] { +; IS__TUNIT____-SAME: (i32* nofree readnone [[P:%.*]]) #[[ATTR9]] { ; IS__TUNIT____-NEXT: [[P2I:%.*]] = ptrtoint i32* [[P]] to i64 ; IS__TUNIT____-NEXT: ret i64 [[P2I]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn -; IS__CGSCC____-LABEL: define {{[^@]+}}@ptr2int -; IS__CGSCC____-SAME: (i32* nofree readnone [[P:%.*]]) [[ATTR9:#.*]] { -; IS__CGSCC____-NEXT: [[P2I:%.*]] = ptrtoint i32* [[P]] to i64 -; IS__CGSCC____-NEXT: ret i64 [[P2I]] +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@ptr2int +; IS__CGSCC_OPM-SAME: (i32* nofree readnone [[P:%.*]]) #[[ATTR11:[0-9]+]] { +; IS__CGSCC_OPM-NEXT: [[P2I:%.*]] = ptrtoint i32* [[P]] to i64 +; IS__CGSCC_OPM-NEXT: ret i64 [[P2I]] +; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@ptr2int +; IS__CGSCC_NPM-SAME: (i32* nofree readnone [[P:%.*]]) #[[ATTR10:[0-9]+]] { +; IS__CGSCC_NPM-NEXT: [[P2I:%.*]] = ptrtoint i32* [[P]] to i64 +; IS__CGSCC_NPM-NEXT: ret i64 [[P2I]] ; %p2i = ptrtoint i32* %p to i64 ret i64 %p2i @@ -869,15 +1137,21 @@ define i64* @int2ptr(i64 %i) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@int2ptr -; IS__TUNIT____-SAME: (i64 [[I:%.*]]) [[ATTR9]] { +; IS__TUNIT____-SAME: (i64 [[I:%.*]]) #[[ATTR9]] { ; IS__TUNIT____-NEXT: [[I2P:%.*]] = inttoptr i64 [[I]] to i64* ; IS__TUNIT____-NEXT: ret i64* [[I2P]] ; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn -; IS__CGSCC____-LABEL: define {{[^@]+}}@int2ptr -; IS__CGSCC____-SAME: (i64 [[I:%.*]]) [[ATTR9]] { -; IS__CGSCC____-NEXT: [[I2P:%.*]] = inttoptr i64 [[I]] to i64* -; IS__CGSCC____-NEXT: ret i64* [[I2P]] +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@int2ptr +; IS__CGSCC_OPM-SAME: (i64 [[I:%.*]]) #[[ATTR11]] { +; IS__CGSCC_OPM-NEXT: [[I2P:%.*]] = inttoptr i64 [[I]] to i64* +; IS__CGSCC_OPM-NEXT: ret i64* [[I2P]] +; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@int2ptr +; IS__CGSCC_NPM-SAME: (i64 [[I:%.*]]) #[[ATTR10]] { +; IS__CGSCC_NPM-NEXT: [[I2P:%.*]] = inttoptr i64 [[I]] to i64* +; IS__CGSCC_NPM-NEXT: ret i64* [[I2P]] ; %i2p = inttoptr i64 %i to i64* ret i64* %i2p @@ -887,15 +1161,21 @@ define void @aligned_store(i8* %Value, i8** %Ptr) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; IS__TUNIT____-LABEL: define {{[^@]+}}@aligned_store -; IS__TUNIT____-SAME: (i8* nofree writeonly [[VALUE:%.*]], i8** nocapture nofree noundef nonnull writeonly align 32 dereferenceable(8) [[PTR:%.*]]) [[ATTR5]] { +; IS__TUNIT____-SAME: (i8* nofree writeonly [[VALUE:%.*]], i8** nocapture nofree noundef nonnull writeonly align 32 dereferenceable(8) [[PTR:%.*]]) #[[ATTR5]] { ; IS__TUNIT____-NEXT: store i8* [[VALUE]], i8** [[PTR]], align 32 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly -; IS__CGSCC____-LABEL: define {{[^@]+}}@aligned_store -; IS__CGSCC____-SAME: (i8* nofree writeonly [[VALUE:%.*]], i8** nocapture nofree noundef nonnull writeonly align 32 dereferenceable(8) [[PTR:%.*]]) [[ATTR5]] { -; IS__CGSCC____-NEXT: store i8* [[VALUE]], i8** [[PTR]], align 32 -; IS__CGSCC____-NEXT: ret void +; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@aligned_store +; IS__CGSCC_OPM-SAME: (i8* nofree writeonly [[VALUE:%.*]], i8** nocapture nofree noundef nonnull writeonly align 32 dereferenceable(8) [[PTR:%.*]]) #[[ATTR7]] { +; IS__CGSCC_OPM-NEXT: store i8* [[VALUE]], i8** [[PTR]], align 32 +; IS__CGSCC_OPM-NEXT: ret void +; +; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@aligned_store +; IS__CGSCC_NPM-SAME: (i8* nofree writeonly [[VALUE:%.*]], i8** nocapture nofree noundef nonnull writeonly align 32 dereferenceable(8) [[PTR:%.*]]) #[[ATTR6]] { +; IS__CGSCC_NPM-NEXT: store i8* [[VALUE]], i8** [[PTR]], align 32 +; IS__CGSCC_NPM-NEXT: ret void ; store i8* %Value, i8** %Ptr, align 32 ret void @@ -917,17 +1197,24 @@ ; ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; IS__TUNIT____-LABEL: define {{[^@]+}}@align_store_after_bc -; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull writeonly align 2048 dereferenceable(1) [[ARG:%.*]]) [[ATTR5]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull writeonly align 2048 dereferenceable(1) [[ARG:%.*]]) #[[ATTR5]] { ; IS__TUNIT____-NEXT: [[BC:%.*]] = bitcast i32* [[ARG]] to i8* ; IS__TUNIT____-NEXT: store i8 0, i8* [[BC]], align 2048 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly -; IS__CGSCC____-LABEL: define {{[^@]+}}@align_store_after_bc -; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull writeonly align 2048 dereferenceable(1) [[ARG:%.*]]) [[ATTR5]] { -; IS__CGSCC____-NEXT: [[BC:%.*]] = bitcast i32* [[ARG]] to i8* -; IS__CGSCC____-NEXT: store i8 0, i8* [[BC]], align 2048 -; IS__CGSCC____-NEXT: ret void +; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@align_store_after_bc +; IS__CGSCC_OPM-SAME: (i32* nocapture nofree nonnull writeonly align 2048 dereferenceable(1) [[ARG:%.*]]) #[[ATTR7]] { +; IS__CGSCC_OPM-NEXT: [[BC:%.*]] = bitcast i32* [[ARG]] to i8* +; IS__CGSCC_OPM-NEXT: store i8 0, i8* [[BC]], align 2048 +; IS__CGSCC_OPM-NEXT: ret void +; +; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@align_store_after_bc +; IS__CGSCC_NPM-SAME: (i32* nocapture nofree nonnull writeonly align 2048 dereferenceable(1) [[ARG:%.*]]) #[[ATTR6]] { +; IS__CGSCC_NPM-NEXT: [[BC:%.*]] = bitcast i32* [[ARG]] to i8* +; IS__CGSCC_NPM-NEXT: store i8 0, i8* [[BC]], align 2048 +; IS__CGSCC_NPM-NEXT: ret void ; %bc = bitcast i32* %arg to i8* store i8 0, i8* %bc @@ -940,15 +1227,21 @@ define i32 @musttail_callee_1(i32* %p) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@musttail_callee_1 -; IS__TUNIT____-SAME: (i32* nocapture nofree noundef nonnull readonly dereferenceable(4) [[P:%.*]]) [[ATTR4]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree noundef nonnull readonly dereferenceable(4) [[P:%.*]]) #[[ATTR4]] { ; IS__TUNIT____-NEXT: [[V:%.*]] = load i32, i32* [[P]], align 32 ; IS__TUNIT____-NEXT: ret i32 [[V]] ; -; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn -; IS__CGSCC____-LABEL: define {{[^@]+}}@musttail_callee_1 -; IS__CGSCC____-SAME: (i32* nocapture nofree noundef nonnull readonly dereferenceable(4) [[P:%.*]]) [[ATTR4]] { -; IS__CGSCC____-NEXT: [[V:%.*]] = load i32, i32* [[P]], align 32 -; IS__CGSCC____-NEXT: ret i32 [[V]] +; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@musttail_callee_1 +; IS__CGSCC_OPM-SAME: (i32* nocapture nofree noundef nonnull readonly dereferenceable(4) [[P:%.*]]) #[[ATTR6]] { +; IS__CGSCC_OPM-NEXT: [[V:%.*]] = load i32, i32* [[P]], align 32 +; IS__CGSCC_OPM-NEXT: ret i32 [[V]] +; +; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@musttail_callee_1 +; IS__CGSCC_NPM-SAME: (i32* nocapture nofree noundef nonnull readonly dereferenceable(4) [[P:%.*]]) #[[ATTR5]] { +; IS__CGSCC_NPM-NEXT: [[V:%.*]] = load i32, i32* [[P]], align 32 +; IS__CGSCC_NPM-NEXT: ret i32 [[V]] ; %v = load i32, i32* %p, align 32 ret i32 %v @@ -956,33 +1249,33 @@ define i32 @musttail_caller_1(i32* %p) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readonly willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@musttail_caller_1 -; IS__TUNIT____-SAME: (i32* nocapture nofree readonly [[P:%.*]]) [[ATTR10:#.*]] { +; IS__TUNIT____-SAME: (i32* nocapture nofree readonly [[P:%.*]]) #[[ATTR10:[0-9]+]] { ; IS__TUNIT____-NEXT: [[C:%.*]] = load i1, i1* @cnd, align 1 ; IS__TUNIT____-NEXT: br i1 [[C]], label [[MT:%.*]], label [[EXIT:%.*]] ; IS__TUNIT____: mt: -; IS__TUNIT____-NEXT: [[V:%.*]] = musttail call i32 @musttail_callee_1(i32* nocapture nofree readonly [[P]]) [[ATTR10]] +; IS__TUNIT____-NEXT: [[V:%.*]] = musttail call i32 @musttail_callee_1(i32* nocapture nofree readonly [[P]]) #[[ATTR10]] ; IS__TUNIT____-NEXT: ret i32 [[V]] ; IS__TUNIT____: exit: ; IS__TUNIT____-NEXT: ret i32 0 ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readonly willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@musttail_caller_1 -; IS__CGSCC_OPM-SAME: (i32* nocapture nofree readonly [[P:%.*]]) [[ATTR11:#.*]] { +; IS__CGSCC_OPM-SAME: (i32* nocapture nofree readonly [[P:%.*]]) #[[ATTR12:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: [[C:%.*]] = load i1, i1* @cnd, align 1 ; IS__CGSCC_OPM-NEXT: br i1 [[C]], label [[MT:%.*]], label [[EXIT:%.*]] ; IS__CGSCC_OPM: mt: -; IS__CGSCC_OPM-NEXT: [[V:%.*]] = musttail call i32 @musttail_callee_1(i32* nocapture nofree noundef nonnull readonly dereferenceable(4) [[P]]) [[ATTR13:#.*]] +; IS__CGSCC_OPM-NEXT: [[V:%.*]] = musttail call i32 @musttail_callee_1(i32* nocapture nofree noundef nonnull readonly dereferenceable(4) [[P]]) #[[ATTR14:[0-9]+]] ; IS__CGSCC_OPM-NEXT: ret i32 [[V]] ; IS__CGSCC_OPM: exit: ; IS__CGSCC_OPM-NEXT: ret i32 0 ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readonly willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@musttail_caller_1 -; IS__CGSCC_NPM-SAME: (i32* nocapture nofree readonly [[P:%.*]]) [[ATTR10:#.*]] { +; IS__CGSCC_NPM-SAME: (i32* nocapture nofree readonly [[P:%.*]]) #[[ATTR11:[0-9]+]] { ; IS__CGSCC_NPM-NEXT: [[C:%.*]] = load i1, i1* @cnd, align 1 ; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[MT:%.*]], label [[EXIT:%.*]] ; IS__CGSCC_NPM: mt: -; IS__CGSCC_NPM-NEXT: [[V:%.*]] = musttail call i32 @musttail_callee_1(i32* nocapture nofree noundef nonnull readonly dereferenceable(4) [[P]]) [[ATTR12:#.*]] +; IS__CGSCC_NPM-NEXT: [[V:%.*]] = musttail call i32 @musttail_callee_1(i32* nocapture nofree noundef nonnull readonly dereferenceable(4) [[P]]) #[[ATTR13:[0-9]+]] ; IS__CGSCC_NPM-NEXT: ret i32 [[V]] ; IS__CGSCC_NPM: exit: ; IS__CGSCC_NPM-NEXT: ret i32 0 @@ -997,38 +1290,54 @@ } define i32* @checkAndAdvance(i32* align(16) %p) { -; NOT_CGSCC_OPM: Function Attrs: nounwind -; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@checkAndAdvance -; NOT_CGSCC_OPM-SAME: (i32* noundef nonnull readonly align 16 dereferenceable(4) "no-capture-maybe-returned" [[P:%.*]]) [[ATTR2]] { -; NOT_CGSCC_OPM-NEXT: entry: -; NOT_CGSCC_OPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[P]], align 16 -; NOT_CGSCC_OPM-NEXT: [[CMP:%.*]] = icmp eq i32 [[TMP0]], 0 -; NOT_CGSCC_OPM-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[RETURN:%.*]] -; NOT_CGSCC_OPM: if.then: -; NOT_CGSCC_OPM-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 4 -; NOT_CGSCC_OPM-NEXT: [[CALL:%.*]] = call nonnull align 16 i32* @checkAndAdvance(i32* nonnull readonly align 16 "no-capture-maybe-returned" [[ADD_PTR]]) [[ATTR2]] -; NOT_CGSCC_OPM-NEXT: br label [[RETURN]] -; NOT_CGSCC_OPM: return: -; NOT_CGSCC_OPM-NEXT: [[RETVAL_0:%.*]] = phi i32* [ [[CALL]], [[IF_THEN]] ], [ [[P]], [[ENTRY:%.*]] ] -; NOT_CGSCC_OPM-NEXT: call void @user_i32_ptr(i32* noalias nocapture nonnull readnone align 16 [[RETVAL_0]]) [[ATTR2]] -; NOT_CGSCC_OPM-NEXT: ret i32* [[RETVAL_0]] +; IS__TUNIT____: Function Attrs: nounwind +; IS__TUNIT____-LABEL: define {{[^@]+}}@checkAndAdvance +; IS__TUNIT____-SAME: (i32* noundef nonnull readonly align 16 dereferenceable(4) "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR2]] { +; IS__TUNIT____-NEXT: entry: +; IS__TUNIT____-NEXT: [[TMP0:%.*]] = load i32, i32* [[P]], align 16 +; IS__TUNIT____-NEXT: [[CMP:%.*]] = icmp eq i32 [[TMP0]], 0 +; IS__TUNIT____-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[RETURN:%.*]] +; IS__TUNIT____: if.then: +; IS__TUNIT____-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 4 +; IS__TUNIT____-NEXT: [[CALL:%.*]] = call nonnull align 16 i32* @checkAndAdvance(i32* nonnull readonly align 16 "no-capture-maybe-returned" [[ADD_PTR]]) #[[ATTR2]] +; IS__TUNIT____-NEXT: br label [[RETURN]] +; IS__TUNIT____: return: +; IS__TUNIT____-NEXT: [[RETVAL_0:%.*]] = phi i32* [ [[CALL]], [[IF_THEN]] ], [ [[P]], [[ENTRY:%.*]] ] +; IS__TUNIT____-NEXT: call void @user_i32_ptr(i32* noalias nocapture nonnull readnone align 16 [[RETVAL_0]]) #[[ATTR2]] +; IS__TUNIT____-NEXT: ret i32* [[RETVAL_0]] ; ; IS__CGSCC_OPM: Function Attrs: nounwind ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@checkAndAdvance -; IS__CGSCC_OPM-SAME: (i32* noundef nonnull readonly align 16 dereferenceable(4) "no-capture-maybe-returned" [[P:%.*]]) [[ATTR3]] { +; IS__CGSCC_OPM-SAME: (i32* noundef nonnull readonly align 16 dereferenceable(4) "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR4]] { ; IS__CGSCC_OPM-NEXT: entry: ; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[P]], align 16 ; IS__CGSCC_OPM-NEXT: [[CMP:%.*]] = icmp eq i32 [[TMP0]], 0 ; IS__CGSCC_OPM-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[RETURN:%.*]] ; IS__CGSCC_OPM: if.then: ; IS__CGSCC_OPM-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 4 -; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call nonnull align 16 i32* @checkAndAdvance(i32* nonnull readonly align 16 "no-capture-maybe-returned" [[ADD_PTR]]) [[ATTR3]] +; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call nonnull align 16 i32* @checkAndAdvance(i32* nonnull readonly align 16 "no-capture-maybe-returned" [[ADD_PTR]]) #[[ATTR4]] ; IS__CGSCC_OPM-NEXT: br label [[RETURN]] ; IS__CGSCC_OPM: return: ; IS__CGSCC_OPM-NEXT: [[RETVAL_0:%.*]] = phi i32* [ [[CALL]], [[IF_THEN]] ], [ [[P]], [[ENTRY:%.*]] ] -; IS__CGSCC_OPM-NEXT: call void @user_i32_ptr(i32* noalias nocapture nonnull readnone align 16 [[RETVAL_0]]) [[ATTR3]] +; IS__CGSCC_OPM-NEXT: call void @user_i32_ptr(i32* noalias nocapture nonnull readnone align 16 [[RETVAL_0]]) #[[ATTR4]] ; IS__CGSCC_OPM-NEXT: ret i32* [[RETVAL_0]] ; +; IS__CGSCC_NPM: Function Attrs: nounwind +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@checkAndAdvance +; IS__CGSCC_NPM-SAME: (i32* noundef nonnull readonly align 16 dereferenceable(4) "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR3]] { +; IS__CGSCC_NPM-NEXT: entry: +; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[P]], align 16 +; IS__CGSCC_NPM-NEXT: [[CMP:%.*]] = icmp eq i32 [[TMP0]], 0 +; IS__CGSCC_NPM-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[RETURN:%.*]] +; IS__CGSCC_NPM: if.then: +; IS__CGSCC_NPM-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 4 +; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call nonnull align 16 i32* @checkAndAdvance(i32* nonnull readonly align 16 "no-capture-maybe-returned" [[ADD_PTR]]) #[[ATTR3]] +; IS__CGSCC_NPM-NEXT: br label [[RETURN]] +; IS__CGSCC_NPM: return: +; IS__CGSCC_NPM-NEXT: [[RETVAL_0:%.*]] = phi i32* [ [[CALL]], [[IF_THEN]] ], [ [[P]], [[ENTRY:%.*]] ] +; IS__CGSCC_NPM-NEXT: call void @user_i32_ptr(i32* noalias nocapture nonnull readnone align 16 [[RETVAL_0]]) #[[ATTR3]] +; IS__CGSCC_NPM-NEXT: ret i32* [[RETVAL_0]] +; entry: %0 = load i32, i32* %p, align 4 %cmp = icmp eq i32 %0, 0 @@ -1062,3 +1371,46 @@ attributes #0 = { nounwind uwtable noinline } attributes #1 = { uwtable noinline } attributes #2 = { null_pointer_is_valid } +; IS__TUNIT____: attributes #[[ATTR0]] = { nofree noinline nosync nounwind readnone uwtable willreturn } +; IS__TUNIT____: attributes #[[ATTR1]] = { nofree noinline noreturn nosync nounwind readnone uwtable } +; IS__TUNIT____: attributes #[[ATTR2]] = { nounwind } +; IS__TUNIT____: attributes #[[ATTR3]] = { nofree nosync nounwind } +; IS__TUNIT____: attributes #[[ATTR4]] = { argmemonly nofree nosync nounwind readonly willreturn } +; IS__TUNIT____: attributes #[[ATTR5]] = { argmemonly nofree nosync nounwind willreturn writeonly } +; IS__TUNIT____: attributes #[[ATTR6]] = { nounwind willreturn } +; IS__TUNIT____: attributes #[[ATTR7]] = { argmemonly nofree noinline nosync nounwind uwtable willreturn writeonly } +; IS__TUNIT____: attributes #[[ATTR8]] = { nofree nosync nounwind willreturn writeonly } +; IS__TUNIT____: attributes #[[ATTR9]] = { nofree nosync nounwind readnone willreturn } +; IS__TUNIT____: attributes #[[ATTR10]] = { nofree nosync nounwind readonly willreturn } +; IS__TUNIT____: attributes #[[ATTR11]] = { nofree noreturn nosync nounwind readnone } +;. +; IS__CGSCC_OPM: attributes #[[ATTR0]] = { nofree noinline norecurse nosync nounwind readnone uwtable willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR1]] = { nofree noinline noreturn nosync nounwind readnone uwtable } +; IS__CGSCC_OPM: attributes #[[ATTR2]] = { nofree noinline nosync nounwind readnone uwtable willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR3]] = { noinline nounwind uwtable } +; IS__CGSCC_OPM: attributes #[[ATTR4]] = { nounwind } +; IS__CGSCC_OPM: attributes #[[ATTR5]] = { nofree nosync nounwind } +; IS__CGSCC_OPM: attributes #[[ATTR6]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR7]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } +; IS__CGSCC_OPM: attributes #[[ATTR8]] = { nounwind willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR9]] = { argmemonly nofree noinline norecurse nosync nounwind uwtable willreturn writeonly } +; IS__CGSCC_OPM: attributes #[[ATTR10]] = { nofree norecurse nosync nounwind willreturn writeonly } +; IS__CGSCC_OPM: attributes #[[ATTR11]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR12]] = { nofree norecurse nosync nounwind readonly willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR13]] = { nofree noreturn nosync nounwind readnone } +; IS__CGSCC_OPM: attributes #[[ATTR14]] = { readonly willreturn } +;. +; IS__CGSCC_NPM: attributes #[[ATTR0]] = { nofree noinline norecurse nosync nounwind readnone uwtable willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR1]] = { nofree noinline noreturn nosync nounwind readnone uwtable } +; IS__CGSCC_NPM: attributes #[[ATTR2]] = { noinline nounwind uwtable } +; IS__CGSCC_NPM: attributes #[[ATTR3]] = { nounwind } +; IS__CGSCC_NPM: attributes #[[ATTR4]] = { nofree nosync nounwind } +; IS__CGSCC_NPM: attributes #[[ATTR5]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR6]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } +; IS__CGSCC_NPM: attributes #[[ATTR7]] = { nounwind willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR8]] = { argmemonly nofree noinline norecurse nosync nounwind uwtable willreturn writeonly } +; IS__CGSCC_NPM: attributes #[[ATTR9]] = { nofree norecurse nosync nounwind willreturn writeonly } +; IS__CGSCC_NPM: attributes #[[ATTR10]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR11]] = { nofree norecurse nosync nounwind readonly willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR12]] = { nofree noreturn nosync nounwind readnone } +; IS__CGSCC_NPM: attributes #[[ATTR13]] = { readonly willreturn } diff --git a/llvm/test/Transforms/Attributor/liveness.ll b/llvm/test/Transforms/Attributor/liveness.ll --- a/llvm/test/Transforms/Attributor/liveness.ll +++ b/llvm/test/Transforms/Attributor/liveness.ll @@ -5,8 +5,8 @@ ; opt -attributor-cgscc -enable-new-pm=0 -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM ; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM -; NOT_CGSCC_OPM: @dead_with_blockaddress_users.l = constant [2 x i8*] [i8* inttoptr (i32 1 to i8*), i8* inttoptr (i32 1 to i8*)] -; IS__CGSCC_OPM: @dead_with_blockaddress_users.l = constant [2 x i8*] [i8* blockaddress(@dead_with_blockaddress_users, %lab0), i8* blockaddress(@dead_with_blockaddress_users, %end)] +; NOT_CGSCC___: @dead_with_blockaddress_users.l = constant [2 x i8*] [i8* inttoptr (i32 1 to i8*), i8* inttoptr (i32 1 to i8*)] +; IS__CGSCC___: @dead_with_blockaddress_users.l = constant [2 x i8*] [i8* blockaddress(@dead_with_blockaddress_users, %lab0), i8* blockaddress(@dead_with_blockaddress_users, %end)] @dead_with_blockaddress_users.l = constant [2 x i8*] [i8* blockaddress(@dead_with_blockaddress_users, %lab0), i8* blockaddress(@dead_with_blockaddress_users, %end)] declare void @no_return_call() nofree noreturn nounwind nosync @@ -29,7 +29,7 @@ define internal i32 @dead_internal_func(i32 %0) { ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@dead_internal_func -; IS__CGSCC____-SAME: () [[ATTR6:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR6:[0-9]+]] { ; IS__CGSCC____-NEXT: br label [[TMP2:%.*]] ; IS__CGSCC____: 1: ; IS__CGSCC____-NEXT: ret i32 undef @@ -58,11 +58,17 @@ } define i32 @volatile_load(i32*) norecurse nounwind uwtable { -; CHECK: Function Attrs: argmemonly nofree norecurse nounwind uwtable willreturn -; CHECK-LABEL: define {{[^@]+}}@volatile_load -; CHECK-SAME: (i32* nofree align 4 [[TMP0:%.*]]) [[ATTR7:#.*]] { -; CHECK-NEXT: [[TMP2:%.*]] = load volatile i32, i32* [[TMP0]], align 4 -; CHECK-NEXT: ret i32 [[TMP2]] +; NOT_CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nounwind uwtable willreturn +; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@volatile_load +; NOT_CGSCC_NPM-SAME: (i32* nofree 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 uwtable willreturn +; IS__CGSCC____-LABEL: define {{[^@]+}}@volatile_load +; IS__CGSCC____-SAME: (i32* nofree align 4 [[TMP0:%.*]]) #[[ATTR7:[0-9]+]] { +; IS__CGSCC____-NEXT: [[TMP2:%.*]] = load volatile i32, i32* [[TMP0]], align 4 +; IS__CGSCC____-NEXT: ret i32 [[TMP2]] ; %2 = load volatile i32, i32* %0, align 4 ret i32 %2 @@ -71,7 +77,7 @@ define internal i32 @internal_load(i32*) norecurse nounwind uwtable { ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone uwtable willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@internal_load -; IS__CGSCC____-SAME: () [[ATTR8:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR8:[0-9]+]] { ; IS__CGSCC____-NEXT: ret i32 undef ; %2 = load i32, i32* %0, align 4 @@ -82,9 +88,9 @@ define i32 @first_block_no_return(i32 %a, i32* nonnull %ptr1, i32* %ptr2) #0 { ; CHECK: Function Attrs: nofree noreturn nosync nounwind ; CHECK-LABEL: define {{[^@]+}}@first_block_no_return -; CHECK-SAME: (i32 [[A:%.*]], i32* nocapture nofree nonnull readnone [[PTR1:%.*]], i32* nocapture nofree readnone [[PTR2:%.*]]) [[ATTR0:#.*]] { +; CHECK-SAME: (i32 [[A:%.*]], i32* nocapture nofree nonnull readnone [[PTR1:%.*]], i32* nocapture nofree readnone [[PTR2:%.*]]) #[[ATTR0:[0-9]+]] { ; CHECK-NEXT: entry: -; CHECK-NEXT: call void @no_return_call() [[ATTR3:#.*]] +; CHECK-NEXT: call void @no_return_call() #[[ATTR3:[0-9]+]] ; CHECK-NEXT: unreachable ; CHECK: cond.true: ; CHECK-NEXT: unreachable @@ -123,21 +129,37 @@ ; dead block and check if it is deduced. define i32 @dead_block_present(i32 %a, i32* %ptr1) #0 { -; CHECK: Function Attrs: nosync -; CHECK-LABEL: define {{[^@]+}}@dead_block_present -; CHECK-SAME: (i32 [[A:%.*]], i32* nocapture nofree readnone [[PTR1:%.*]]) [[ATTR9:#.*]] { -; CHECK-NEXT: entry: -; CHECK-NEXT: [[CMP:%.*]] = icmp eq i32 [[A]], 0 -; CHECK-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]] -; CHECK: cond.true: -; CHECK-NEXT: call void @no_return_call() [[ATTR3]] -; CHECK-NEXT: unreachable -; CHECK: cond.false: -; CHECK-NEXT: call void @normal_call() -; CHECK-NEXT: [[CALL1:%.*]] = call i32 @bar() -; CHECK-NEXT: br label [[COND_END:%.*]] -; CHECK: cond.end: -; CHECK-NEXT: ret i32 [[CALL1]] +; NOT_CGSCC_NPM: Function Attrs: nosync +; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@dead_block_present +; NOT_CGSCC_NPM-SAME: (i32 [[A:%.*]], i32* nocapture nofree readnone [[PTR1:%.*]]) #[[ATTR7:[0-9]+]] { +; NOT_CGSCC_NPM-NEXT: entry: +; NOT_CGSCC_NPM-NEXT: [[CMP:%.*]] = icmp eq i32 [[A]], 0 +; NOT_CGSCC_NPM-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]] +; NOT_CGSCC_NPM: cond.true: +; NOT_CGSCC_NPM-NEXT: call void @no_return_call() #[[ATTR3]] +; NOT_CGSCC_NPM-NEXT: unreachable +; NOT_CGSCC_NPM: cond.false: +; NOT_CGSCC_NPM-NEXT: call void @normal_call() +; NOT_CGSCC_NPM-NEXT: [[CALL1:%.*]] = call i32 @bar() +; NOT_CGSCC_NPM-NEXT: br label [[COND_END:%.*]] +; NOT_CGSCC_NPM: cond.end: +; NOT_CGSCC_NPM-NEXT: ret i32 [[CALL1]] +; +; IS__CGSCC____: Function Attrs: nosync +; IS__CGSCC____-LABEL: define {{[^@]+}}@dead_block_present +; IS__CGSCC____-SAME: (i32 [[A:%.*]], i32* nocapture nofree readnone [[PTR1:%.*]]) #[[ATTR9:[0-9]+]] { +; IS__CGSCC____-NEXT: entry: +; IS__CGSCC____-NEXT: [[CMP:%.*]] = icmp eq i32 [[A]], 0 +; IS__CGSCC____-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]] +; IS__CGSCC____: cond.true: +; IS__CGSCC____-NEXT: call void @no_return_call() #[[ATTR3]] +; IS__CGSCC____-NEXT: unreachable +; IS__CGSCC____: cond.false: +; IS__CGSCC____-NEXT: call void @normal_call() +; IS__CGSCC____-NEXT: [[CALL1:%.*]] = call i32 @bar() +; IS__CGSCC____-NEXT: br label [[COND_END:%.*]] +; IS__CGSCC____: cond.end: +; IS__CGSCC____-NEXT: ret i32 [[CALL1]] ; entry: %cmp = icmp eq i32 %a, 0 @@ -163,15 +185,15 @@ define i32 @all_dead(i32 %a) #0 { ; CHECK: Function Attrs: nofree noreturn nosync nounwind ; CHECK-LABEL: define {{[^@]+}}@all_dead -; CHECK-SAME: (i32 [[A:%.*]]) [[ATTR0]] { +; CHECK-SAME: (i32 [[A:%.*]]) #[[ATTR0]] { ; CHECK-NEXT: entry: ; CHECK-NEXT: [[CMP:%.*]] = icmp eq i32 [[A]], 0 ; CHECK-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]] ; CHECK: cond.true: -; CHECK-NEXT: call void @no_return_call() [[ATTR3]] +; CHECK-NEXT: call void @no_return_call() #[[ATTR3]] ; CHECK-NEXT: unreachable ; CHECK: cond.false: -; CHECK-NEXT: call void @no_return_call() [[ATTR3]] +; CHECK-NEXT: call void @no_return_call() #[[ATTR3]] ; CHECK-NEXT: unreachable ; CHECK: cond.end: ; CHECK-NEXT: unreachable @@ -209,7 +231,7 @@ ; CHECK-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]] ; CHECK: cond.true: ; CHECK-NEXT: call void @normal_call() -; CHECK-NEXT: [[CALL:%.*]] = call i32 @foo_noreturn() [[ATTR4:#.*]] +; CHECK-NEXT: [[CALL:%.*]] = call i32 @foo_noreturn() #[[ATTR4:[0-9]+]] ; CHECK-NEXT: unreachable ; CHECK: cond.false: ; CHECK-NEXT: call void @normal_call() @@ -247,7 +269,7 @@ ; CHECK-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]] ; CHECK: cond.true: ; CHECK-NEXT: call void @normal_call() -; CHECK-NEXT: [[CALL:%.*]] = invoke i32 @foo_noreturn() [[ATTR4]] +; CHECK-NEXT: [[CALL:%.*]] = invoke i32 @foo_noreturn() #[[ATTR4]] ; CHECK-NEXT: to label [[CONTINUE:%.*]] unwind label [[CLEANUP:%.*]] ; CHECK: cond.false: ; CHECK-NEXT: call void @normal_call() @@ -300,7 +322,7 @@ ; CHECK-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]] ; CHECK: cond.true: ; CHECK-NEXT: call void @normal_call() -; CHECK-NEXT: [[CALL:%.*]] = call i32 @foo_noreturn_nounwind() [[ATTR3]] +; CHECK-NEXT: [[CALL:%.*]] = call i32 @foo_noreturn_nounwind() #[[ATTR3]] ; CHECK-NEXT: unreachable ; CHECK: cond.false: ; CHECK-NEXT: call void @normal_call() @@ -350,7 +372,7 @@ ; CHECK-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]] ; CHECK: cond.true: ; CHECK-NEXT: call void @normal_call() -; CHECK-NEXT: [[CALL:%.*]] = call i32 @foo_nounwind() [[ATTR2:#.*]] +; CHECK-NEXT: [[CALL:%.*]] = call i32 @foo_nounwind() #[[ATTR2:[0-9]+]] ; CHECK-NEXT: br label [[CONTINUE:%.*]] ; CHECK: cond.false: ; CHECK-NEXT: call void @normal_call() @@ -400,7 +422,7 @@ ; CHECK-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]] ; CHECK: cond.true: ; CHECK-NEXT: call void @normal_call() -; CHECK-NEXT: [[CALL:%.*]] = call i32 @foo_nounwind() [[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call i32 @foo_nounwind() #[[ATTR2]] ; CHECK-NEXT: br label [[CONTINUE:%.*]] ; CHECK: cond.false: ; CHECK-NEXT: call void @normal_call() @@ -444,7 +466,7 @@ ; CHECK-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]] ; CHECK: cond.true: ; CHECK-NEXT: call void @normal_call() -; CHECK-NEXT: [[CALL:%.*]] = call i32 @foo_nounwind() [[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call i32 @foo_nounwind() #[[ATTR2]] ; CHECK-NEXT: br label [[CONTINUE:%.*]] ; CHECK: cond.false: ; CHECK-NEXT: call void @normal_call() @@ -485,7 +507,7 @@ define void @ub(i32* %0) { ; NOT_CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@ub -; NOT_CGSCC_NPM-SAME: (i32* nocapture nofree writeonly [[TMP0:%.*]]) [[ATTR8:#.*]] { +; NOT_CGSCC_NPM-SAME: (i32* nocapture nofree writeonly [[TMP0:%.*]]) #[[ATTR8:[0-9]+]] { ; NOT_CGSCC_NPM-NEXT: [[POISON:%.*]] = sub nuw i32 0, 1 ; NOT_CGSCC_NPM-NEXT: [[STILL_POISON:%.*]] = and i32 [[POISON]], 0 ; NOT_CGSCC_NPM-NEXT: [[POISON_YET_AGAIN:%.*]] = getelementptr i32, i32* [[TMP0]], i32 [[STILL_POISON]] @@ -494,7 +516,7 @@ ; ; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly ; IS__CGSCC____-LABEL: define {{[^@]+}}@ub -; IS__CGSCC____-SAME: (i32* nocapture nofree writeonly [[TMP0:%.*]]) [[ATTR10:#.*]] { +; IS__CGSCC____-SAME: (i32* nocapture nofree writeonly [[TMP0:%.*]]) #[[ATTR10:[0-9]+]] { ; IS__CGSCC____-NEXT: [[POISON:%.*]] = sub nuw i32 0, 1 ; IS__CGSCC____-NEXT: [[STILL_POISON:%.*]] = and i32 [[POISON]], 0 ; IS__CGSCC____-NEXT: [[POISON_YET_AGAIN:%.*]] = getelementptr i32, i32* [[TMP0]], i32 [[STILL_POISON]] @@ -511,7 +533,7 @@ define void @inf_loop() #0 { ; NOT_CGSCC_NPM: Function Attrs: nofree noreturn nosync nounwind readnone ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@inf_loop -; NOT_CGSCC_NPM-SAME: () [[ATTR9:#.*]] { +; NOT_CGSCC_NPM-SAME: () #[[ATTR9:[0-9]+]] { ; NOT_CGSCC_NPM-NEXT: entry: ; NOT_CGSCC_NPM-NEXT: br label [[WHILE_BODY:%.*]] ; NOT_CGSCC_NPM: while.body: @@ -519,7 +541,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone ; IS__CGSCC____-LABEL: define {{[^@]+}}@inf_loop -; IS__CGSCC____-SAME: () [[ATTR11:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR11:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: br label [[WHILE_BODY:%.*]] ; IS__CGSCC____: while.body: @@ -538,7 +560,7 @@ define i32 @test5(i32, i32) #0 { ; CHECK: Function Attrs: nosync readnone ; CHECK-LABEL: define {{[^@]+}}@test5 -; CHECK-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) [[ATTR5:#.*]] { +; CHECK-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR5:[0-9]+]] { ; CHECK-NEXT: [[TMP3:%.*]] = icmp sgt i32 [[TMP0]], [[TMP1]] ; CHECK-NEXT: br i1 [[TMP3]], label [[COND_IF:%.*]], label [[COND_ELSEIF:%.*]] ; CHECK: cond.if: @@ -575,13 +597,13 @@ define void @rec() #0 { ; NOT_CGSCC_NPM: Function Attrs: nofree noreturn nosync nounwind readnone willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@rec -; NOT_CGSCC_NPM-SAME: () [[ATTR10:#.*]] { +; NOT_CGSCC_NPM-SAME: () #[[ATTR10:[0-9]+]] { ; NOT_CGSCC_NPM-NEXT: entry: ; NOT_CGSCC_NPM-NEXT: unreachable ; ; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@rec -; IS__CGSCC____-SAME: () [[ATTR12:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR12:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: unreachable ; @@ -597,7 +619,7 @@ define i32 @test6(i32, i32) #0 { ; NOT_CGSCC_NPM: Function Attrs: nofree noreturn nosync nounwind readnone willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@test6 -; NOT_CGSCC_NPM-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) [[ATTR10]] { +; NOT_CGSCC_NPM-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR10]] { ; NOT_CGSCC_NPM-NEXT: unreachable ; NOT_CGSCC_NPM: cond.if: ; NOT_CGSCC_NPM-NEXT: unreachable @@ -610,7 +632,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@test6 -; IS__CGSCC____-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) [[ATTR12]] { +; IS__CGSCC____-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR12]] { ; IS__CGSCC____-NEXT: unreachable ; IS__CGSCC____: cond.if: ; IS__CGSCC____-NEXT: unreachable @@ -788,16 +810,16 @@ define void @test_unreachable() { ; NOT_CGSCC_NPM: Function Attrs: nofree noreturn nosync nounwind ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@test_unreachable -; NOT_CGSCC_NPM-SAME: () [[ATTR0:#.*]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14:#.*]] -; NOT_CGSCC_NPM-NEXT: call void @test_unreachable() [[ATTR0]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR0]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14:[0-9]+]] +; NOT_CGSCC_NPM-NEXT: call void @test_unreachable() #[[ATTR0]] ; NOT_CGSCC_NPM-NEXT: unreachable ; ; IS__CGSCC____: Function Attrs: nofree noreturn nosync nounwind ; IS__CGSCC____-LABEL: define {{[^@]+}}@test_unreachable -; IS__CGSCC____-SAME: () [[ATTR0:#.*]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16:#.*]] -; IS__CGSCC____-NEXT: call void @test_unreachable() [[ATTR0]] +; IS__CGSCC____-SAME: () #[[ATTR0]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17:[0-9]+]] +; IS__CGSCC____-NEXT: call void @test_unreachable() #[[ATTR0]] ; IS__CGSCC____-NEXT: unreachable ; call void @sink() @@ -807,22 +829,22 @@ define linkonce_odr void @non_exact1() { ; CHECK-LABEL: define {{[^@]+}}@non_exact1() { -; CHECK-NEXT: call void @non_dead_a0() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_a1() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_a2() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_a3() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_a4() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_a5() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_a6() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_a7() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_a8() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_a9() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_a10() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_a11() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_a12() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_a13() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_a14() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_a15() [[ATTR2]] +; CHECK-NEXT: call void @non_dead_a0() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_a1() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_a2() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_a3() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_a4() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_a5() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_a6() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_a7() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_a8() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_a9() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_a10() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_a11() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_a12() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_a13() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_a14() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_a15() #[[ATTR2]] ; CHECK-NEXT: call void @middle() ; CHECK-NEXT: ret void ; @@ -848,28 +870,28 @@ define internal void @middle() { ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@middle() { ; NOT_CGSCC_NPM-NEXT: bb0: -; NOT_CGSCC_NPM-NEXT: call void @non_dead_b0() [[ATTR11:#.*]] -; NOT_CGSCC_NPM-NEXT: call void @non_dead_b1() [[ATTR11]] -; NOT_CGSCC_NPM-NEXT: call void @non_dead_b2() [[ATTR11]] -; NOT_CGSCC_NPM-NEXT: call void @non_dead_b3() [[ATTR11]] +; NOT_CGSCC_NPM-NEXT: call void @non_dead_b0() #[[ATTR11:[0-9]+]] +; NOT_CGSCC_NPM-NEXT: call void @non_dead_b1() #[[ATTR11]] +; NOT_CGSCC_NPM-NEXT: call void @non_dead_b2() #[[ATTR11]] +; NOT_CGSCC_NPM-NEXT: call void @non_dead_b3() #[[ATTR11]] ; NOT_CGSCC_NPM-NEXT: br label [[BB1:%.*]] ; NOT_CGSCC_NPM: bb1: -; NOT_CGSCC_NPM-NEXT: call void @non_dead_b4() [[ATTR11]] -; NOT_CGSCC_NPM-NEXT: call void @non_dead_b5() [[ATTR11]] -; NOT_CGSCC_NPM-NEXT: call void @non_dead_b6() [[ATTR11]] -; NOT_CGSCC_NPM-NEXT: call void @non_dead_b7() [[ATTR11]] +; NOT_CGSCC_NPM-NEXT: call void @non_dead_b4() #[[ATTR11]] +; NOT_CGSCC_NPM-NEXT: call void @non_dead_b5() #[[ATTR11]] +; NOT_CGSCC_NPM-NEXT: call void @non_dead_b6() #[[ATTR11]] +; NOT_CGSCC_NPM-NEXT: call void @non_dead_b7() #[[ATTR11]] ; NOT_CGSCC_NPM-NEXT: br label [[BB2:%.*]] ; NOT_CGSCC_NPM: bb2: -; NOT_CGSCC_NPM-NEXT: call void @non_dead_b8() [[ATTR11]] -; NOT_CGSCC_NPM-NEXT: call void @non_dead_b9() [[ATTR11]] -; NOT_CGSCC_NPM-NEXT: call void @non_dead_b10() [[ATTR11]] -; NOT_CGSCC_NPM-NEXT: call void @non_dead_b11() [[ATTR11]] +; NOT_CGSCC_NPM-NEXT: call void @non_dead_b8() #[[ATTR11]] +; NOT_CGSCC_NPM-NEXT: call void @non_dead_b9() #[[ATTR11]] +; NOT_CGSCC_NPM-NEXT: call void @non_dead_b10() #[[ATTR11]] +; NOT_CGSCC_NPM-NEXT: call void @non_dead_b11() #[[ATTR11]] ; NOT_CGSCC_NPM-NEXT: br label [[BB3:%.*]] ; NOT_CGSCC_NPM: bb3: -; NOT_CGSCC_NPM-NEXT: call void @non_dead_b12() [[ATTR11]] -; NOT_CGSCC_NPM-NEXT: call void @non_dead_b13() [[ATTR11]] -; NOT_CGSCC_NPM-NEXT: call void @non_dead_b14() [[ATTR11]] -; NOT_CGSCC_NPM-NEXT: call void @non_dead_b15() [[ATTR11]] +; NOT_CGSCC_NPM-NEXT: call void @non_dead_b12() #[[ATTR11]] +; NOT_CGSCC_NPM-NEXT: call void @non_dead_b13() #[[ATTR11]] +; NOT_CGSCC_NPM-NEXT: call void @non_dead_b14() #[[ATTR11]] +; NOT_CGSCC_NPM-NEXT: call void @non_dead_b15() #[[ATTR11]] ; NOT_CGSCC_NPM-NEXT: br label [[BB4:%.*]] ; NOT_CGSCC_NPM: bb4: ; NOT_CGSCC_NPM-NEXT: call void @non_exact2() @@ -877,28 +899,28 @@ ; ; IS__CGSCC____-LABEL: define {{[^@]+}}@middle() { ; IS__CGSCC____-NEXT: bb0: -; IS__CGSCC____-NEXT: call void @non_dead_b0() [[ATTR16]] -; IS__CGSCC____-NEXT: call void @non_dead_b1() [[ATTR16]] -; IS__CGSCC____-NEXT: call void @non_dead_b2() [[ATTR16]] -; IS__CGSCC____-NEXT: call void @non_dead_b3() [[ATTR16]] +; IS__CGSCC____-NEXT: call void @non_dead_b0() #[[ATTR17]] +; IS__CGSCC____-NEXT: call void @non_dead_b1() #[[ATTR17]] +; IS__CGSCC____-NEXT: call void @non_dead_b2() #[[ATTR17]] +; IS__CGSCC____-NEXT: call void @non_dead_b3() #[[ATTR17]] ; IS__CGSCC____-NEXT: br label [[BB1:%.*]] ; IS__CGSCC____: bb1: -; IS__CGSCC____-NEXT: call void @non_dead_b4() [[ATTR16]] -; IS__CGSCC____-NEXT: call void @non_dead_b5() [[ATTR16]] -; IS__CGSCC____-NEXT: call void @non_dead_b6() [[ATTR16]] -; IS__CGSCC____-NEXT: call void @non_dead_b7() [[ATTR16]] +; IS__CGSCC____-NEXT: call void @non_dead_b4() #[[ATTR17]] +; IS__CGSCC____-NEXT: call void @non_dead_b5() #[[ATTR17]] +; IS__CGSCC____-NEXT: call void @non_dead_b6() #[[ATTR17]] +; IS__CGSCC____-NEXT: call void @non_dead_b7() #[[ATTR17]] ; IS__CGSCC____-NEXT: br label [[BB2:%.*]] ; IS__CGSCC____: bb2: -; IS__CGSCC____-NEXT: call void @non_dead_b8() [[ATTR16]] -; IS__CGSCC____-NEXT: call void @non_dead_b9() [[ATTR16]] -; IS__CGSCC____-NEXT: call void @non_dead_b10() [[ATTR16]] -; IS__CGSCC____-NEXT: call void @non_dead_b11() [[ATTR16]] +; IS__CGSCC____-NEXT: call void @non_dead_b8() #[[ATTR17]] +; IS__CGSCC____-NEXT: call void @non_dead_b9() #[[ATTR17]] +; IS__CGSCC____-NEXT: call void @non_dead_b10() #[[ATTR17]] +; IS__CGSCC____-NEXT: call void @non_dead_b11() #[[ATTR17]] ; IS__CGSCC____-NEXT: br label [[BB3:%.*]] ; IS__CGSCC____: bb3: -; IS__CGSCC____-NEXT: call void @non_dead_b12() [[ATTR16]] -; IS__CGSCC____-NEXT: call void @non_dead_b13() [[ATTR16]] -; IS__CGSCC____-NEXT: call void @non_dead_b14() [[ATTR16]] -; IS__CGSCC____-NEXT: call void @non_dead_b15() [[ATTR16]] +; IS__CGSCC____-NEXT: call void @non_dead_b12() #[[ATTR17]] +; IS__CGSCC____-NEXT: call void @non_dead_b13() #[[ATTR17]] +; IS__CGSCC____-NEXT: call void @non_dead_b14() #[[ATTR17]] +; IS__CGSCC____-NEXT: call void @non_dead_b15() #[[ATTR17]] ; IS__CGSCC____-NEXT: br label [[BB4:%.*]] ; IS__CGSCC____: bb4: ; IS__CGSCC____-NEXT: call void @non_exact2() @@ -934,22 +956,22 @@ } define linkonce_odr void @non_exact2() { ; CHECK-LABEL: define {{[^@]+}}@non_exact2() { -; CHECK-NEXT: call void @non_dead_c0() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_c1() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_c2() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_c3() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_c4() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_c5() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_c6() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_c7() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_c8() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_c9() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_c10() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_c11() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_c12() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_c13() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_c14() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_c15() [[ATTR2]] +; CHECK-NEXT: call void @non_dead_c0() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_c1() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_c2() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_c3() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_c4() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_c5() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_c6() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_c7() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_c8() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_c9() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_c10() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_c11() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_c12() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_c13() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_c14() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_c15() #[[ATTR2]] ; CHECK-NEXT: call void @non_exact3() ; CHECK-NEXT: ret void ; @@ -974,23 +996,23 @@ } define linkonce_odr void @non_exact3() { ; CHECK-LABEL: define {{[^@]+}}@non_exact3() { -; CHECK-NEXT: call void @non_dead_d0() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_d1() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_d2() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_d3() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_d4() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_d5() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_d6() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_d7() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_d8() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_d9() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_d10() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_d11() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_d12() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_d13() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_d14() [[ATTR2]] -; CHECK-NEXT: call void @non_dead_d15() [[ATTR2]] -; CHECK-NEXT: [[NR:%.*]] = call i32 @foo_noreturn() [[ATTR4]] +; CHECK-NEXT: call void @non_dead_d0() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_d1() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_d2() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_d3() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_d4() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_d5() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_d6() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_d7() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_d8() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_d9() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_d10() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_d11() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_d12() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_d13() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_d14() #[[ATTR2]] +; CHECK-NEXT: call void @non_dead_d15() #[[ATTR2]] +; CHECK-NEXT: [[NR:%.*]] = call i32 @foo_noreturn() #[[ATTR4]] ; CHECK-NEXT: unreachable ; call void @non_dead_d0() @@ -1017,14 +1039,14 @@ define internal void @non_dead_a0() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a0 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a0 -; IS__CGSCC____-SAME: () [[ATTR13:#.*]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13:[0-9]+]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1033,14 +1055,14 @@ define internal void @non_dead_a1() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a1 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a1 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1049,14 +1071,14 @@ define internal void @non_dead_a2() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a2 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a2 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1065,14 +1087,14 @@ define internal void @non_dead_a3() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a3 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a3 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1081,14 +1103,14 @@ define internal void @non_dead_a4() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a4 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a4 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1097,14 +1119,14 @@ define internal void @non_dead_a5() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a5 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a5 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1113,14 +1135,14 @@ define internal void @non_dead_a6() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a6 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a6 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1129,14 +1151,14 @@ define internal void @non_dead_a7() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a7 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a7 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1145,14 +1167,14 @@ define internal void @non_dead_a8() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a8 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a8 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1161,14 +1183,14 @@ define internal void @non_dead_a9() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a9 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a9 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1177,14 +1199,14 @@ define internal void @non_dead_a10() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a10 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a10 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1193,14 +1215,14 @@ define internal void @non_dead_a11() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a11 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a11 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1209,14 +1231,14 @@ define internal void @non_dead_a12() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a12 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a12 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1225,14 +1247,14 @@ define internal void @non_dead_a13() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a13 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a13 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1241,14 +1263,14 @@ define internal void @non_dead_a14() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a14 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a14 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1257,14 +1279,14 @@ define internal void @non_dead_a15() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a15 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a15 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1273,14 +1295,14 @@ define internal void @non_dead_b0() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b0 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b0 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1289,14 +1311,14 @@ define internal void @non_dead_b1() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b1 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b1 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1305,14 +1327,14 @@ define internal void @non_dead_b2() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b2 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b2 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1321,14 +1343,14 @@ define internal void @non_dead_b3() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b3 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b3 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1337,14 +1359,14 @@ define internal void @non_dead_b4() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b4 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b4 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1353,14 +1375,14 @@ define internal void @non_dead_b5() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b5 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b5 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1369,14 +1391,14 @@ define internal void @non_dead_b6() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b6 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b6 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1385,14 +1407,14 @@ define internal void @non_dead_b7() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b7 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b7 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1401,14 +1423,14 @@ define internal void @non_dead_b8() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b8 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b8 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1417,14 +1439,14 @@ define internal void @non_dead_b9() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b9 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b9 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1433,14 +1455,14 @@ define internal void @non_dead_b10() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b10 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b10 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1449,14 +1471,14 @@ define internal void @non_dead_b11() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b11 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b11 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1465,14 +1487,14 @@ define internal void @non_dead_b12() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b12 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b12 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1481,14 +1503,14 @@ define internal void @non_dead_b13() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b13 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b13 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1497,14 +1519,14 @@ define internal void @non_dead_b14() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b14 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b14 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1513,14 +1535,14 @@ define internal void @non_dead_b15() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b15 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b15 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1529,14 +1551,14 @@ define internal void @non_dead_c0() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c0 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c0 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1545,14 +1567,14 @@ define internal void @non_dead_c1() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c1 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c1 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1561,14 +1583,14 @@ define internal void @non_dead_c2() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c2 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c2 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1577,14 +1599,14 @@ define internal void @non_dead_c3() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c3 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c3 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1593,14 +1615,14 @@ define internal void @non_dead_c4() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c4 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c4 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1609,14 +1631,14 @@ define internal void @non_dead_c5() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c5 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c5 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1625,14 +1647,14 @@ define internal void @non_dead_c6() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c6 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c6 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1641,14 +1663,14 @@ define internal void @non_dead_c7() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c7 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c7 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1657,14 +1679,14 @@ define internal void @non_dead_c8() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c8 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c8 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1673,14 +1695,14 @@ define internal void @non_dead_c9() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c9 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c9 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1689,14 +1711,14 @@ define internal void @non_dead_c10() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c10 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c10 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1705,14 +1727,14 @@ define internal void @non_dead_c11() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c11 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c11 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1721,14 +1743,14 @@ define internal void @non_dead_c12() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c12 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c12 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1737,14 +1759,14 @@ define internal void @non_dead_c13() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c13 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c13 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1753,14 +1775,14 @@ define internal void @non_dead_c14() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c14 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c14 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1769,14 +1791,14 @@ define internal void @non_dead_c15() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c15 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c15 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1785,14 +1807,14 @@ define internal void @non_dead_d0() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d0 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d0 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1801,14 +1823,14 @@ define internal void @non_dead_d1() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d1 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d1 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1817,14 +1839,14 @@ define internal void @non_dead_d2() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d2 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d2 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1833,14 +1855,14 @@ define internal void @non_dead_d3() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d3 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d3 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1849,14 +1871,14 @@ define internal void @non_dead_d4() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d4 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d4 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1865,14 +1887,14 @@ define internal void @non_dead_d5() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d5 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d5 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1881,14 +1903,14 @@ define internal void @non_dead_d6() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d6 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d6 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1897,14 +1919,14 @@ define internal void @non_dead_d7() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d7 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d7 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1913,14 +1935,14 @@ define internal void @non_dead_d8() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d8 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d8 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1929,14 +1951,14 @@ define internal void @non_dead_d9() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d9 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d9 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1945,14 +1967,14 @@ define internal void @non_dead_d10() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d10 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d10 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1961,14 +1983,14 @@ define internal void @non_dead_d11() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d11 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d11 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1977,14 +1999,14 @@ define internal void @non_dead_d12() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d12 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d12 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1993,14 +2015,14 @@ define internal void @non_dead_d13() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d13 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d13 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -2009,14 +2031,14 @@ define internal void @non_dead_d14() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d14 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d14 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -2025,14 +2047,14 @@ define internal void @non_dead_d15() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d15 -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d15 -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -2062,14 +2084,14 @@ define void @live_with_dead_entry_lp() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { ; CHECK: Function Attrs: nounwind ; CHECK-LABEL: define {{[^@]+}}@live_with_dead_entry_lp -; CHECK-SAME: () [[ATTR2]] personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { +; CHECK-SAME: () #[[ATTR2]] personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { ; CHECK-NEXT: entry: -; CHECK-NEXT: invoke void @blowup() [[ATTR4]] +; CHECK-NEXT: invoke void @blowup() #[[ATTR4]] ; CHECK-NEXT: to label [[LIVE_WITH_DEAD_ENTRY_DEAD:%.*]] unwind label [[LP1:%.*]] ; CHECK: lp1: ; CHECK-NEXT: [[LP:%.*]] = landingpad { i8*, i32 } ; CHECK-NEXT: catch i8* null -; CHECK-NEXT: invoke void @blowup() [[ATTR4]] +; CHECK-NEXT: invoke void @blowup() #[[ATTR4]] ; CHECK-NEXT: to label [[LIVE_WITH_DEAD_ENTRY_DEAD1:%.*]] unwind label [[LP2:%.*]] ; CHECK: lp2: ; CHECK-NEXT: [[TMP0:%.*]] = landingpad { i8*, i32 } @@ -2097,14 +2119,14 @@ define internal void @useless_arg_sink(i32* %a) { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@useless_arg_sink -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@useless_arg_sink -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -2114,14 +2136,14 @@ define internal void @useless_arg_almost_sink(i32* %a) { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@useless_arg_almost_sink -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: call void @useless_arg_sink() [[ATTR11]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: call void @useless_arg_sink() #[[ATTR11]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@useless_arg_almost_sink -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: call void @useless_arg_sink() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: call void @useless_arg_sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret void ; call void @useless_arg_sink(i32* %a) @@ -2132,7 +2154,7 @@ define weak_odr void @useless_arg_ext(i32* %a) { ; CHECK-LABEL: define {{[^@]+}}@useless_arg_ext ; CHECK-SAME: (i32* [[A:%.*]]) { -; CHECK-NEXT: call void @useless_arg_almost_sink() [[ATTR2]] +; CHECK-NEXT: call void @useless_arg_almost_sink() #[[ATTR2]] ; CHECK-NEXT: ret void ; call void @useless_arg_almost_sink(i32* %a) @@ -2164,28 +2186,28 @@ define internal i32 @switch_default(i64 %i) nounwind { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@switch_default -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { ; NOT_CGSCC_NPM-NEXT: entry: ; NOT_CGSCC_NPM-NEXT: switch i64 0, label [[SW_DEFAULT:%.*]] [ ; NOT_CGSCC_NPM-NEXT: i64 3, label [[RETURN:%.*]] ; NOT_CGSCC_NPM-NEXT: i64 10, label [[RETURN]] ; NOT_CGSCC_NPM-NEXT: ] ; NOT_CGSCC_NPM: sw.default: -; NOT_CGSCC_NPM-NEXT: call void @sink() [[ATTR14]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR14]] ; NOT_CGSCC_NPM-NEXT: ret i32 undef ; NOT_CGSCC_NPM: return: ; NOT_CGSCC_NPM-NEXT: unreachable ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@switch_default -; IS__CGSCC____-SAME: () [[ATTR13]] { +; IS__CGSCC____-SAME: () #[[ATTR13]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: switch i64 0, label [[SW_DEFAULT:%.*]] [ ; IS__CGSCC____-NEXT: i64 3, label [[RETURN:%.*]] ; IS__CGSCC____-NEXT: i64 10, label [[RETURN]] ; IS__CGSCC____-NEXT: ] ; IS__CGSCC____: sw.default: -; IS__CGSCC____-NEXT: call void @sink() [[ATTR16]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret i32 undef ; IS__CGSCC____: return: ; IS__CGSCC____-NEXT: unreachable @@ -2207,14 +2229,14 @@ define i32 @switch_default_caller() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@switch_default_caller -; NOT_CGSCC_NPM-SAME: () [[ATTR11]] { -; NOT_CGSCC_NPM-NEXT: [[CALL2:%.*]] = tail call i32 @switch_default() [[ATTR11]] +; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] { +; NOT_CGSCC_NPM-NEXT: [[CALL2:%.*]] = tail call i32 @switch_default() #[[ATTR11]] ; NOT_CGSCC_NPM-NEXT: ret i32 123 ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@switch_default_caller -; IS__CGSCC____-SAME: () [[ATTR13]] { -; IS__CGSCC____-NEXT: [[CALL2:%.*]] = tail call i32 @switch_default() [[ATTR16]] +; IS__CGSCC____-SAME: () #[[ATTR13]] { +; IS__CGSCC____-NEXT: [[CALL2:%.*]] = tail call i32 @switch_default() #[[ATTR17]] ; IS__CGSCC____-NEXT: ret i32 123 ; %call2 = tail call i32 @switch_default(i64 0) @@ -2224,7 +2246,7 @@ define internal i32 @switch_default_dead(i64 %i) nounwind { ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@switch_default_dead -; IS__CGSCC____-SAME: () [[ATTR6]] { +; IS__CGSCC____-SAME: () #[[ATTR6]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: switch i64 0, label [[SW_DEFAULT:%.*]] [ ; IS__CGSCC____-NEXT: i64 3, label [[RETURN:%.*]] @@ -2251,12 +2273,12 @@ define i32 @switch_default_dead_caller() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@switch_default_dead_caller -; NOT_CGSCC_NPM-SAME: () [[ATTR12:#.*]] { +; NOT_CGSCC_NPM-SAME: () #[[ATTR12:[0-9]+]] { ; NOT_CGSCC_NPM-NEXT: ret i32 123 ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@switch_default_dead_caller -; IS__CGSCC____-SAME: () [[ATTR6]] { +; IS__CGSCC____-SAME: () #[[ATTR6]] { ; IS__CGSCC____-NEXT: ret i32 123 ; %call2 = tail call i32 @switch_default_dead(i64 0) @@ -2379,10 +2401,9 @@ declare void @use_i32p(i32*) ; Allow blockaddress users -; NOT_CGSCC_OPM-NOT: @dead_with_blockaddress_users define internal void @dead_with_blockaddress_users(i32* nocapture %pc) nounwind readonly { ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@dead_with_blockaddress_users -; IS__CGSCC_OPM-SAME: (i32* nocapture [[PC:%.*]]) +; IS__CGSCC_OPM-SAME: (i32* noalias nocapture nofree nonnull readonly align 536870912 dereferenceable(4294967295) [[PC:%.*]]) ; IS__CGSCC_OPM-NEXT: entry: ; IS__CGSCC_OPM-NEXT: br label [[INDIRECTGOTO:%.*]] ; IS__CGSCC_OPM: lab0: @@ -2398,6 +2419,24 @@ ; IS__CGSCC_OPM-NEXT: [[INDIRECT_GOTO_DEST:%.*]] = load i8*, i8** [[INDIRECT_GOTO_DEST_IN]] ; IS__CGSCC_OPM-NEXT: indirectbr i8* [[INDIRECT_GOTO_DEST]], [label [[LAB0]], label %end] ; +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone +; IS__CGSCC____-LABEL: define {{[^@]+}}@dead_with_blockaddress_users +; IS__CGSCC____-SAME: (i32* noalias nocapture nofree nonnull readonly align 536870912 dereferenceable(4294967295) [[PC:%.*]]) #[[ATTR14:[0-9]+]] { +; IS__CGSCC____-NEXT: entry: +; IS__CGSCC____-NEXT: br label [[INDIRECTGOTO:%.*]] +; IS__CGSCC____: lab0: +; IS__CGSCC____-NEXT: [[INDVAR_NEXT:%.*]] = add i32 [[INDVAR:%.*]], 1 +; IS__CGSCC____-NEXT: br label [[INDIRECTGOTO]] +; IS__CGSCC____: end: +; IS__CGSCC____-NEXT: ret void +; IS__CGSCC____: indirectgoto: +; IS__CGSCC____-NEXT: [[INDVAR]] = phi i32 [ [[INDVAR_NEXT]], [[LAB0:%.*]] ], [ 0, [[ENTRY:%.*]] ] +; IS__CGSCC____-NEXT: [[PC_ADDR_0:%.*]] = getelementptr i32, i32* undef, i32 [[INDVAR]] +; IS__CGSCC____-NEXT: [[TMP1_PN:%.*]] = load i32, i32* [[PC_ADDR_0]], align 4 +; IS__CGSCC____-NEXT: [[INDIRECT_GOTO_DEST_IN:%.*]] = getelementptr inbounds [2 x i8*], [2 x i8*]* @dead_with_blockaddress_users.l, i32 0, i32 [[TMP1_PN]] +; IS__CGSCC____-NEXT: [[INDIRECT_GOTO_DEST:%.*]] = load i8*, i8** [[INDIRECT_GOTO_DEST_IN]], align 8 +; IS__CGSCC____-NEXT: indirectbr i8* [[INDIRECT_GOTO_DEST]], [label [[LAB0]], label %end] +; entry: br label %indirectgoto @@ -2492,12 +2531,12 @@ define i32 @h(i32 %i) { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@h -; NOT_CGSCC_NPM-SAME: (i32 [[I:%.*]]) [[ATTR12]] { +; NOT_CGSCC_NPM-SAME: (i32 [[I:%.*]]) #[[ATTR12]] { ; NOT_CGSCC_NPM-NEXT: ret i32 0 ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@h -; IS__CGSCC____-SAME: (i32 [[I:%.*]]) [[ATTR6]] { +; IS__CGSCC____-SAME: (i32 [[I:%.*]]) #[[ATTR6]] { ; IS__CGSCC____-NEXT: ret i32 0 ; ret i32 0 @@ -2511,11 +2550,11 @@ define void @bad_gep() { ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@bad_gep -; NOT_CGSCC_NPM-SAME: () [[ATTR12]] { +; NOT_CGSCC_NPM-SAME: () #[[ATTR12]] { ; NOT_CGSCC_NPM-NEXT: entry: ; NOT_CGSCC_NPM-NEXT: [[N:%.*]] = alloca i8, align 1 ; NOT_CGSCC_NPM-NEXT: [[M:%.*]] = alloca i8, align 1 -; NOT_CGSCC_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 1, i8* noalias nocapture nofree noundef nonnull dereferenceable(1) [[N]]) [[ATTR15:#.*]] +; NOT_CGSCC_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 1, i8* noalias nocapture nofree noundef nonnull dereferenceable(1) [[N]]) #[[ATTR15:[0-9]+]] ; NOT_CGSCC_NPM-NEXT: br label [[EXIT:%.*]] ; NOT_CGSCC_NPM: while.body: ; NOT_CGSCC_NPM-NEXT: unreachable @@ -2524,16 +2563,16 @@ ; NOT_CGSCC_NPM: if.end: ; NOT_CGSCC_NPM-NEXT: unreachable ; NOT_CGSCC_NPM: exit: -; NOT_CGSCC_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 1, i8* noalias nocapture nofree noundef nonnull dereferenceable(1) [[N]]) [[ATTR15]] +; NOT_CGSCC_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 1, i8* noalias nocapture nofree noundef nonnull dereferenceable(1) [[N]]) #[[ATTR15]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@bad_gep -; IS__CGSCC____-SAME: () [[ATTR14:#.*]] { +; IS__CGSCC____-SAME: () #[[ATTR15:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: [[N:%.*]] = alloca i8, align 1 ; IS__CGSCC____-NEXT: [[M:%.*]] = alloca i8, align 1 -; IS__CGSCC____-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 1, i8* noalias nocapture nofree noundef nonnull dereferenceable(1) [[N]]) [[ATTR17:#.*]] +; IS__CGSCC____-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 1, i8* noalias nocapture nofree noundef nonnull dereferenceable(1) [[N]]) #[[ATTR18:[0-9]+]] ; IS__CGSCC____-NEXT: br label [[EXIT:%.*]] ; IS__CGSCC____: while.body: ; IS__CGSCC____-NEXT: unreachable @@ -2542,7 +2581,7 @@ ; IS__CGSCC____: if.end: ; IS__CGSCC____-NEXT: unreachable ; IS__CGSCC____: exit: -; IS__CGSCC____-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 1, i8* noalias nocapture nofree noundef nonnull dereferenceable(1) [[N]]) [[ATTR17]] +; IS__CGSCC____-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 1, i8* noalias nocapture nofree noundef nonnull dereferenceable(1) [[N]]) #[[ATTR18]] ; IS__CGSCC____-NEXT: ret void ; entry: @@ -2575,3 +2614,39 @@ declare void @llvm.lifetime.start.p0i8(i64 %0, i8* %1) declare void @llvm.lifetime.end.p0i8(i64 %0, i8* %1) +; NOT_CGSCC_NPM: attributes #[[ATTR0]] = { nofree noreturn nosync nounwind } +; NOT_CGSCC_NPM: attributes #[[ATTR1:[0-9]+]] = { readnone } +; NOT_CGSCC_NPM: attributes #[[ATTR2]] = { nounwind } +; NOT_CGSCC_NPM: attributes #[[ATTR3]] = { noreturn nounwind } +; NOT_CGSCC_NPM: attributes #[[ATTR4]] = { noreturn } +; NOT_CGSCC_NPM: attributes #[[ATTR5]] = { nosync readnone } +; NOT_CGSCC_NPM: attributes #[[ATTR6]] = { argmemonly nofree norecurse nounwind uwtable willreturn } +; NOT_CGSCC_NPM: attributes #[[ATTR7]] = { nosync } +; NOT_CGSCC_NPM: attributes #[[ATTR8]] = { argmemonly nofree nosync nounwind willreturn writeonly } +; NOT_CGSCC_NPM: attributes #[[ATTR9]] = { nofree noreturn nosync nounwind readnone } +; NOT_CGSCC_NPM: attributes #[[ATTR10]] = { nofree noreturn nosync nounwind readnone willreturn } +; NOT_CGSCC_NPM: attributes #[[ATTR11]] = { nofree nosync nounwind willreturn } +; NOT_CGSCC_NPM: attributes #[[ATTR12]] = { nofree nosync nounwind readnone willreturn } +; NOT_CGSCC_NPM: attributes #[[ATTR13:[0-9]+]] = { argmemonly nofree nosync nounwind willreturn } +; NOT_CGSCC_NPM: attributes #[[ATTR14]] = { nounwind willreturn } +; NOT_CGSCC_NPM: attributes #[[ATTR15]] = { willreturn } +;. +; IS__CGSCC____: attributes #[[ATTR0]] = { nofree noreturn nosync nounwind } +; IS__CGSCC____: attributes #[[ATTR1:[0-9]+]] = { readnone } +; IS__CGSCC____: attributes #[[ATTR2]] = { nounwind } +; IS__CGSCC____: attributes #[[ATTR3]] = { noreturn nounwind } +; IS__CGSCC____: attributes #[[ATTR4]] = { noreturn } +; IS__CGSCC____: attributes #[[ATTR5]] = { nosync readnone } +; IS__CGSCC____: attributes #[[ATTR6]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS__CGSCC____: attributes #[[ATTR7]] = { argmemonly nofree norecurse nounwind uwtable willreturn } +; IS__CGSCC____: attributes #[[ATTR8]] = { nofree norecurse nosync nounwind readnone uwtable willreturn } +; IS__CGSCC____: attributes #[[ATTR9]] = { nosync } +; IS__CGSCC____: attributes #[[ATTR10]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } +; IS__CGSCC____: attributes #[[ATTR11]] = { nofree norecurse noreturn nosync nounwind readnone } +; IS__CGSCC____: attributes #[[ATTR12]] = { nofree norecurse noreturn nosync nounwind readnone willreturn } +; IS__CGSCC____: attributes #[[ATTR13]] = { nofree nosync nounwind willreturn } +; IS__CGSCC____: attributes #[[ATTR14]] = { nofree norecurse nosync nounwind readnone } +; IS__CGSCC____: attributes #[[ATTR15]] = { nofree nosync nounwind readnone willreturn } +; IS__CGSCC____: attributes #[[ATTR16:[0-9]+]] = { argmemonly nofree nosync nounwind willreturn } +; IS__CGSCC____: attributes #[[ATTR17]] = { nounwind willreturn } +; IS__CGSCC____: attributes #[[ATTR18]] = { willreturn } diff --git a/llvm/test/Transforms/Attributor/nodelete.ll b/llvm/test/Transforms/Attributor/nodelete.ll new file mode 100644 --- /dev/null +++ b/llvm/test/Transforms/Attributor/nodelete.ll @@ -0,0 +1,91 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes +; TODO: note that non-cgscc mode also fails +; TODO: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=39 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM +; TODO: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=39 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM +; RUN: opt -attributor-cgscc -enable-new-pm=0 -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM +; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM + +%"a" = type { i64 } +%"b" = type { i8 } + +define hidden i64 @f1() align 2 { +; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; CHECK-LABEL: define {{[^@]+}}@f1 +; CHECK-SAME: () [[ATTR0:#.*]] align 2 { +; CHECK-NEXT: entry: +; CHECK-NEXT: ret i64 undef +; +entry: + %ref.tmp = alloca %"a", align 8 + %call2 = call i64 @f2(%"a"* %ref.tmp) + ret i64 %call2 +} + +define internal i64 @f2(%"a"* %this) align 2 { +; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; CHECK-LABEL: define {{[^@]+}}@f2 +; CHECK-SAME: (%a* noalias nocapture nofree noundef nonnull readnone align 8 dereferenceable(8) [[THIS:%.*]]) [[ATTR0]] align 2 { +; CHECK-NEXT: entry: +; CHECK-NEXT: [[THIS_ADDR:%.*]] = alloca %a*, align 8 +; CHECK-NEXT: store %a* [[THIS]], %a** [[THIS_ADDR]], align 8 +; CHECK-NEXT: ret i64 undef +; +entry: + %this.addr = alloca %"a"*, align 8 + store %"a"* %this, %"a"** %this.addr, align 8 + %this1 = load %"a"*, %"a"** %this.addr, align 8 + %0 = bitcast %"a"* %this1 to %"b"* + call void @f3(%"b"* %0) + ret i64 undef +} + +define internal void @f3(%"b"* %this) align 2 { +; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; CHECK-LABEL: define {{[^@]+}}@f3 +; CHECK-SAME: (%b* noalias nocapture nofree readnone [[THIS:%.*]]) [[ATTR0]] align 2 { +; CHECK-NEXT: entry: +; CHECK-NEXT: [[THIS_ADDR:%.*]] = alloca %b*, align 8 +; CHECK-NEXT: store %b* [[THIS]], %b** [[THIS_ADDR]], align 8 +; CHECK-NEXT: ret void +; +entry: + %this.addr = alloca %"b"*, align 8 + store %"b"* %this, %"b"** %this.addr, align 8 + %this1 = load %"b"*, %"b"** %this.addr, align 8 + %call = call i1 @f4(%"b"* %this1) + ret void +} + +define internal i1 @f4(%"b"* %this) align 2 { +; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; CHECK-LABEL: define {{[^@]+}}@f4 +; CHECK-SAME: (%b* noalias nocapture nofree readnone [[THIS:%.*]]) [[ATTR0]] align 2 { +; CHECK-NEXT: entry: +; CHECK-NEXT: [[THIS_ADDR:%.*]] = alloca %b*, align 8 +; CHECK-NEXT: store %b* [[THIS]], %b** [[THIS_ADDR]], align 8 +; CHECK-NEXT: ret i1 undef +; +entry: + %this.addr = alloca %"b"*, align 8 + store %"b"* %this, %"b"** %this.addr, align 8 + %this1 = load %"b"*, %"b"** %this.addr, align 8 + %call = call %"a"* @f5(%"b"* %this1) + ret i1 undef +} + +define internal %"a"* @f5(%"b"* %this) align 2 { +; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone willreturn +; CHECK-LABEL: define {{[^@]+}}@f5 +; CHECK-SAME: (%b* noalias nocapture nofree readnone [[THIS:%.*]]) [[ATTR0]] align 2 { +; CHECK-NEXT: entry: +; CHECK-NEXT: [[THIS_ADDR:%.*]] = alloca %b*, align 8 +; CHECK-NEXT: store %b* [[THIS]], %b** [[THIS_ADDR]], align 8 +; CHECK-NEXT: ret %a* undef +; +entry: + %this.addr = alloca %"b"*, align 8 + store %"b"* %this, %"b"** %this.addr, align 8 + %this1 = load %"b"*, %"b"** %this.addr, align 8 + %0 = bitcast %"b"* %this1 to %"a"* + ret %"a"* %0 +} diff --git a/llvm/test/Transforms/OpenMP/parallel_deletion_cg_update.ll b/llvm/test/Transforms/OpenMP/parallel_deletion_cg_update.ll --- a/llvm/test/Transforms/OpenMP/parallel_deletion_cg_update.ll +++ b/llvm/test/Transforms/OpenMP/parallel_deletion_cg_update.ll @@ -2,11 +2,14 @@ ; CHECK: Call graph node <><<{{.*}}>> #uses=0 ; CHECK: CS calls function 'dead_fork_call' -; CHECK: CS calls function 'd' +; CHECK: CS calls function '.omp_outlined..0' ; CHECK: CS calls function '__kmpc_fork_call' ; CHECK: CS calls function 'live_fork_call' ; CHECK: CS calls function '.omp_outlined..1' +; CHECK: CS calls function 'd' ; +; CHECK: Call graph node for function: '.omp_outlined..0'<<{{.*}}>> #uses=1 +; ; CHECK: Call graph node for function: '.omp_outlined..1'<<{{.*}}>> #uses=3 ; CHECK: CS<{{.*}}> calls function 'd' ;