diff --git a/llvm/include/llvm/IR/Intrinsics.td b/llvm/include/llvm/IR/Intrinsics.td --- a/llvm/include/llvm/IR/Intrinsics.td +++ b/llvm/include/llvm/IR/Intrinsics.td @@ -120,6 +120,9 @@ def IntrNoReturn : IntrinsicProperty; +// Applied by default. +def IntrNoCallback : IntrinsicProperty<1>; + // IntrNoSync - Threads executing the intrinsic will not synchronize using // memory or other means. Applied by default. def IntrNoSync : IntrinsicProperty<1>; diff --git a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp --- a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp +++ b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp @@ -9720,6 +9720,10 @@ const SetVector &Edges = AAEdges->getOptimisticEdges(); for (Function *Edge : Edges) { + // Functions that do not call back into the module can be ignored. + if (Edge->hasFnAttribute(Attribute::NoCallback)) + continue; + // We don't need a dependency if the result is reachable. const AAFunctionReachability &EdgeReachability = A.getAAFor( diff --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/X86/thiscall.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/X86/thiscall.ll --- a/llvm/test/Transforms/Attributor/ArgumentPromotion/X86/thiscall.ll +++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/X86/thiscall.ll @@ -56,6 +56,6 @@ declare i8* @llvm.stacksave() declare void @llvm.stackrestore(i8*) ;. -; CHECK: attributes #[[ATTR0:[0-9]+]] = { nofree nosync nounwind willreturn } +; CHECK: attributes #[[ATTR0:[0-9]+]] = { nocallback nofree nosync nounwind willreturn } ; CHECK: attributes #[[ATTR1]] = { willreturn } ;. diff --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/pr33641_remove_arg_dbgvalue.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/pr33641_remove_arg_dbgvalue.ll --- a/llvm/test/Transforms/Attributor/ArgumentPromotion/pr33641_remove_arg_dbgvalue.ll +++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/pr33641_remove_arg_dbgvalue.ll @@ -31,10 +31,10 @@ ; IS__CGSCC_OPM-NEXT: call void @llvm.dbg.value(metadata i16* [[P]], metadata [[META3:![0-9]+]], metadata !DIExpression()), !dbg [[DBG5:![0-9]+]] ; IS__CGSCC_OPM-NEXT: ret void ; -; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@bar -; IS__CGSCC_NPM-SAME: (i16* nocapture nofree readnone [[P:%.*]]) #[[ATTR1:[0-9]+]] { -; IS__CGSCC_NPM-NEXT: call void @llvm.dbg.value(metadata i16* [[P]], metadata [[META3:![0-9]+]], metadata !DIExpression()) #[[ATTR3:[0-9]+]], !dbg [[DBG5:![0-9]+]] +; IS__CGSCC_NPM-SAME: (i16* nocapture nofree readnone [[P:%.*]]) #[[ATTR0]] { +; IS__CGSCC_NPM-NEXT: call void @llvm.dbg.value(metadata i16* [[P]], metadata [[META3:![0-9]+]], metadata !DIExpression()) #[[ATTR2:[0-9]+]], !dbg [[DBG5:![0-9]+]] ; IS__CGSCC_NPM-NEXT: ret void ; call void @llvm.dbg.value(metadata %p_t %p, metadata !4, metadata !5), !dbg !6 @@ -55,12 +55,11 @@ !6 = !DILocation(line: 1, column: 1, scope: !3) ;. ; NOT_CGSCC_NPM: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn } -; NOT_CGSCC_NPM: attributes #[[ATTR1:[0-9]+]] = { nofree nosync nounwind readnone speculatable willreturn } +; NOT_CGSCC_NPM: attributes #[[ATTR1:[0-9]+]] = { nocallback nofree nosync nounwind readnone speculatable willreturn } ;. ; IS__CGSCC_NPM: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn } -; IS__CGSCC_NPM: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn } -; IS__CGSCC_NPM: attributes #[[ATTR2:[0-9]+]] = { nofree nosync nounwind readnone speculatable willreturn } -; IS__CGSCC_NPM: attributes #[[ATTR3]] = { readnone willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR1:[0-9]+]] = { nocallback nofree nosync nounwind readnone speculatable willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR2]] = { readnone willreturn } ;. ; IS__TUNIT____: [[META0:![0-9]+]] = distinct !DICompileUnit(language: DW_LANG_C, file: !1, isOptimized: false, runtimeVersion: 0, emissionKind: NoDebug) ; IS__TUNIT____: [[META1:![0-9]+]] = !DIFile(filename: "test.c", directory: "") diff --git a/llvm/test/Transforms/Attributor/dereferenceable-1.ll b/llvm/test/Transforms/Attributor/dereferenceable-1.ll --- a/llvm/test/Transforms/Attributor/dereferenceable-1.ll +++ b/llvm/test/Transforms/Attributor/dereferenceable-1.ll @@ -924,7 +924,7 @@ ; IS__TUNIT_OPM: attributes #[[ATTR3]] = { argmemonly nofree norecurse nosync nounwind writeonly } ; IS__TUNIT_OPM: attributes #[[ATTR4]] = { argmemonly nofree norecurse nosync nounwind } ; IS__TUNIT_OPM: attributes #[[ATTR5]] = { argmemonly nofree nosync nounwind writeonly } -; IS__TUNIT_OPM: attributes #[[ATTR6:[0-9]+]] = { inaccessiblememonly nofree nosync nounwind willreturn } +; IS__TUNIT_OPM: attributes #[[ATTR6:[0-9]+]] = { inaccessiblememonly nocallback nofree nosync nounwind willreturn } ; IS__TUNIT_OPM: attributes #[[ATTR7]] = { nofree nosync nounwind writeonly } ; IS__TUNIT_OPM: attributes #[[ATTR8]] = { willreturn } ; IS__TUNIT_OPM: attributes #[[ATTR9]] = { nounwind } @@ -934,7 +934,7 @@ ; IS__TUNIT_NPM: attributes #[[ATTR2]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } ; IS__TUNIT_NPM: attributes #[[ATTR3]] = { argmemonly nofree norecurse nosync nounwind willreturn } ; IS__TUNIT_NPM: attributes #[[ATTR4]] = { argmemonly nofree nosync nounwind writeonly } -; IS__TUNIT_NPM: attributes #[[ATTR5:[0-9]+]] = { inaccessiblememonly nofree nosync nounwind willreturn } +; IS__TUNIT_NPM: attributes #[[ATTR5:[0-9]+]] = { inaccessiblememonly nocallback nofree nosync nounwind willreturn } ; IS__TUNIT_NPM: attributes #[[ATTR6]] = { nofree nosync nounwind willreturn writeonly } ; IS__TUNIT_NPM: attributes #[[ATTR7]] = { nofree nosync nounwind writeonly } ; IS__TUNIT_NPM: attributes #[[ATTR8]] = { willreturn } @@ -946,7 +946,7 @@ ; IS__CGSCC_OPM: attributes #[[ATTR3]] = { argmemonly nofree norecurse nosync nounwind writeonly } ; IS__CGSCC_OPM: attributes #[[ATTR4]] = { argmemonly nofree norecurse nosync nounwind } ; IS__CGSCC_OPM: attributes #[[ATTR5]] = { argmemonly nofree nosync nounwind writeonly } -; IS__CGSCC_OPM: attributes #[[ATTR6:[0-9]+]] = { inaccessiblememonly nofree nosync nounwind willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR6:[0-9]+]] = { inaccessiblememonly nocallback nofree nosync nounwind willreturn } ; IS__CGSCC_OPM: attributes #[[ATTR7]] = { nosync nounwind writeonly } ; IS__CGSCC_OPM: attributes #[[ATTR8]] = { nofree nosync nounwind writeonly } ; IS__CGSCC_OPM: attributes #[[ATTR9]] = { willreturn } @@ -957,7 +957,7 @@ ; IS__CGSCC_NPM: attributes #[[ATTR2]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } ; IS__CGSCC_NPM: attributes #[[ATTR3]] = { argmemonly nofree norecurse nosync nounwind willreturn } ; IS__CGSCC_NPM: attributes #[[ATTR4]] = { argmemonly nofree nosync nounwind writeonly } -; IS__CGSCC_NPM: attributes #[[ATTR5:[0-9]+]] = { inaccessiblememonly nofree nosync nounwind willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR5:[0-9]+]] = { inaccessiblememonly nocallback nofree nosync nounwind willreturn } ; IS__CGSCC_NPM: attributes #[[ATTR6]] = { nosync nounwind willreturn writeonly } ; IS__CGSCC_NPM: attributes #[[ATTR7]] = { nofree nosync nounwind writeonly } ; IS__CGSCC_NPM: attributes #[[ATTR8]] = { willreturn } diff --git a/llvm/test/Transforms/Attributor/heap_to_stack.ll b/llvm/test/Transforms/Attributor/heap_to_stack.ll --- a/llvm/test/Transforms/Attributor/heap_to_stack.ll +++ b/llvm/test/Transforms/Attributor/heap_to_stack.ll @@ -830,14 +830,14 @@ ; IS________OPM: attributes #[[ATTR1:[0-9]+]] = { nofree nosync willreturn } ; IS________OPM: attributes #[[ATTR2:[0-9]+]] = { nofree nounwind } ; IS________OPM: attributes #[[ATTR3]] = { noreturn } -; IS________OPM: attributes #[[ATTR4:[0-9]+]] = { argmemonly nofree nosync nounwind willreturn } +; IS________OPM: attributes #[[ATTR4:[0-9]+]] = { argmemonly nocallback nofree nosync nounwind willreturn } ; IS________OPM: attributes #[[ATTR5]] = { nounwind } ;. ; IS________NPM: attributes #[[ATTR0:[0-9]+]] = { nounwind willreturn } ; IS________NPM: attributes #[[ATTR1:[0-9]+]] = { nofree nosync willreturn } ; IS________NPM: attributes #[[ATTR2:[0-9]+]] = { nofree nounwind } ; IS________NPM: attributes #[[ATTR3]] = { noreturn } -; IS________NPM: attributes #[[ATTR4:[0-9]+]] = { argmemonly nofree nosync nounwind willreturn } +; IS________NPM: attributes #[[ATTR4:[0-9]+]] = { argmemonly nocallback nofree nosync nounwind willreturn } ; IS________NPM: attributes #[[ATTR5:[0-9]+]] = { argmemonly nofree nounwind willreturn writeonly } ; IS________NPM: attributes #[[ATTR6]] = { nounwind } ;. diff --git a/llvm/test/Transforms/Attributor/heap_to_stack_gpu.ll b/llvm/test/Transforms/Attributor/heap_to_stack_gpu.ll --- a/llvm/test/Transforms/Attributor/heap_to_stack_gpu.ll +++ b/llvm/test/Transforms/Attributor/heap_to_stack_gpu.ll @@ -668,6 +668,6 @@ ; CHECK: attributes #[[ATTR1:[0-9]+]] = { nofree nosync willreturn } ; CHECK: attributes #[[ATTR2:[0-9]+]] = { nofree nounwind } ; CHECK: attributes #[[ATTR3]] = { noreturn } -; CHECK: attributes #[[ATTR4:[0-9]+]] = { argmemonly nofree nosync nounwind willreturn } +; CHECK: attributes #[[ATTR4:[0-9]+]] = { argmemonly nocallback nofree nosync nounwind willreturn } ; CHECK: attributes #[[ATTR5]] = { nounwind } ;. 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 @@ -798,14 +798,14 @@ ; 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() #[[ATTR13:[0-9]+]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12:[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() #[[ATTR15:[0-9]+]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14:[0-9]+]] ; IS__CGSCC____-NEXT: call void @test_unreachable() #[[ATTR0]] ; IS__CGSCC____-NEXT: unreachable ; @@ -886,28 +886,28 @@ ; ; IS__CGSCC____-LABEL: define {{[^@]+}}@middle() { ; IS__CGSCC____-NEXT: bb0: -; IS__CGSCC____-NEXT: call void @non_dead_b0() #[[ATTR15]] -; IS__CGSCC____-NEXT: call void @non_dead_b1() #[[ATTR15]] -; IS__CGSCC____-NEXT: call void @non_dead_b2() #[[ATTR15]] -; IS__CGSCC____-NEXT: call void @non_dead_b3() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @non_dead_b0() #[[ATTR14]] +; IS__CGSCC____-NEXT: call void @non_dead_b1() #[[ATTR14]] +; IS__CGSCC____-NEXT: call void @non_dead_b2() #[[ATTR14]] +; IS__CGSCC____-NEXT: call void @non_dead_b3() #[[ATTR14]] ; IS__CGSCC____-NEXT: br label [[BB1:%.*]] ; IS__CGSCC____: bb1: -; IS__CGSCC____-NEXT: call void @non_dead_b4() #[[ATTR15]] -; IS__CGSCC____-NEXT: call void @non_dead_b5() #[[ATTR15]] -; IS__CGSCC____-NEXT: call void @non_dead_b6() #[[ATTR15]] -; IS__CGSCC____-NEXT: call void @non_dead_b7() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @non_dead_b4() #[[ATTR14]] +; IS__CGSCC____-NEXT: call void @non_dead_b5() #[[ATTR14]] +; IS__CGSCC____-NEXT: call void @non_dead_b6() #[[ATTR14]] +; IS__CGSCC____-NEXT: call void @non_dead_b7() #[[ATTR14]] ; IS__CGSCC____-NEXT: br label [[BB2:%.*]] ; IS__CGSCC____: bb2: -; IS__CGSCC____-NEXT: call void @non_dead_b8() #[[ATTR15]] -; IS__CGSCC____-NEXT: call void @non_dead_b9() #[[ATTR15]] -; IS__CGSCC____-NEXT: call void @non_dead_b10() #[[ATTR15]] -; IS__CGSCC____-NEXT: call void @non_dead_b11() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @non_dead_b8() #[[ATTR14]] +; IS__CGSCC____-NEXT: call void @non_dead_b9() #[[ATTR14]] +; IS__CGSCC____-NEXT: call void @non_dead_b10() #[[ATTR14]] +; IS__CGSCC____-NEXT: call void @non_dead_b11() #[[ATTR14]] ; IS__CGSCC____-NEXT: br label [[BB3:%.*]] ; IS__CGSCC____: bb3: -; IS__CGSCC____-NEXT: call void @non_dead_b12() #[[ATTR15]] -; IS__CGSCC____-NEXT: call void @non_dead_b13() #[[ATTR15]] -; IS__CGSCC____-NEXT: call void @non_dead_b14() #[[ATTR15]] -; IS__CGSCC____-NEXT: call void @non_dead_b15() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @non_dead_b12() #[[ATTR14]] +; IS__CGSCC____-NEXT: call void @non_dead_b13() #[[ATTR14]] +; IS__CGSCC____-NEXT: call void @non_dead_b14() #[[ATTR14]] +; IS__CGSCC____-NEXT: call void @non_dead_b15() #[[ATTR14]] ; IS__CGSCC____-NEXT: br label [[BB4:%.*]] ; IS__CGSCC____: bb4: ; IS__CGSCC____-NEXT: call void @non_exact2() @@ -1027,13 +1027,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a0 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a0 ; IS__CGSCC____-SAME: () #[[ATTR11:[0-9]+]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1043,13 +1043,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a1 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a1 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1059,13 +1059,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a2 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a2 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1075,13 +1075,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a3 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a3 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1091,13 +1091,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a4 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a4 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1107,13 +1107,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a5 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a5 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1123,13 +1123,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a6 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a6 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1139,13 +1139,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a7 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a7 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1155,13 +1155,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a8 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a8 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1171,13 +1171,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a9 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a9 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1187,13 +1187,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a10 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a10 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1203,13 +1203,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a11 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a11 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1219,13 +1219,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a12 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a12 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1235,13 +1235,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a13 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a13 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1251,13 +1251,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a14 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a14 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1267,13 +1267,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a15 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a15 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1283,13 +1283,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b0 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b0 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1299,13 +1299,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b1 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b1 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1315,13 +1315,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b2 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b2 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1331,13 +1331,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b3 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b3 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1347,13 +1347,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b4 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b4 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1363,13 +1363,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b5 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b5 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1379,13 +1379,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b6 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b6 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1395,13 +1395,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b7 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b7 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1411,13 +1411,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b8 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b8 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1427,13 +1427,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b9 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b9 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1443,13 +1443,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b10 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b10 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1459,13 +1459,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b11 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b11 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1475,13 +1475,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b12 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b12 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1491,13 +1491,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b13 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b13 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1507,13 +1507,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b14 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b14 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1523,13 +1523,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b15 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b15 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1539,13 +1539,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c0 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c0 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1555,13 +1555,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c1 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c1 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1571,13 +1571,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c2 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c2 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1587,13 +1587,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c3 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c3 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1603,13 +1603,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c4 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c4 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1619,13 +1619,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c5 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c5 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1635,13 +1635,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c6 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c6 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1651,13 +1651,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c7 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c7 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1667,13 +1667,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c8 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c8 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1683,13 +1683,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c9 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c9 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1699,13 +1699,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c10 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c10 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1715,13 +1715,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c11 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c11 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1731,13 +1731,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c12 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c12 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1747,13 +1747,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c13 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c13 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1763,13 +1763,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c14 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c14 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1779,13 +1779,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c15 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c15 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1795,13 +1795,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d0 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d0 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1811,13 +1811,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d1 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d1 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1827,13 +1827,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d2 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d2 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1843,13 +1843,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d3 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d3 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1859,13 +1859,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d4 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d4 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1875,13 +1875,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d5 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d5 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1891,13 +1891,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d6 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d6 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1907,13 +1907,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d7 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d7 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1923,13 +1923,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d8 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d8 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1939,13 +1939,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d9 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d9 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1955,13 +1955,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d10 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d10 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1971,13 +1971,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d11 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d11 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -1987,13 +1987,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d12 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d12 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -2003,13 +2003,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d13 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d13 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -2019,13 +2019,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d14 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d14 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -2035,13 +2035,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d15 ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d15 ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -2107,13 +2107,13 @@ ; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@useless_arg_sink ; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] { -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@useless_arg_sink ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @sink() @@ -2130,7 +2130,7 @@ ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@useless_arg_almost_sink ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: call void @useless_arg_sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @useless_arg_sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret void ; call void @useless_arg_sink(i32* %a) @@ -2180,7 +2180,7 @@ ; NOT_CGSCC_NPM-NEXT: i64 10, label [[RETURN]] ; NOT_CGSCC_NPM-NEXT: ] ; NOT_CGSCC_NPM: sw.default: -; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR13]] +; NOT_CGSCC_NPM-NEXT: call void @sink() #[[ATTR12]] ; NOT_CGSCC_NPM-NEXT: ret i32 undef ; NOT_CGSCC_NPM: return: ; NOT_CGSCC_NPM-NEXT: unreachable @@ -2194,7 +2194,7 @@ ; IS__CGSCC____-NEXT: i64 10, label [[RETURN]] ; IS__CGSCC____-NEXT: ] ; IS__CGSCC____: sw.default: -; IS__CGSCC____-NEXT: call void @sink() #[[ATTR15]] +; IS__CGSCC____-NEXT: call void @sink() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret i32 undef ; IS__CGSCC____: return: ; IS__CGSCC____-NEXT: unreachable @@ -2223,7 +2223,7 @@ ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@switch_default_caller ; IS__CGSCC____-SAME: () #[[ATTR11]] { -; IS__CGSCC____-NEXT: [[CALL2:%.*]] = tail call i32 @switch_default() #[[ATTR15]] +; IS__CGSCC____-NEXT: [[CALL2:%.*]] = tail call i32 @switch_default() #[[ATTR14]] ; IS__CGSCC____-NEXT: ret i32 123 ; %call2 = tail call i32 @switch_default(i64 0) @@ -2561,13 +2561,13 @@ @p = global i8 0 define void @bad_gep() { -; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn +; NOT_CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@bad_gep -; NOT_CGSCC_NPM-SAME: () #[[ATTR11:[0-9]+]] { +; NOT_CGSCC_NPM-SAME: () #[[ATTR9]] { ; 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]]) #[[ATTR14:[0-9]+]] +; NOT_CGSCC_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 1, i8* noalias nocapture nofree noundef nonnull dereferenceable(1) [[N]]) #[[ATTR13:[0-9]+]] ; NOT_CGSCC_NPM-NEXT: br label [[EXIT:%.*]] ; NOT_CGSCC_NPM: while.body: ; NOT_CGSCC_NPM-NEXT: unreachable @@ -2576,16 +2576,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]]) #[[ATTR14]] +; NOT_CGSCC_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 1, i8* noalias nocapture nofree noundef nonnull dereferenceable(1) [[N]]) #[[ATTR13]] ; NOT_CGSCC_NPM-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@bad_gep -; IS__CGSCC____-SAME: () #[[ATTR13:[0-9]+]] { +; IS__CGSCC____-SAME: () #[[ATTR6]] { ; 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]]) #[[ATTR16:[0-9]+]] +; IS__CGSCC____-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 1, i8* noalias nocapture nofree noundef nonnull dereferenceable(1) [[N]]) #[[ATTR15:[0-9]+]] ; IS__CGSCC____-NEXT: br label [[EXIT:%.*]] ; IS__CGSCC____: while.body: ; IS__CGSCC____-NEXT: unreachable @@ -2594,7 +2594,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]]) #[[ATTR16]] +; IS__CGSCC____-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 1, i8* noalias nocapture nofree noundef nonnull dereferenceable(1) [[N]]) #[[ATTR15]] ; IS__CGSCC____-NEXT: ret void ; entry: @@ -2671,10 +2671,9 @@ ; NOT_CGSCC_NPM: attributes #[[ATTR8]] = { nofree norecurse noreturn nosync nounwind readnone } ; NOT_CGSCC_NPM: attributes #[[ATTR9]] = { nofree norecurse nosync nounwind readnone willreturn } ; NOT_CGSCC_NPM: attributes #[[ATTR10]] = { nofree nosync nounwind willreturn } -; NOT_CGSCC_NPM: attributes #[[ATTR11]] = { nofree nosync nounwind readnone willreturn } -; NOT_CGSCC_NPM: attributes #[[ATTR12:[0-9]+]] = { argmemonly nofree nosync nounwind willreturn } -; NOT_CGSCC_NPM: attributes #[[ATTR13]] = { nounwind willreturn } -; NOT_CGSCC_NPM: attributes #[[ATTR14]] = { willreturn } +; NOT_CGSCC_NPM: attributes #[[ATTR11:[0-9]+]] = { argmemonly nocallback nofree nosync nounwind willreturn } +; NOT_CGSCC_NPM: attributes #[[ATTR12]] = { nounwind willreturn } +; NOT_CGSCC_NPM: attributes #[[ATTR13]] = { willreturn } ;. ; IS__CGSCC____: attributes #[[ATTR0]] = { nofree noreturn nosync nounwind } ; IS__CGSCC____: attributes #[[ATTR1:[0-9]+]] = { readnone } @@ -2689,8 +2688,7 @@ ; IS__CGSCC____: attributes #[[ATTR10]] = { nofree norecurse noreturn nosync nounwind readnone } ; IS__CGSCC____: attributes #[[ATTR11]] = { nofree nosync nounwind willreturn } ; IS__CGSCC____: attributes #[[ATTR12]] = { nounwind readonly } -; IS__CGSCC____: attributes #[[ATTR13]] = { nofree nosync nounwind readnone willreturn } -; IS__CGSCC____: attributes #[[ATTR14:[0-9]+]] = { argmemonly nofree nosync nounwind willreturn } -; IS__CGSCC____: attributes #[[ATTR15]] = { nounwind willreturn } -; IS__CGSCC____: attributes #[[ATTR16]] = { willreturn } +; IS__CGSCC____: attributes #[[ATTR13:[0-9]+]] = { argmemonly nocallback nofree nosync nounwind willreturn } +; IS__CGSCC____: attributes #[[ATTR14]] = { nounwind willreturn } +; IS__CGSCC____: attributes #[[ATTR15]] = { willreturn } ;. diff --git a/llvm/test/Transforms/Attributor/lvi-after-jumpthreading.ll b/llvm/test/Transforms/Attributor/lvi-after-jumpthreading.ll --- a/llvm/test/Transforms/Attributor/lvi-after-jumpthreading.ll +++ b/llvm/test/Transforms/Attributor/lvi-after-jumpthreading.ll @@ -243,12 +243,12 @@ declare void @llvm.experimental.guard(i1, ...) ;. ; IS________OPM: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone } -; IS________OPM: attributes #[[ATTR1:[0-9]+]] = { inaccessiblememonly nofree nosync nounwind willreturn } +; IS________OPM: attributes #[[ATTR1:[0-9]+]] = { inaccessiblememonly nocallback nofree nosync nounwind willreturn } ; IS________OPM: attributes #[[ATTR2]] = { nounwind } -; IS________OPM: attributes #[[ATTR3:[0-9]+]] = { nofree nosync willreturn } +; IS________OPM: attributes #[[ATTR3:[0-9]+]] = { nocallback nofree nosync willreturn } ;. ; IS________NPM: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn } -; IS________NPM: attributes #[[ATTR1:[0-9]+]] = { inaccessiblememonly nofree nosync nounwind willreturn } +; IS________NPM: attributes #[[ATTR1:[0-9]+]] = { inaccessiblememonly nocallback nofree nosync nounwind willreturn } ; IS________NPM: attributes #[[ATTR2]] = { nounwind } -; IS________NPM: attributes #[[ATTR3:[0-9]+]] = { nofree nosync willreturn } +; IS________NPM: attributes #[[ATTR3:[0-9]+]] = { nocallback nofree nosync willreturn } ;. diff --git a/llvm/test/Transforms/Attributor/memory_locations.ll b/llvm/test/Transforms/Attributor/memory_locations.ll --- a/llvm/test/Transforms/Attributor/memory_locations.ll +++ b/llvm/test/Transforms/Attributor/memory_locations.ll @@ -752,7 +752,7 @@ ; IS__TUNIT____: attributes #[[ATTR1]] = { inaccessiblemem_or_argmemonly } ; IS__TUNIT____: attributes #[[ATTR2]] = { readnone } ; IS__TUNIT____: attributes #[[ATTR3]] = { argmemonly } -; IS__TUNIT____: attributes #[[ATTR4:[0-9]+]] = { argmemonly nofree nosync nounwind willreturn } +; IS__TUNIT____: attributes #[[ATTR4:[0-9]+]] = { argmemonly nocallback nofree nosync nounwind willreturn } ; IS__TUNIT____: attributes #[[ATTR5]] = { nofree norecurse nosync nounwind readnone willreturn } ; IS__TUNIT____: attributes #[[ATTR6]] = { nofree norecurse nosync nounwind willreturn writeonly } ; IS__TUNIT____: attributes #[[ATTR7]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } @@ -765,7 +765,7 @@ ; IS__CGSCC____: attributes #[[ATTR1]] = { inaccessiblemem_or_argmemonly } ; IS__CGSCC____: attributes #[[ATTR2]] = { readnone } ; IS__CGSCC____: attributes #[[ATTR3]] = { argmemonly } -; IS__CGSCC____: attributes #[[ATTR4:[0-9]+]] = { argmemonly nofree nosync nounwind willreturn } +; IS__CGSCC____: attributes #[[ATTR4:[0-9]+]] = { argmemonly nocallback nofree nosync nounwind willreturn } ; IS__CGSCC____: attributes #[[ATTR5]] = { nofree norecurse nosync nounwind readnone willreturn } ; IS__CGSCC____: attributes #[[ATTR6]] = { nofree norecurse nosync nounwind willreturn writeonly } ; IS__CGSCC____: attributes #[[ATTR7]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } diff --git a/llvm/test/Transforms/Attributor/noalias.ll b/llvm/test/Transforms/Attributor/noalias.ll --- a/llvm/test/Transforms/Attributor/noalias.ll +++ b/llvm/test/Transforms/Attributor/noalias.ll @@ -896,7 +896,7 @@ ; NOT_CGSCC_NPM: attributes #[[ATTR3]] = { nounwind ssp uwtable } ; NOT_CGSCC_NPM: attributes #[[ATTR4]] = { nofree norecurse nosync nounwind readonly willreturn } ; NOT_CGSCC_NPM: attributes #[[ATTR5]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn } -; NOT_CGSCC_NPM: attributes #[[ATTR6:[0-9]+]] = { argmemonly nofree nosync nounwind willreturn } +; NOT_CGSCC_NPM: attributes #[[ATTR6:[0-9]+]] = { argmemonly nocallback nofree nosync nounwind willreturn } ; NOT_CGSCC_NPM: attributes #[[ATTR7]] = { nofree norecurse nosync nounwind willreturn writeonly } ; NOT_CGSCC_NPM: attributes #[[ATTR8]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } ; NOT_CGSCC_NPM: attributes #[[ATTR9]] = { nofree nosync nounwind readnone willreturn } @@ -910,7 +910,7 @@ ; IS__CGSCC____: attributes #[[ATTR3]] = { nounwind ssp uwtable } ; IS__CGSCC____: attributes #[[ATTR4]] = { nofree norecurse nosync nounwind readonly willreturn } ; IS__CGSCC____: attributes #[[ATTR5]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn } -; IS__CGSCC____: attributes #[[ATTR6:[0-9]+]] = { argmemonly nofree nosync nounwind willreturn } +; IS__CGSCC____: attributes #[[ATTR6:[0-9]+]] = { argmemonly nocallback nofree nosync nounwind willreturn } ; IS__CGSCC____: attributes #[[ATTR7]] = { nofree norecurse nosync nounwind willreturn writeonly } ; IS__CGSCC____: attributes #[[ATTR8]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } ; IS__CGSCC____: attributes #[[ATTR9]] = { nounwind readnone willreturn } diff --git a/llvm/test/Transforms/Attributor/nocapture-1.ll b/llvm/test/Transforms/Attributor/nocapture-1.ll --- a/llvm/test/Transforms/Attributor/nocapture-1.ll +++ b/llvm/test/Transforms/Attributor/nocapture-1.ll @@ -34,17 +34,11 @@ } define void @c3(i32* %q) { -; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly -; IS__TUNIT____-LABEL: define {{[^@]+}}@c3 -; IS__TUNIT____-SAME: (i32* nofree writeonly [[Q:%.*]]) #[[ATTR1]] { -; IS__TUNIT____-NEXT: call void @c2(i32* nofree writeonly [[Q]]) #[[ATTR12:[0-9]+]] -; IS__TUNIT____-NEXT: ret void -; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly -; IS__CGSCC____-LABEL: define {{[^@]+}}@c3 -; IS__CGSCC____-SAME: (i32* nofree writeonly [[Q:%.*]]) #[[ATTR1]] { -; IS__CGSCC____-NEXT: call void @c2(i32* nofree writeonly [[Q]]) #[[ATTR18:[0-9]+]] -; IS__CGSCC____-NEXT: ret void +; CHECK: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly +; CHECK-LABEL: define {{[^@]+}}@c3 +; CHECK-SAME: (i32* nofree writeonly [[Q:%.*]]) #[[ATTR1]] { +; CHECK-NEXT: call void @c2(i32* nofree writeonly [[Q]]) #[[ATTR16:[0-9]+]] +; CHECK-NEXT: ret void ; call void @c2(i32* %q) ret void @@ -164,19 +158,12 @@ } define i1 @c7(i32* %q, i32 %bitno) { -; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn -; IS__TUNIT____-LABEL: define {{[^@]+}}@c7 -; IS__TUNIT____-SAME: (i32* nofree readonly [[Q:%.*]], i32 [[BITNO:%.*]]) #[[ATTR2]] { -; IS__TUNIT____-NEXT: [[PTR:%.*]] = call i1* @lookup_bit(i32* noalias nofree readnone [[Q]], i32 [[BITNO]]) #[[ATTR18:[0-9]+]] -; IS__TUNIT____-NEXT: [[VAL:%.*]] = load i1, i1* [[PTR]], align 1 -; IS__TUNIT____-NEXT: ret i1 [[VAL]] -; -; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn -; IS__CGSCC____-LABEL: define {{[^@]+}}@c7 -; IS__CGSCC____-SAME: (i32* nofree readonly [[Q:%.*]], i32 [[BITNO:%.*]]) #[[ATTR2]] { -; IS__CGSCC____-NEXT: [[PTR:%.*]] = call i1* @lookup_bit(i32* noalias nofree readnone [[Q]], i32 [[BITNO]]) #[[ATTR19:[0-9]+]] -; IS__CGSCC____-NEXT: [[VAL:%.*]] = load i1, i1* [[PTR]], align 1 -; IS__CGSCC____-NEXT: ret i1 [[VAL]] +; CHECK: Function Attrs: nofree norecurse nosync nounwind readonly willreturn +; CHECK-LABEL: define {{[^@]+}}@c7 +; CHECK-SAME: (i32* nofree readonly [[Q:%.*]], i32 [[BITNO:%.*]]) #[[ATTR2]] { +; CHECK-NEXT: [[PTR:%.*]] = call i1* @lookup_bit(i32* noalias nofree readnone [[Q]], i32 [[BITNO]]) #[[ATTR17:[0-9]+]] +; CHECK-NEXT: [[VAL:%.*]] = load i1, i1* [[PTR]], align 1 +; CHECK-NEXT: ret i1 [[VAL]] ; %ptr = call i1* @lookup_bit(i32* %q, i32 %bitno) %val = load i1, i1* %ptr @@ -257,13 +244,13 @@ ; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@nc2 ; IS__TUNIT____-SAME: (i32* nocapture nofree [[P:%.*]], i32* nofree [[Q:%.*]]) #[[ATTR5]] { -; IS__TUNIT____-NEXT: [[TMP1:%.*]] = call i32 @nc1(i32* nofree [[Q]], i32* nocapture nofree [[P]], i1 noundef false) #[[ATTR10:[0-9]+]] +; IS__TUNIT____-NEXT: [[TMP1:%.*]] = call i32 @nc1(i32* nofree [[Q]], i32* nocapture nofree [[P]], i1 noundef false) #[[ATTR18:[0-9]+]] ; IS__TUNIT____-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@nc2 ; IS__CGSCC____-SAME: (i32* nocapture nofree align 4 [[P:%.*]], i32* nofree [[Q:%.*]]) #[[ATTR5]] { -; IS__CGSCC____-NEXT: [[TMP1:%.*]] = call i32 @nc1(i32* nofree [[Q]], i32* nocapture nofree align 4 [[P]], i1 noundef false) #[[ATTR15:[0-9]+]] +; IS__CGSCC____-NEXT: [[TMP1:%.*]] = call i32 @nc1(i32* nofree [[Q]], i32* nocapture nofree align 4 [[P]], i1 noundef false) #[[ATTR13:[0-9]+]] ; IS__CGSCC____-NEXT: ret void ; %1 = call i32 @nc1(i32* %q, i32* %p, i1 0) ; [#uses=0] @@ -294,7 +281,7 @@ ; IS__CGSCC____: Function Attrs: argmemonly nounwind ; IS__CGSCC____-LABEL: define {{[^@]+}}@nc4 ; IS__CGSCC____-SAME: (i8* [[P:%.*]]) #[[ATTR6:[0-9]+]] { -; IS__CGSCC____-NEXT: call void @external(i8* readonly [[P]]) #[[ATTR20:[0-9]+]] +; IS__CGSCC____-NEXT: call void @external(i8* readonly [[P]]) #[[ATTR18:[0-9]+]] ; IS__CGSCC____-NEXT: ret void ; call void @external(i8* %p) @@ -506,7 +493,7 @@ } define void @nocaptureLaunder(i8* %p) { -; IS__TUNIT____: Function Attrs: inaccessiblemem_or_argmemonly nofree nosync nounwind willreturn +; IS__TUNIT____: Function Attrs: inaccessiblemem_or_argmemonly nofree norecurse nosync nounwind willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@nocaptureLaunder ; IS__TUNIT____-SAME: (i8* nocapture nofree [[P:%.*]]) #[[ATTR9:[0-9]+]] { ; IS__TUNIT____-NEXT: entry: @@ -514,11 +501,11 @@ ; IS__TUNIT____-NEXT: store i8 42, i8* [[B]], align 1 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: inaccessiblemem_or_argmemonly nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: inaccessiblemem_or_argmemonly nofree norecurse nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@nocaptureLaunder ; IS__CGSCC____-SAME: (i8* nocapture nofree [[P:%.*]]) #[[ATTR9:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: -; IS__CGSCC____-NEXT: [[B:%.*]] = call i8* @llvm.launder.invariant.group.p0i8(i8* nofree [[P]]) #[[ATTR21:[0-9]+]] +; IS__CGSCC____-NEXT: [[B:%.*]] = call i8* @llvm.launder.invariant.group.p0i8(i8* nofree [[P]]) #[[ATTR19:[0-9]+]] ; IS__CGSCC____-NEXT: store i8 42, i8* [[B]], align 1 ; IS__CGSCC____-NEXT: ret void ; @@ -530,17 +517,17 @@ @g2 = global i8* null define void @captureLaunder(i8* %p) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn +; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@captureLaunder -; IS__TUNIT____-SAME: (i8* nofree [[P:%.*]]) #[[ATTR10]] { +; IS__TUNIT____-SAME: (i8* nofree [[P:%.*]]) #[[ATTR5]] { ; IS__TUNIT____-NEXT: [[B:%.*]] = call i8* @llvm.launder.invariant.group.p0i8(i8* nofree [[P]]) #[[ATTR20]] ; IS__TUNIT____-NEXT: store i8* [[B]], i8** @g2, align 8 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@captureLaunder -; IS__CGSCC____-SAME: (i8* nofree [[P:%.*]]) #[[ATTR10:[0-9]+]] { -; IS__CGSCC____-NEXT: [[B:%.*]] = call i8* @llvm.launder.invariant.group.p0i8(i8* nofree [[P]]) #[[ATTR21]] +; IS__CGSCC____-SAME: (i8* nofree [[P:%.*]]) #[[ATTR5]] { +; IS__CGSCC____-NEXT: [[B:%.*]] = call i8* @llvm.launder.invariant.group.p0i8(i8* nofree [[P]]) #[[ATTR19]] ; IS__CGSCC____-NEXT: store i8* [[B]], i8** @g2, align 8 ; IS__CGSCC____-NEXT: ret void ; @@ -550,19 +537,19 @@ } define void @nocaptureStrip(i8* %p) { -; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly +; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly ; IS__TUNIT____-LABEL: define {{[^@]+}}@nocaptureStrip -; IS__TUNIT____-SAME: (i8* nocapture nofree writeonly [[P:%.*]]) #[[ATTR11:[0-9]+]] { +; IS__TUNIT____-SAME: (i8* nocapture nofree writeonly [[P:%.*]]) #[[ATTR10:[0-9]+]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: [[B:%.*]] = call i8* @llvm.strip.invariant.group.p0i8(i8* noalias nofree readnone [[P]]) #[[ATTR21:[0-9]+]] ; IS__TUNIT____-NEXT: store i8 42, i8* [[B]], align 1 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly ; IS__CGSCC____-LABEL: define {{[^@]+}}@nocaptureStrip -; IS__CGSCC____-SAME: (i8* nocapture nofree writeonly [[P:%.*]]) #[[ATTR11:[0-9]+]] { +; IS__CGSCC____-SAME: (i8* nocapture nofree writeonly [[P:%.*]]) #[[ATTR10:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: -; IS__CGSCC____-NEXT: [[B:%.*]] = call i8* @llvm.strip.invariant.group.p0i8(i8* noalias nofree readnone [[P]]) #[[ATTR19]] +; IS__CGSCC____-NEXT: [[B:%.*]] = call i8* @llvm.strip.invariant.group.p0i8(i8* noalias nofree readnone [[P]]) #[[ATTR17]] ; IS__CGSCC____-NEXT: store i8 42, i8* [[B]], align 1 ; IS__CGSCC____-NEXT: ret void ; @@ -574,17 +561,17 @@ @g3 = global i8* null define void @captureStrip(i8* %p) { -; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly +; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly ; IS__TUNIT____-LABEL: define {{[^@]+}}@captureStrip -; IS__TUNIT____-SAME: (i8* nofree writeonly [[P:%.*]]) #[[ATTR12]] { +; IS__TUNIT____-SAME: (i8* nofree writeonly [[P:%.*]]) #[[ATTR1]] { ; IS__TUNIT____-NEXT: [[B:%.*]] = call i8* @llvm.strip.invariant.group.p0i8(i8* noalias nofree readnone [[P]]) #[[ATTR21]] ; IS__TUNIT____-NEXT: store i8* [[B]], i8** @g3, align 8 ; IS__TUNIT____-NEXT: ret void ; -; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn writeonly +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly ; IS__CGSCC____-LABEL: define {{[^@]+}}@captureStrip -; IS__CGSCC____-SAME: (i8* nofree writeonly [[P:%.*]]) #[[ATTR12:[0-9]+]] { -; IS__CGSCC____-NEXT: [[B:%.*]] = call i8* @llvm.strip.invariant.group.p0i8(i8* noalias nofree readnone [[P]]) #[[ATTR19]] +; IS__CGSCC____-SAME: (i8* nofree writeonly [[P:%.*]]) #[[ATTR1]] { +; IS__CGSCC____-NEXT: [[B:%.*]] = call i8* @llvm.strip.invariant.group.p0i8(i8* noalias nofree readnone [[P]]) #[[ATTR17]] ; IS__CGSCC____-NEXT: store i8* [[B]], i8** @g3, align 8 ; IS__CGSCC____-NEXT: ret void ; @@ -655,7 +642,7 @@ define i1 @captureDereferenceableOrNullICmp(i32* dereferenceable_or_null(4) %x) null_pointer_is_valid { ; CHECK: Function Attrs: nofree norecurse nosync nounwind null_pointer_is_valid readnone willreturn ; CHECK-LABEL: define {{[^@]+}}@captureDereferenceableOrNullICmp -; CHECK-SAME: (i32* nofree readnone dereferenceable_or_null(4) [[X:%.*]]) #[[ATTR13:[0-9]+]] { +; CHECK-SAME: (i32* nofree readnone dereferenceable_or_null(4) [[X:%.*]]) #[[ATTR11:[0-9]+]] { ; CHECK-NEXT: [[TMP1:%.*]] = bitcast i32* [[X]] to i8* ; CHECK-NEXT: [[TMP2:%.*]] = icmp eq i8* [[TMP1]], null ; CHECK-NEXT: ret i1 [[TMP2]] @@ -713,7 +700,7 @@ define void @ptr_uses(i8* %ptr, i8* %wptr) { ; CHECK: Function Attrs: nounwind willreturn ; CHECK-LABEL: define {{[^@]+}}@ptr_uses -; CHECK-SAME: (i8* [[PTR:%.*]], i8* nocapture nofree noundef nonnull writeonly dereferenceable(1) [[WPTR:%.*]]) #[[ATTR15:[0-9]+]] { +; CHECK-SAME: (i8* [[PTR:%.*]], i8* nocapture nofree noundef nonnull writeonly dereferenceable(1) [[WPTR:%.*]]) #[[ATTR13:[0-9]+]] { ; CHECK-NEXT: store i8 0, i8* [[WPTR]], align 1 ; CHECK-NEXT: ret void ; @@ -736,16 +723,16 @@ ; IS__TUNIT____: attributes #[[ATTR6]] = { argmemonly nounwind } ; IS__TUNIT____: attributes #[[ATTR7]] = { nofree nosync nounwind writeonly } ; IS__TUNIT____: attributes #[[ATTR8]] = { argmemonly nofree norecurse nounwind willreturn } -; IS__TUNIT____: attributes #[[ATTR9]] = { inaccessiblemem_or_argmemonly nofree nosync nounwind willreturn } -; IS__TUNIT____: attributes #[[ATTR10]] = { nofree nosync nounwind willreturn } -; IS__TUNIT____: attributes #[[ATTR11]] = { argmemonly nofree nosync nounwind willreturn writeonly } -; IS__TUNIT____: attributes #[[ATTR12]] = { nofree nosync nounwind willreturn writeonly } -; IS__TUNIT____: attributes #[[ATTR13]] = { nofree norecurse nosync nounwind null_pointer_is_valid readnone willreturn } -; IS__TUNIT____: attributes #[[ATTR14:[0-9]+]] = { nounwind readonly willreturn } -; IS__TUNIT____: attributes #[[ATTR15]] = { nounwind willreturn } -; IS__TUNIT____: attributes #[[ATTR16:[0-9]+]] = { inaccessiblememonly nofree nosync nounwind speculatable willreturn } -; IS__TUNIT____: attributes #[[ATTR17:[0-9]+]] = { nofree nosync nounwind readnone speculatable willreturn } -; IS__TUNIT____: attributes #[[ATTR18]] = { nofree nounwind readnone willreturn } +; IS__TUNIT____: attributes #[[ATTR9]] = { inaccessiblemem_or_argmemonly nofree norecurse nosync nounwind willreturn } +; IS__TUNIT____: attributes #[[ATTR10]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } +; IS__TUNIT____: attributes #[[ATTR11]] = { nofree norecurse nosync nounwind null_pointer_is_valid readnone willreturn } +; IS__TUNIT____: attributes #[[ATTR12:[0-9]+]] = { nounwind readonly willreturn } +; IS__TUNIT____: attributes #[[ATTR13]] = { nounwind willreturn } +; IS__TUNIT____: attributes #[[ATTR14:[0-9]+]] = { inaccessiblememonly nocallback nofree nosync nounwind speculatable willreturn } +; IS__TUNIT____: attributes #[[ATTR15:[0-9]+]] = { nocallback nofree nosync nounwind readnone speculatable willreturn } +; IS__TUNIT____: attributes #[[ATTR16]] = { nofree nosync nounwind willreturn writeonly } +; IS__TUNIT____: attributes #[[ATTR17]] = { nofree nounwind readnone willreturn } +; IS__TUNIT____: attributes #[[ATTR18]] = { nofree nosync nounwind willreturn } ; IS__TUNIT____: attributes #[[ATTR19]] = { nounwind } ; IS__TUNIT____: attributes #[[ATTR20]] = { willreturn } ; IS__TUNIT____: attributes #[[ATTR21]] = { readnone willreturn } @@ -759,17 +746,15 @@ ; IS__CGSCC____: attributes #[[ATTR6]] = { argmemonly nounwind } ; IS__CGSCC____: attributes #[[ATTR7]] = { nofree nosync nounwind writeonly } ; IS__CGSCC____: attributes #[[ATTR8]] = { argmemonly nofree norecurse nounwind willreturn } -; IS__CGSCC____: attributes #[[ATTR9]] = { inaccessiblemem_or_argmemonly nofree nosync nounwind willreturn } -; IS__CGSCC____: attributes #[[ATTR10]] = { nofree nosync nounwind willreturn } -; IS__CGSCC____: attributes #[[ATTR11]] = { argmemonly nofree nosync nounwind willreturn writeonly } -; IS__CGSCC____: attributes #[[ATTR12]] = { nofree nosync nounwind willreturn writeonly } -; IS__CGSCC____: attributes #[[ATTR13]] = { nofree norecurse nosync nounwind null_pointer_is_valid readnone willreturn } -; IS__CGSCC____: attributes #[[ATTR14:[0-9]+]] = { nounwind readonly willreturn } -; IS__CGSCC____: attributes #[[ATTR15]] = { nounwind willreturn } -; IS__CGSCC____: attributes #[[ATTR16:[0-9]+]] = { inaccessiblememonly nofree nosync nounwind speculatable willreturn } -; IS__CGSCC____: attributes #[[ATTR17:[0-9]+]] = { nofree nosync nounwind readnone speculatable willreturn } -; IS__CGSCC____: attributes #[[ATTR18]] = { nounwind willreturn writeonly } -; IS__CGSCC____: attributes #[[ATTR19]] = { readnone willreturn } -; IS__CGSCC____: attributes #[[ATTR20]] = { nounwind } -; IS__CGSCC____: attributes #[[ATTR21]] = { willreturn } +; IS__CGSCC____: attributes #[[ATTR9]] = { inaccessiblemem_or_argmemonly nofree norecurse nosync nounwind willreturn } +; IS__CGSCC____: attributes #[[ATTR10]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } +; IS__CGSCC____: attributes #[[ATTR11]] = { nofree norecurse nosync nounwind null_pointer_is_valid readnone willreturn } +; IS__CGSCC____: attributes #[[ATTR12:[0-9]+]] = { nounwind readonly willreturn } +; IS__CGSCC____: attributes #[[ATTR13]] = { nounwind willreturn } +; IS__CGSCC____: attributes #[[ATTR14:[0-9]+]] = { inaccessiblememonly nocallback nofree nosync nounwind speculatable willreturn } +; IS__CGSCC____: attributes #[[ATTR15:[0-9]+]] = { nocallback nofree nosync nounwind readnone speculatable willreturn } +; IS__CGSCC____: attributes #[[ATTR16]] = { nounwind willreturn writeonly } +; IS__CGSCC____: attributes #[[ATTR17]] = { readnone willreturn } +; IS__CGSCC____: attributes #[[ATTR18]] = { nounwind } +; IS__CGSCC____: attributes #[[ATTR19]] = { willreturn } ;. diff --git a/llvm/test/Transforms/Attributor/nofree.ll b/llvm/test/Transforms/Attributor/nofree.ll --- a/llvm/test/Transforms/Attributor/nofree.ll +++ b/llvm/test/Transforms/Attributor/nofree.ll @@ -227,7 +227,7 @@ ; TEST 10 (positive case) ; Call intrinsic function -; CHECK: Function Attrs: nofree nosync nounwind readnone speculatable willreturn +; CHECK: Function Attrs: nocallback nofree nosync nounwind readnone speculatable willreturn ; CHECK-NEXT: declare float @llvm.floor.f32(float) declare float @llvm.floor.f32(float) @@ -242,10 +242,10 @@ } define float @call_floor2(float %a) #0 { -; CHECK: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn +; CHECK: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn ; CHECK-LABEL: define {{[^@]+}}@call_floor2 -; CHECK-SAME: (float [[A:%.*]]) #[[ATTR6:[0-9]+]] { -; CHECK-NEXT: [[C:%.*]] = tail call float @llvm.floor.f32(float [[A]]) #[[ATTR11:[0-9]+]] +; CHECK-SAME: (float [[A:%.*]]) #[[ATTR3]] { +; CHECK-NEXT: [[C:%.*]] = tail call float @llvm.floor.f32(float [[A]]) #[[ATTR10:[0-9]+]] ; CHECK-NEXT: ret float [[C]] ; %c = tail call float @llvm.floor.f32(float %a) @@ -279,7 +279,7 @@ define double @test12(double* nocapture readonly %a) { ; CHECK: Function Attrs: nofree nounwind ; CHECK-LABEL: define {{[^@]+}}@test12 -; CHECK-SAME: (double* nocapture nofree noundef nonnull readonly align 8 dereferenceable(8) [[A:%.*]]) #[[ATTR7:[0-9]+]] { +; CHECK-SAME: (double* nocapture nofree noundef nonnull readonly align 8 dereferenceable(8) [[A:%.*]]) #[[ATTR6:[0-9]+]] { ; CHECK-NEXT: entry: ; CHECK-NEXT: [[TMP0:%.*]] = load double, double* [[A]], align 8 ; CHECK-NEXT: [[CALL:%.*]] = tail call double @cos(double [[TMP0]]) #[[ATTR2]] @@ -334,7 +334,7 @@ ; ; CHECK-LABEL: define {{[^@]+}}@nonnull_assume_pos ; CHECK-SAME: (i8* nofree [[ARG1:%.*]], i8* [[ARG2:%.*]], i8* nofree [[ARG3:%.*]], i8* [[ARG4:%.*]]) { -; CHECK-NEXT: call void @llvm.assume(i1 noundef true) #[[ATTR12:[0-9]+]] [ "nofree"(i8* [[ARG1]]), "nofree"(i8* [[ARG3]]) ] +; CHECK-NEXT: call void @llvm.assume(i1 noundef true) #[[ATTR11:[0-9]+]] [ "nofree"(i8* [[ARG1]]), "nofree"(i8* [[ARG3]]) ] ; CHECK-NEXT: call void @unknown(i8* nofree [[ARG1]], i8* [[ARG2]], i8* nofree [[ARG3]], i8* [[ARG4]]) ; CHECK-NEXT: ret void ; @@ -419,12 +419,11 @@ ; CHECK: attributes #[[ATTR2]] = { nobuiltin nounwind } ; CHECK: attributes #[[ATTR3]] = { nofree noinline norecurse nosync nounwind readnone uwtable willreturn } ; CHECK: attributes #[[ATTR4:[0-9]+]] = { nofree noinline nounwind readnone uwtable } -; CHECK: attributes #[[ATTR5:[0-9]+]] = { nofree nosync nounwind readnone speculatable willreturn } -; CHECK: attributes #[[ATTR6]] = { nofree noinline nosync nounwind readnone uwtable willreturn } -; CHECK: attributes #[[ATTR7]] = { nofree nounwind } -; CHECK: attributes #[[ATTR8:[0-9]+]] = { nobuiltin nofree nounwind } -; CHECK: attributes #[[ATTR9:[0-9]+]] = { inaccessiblememonly nofree nosync nounwind willreturn } -; CHECK: attributes #[[ATTR10:[0-9]+]] = { nounwind willreturn } -; CHECK: attributes #[[ATTR11]] = { readnone willreturn } -; CHECK: attributes #[[ATTR12]] = { willreturn } +; CHECK: attributes #[[ATTR5:[0-9]+]] = { nocallback nofree nosync nounwind readnone speculatable willreturn } +; CHECK: attributes #[[ATTR6]] = { nofree nounwind } +; CHECK: attributes #[[ATTR7:[0-9]+]] = { nobuiltin nofree nounwind } +; CHECK: attributes #[[ATTR8:[0-9]+]] = { inaccessiblememonly nocallback nofree nosync nounwind willreturn } +; CHECK: attributes #[[ATTR9:[0-9]+]] = { nounwind willreturn } +; CHECK: attributes #[[ATTR10]] = { readnone willreturn } +; CHECK: attributes #[[ATTR11]] = { willreturn } ;. diff --git a/llvm/test/Transforms/Attributor/nonnull.ll b/llvm/test/Transforms/Attributor/nonnull.ll --- a/llvm/test/Transforms/Attributor/nonnull.ll +++ b/llvm/test/Transforms/Attributor/nonnull.ll @@ -31,15 +31,15 @@ } define i8* @test2A(i1 %c, i8* %ret) { -; CHECK: Function Attrs: inaccessiblememonly nofree nosync nounwind willreturn +; CHECK: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn ; CHECK-LABEL: define {{[^@]+}}@test2A -; CHECK-SAME: (i1 [[C:%.*]], i8* nofree nonnull readnone returned "no-capture-maybe-returned" [[RET:%.*]]) #[[ATTR0:[0-9]+]] { +; CHECK-SAME: (i1 [[C:%.*]], i8* nofree nonnull readnone returned "no-capture-maybe-returned" [[RET:%.*]]) #[[ATTR2:[0-9]+]] { ; CHECK-NEXT: br i1 [[C]], label [[A:%.*]], label [[B:%.*]] ; CHECK: A: -; CHECK-NEXT: call void @llvm.assume(i1 noundef true) #[[ATTR11:[0-9]+]] [ "nonnull"(i8* [[RET]]) ] +; CHECK-NEXT: call void @llvm.assume(i1 noundef true) #[[ATTR12:[0-9]+]] [ "nonnull"(i8* [[RET]]) ] ; CHECK-NEXT: ret i8* [[RET]] ; CHECK: B: -; CHECK-NEXT: call void @llvm.assume(i1 noundef true) #[[ATTR11]] [ "nonnull"(i8* [[RET]]) ] +; CHECK-NEXT: call void @llvm.assume(i1 noundef true) #[[ATTR12]] [ "nonnull"(i8* [[RET]]) ] ; CHECK-NEXT: ret i8* [[RET]] ; br i1 %c, label %A, label %B @@ -52,15 +52,15 @@ } define i8* @test2B(i1 %c, i8* %ret) { -; CHECK: Function Attrs: inaccessiblememonly nofree nosync nounwind willreturn +; CHECK: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn ; CHECK-LABEL: define {{[^@]+}}@test2B -; CHECK-SAME: (i1 [[C:%.*]], i8* nofree nonnull readnone returned dereferenceable(4) "no-capture-maybe-returned" [[RET:%.*]]) #[[ATTR0]] { +; CHECK-SAME: (i1 [[C:%.*]], i8* nofree nonnull readnone returned dereferenceable(4) "no-capture-maybe-returned" [[RET:%.*]]) #[[ATTR2]] { ; CHECK-NEXT: br i1 [[C]], label [[A:%.*]], label [[B:%.*]] ; CHECK: A: -; CHECK-NEXT: call void @llvm.assume(i1 noundef true) #[[ATTR11]] [ "dereferenceable"(i8* [[RET]], i32 4) ] +; CHECK-NEXT: call void @llvm.assume(i1 noundef true) #[[ATTR12]] [ "dereferenceable"(i8* [[RET]], i32 4) ] ; CHECK-NEXT: ret i8* [[RET]] ; CHECK: B: -; CHECK-NEXT: call void @llvm.assume(i1 noundef true) #[[ATTR11]] [ "dereferenceable"(i8* [[RET]], i32 4) ] +; CHECK-NEXT: call void @llvm.assume(i1 noundef true) #[[ATTR12]] [ "dereferenceable"(i8* [[RET]], i32 4) ] ; CHECK-NEXT: ret i8* [[RET]] ; br i1 %c, label %A, label %B @@ -171,7 +171,7 @@ ; ; CHECK: Function Attrs: noreturn ; CHECK-LABEL: define {{[^@]+}}@test6a -; CHECK-SAME: () #[[ATTR2:[0-9]+]] { +; CHECK-SAME: () #[[ATTR3:[0-9]+]] { ; CHECK-NEXT: entry: ; CHECK-NEXT: [[RET:%.*]] = call i8* @ret_nonnull() ; CHECK-NEXT: br label [[LOOP:%.*]] @@ -247,10 +247,10 @@ ; ATTRIBUTOR_OPM: define i8* @test10 ; ATTRIBUTOR_NPM: define nonnull i8* @test10 define i8* @test10(i8* %a, i64 %n) { -; CHECK: Function Attrs: inaccessiblememonly nofree nosync nounwind willreturn +; CHECK: Function Attrs: inaccessiblememonly nofree norecurse nosync nounwind willreturn ; CHECK-LABEL: define {{[^@]+}}@test10 -; CHECK-SAME: (i8* nofree readnone "no-capture-maybe-returned" [[A:%.*]], i64 [[N:%.*]]) #[[ATTR0]] { -; CHECK-NEXT: call void @llvm.assume(i1 noundef true) #[[ATTR11]] +; CHECK-SAME: (i8* nofree readnone "no-capture-maybe-returned" [[A:%.*]], i64 [[N:%.*]]) #[[ATTR2]] { +; CHECK-NEXT: call void @llvm.assume(i1 noundef true) #[[ATTR12]] ; CHECK-NEXT: [[B:%.*]] = getelementptr inbounds i8, i8* [[A]], i64 [[N]] ; CHECK-NEXT: ret i8* [[B]] ; @@ -309,8 +309,8 @@ ; CHECK-LABEL: define {{[^@]+}}@test13_helper() { ; CHECK-NEXT: [[NONNULLPTR:%.*]] = tail call nonnull i8* @ret_nonnull() ; CHECK-NEXT: [[MAYBENULLPTR:%.*]] = tail call i8* @unknown() -; CHECK-NEXT: tail call void @test13(i8* noalias nocapture nofree nonnull readnone [[NONNULLPTR]], i8* noalias nocapture nofree nonnull readnone [[NONNULLPTR]], i8* noalias nocapture nofree readnone [[MAYBENULLPTR]]) #[[ATTR3:[0-9]+]] -; CHECK-NEXT: tail call void @test13(i8* noalias nocapture nofree nonnull readnone [[NONNULLPTR]], i8* noalias nocapture nofree readnone [[MAYBENULLPTR]], i8* noalias nocapture nofree nonnull readnone [[NONNULLPTR]]) #[[ATTR3]] +; CHECK-NEXT: tail call void @test13(i8* noalias nocapture nofree nonnull readnone [[NONNULLPTR]], i8* noalias nocapture nofree nonnull readnone [[NONNULLPTR]], i8* noalias nocapture nofree readnone [[MAYBENULLPTR]]) #[[ATTR4:[0-9]+]] +; CHECK-NEXT: tail call void @test13(i8* noalias nocapture nofree nonnull readnone [[NONNULLPTR]], i8* noalias nocapture nofree readnone [[MAYBENULLPTR]], i8* noalias nocapture nofree nonnull readnone [[NONNULLPTR]]) #[[ATTR4]] ; CHECK-NEXT: ret void ; %nonnullptr = tail call i8* @ret_nonnull() @@ -323,10 +323,10 @@ ; ; CHECK: Function Attrs: nounwind ; CHECK-LABEL: define {{[^@]+}}@test13 -; CHECK-SAME: (i8* noalias nocapture nofree nonnull readnone [[A:%.*]], i8* noalias nocapture nofree readnone [[B:%.*]], i8* noalias nocapture nofree readnone [[C:%.*]]) #[[ATTR3]] { -; CHECK-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree nonnull readnone [[A]]) #[[ATTR3]] -; CHECK-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree readnone [[B]]) #[[ATTR3]] -; CHECK-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree readnone [[C]]) #[[ATTR3]] +; CHECK-SAME: (i8* noalias nocapture nofree nonnull readnone [[A:%.*]], i8* noalias nocapture nofree readnone [[B:%.*]], i8* noalias nocapture nofree readnone [[C:%.*]]) #[[ATTR4]] { +; CHECK-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree nonnull readnone [[A]]) #[[ATTR4]] +; CHECK-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree readnone [[B]]) #[[ATTR4]] +; CHECK-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree readnone [[C]]) #[[ATTR4]] ; CHECK-NEXT: ret void ; call void @use_i8_ptr(i8* %a) @@ -353,7 +353,7 @@ ; FIXME: missing nonnull It should be nonnull @f1(i32* nonnull readonly %arg) ; CHECK: Function Attrs: argmemonly nofree nosync nounwind readonly ; CHECK-LABEL: define {{[^@]+}}@f1 -; CHECK-SAME: (i32* nofree readonly [[ARG:%.*]]) #[[ATTR4:[0-9]+]] { +; CHECK-SAME: (i32* nofree readonly [[ARG:%.*]]) #[[ATTR5:[0-9]+]] { ; CHECK-NEXT: bb: ; CHECK-NEXT: [[TMP:%.*]] = icmp eq i32* [[ARG]], null ; CHECK-NEXT: br i1 [[TMP]], label [[BB9:%.*]], label [[BB1:%.*]] @@ -363,11 +363,11 @@ ; CHECK-NEXT: br i1 [[TMP3]], label [[BB6:%.*]], label [[BB4:%.*]] ; CHECK: bb4: ; CHECK-NEXT: [[TMP5:%.*]] = getelementptr inbounds i32, i32* [[ARG]], i64 1 -; CHECK-NEXT: [[TMP5B:%.*]] = tail call i32* @f3(i32* nofree nonnull readonly [[TMP5]]) #[[ATTR12:[0-9]+]] +; CHECK-NEXT: [[TMP5B:%.*]] = tail call i32* @f3(i32* nofree nonnull readonly [[TMP5]]) #[[ATTR13:[0-9]+]] ; CHECK-NEXT: [[TMP5C:%.*]] = getelementptr inbounds i32, i32* [[TMP5B]], i64 -1 ; CHECK-NEXT: br label [[BB9]] ; CHECK: bb6: -; CHECK-NEXT: [[TMP7:%.*]] = tail call i32* @f2(i32* nofree nonnull readonly align 4 dereferenceable(4) [[ARG]]) #[[ATTR12]] +; CHECK-NEXT: [[TMP7:%.*]] = tail call i32* @f2(i32* nofree nonnull readonly align 4 dereferenceable(4) [[ARG]]) #[[ATTR13]] ; CHECK-NEXT: ret i32* [[TMP7]] ; CHECK: bb9: ; CHECK-NEXT: [[TMP10:%.*]] = phi i32* [ [[TMP5C]], [[BB4]] ], [ inttoptr (i64 4 to i32*), [[BB:%.*]] ] @@ -401,9 +401,9 @@ define internal i32* @f2(i32* %arg) { ; CHECK: Function Attrs: argmemonly nofree nosync nounwind readonly ; CHECK-LABEL: define {{[^@]+}}@f2 -; CHECK-SAME: (i32* nofree nonnull readonly align 4 dereferenceable(4) [[ARG:%.*]]) #[[ATTR4]] { +; CHECK-SAME: (i32* nofree nonnull readonly align 4 dereferenceable(4) [[ARG:%.*]]) #[[ATTR5]] { ; CHECK-NEXT: bb: -; CHECK-NEXT: [[TMP:%.*]] = tail call i32* @f1(i32* nofree readonly [[ARG]]) #[[ATTR12]] +; CHECK-NEXT: [[TMP:%.*]] = tail call i32* @f1(i32* nofree readonly [[ARG]]) #[[ATTR13]] ; CHECK-NEXT: ret i32* [[TMP]] ; bb: @@ -415,9 +415,9 @@ ; FIXME: missing nonnull. It should be nonnull @f3(i32* nonnull readonly %arg) ; CHECK: Function Attrs: argmemonly nofree nosync nounwind readonly ; CHECK-LABEL: define {{[^@]+}}@f3 -; CHECK-SAME: (i32* nofree readonly [[ARG:%.*]]) #[[ATTR4]] { +; CHECK-SAME: (i32* nofree readonly [[ARG:%.*]]) #[[ATTR5]] { ; CHECK-NEXT: bb: -; CHECK-NEXT: [[TMP:%.*]] = call i32* @f1(i32* nofree readonly [[ARG]]) #[[ATTR12]] +; CHECK-NEXT: [[TMP:%.*]] = call i32* @f1(i32* nofree readonly [[ARG]]) #[[ATTR13]] ; CHECK-NEXT: ret i32* [[TMP]] ; bb: @@ -451,14 +451,14 @@ define void @f16(i8* %a, i8 * %b, i8 %c) { ; CHECK: Function Attrs: nounwind willreturn ; CHECK-LABEL: define {{[^@]+}}@f16 -; CHECK-SAME: (i8* nonnull [[A:%.*]], i8* [[B:%.*]], i8 [[C:%.*]]) #[[ATTR5:[0-9]+]] { +; CHECK-SAME: (i8* nonnull [[A:%.*]], i8* [[B:%.*]], i8 [[C:%.*]]) #[[ATTR6:[0-9]+]] { ; CHECK-NEXT: [[CMP:%.*]] = icmp eq i8 [[C]], 0 ; CHECK-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]] ; CHECK: if.then: -; CHECK-NEXT: tail call void @fun2(i8* nonnull [[A]], i8* nonnull [[B]]) #[[ATTR5]] +; CHECK-NEXT: tail call void @fun2(i8* nonnull [[A]], i8* nonnull [[B]]) #[[ATTR6]] ; CHECK-NEXT: ret void ; CHECK: if.else: -; CHECK-NEXT: tail call void @fun2(i8* nonnull [[A]], i8* [[B]]) #[[ATTR5]] +; CHECK-NEXT: tail call void @fun2(i8* nonnull [[A]], i8* [[B]]) #[[ATTR6]] ; CHECK-NEXT: ret void ; %cmp = icmp eq i8 %c, 0 @@ -481,17 +481,17 @@ ; ; CHECK: Function Attrs: nounwind willreturn ; CHECK-LABEL: define {{[^@]+}}@f17 -; CHECK-SAME: (i8* nonnull [[A:%.*]], i8 [[C:%.*]]) #[[ATTR5]] { +; CHECK-SAME: (i8* nonnull [[A:%.*]], i8 [[C:%.*]]) #[[ATTR6]] { ; CHECK-NEXT: [[CMP:%.*]] = icmp eq i8 [[C]], 0 ; CHECK-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]] ; CHECK: if.then: -; CHECK-NEXT: tail call void @fun0() #[[ATTR5]] +; CHECK-NEXT: tail call void @fun0() #[[ATTR6]] ; CHECK-NEXT: br label [[CONT:%.*]] ; CHECK: if.else: -; CHECK-NEXT: tail call void @fun0() #[[ATTR5]] +; CHECK-NEXT: tail call void @fun0() #[[ATTR6]] ; CHECK-NEXT: br label [[CONT]] ; CHECK: cont: -; CHECK-NEXT: tail call void @fun1(i8* nonnull [[A]]) #[[ATTR5]] +; CHECK-NEXT: tail call void @fun1(i8* nonnull [[A]]) #[[ATTR6]] ; CHECK-NEXT: ret void ; %cmp = icmp eq i8 %c, 0 @@ -520,26 +520,26 @@ define void @f18(i8* %a, i8* %b, i8 %c) { ; CHECK: Function Attrs: nounwind willreturn ; CHECK-LABEL: define {{[^@]+}}@f18 -; CHECK-SAME: (i8* nonnull [[A:%.*]], i8* [[B:%.*]], i8 [[C:%.*]]) #[[ATTR5]] { +; CHECK-SAME: (i8* nonnull [[A:%.*]], i8* [[B:%.*]], i8 [[C:%.*]]) #[[ATTR6]] { ; CHECK-NEXT: [[CMP1:%.*]] = icmp eq i8 [[C]], 0 ; CHECK-NEXT: br i1 [[CMP1]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]] ; CHECK: if.then: -; CHECK-NEXT: tail call void @fun0() #[[ATTR5]] +; CHECK-NEXT: tail call void @fun0() #[[ATTR6]] ; CHECK-NEXT: br label [[CONT:%.*]] ; CHECK: if.else: -; CHECK-NEXT: tail call void @fun0() #[[ATTR5]] +; CHECK-NEXT: tail call void @fun0() #[[ATTR6]] ; CHECK-NEXT: br label [[CONT]] ; CHECK: cont: ; CHECK-NEXT: [[CMP2:%.*]] = icmp eq i8 [[C]], 1 ; CHECK-NEXT: br i1 [[CMP2]], label [[CONT_THEN:%.*]], label [[CONT_ELSE:%.*]] ; CHECK: cont.then: -; CHECK-NEXT: tail call void @fun1(i8* nonnull [[B]]) #[[ATTR5]] +; CHECK-NEXT: tail call void @fun1(i8* nonnull [[B]]) #[[ATTR6]] ; CHECK-NEXT: br label [[CONT2:%.*]] ; CHECK: cont.else: -; CHECK-NEXT: tail call void @fun0() #[[ATTR5]] +; CHECK-NEXT: tail call void @fun0() #[[ATTR6]] ; CHECK-NEXT: br label [[CONT2]] ; CHECK: cont2: -; CHECK-NEXT: tail call void @fun1(i8* nonnull [[A]]) #[[ATTR5]] +; CHECK-NEXT: tail call void @fun1(i8* nonnull [[A]]) #[[ATTR6]] ; CHECK-NEXT: ret void ; %cmp1 = icmp eq i8 %c, 0 @@ -569,17 +569,17 @@ define void @f19(i8* %a, i8* %b, i8 %c) { ; CHECK: Function Attrs: nounwind ; CHECK-LABEL: define {{[^@]+}}@f19 -; CHECK-SAME: (i8* [[A:%.*]], i8* nonnull [[B:%.*]], i8 [[C:%.*]]) #[[ATTR3]] { +; CHECK-SAME: (i8* [[A:%.*]], i8* nonnull [[B:%.*]], i8 [[C:%.*]]) #[[ATTR4]] { ; CHECK-NEXT: br label [[LOOP_HEADER:%.*]] ; CHECK: loop.header: ; CHECK-NEXT: [[CMP2:%.*]] = icmp eq i8 [[C]], 0 ; CHECK-NEXT: br i1 [[CMP2]], label [[LOOP_BODY:%.*]], label [[LOOP_EXIT:%.*]] ; CHECK: loop.body: -; CHECK-NEXT: tail call void @fun1(i8* nonnull [[B]]) #[[ATTR3]] -; CHECK-NEXT: tail call void @fun1(i8* nonnull [[A]]) #[[ATTR3]] +; CHECK-NEXT: tail call void @fun1(i8* nonnull [[B]]) #[[ATTR4]] +; CHECK-NEXT: tail call void @fun1(i8* nonnull [[A]]) #[[ATTR4]] ; CHECK-NEXT: br label [[LOOP_HEADER]] ; CHECK: loop.exit: -; CHECK-NEXT: tail call void @fun1(i8* nonnull [[B]]) #[[ATTR3]] +; CHECK-NEXT: tail call void @fun1(i8* nonnull [[B]]) #[[ATTR4]] ; CHECK-NEXT: ret void ; br label %loop.header @@ -715,7 +715,7 @@ define i8 @parent7(i8* %a) { ; CHECK-LABEL: define {{[^@]+}}@parent7 ; CHECK-SAME: (i8* nonnull [[A:%.*]]) { -; CHECK-NEXT: [[RET:%.*]] = call i8 @use1safecall(i8* nonnull readonly [[A]]) #[[ATTR13:[0-9]+]] +; CHECK-NEXT: [[RET:%.*]] = call i8 @use1safecall(i8* nonnull readonly [[A]]) #[[ATTR14:[0-9]+]] ; CHECK-NEXT: call void @use1nonnull(i8* nonnull [[A]]) ; CHECK-NEXT: ret i8 [[RET]] ; @@ -733,7 +733,7 @@ define i1 @parent8(i8* %a, i8* %bogus1, i8* %b) personality i8* bitcast (i32 (...)* @esfp to i8*){ ; CHECK: Function Attrs: nounwind ; CHECK-LABEL: define {{[^@]+}}@parent8 -; CHECK-SAME: (i8* nonnull [[A:%.*]], i8* nocapture nofree readnone [[BOGUS1:%.*]], i8* nonnull [[B:%.*]]) #[[ATTR3]] personality i8* bitcast (i32 (...)* @esfp to i8*) { +; CHECK-SAME: (i8* nonnull [[A:%.*]], i8* nocapture nofree readnone [[BOGUS1:%.*]], i8* nonnull [[B:%.*]]) #[[ATTR4]] personality i8* bitcast (i32 (...)* @esfp to i8*) { ; CHECK-NEXT: entry: ; CHECK-NEXT: invoke void @use2nonnull(i8* nonnull [[A]], i8* nonnull [[B]]) ; CHECK-NEXT: to label [[CONT:%.*]] unwind label [[EXC:%.*]] @@ -774,7 +774,7 @@ ; Should't be able to derive nonnull based on gep. ; CHECK: Function Attrs: nofree norecurse nosync nounwind null_pointer_is_valid readnone willreturn ; CHECK-LABEL: define {{[^@]+}}@gep1_no_null_opt -; CHECK-SAME: (i32* nofree readnone "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR7:[0-9]+]] { +; CHECK-SAME: (i32* nofree readnone "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR8:[0-9]+]] { ; CHECK-NEXT: [[Q:%.*]] = getelementptr inbounds i32, i32* [[P]], i32 1 ; CHECK-NEXT: ret i32* [[Q]] ; @@ -827,8 +827,8 @@ define internal void @called_by_weak(i32* %a) { ; CHECK: Function Attrs: nounwind ; CHECK-LABEL: define {{[^@]+}}@called_by_weak -; CHECK-SAME: (i32* noalias nocapture nonnull readnone [[A:%.*]]) #[[ATTR3]] { -; CHECK-NEXT: call void @use_i32_ptr(i32* noalias nocapture nonnull readnone [[A]]) #[[ATTR3]] +; CHECK-SAME: (i32* noalias nocapture nonnull readnone [[A:%.*]]) #[[ATTR4]] { +; CHECK-NEXT: call void @use_i32_ptr(i32* noalias nocapture nonnull readnone [[A]]) #[[ATTR4]] ; CHECK-NEXT: ret void ; call void @use_i32_ptr(i32* %a) @@ -840,7 +840,7 @@ ; ; CHECK-LABEL: define {{[^@]+}}@weak_caller ; CHECK-SAME: (i32* nonnull [[A:%.*]]) { -; CHECK-NEXT: call void @called_by_weak(i32* noalias nocapture nonnull readnone [[A]]) #[[ATTR3]] +; CHECK-NEXT: call void @called_by_weak(i32* noalias nocapture nonnull readnone [[A]]) #[[ATTR4]] ; CHECK-NEXT: ret void ; call void @called_by_weak(i32* %a) @@ -851,8 +851,8 @@ define internal void @control(i32* dereferenceable(4) %a) { ; CHECK: Function Attrs: nounwind ; CHECK-LABEL: define {{[^@]+}}@control -; CHECK-SAME: (i32* noalias nocapture noundef nonnull readnone align 16 dereferenceable(8) [[A:%.*]]) #[[ATTR3]] { -; CHECK-NEXT: call void @use_i32_ptr(i32* noalias nocapture noundef nonnull readnone align 16 dereferenceable(8) [[A]]) #[[ATTR3]] +; CHECK-SAME: (i32* noalias nocapture noundef nonnull readnone align 16 dereferenceable(8) [[A:%.*]]) #[[ATTR4]] { +; CHECK-NEXT: call void @use_i32_ptr(i32* noalias nocapture noundef nonnull readnone align 16 dereferenceable(8) [[A]]) #[[ATTR4]] ; CHECK-NEXT: ret void ; call void @use_i32_ptr(i32* %a) @@ -862,7 +862,7 @@ define internal void @naked(i32* dereferenceable(4) %a) naked { ; CHECK: Function Attrs: naked ; CHECK-LABEL: define {{[^@]+}}@naked -; CHECK-SAME: (i32* dereferenceable(4) [[A:%.*]]) #[[ATTR8:[0-9]+]] { +; CHECK-SAME: (i32* dereferenceable(4) [[A:%.*]]) #[[ATTR9:[0-9]+]] { ; CHECK-NEXT: call void @use_i32_ptr(i32* [[A]]) ; CHECK-NEXT: ret void ; @@ -874,7 +874,7 @@ ; ; CHECK: Function Attrs: noinline optnone ; CHECK-LABEL: define {{[^@]+}}@optnone -; CHECK-SAME: (i32* dereferenceable(4) [[A:%.*]]) #[[ATTR9:[0-9]+]] { +; CHECK-SAME: (i32* dereferenceable(4) [[A:%.*]]) #[[ATTR10:[0-9]+]] { ; CHECK-NEXT: call void @use_i32_ptr(i32* [[A]]) ; CHECK-NEXT: ret void ; @@ -885,7 +885,7 @@ ; CHECK-LABEL: define {{[^@]+}}@make_live ; CHECK-SAME: (i32* noundef nonnull align 16 dereferenceable(8) [[A:%.*]]) { ; CHECK-NEXT: call void @naked(i32* noundef nonnull align 16 dereferenceable(8) [[A]]) -; CHECK-NEXT: call void @control(i32* noalias nocapture noundef nonnull readnone align 16 dereferenceable(8) [[A]]) #[[ATTR3]] +; CHECK-NEXT: call void @control(i32* noalias nocapture noundef nonnull readnone align 16 dereferenceable(8) [[A]]) #[[ATTR4]] ; CHECK-NEXT: call void @optnone(i32* noundef nonnull align 16 dereferenceable(8) [[A]]) ; CHECK-NEXT: ret void ; @@ -908,32 +908,32 @@ ; ; IS________OPM: Function Attrs: nounwind ; IS________OPM-LABEL: define {{[^@]+}}@nonnull_exec_ctx_1 -; IS________OPM-SAME: (i32* [[A:%.*]], i32 [[B:%.*]]) #[[ATTR3]] { +; IS________OPM-SAME: (i32* [[A:%.*]], i32 [[B:%.*]]) #[[ATTR4]] { ; IS________OPM-NEXT: en: ; IS________OPM-NEXT: [[TMP3:%.*]] = icmp eq i32 [[B]], 0 ; IS________OPM-NEXT: br i1 [[TMP3]], label [[EX:%.*]], label [[HD:%.*]] ; IS________OPM: ex: -; IS________OPM-NEXT: [[TMP5:%.*]] = tail call i32 @g(i32* nonnull [[A]]) #[[ATTR3]] +; IS________OPM-NEXT: [[TMP5:%.*]] = tail call i32 @g(i32* nonnull [[A]]) #[[ATTR4]] ; IS________OPM-NEXT: ret i32 [[TMP5]] ; IS________OPM: hd: ; IS________OPM-NEXT: [[TMP7:%.*]] = phi i32 [ [[TMP8:%.*]], [[HD]] ], [ 0, [[EN:%.*]] ] -; IS________OPM-NEXT: tail call void @h(i32* [[A]]) #[[ATTR3]] +; IS________OPM-NEXT: tail call void @h(i32* [[A]]) #[[ATTR4]] ; IS________OPM-NEXT: [[TMP8]] = add nuw i32 [[TMP7]], 1 ; IS________OPM-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], [[B]] ; IS________OPM-NEXT: br i1 [[TMP9]], label [[EX]], label [[HD]] ; ; IS________NPM: Function Attrs: nounwind willreturn ; IS________NPM-LABEL: define {{[^@]+}}@nonnull_exec_ctx_1 -; IS________NPM-SAME: (i32* [[A:%.*]], i32 [[B:%.*]]) #[[ATTR5]] { +; IS________NPM-SAME: (i32* [[A:%.*]], i32 [[B:%.*]]) #[[ATTR6]] { ; IS________NPM-NEXT: en: ; IS________NPM-NEXT: [[TMP3:%.*]] = icmp eq i32 [[B]], 0 ; IS________NPM-NEXT: br i1 [[TMP3]], label [[EX:%.*]], label [[HD:%.*]] ; IS________NPM: ex: -; IS________NPM-NEXT: [[TMP5:%.*]] = tail call i32 @g(i32* nonnull [[A]]) #[[ATTR5]] +; IS________NPM-NEXT: [[TMP5:%.*]] = tail call i32 @g(i32* nonnull [[A]]) #[[ATTR6]] ; IS________NPM-NEXT: ret i32 [[TMP5]] ; IS________NPM: hd: ; IS________NPM-NEXT: [[TMP7:%.*]] = phi i32 [ [[TMP8:%.*]], [[HD]] ], [ 0, [[EN:%.*]] ] -; IS________NPM-NEXT: tail call void @h(i32* [[A]]) #[[ATTR5]] +; IS________NPM-NEXT: tail call void @h(i32* [[A]]) #[[ATTR6]] ; IS________NPM-NEXT: [[TMP8]] = add nuw i32 [[TMP7]], 1 ; IS________NPM-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], [[B]] ; IS________NPM-NEXT: br i1 [[TMP9]], label [[EX]], label [[HD]] @@ -958,16 +958,16 @@ ; ; IS________OPM: Function Attrs: nounwind ; IS________OPM-LABEL: define {{[^@]+}}@nonnull_exec_ctx_1b -; IS________OPM-SAME: (i32* [[A:%.*]], i32 [[B:%.*]]) #[[ATTR3]] { +; IS________OPM-SAME: (i32* [[A:%.*]], i32 [[B:%.*]]) #[[ATTR4]] { ; IS________OPM-NEXT: en: ; IS________OPM-NEXT: [[TMP3:%.*]] = icmp eq i32 [[B]], 0 ; IS________OPM-NEXT: br i1 [[TMP3]], label [[EX:%.*]], label [[HD:%.*]] ; IS________OPM: ex: -; IS________OPM-NEXT: [[TMP5:%.*]] = tail call i32 @g(i32* nonnull [[A]]) #[[ATTR3]] +; IS________OPM-NEXT: [[TMP5:%.*]] = tail call i32 @g(i32* nonnull [[A]]) #[[ATTR4]] ; IS________OPM-NEXT: ret i32 [[TMP5]] ; IS________OPM: hd: ; IS________OPM-NEXT: [[TMP7:%.*]] = phi i32 [ [[TMP8:%.*]], [[HD2:%.*]] ], [ 0, [[EN:%.*]] ] -; IS________OPM-NEXT: tail call void @h(i32* [[A]]) #[[ATTR3]] +; IS________OPM-NEXT: tail call void @h(i32* [[A]]) #[[ATTR4]] ; IS________OPM-NEXT: br label [[HD2]] ; IS________OPM: hd2: ; IS________OPM-NEXT: [[TMP8]] = add nuw i32 [[TMP7]], 1 @@ -976,16 +976,16 @@ ; ; IS________NPM: Function Attrs: nounwind willreturn ; IS________NPM-LABEL: define {{[^@]+}}@nonnull_exec_ctx_1b -; IS________NPM-SAME: (i32* [[A:%.*]], i32 [[B:%.*]]) #[[ATTR5]] { +; IS________NPM-SAME: (i32* [[A:%.*]], i32 [[B:%.*]]) #[[ATTR6]] { ; IS________NPM-NEXT: en: ; IS________NPM-NEXT: [[TMP3:%.*]] = icmp eq i32 [[B]], 0 ; IS________NPM-NEXT: br i1 [[TMP3]], label [[EX:%.*]], label [[HD:%.*]] ; IS________NPM: ex: -; IS________NPM-NEXT: [[TMP5:%.*]] = tail call i32 @g(i32* nonnull [[A]]) #[[ATTR5]] +; IS________NPM-NEXT: [[TMP5:%.*]] = tail call i32 @g(i32* nonnull [[A]]) #[[ATTR6]] ; IS________NPM-NEXT: ret i32 [[TMP5]] ; IS________NPM: hd: ; IS________NPM-NEXT: [[TMP7:%.*]] = phi i32 [ [[TMP8:%.*]], [[HD2:%.*]] ], [ 0, [[EN:%.*]] ] -; IS________NPM-NEXT: tail call void @h(i32* [[A]]) #[[ATTR5]] +; IS________NPM-NEXT: tail call void @h(i32* [[A]]) #[[ATTR6]] ; IS________NPM-NEXT: br label [[HD2]] ; IS________NPM: hd2: ; IS________NPM-NEXT: [[TMP8]] = add nuw i32 [[TMP7]], 1 @@ -1015,16 +1015,16 @@ ; ; CHECK: Function Attrs: nounwind willreturn ; CHECK-LABEL: define {{[^@]+}}@nonnull_exec_ctx_2 -; CHECK-SAME: (i32* nonnull [[A:%.*]], i32 [[B:%.*]]) #[[ATTR5]] { +; CHECK-SAME: (i32* nonnull [[A:%.*]], i32 [[B:%.*]]) #[[ATTR6]] { ; CHECK-NEXT: en: ; CHECK-NEXT: [[TMP3:%.*]] = icmp eq i32 [[B]], 0 ; CHECK-NEXT: br i1 [[TMP3]], label [[EX:%.*]], label [[HD:%.*]] ; CHECK: ex: -; CHECK-NEXT: [[TMP5:%.*]] = tail call i32 @g(i32* nonnull [[A]]) #[[ATTR3]] +; CHECK-NEXT: [[TMP5:%.*]] = tail call i32 @g(i32* nonnull [[A]]) #[[ATTR4]] ; CHECK-NEXT: ret i32 [[TMP5]] ; CHECK: hd: ; CHECK-NEXT: [[TMP7:%.*]] = phi i32 [ [[TMP8:%.*]], [[HD]] ], [ 0, [[EN:%.*]] ] -; CHECK-NEXT: tail call void @h(i32* nonnull [[A]]) #[[ATTR3]] +; CHECK-NEXT: tail call void @h(i32* nonnull [[A]]) #[[ATTR4]] ; CHECK-NEXT: [[TMP8]] = add nuw i32 [[TMP7]], 1 ; CHECK-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], [[B]] ; CHECK-NEXT: br i1 [[TMP9]], label [[EX]], label [[HD]] @@ -1049,16 +1049,16 @@ ; ; CHECK: Function Attrs: nounwind willreturn ; CHECK-LABEL: define {{[^@]+}}@nonnull_exec_ctx_2b -; CHECK-SAME: (i32* nonnull [[A:%.*]], i32 [[B:%.*]]) #[[ATTR5]] { +; CHECK-SAME: (i32* nonnull [[A:%.*]], i32 [[B:%.*]]) #[[ATTR6]] { ; CHECK-NEXT: en: ; CHECK-NEXT: [[TMP3:%.*]] = icmp eq i32 [[B]], 0 ; CHECK-NEXT: br i1 [[TMP3]], label [[EX:%.*]], label [[HD:%.*]] ; CHECK: ex: -; CHECK-NEXT: [[TMP5:%.*]] = tail call i32 @g(i32* nonnull [[A]]) #[[ATTR3]] +; CHECK-NEXT: [[TMP5:%.*]] = tail call i32 @g(i32* nonnull [[A]]) #[[ATTR4]] ; CHECK-NEXT: ret i32 [[TMP5]] ; CHECK: hd: ; CHECK-NEXT: [[TMP7:%.*]] = phi i32 [ [[TMP8:%.*]], [[HD2:%.*]] ], [ 0, [[EN:%.*]] ] -; CHECK-NEXT: tail call void @h(i32* nonnull [[A]]) #[[ATTR3]] +; CHECK-NEXT: tail call void @h(i32* nonnull [[A]]) #[[ATTR4]] ; CHECK-NEXT: br label [[HD2]] ; CHECK: hd2: ; CHECK-NEXT: [[TMP8]] = add nuw i32 [[TMP7]], 1 @@ -1202,8 +1202,8 @@ define i8* @mybasename(i8* nofree readonly %str) { ; CHECK: Function Attrs: nofree nounwind readonly willreturn ; CHECK-LABEL: define {{[^@]+}}@mybasename -; CHECK-SAME: (i8* nofree readonly [[STR:%.*]]) #[[ATTR10:[0-9]+]] { -; CHECK-NEXT: [[CALL:%.*]] = call i8* @strrchr(i8* nofree readonly [[STR]], i32 noundef 47) #[[ATTR13]] +; CHECK-SAME: (i8* nofree readonly [[STR:%.*]]) #[[ATTR11:[0-9]+]] { +; CHECK-NEXT: [[CALL:%.*]] = call i8* @strrchr(i8* nofree readonly [[STR]], i32 noundef 47) #[[ATTR14]] ; CHECK-NEXT: [[TOBOOL:%.*]] = icmp ne i8* [[CALL]], null ; CHECK-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds i8, i8* [[CALL]], i64 1 ; CHECK-NEXT: [[COND:%.*]] = select i1 [[TOBOOL]], i8* [[ADD_PTR]], i8* [[STR]] @@ -1226,8 +1226,8 @@ ; ; CHECK-LABEL: define {{[^@]+}}@nonnull_assume_pos ; CHECK-SAME: (i8* nocapture nofree nonnull readnone [[ARG:%.*]]) { -; CHECK-NEXT: call void @llvm.assume(i1 noundef true) #[[ATTR11]] [ "nonnull"(i8* [[ARG]]) ] -; CHECK-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree nonnull readnone [[ARG]]) #[[ATTR3]] +; CHECK-NEXT: call void @llvm.assume(i1 noundef true) #[[ATTR12]] [ "nonnull"(i8* [[ARG]]) ] +; CHECK-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree nonnull readnone [[ARG]]) #[[ATTR4]] ; CHECK-NEXT: [[TMP1:%.*]] = call i8* @unknown() ; CHECK-NEXT: ret void ; @@ -1253,13 +1253,13 @@ ; CHECK-LABEL: define {{[^@]+}}@nonnull_assume_neg ; CHECK-SAME: (i8* nocapture nofree readnone [[ARG:%.*]]) { ; CHECK-NEXT: [[TMP1:%.*]] = call i8* @unknown() -; CHECK-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree readnone [[ARG]]) #[[ATTR3]] +; CHECK-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree readnone [[ARG]]) #[[ATTR4]] ; CHECK-NEXT: call void @llvm.assume(i1 noundef true) [ "nonnull"(i8* [[ARG]]) ] -; CHECK-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree nonnull readnone [[ARG]]) #[[ATTR3]] +; CHECK-NEXT: call void @use_i8_ptr(i8* noalias nocapture nofree nonnull readnone [[ARG]]) #[[ATTR4]] ; CHECK-NEXT: [[TMP2:%.*]] = call i8* @unknown() -; CHECK-NEXT: call void @use_i8_ptr_ret(i8* noalias nocapture nofree nonnull readnone [[ARG]]) #[[ATTR3]] +; CHECK-NEXT: call void @use_i8_ptr_ret(i8* noalias nocapture nofree nonnull readnone [[ARG]]) #[[ATTR4]] ; CHECK-NEXT: call void @llvm.assume(i1 noundef true) [ "nonnull"(i8* [[ARG]]) ] -; CHECK-NEXT: call void @use_i8_ptr_ret(i8* noalias nocapture nofree nonnull readnone [[ARG]]) #[[ATTR3]] +; CHECK-NEXT: call void @use_i8_ptr_ret(i8* noalias nocapture nofree nonnull readnone [[ARG]]) #[[ATTR4]] ; CHECK-NEXT: ret void ; call i8* @unknown() @@ -1312,18 +1312,19 @@ attributes #0 = { null_pointer_is_valid } attributes #1 = { nounwind willreturn} ;. -; CHECK: attributes #[[ATTR0]] = { inaccessiblememonly nofree nosync nounwind willreturn } +; CHECK: attributes #[[ATTR0:[0-9]+]] = { inaccessiblememonly nocallback nofree nosync nounwind willreturn } ; CHECK: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn } -; CHECK: attributes #[[ATTR2]] = { noreturn } -; CHECK: attributes #[[ATTR3]] = { nounwind } -; CHECK: attributes #[[ATTR4]] = { argmemonly nofree nosync nounwind readonly } -; CHECK: attributes #[[ATTR5]] = { nounwind willreturn } -; CHECK: attributes #[[ATTR6:[0-9]+]] = { nounwind readonly willreturn } -; CHECK: attributes #[[ATTR7]] = { nofree norecurse nosync nounwind null_pointer_is_valid readnone willreturn } -; CHECK: attributes #[[ATTR8]] = { naked } -; CHECK: attributes #[[ATTR9]] = { noinline optnone } -; CHECK: attributes #[[ATTR10]] = { nofree nounwind readonly willreturn } -; CHECK: attributes #[[ATTR11]] = { willreturn } -; CHECK: attributes #[[ATTR12]] = { nofree nosync nounwind readonly } -; CHECK: attributes #[[ATTR13]] = { readonly willreturn } +; CHECK: attributes #[[ATTR2]] = { inaccessiblememonly nofree norecurse nosync nounwind willreturn } +; CHECK: attributes #[[ATTR3]] = { noreturn } +; CHECK: attributes #[[ATTR4]] = { nounwind } +; CHECK: attributes #[[ATTR5]] = { argmemonly nofree nosync nounwind readonly } +; CHECK: attributes #[[ATTR6]] = { nounwind willreturn } +; CHECK: attributes #[[ATTR7:[0-9]+]] = { nounwind readonly willreturn } +; CHECK: attributes #[[ATTR8]] = { nofree norecurse nosync nounwind null_pointer_is_valid readnone willreturn } +; CHECK: attributes #[[ATTR9]] = { naked } +; CHECK: attributes #[[ATTR10]] = { noinline optnone } +; CHECK: attributes #[[ATTR11]] = { nofree nounwind readonly willreturn } +; CHECK: attributes #[[ATTR12]] = { willreturn } +; CHECK: attributes #[[ATTR13]] = { nofree nosync nounwind readonly } +; CHECK: attributes #[[ATTR14]] = { readonly willreturn } ;. diff --git a/llvm/test/Transforms/Attributor/nosync.ll b/llvm/test/Transforms/Attributor/nosync.ll --- a/llvm/test/Transforms/Attributor/nosync.ll +++ b/llvm/test/Transforms/Attributor/nosync.ll @@ -204,21 +204,21 @@ ; IS__TUNIT____: Function Attrs: argmemonly nofree noinline nounwind uwtable ; IS__TUNIT____-LABEL: define {{[^@]+}}@scc1 ; IS__TUNIT____-SAME: (i32* nofree [[TMP0:%.*]]) #[[ATTR5:[0-9]+]] { -; IS__TUNIT____-NEXT: tail call void @scc2(i32* nofree [[TMP0]]) #[[ATTR19:[0-9]+]] -; IS__TUNIT____-NEXT: [[VAL:%.*]] = tail call i32 @volatile_load(i32* nofree align 4 [[TMP0]]) #[[ATTR19]] +; IS__TUNIT____-NEXT: tail call void @scc2(i32* nofree [[TMP0]]) #[[ATTR18:[0-9]+]] +; IS__TUNIT____-NEXT: [[VAL:%.*]] = tail call i32 @volatile_load(i32* nofree align 4 [[TMP0]]) #[[ATTR18]] ; IS__TUNIT____-NEXT: ret i32 [[VAL]] ; ; IS__CGSCC_OPM: Function Attrs: argmemonly nofree noinline nounwind uwtable ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@scc1 ; IS__CGSCC_OPM-SAME: (i32* nofree [[TMP0:%.*]]) #[[ATTR5:[0-9]+]] { -; IS__CGSCC_OPM-NEXT: tail call void @scc2(i32* nofree [[TMP0]]) #[[ATTR19:[0-9]+]] -; IS__CGSCC_OPM-NEXT: [[VAL:%.*]] = tail call i32 @volatile_load(i32* nofree noundef align 4 [[TMP0]]) #[[ATTR20:[0-9]+]] +; IS__CGSCC_OPM-NEXT: tail call void @scc2(i32* nofree [[TMP0]]) #[[ATTR18:[0-9]+]] +; IS__CGSCC_OPM-NEXT: [[VAL:%.*]] = tail call i32 @volatile_load(i32* nofree noundef align 4 [[TMP0]]) #[[ATTR19:[0-9]+]] ; IS__CGSCC_OPM-NEXT: ret i32 [[VAL]] ; ; IS__CGSCC_NPM: Function Attrs: argmemonly nofree noinline nounwind uwtable ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@scc1 ; IS__CGSCC_NPM-SAME: (i32* nofree [[TMP0:%.*]]) #[[ATTR5:[0-9]+]] { -; IS__CGSCC_NPM-NEXT: tail call void @scc2(i32* nofree [[TMP0]]) #[[ATTR19:[0-9]+]] +; IS__CGSCC_NPM-NEXT: tail call void @scc2(i32* nofree [[TMP0]]) #[[ATTR18:[0-9]+]] ; IS__CGSCC_NPM-NEXT: [[VAL:%.*]] = tail call i32 @volatile_load(i32* nofree noundef align 4 [[TMP0]]) #[[ATTR14:[0-9]+]] ; IS__CGSCC_NPM-NEXT: ret i32 [[VAL]] ; @@ -231,7 +231,7 @@ ; CHECK: Function Attrs: argmemonly nofree noinline nounwind uwtable ; CHECK-LABEL: define {{[^@]+}}@scc2 ; CHECK-SAME: (i32* nofree [[TMP0:%.*]]) #[[ATTR5:[0-9]+]] { -; CHECK-NEXT: [[TMP2:%.*]] = tail call i32 @scc1(i32* nofree [[TMP0]]) #[[ATTR19:[0-9]+]] +; CHECK-NEXT: [[TMP2:%.*]] = tail call i32 @scc1(i32* nofree [[TMP0]]) #[[ATTR18:[0-9]+]] ; CHECK-NEXT: ret void ; tail call i32 @scc1(i32* %0); @@ -361,13 +361,13 @@ ; NOT_CGSCC_OPM: Function Attrs: argmemonly nofree nounwind willreturn ; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@memcpy_volatile ; NOT_CGSCC_OPM-SAME: (i8* nocapture nofree writeonly [[PTR1:%.*]], i8* nocapture nofree readonly [[PTR2:%.*]]) #[[ATTR10:[0-9]+]] { -; NOT_CGSCC_OPM-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* noalias nocapture nofree writeonly [[PTR1]], i8* noalias nocapture nofree readonly [[PTR2]], i32 noundef 8, i1 noundef true) #[[ATTR20:[0-9]+]] +; NOT_CGSCC_OPM-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* noalias nocapture nofree writeonly [[PTR1]], i8* noalias nocapture nofree readonly [[PTR2]], i32 noundef 8, i1 noundef true) #[[ATTR19:[0-9]+]] ; NOT_CGSCC_OPM-NEXT: ret i32 4 ; ; IS__CGSCC_OPM: Function Attrs: argmemonly nofree nounwind willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@memcpy_volatile ; IS__CGSCC_OPM-SAME: (i8* nocapture nofree writeonly [[PTR1:%.*]], i8* nocapture nofree readonly [[PTR2:%.*]]) #[[ATTR10:[0-9]+]] { -; IS__CGSCC_OPM-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* noalias nocapture nofree writeonly [[PTR1]], i8* noalias nocapture nofree readonly [[PTR2]], i32 noundef 8, i1 noundef true) #[[ATTR21:[0-9]+]] +; IS__CGSCC_OPM-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* noalias nocapture nofree writeonly [[PTR1]], i8* noalias nocapture nofree readonly [[PTR2]], i32 noundef 8, i1 noundef true) #[[ATTR20:[0-9]+]] ; IS__CGSCC_OPM-NEXT: ret i32 4 ; call void @llvm.memcpy(i8* %ptr1, i8* %ptr2, i32 8, i1 1) @@ -382,13 +382,13 @@ ; NOT_CGSCC_OPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@memset_non_volatile ; NOT_CGSCC_OPM-SAME: (i8* nocapture nofree writeonly [[PTR1:%.*]], i8 [[VAL:%.*]]) #[[ATTR11:[0-9]+]] { -; NOT_CGSCC_OPM-NEXT: call void @llvm.memset.p0i8.i32(i8* nocapture nofree writeonly [[PTR1]], i8 [[VAL]], i32 noundef 8, i1 noundef false) #[[ATTR21:[0-9]+]] +; NOT_CGSCC_OPM-NEXT: call void @llvm.memset.p0i8.i32(i8* nocapture nofree writeonly [[PTR1]], i8 [[VAL]], i32 noundef 8, i1 noundef false) #[[ATTR20:[0-9]+]] ; NOT_CGSCC_OPM-NEXT: ret i32 4 ; ; IS__CGSCC_OPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@memset_non_volatile ; IS__CGSCC_OPM-SAME: (i8* nocapture nofree writeonly [[PTR1:%.*]], i8 [[VAL:%.*]]) #[[ATTR11:[0-9]+]] { -; IS__CGSCC_OPM-NEXT: call void @llvm.memset.p0i8.i32(i8* nocapture nofree writeonly [[PTR1]], i8 [[VAL]], i32 noundef 8, i1 noundef false) #[[ATTR22:[0-9]+]] +; IS__CGSCC_OPM-NEXT: call void @llvm.memset.p0i8.i32(i8* nocapture nofree writeonly [[PTR1]], i8 [[VAL]], i32 noundef 8, i1 noundef false) #[[ATTR21:[0-9]+]] ; IS__CGSCC_OPM-NEXT: ret i32 4 ; call void @llvm.memset(i8* %ptr1, i8 %val, i32 8, i1 0) @@ -454,16 +454,16 @@ } define float @cos_test2(float %x) { -; NOT_CGSCC_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; NOT_CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@cos_test2 -; NOT_CGSCC_OPM-SAME: (float [[X:%.*]]) #[[ATTR16:[0-9]+]] { -; NOT_CGSCC_OPM-NEXT: [[C:%.*]] = call float @llvm.cos.f32(float [[X]]) #[[ATTR22:[0-9]+]] +; NOT_CGSCC_OPM-SAME: (float [[X:%.*]]) #[[ATTR15]] { +; NOT_CGSCC_OPM-NEXT: [[C:%.*]] = call float @llvm.cos.f32(float [[X]]) #[[ATTR21:[0-9]+]] ; NOT_CGSCC_OPM-NEXT: ret float [[C]] ; -; IS__CGSCC_OPM: Function Attrs: nofree nosync nounwind readnone willreturn +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@cos_test2 -; IS__CGSCC_OPM-SAME: (float [[X:%.*]]) #[[ATTR16:[0-9]+]] { -; IS__CGSCC_OPM-NEXT: [[C:%.*]] = call float @llvm.cos.f32(float [[X]]) #[[ATTR23:[0-9]+]] +; IS__CGSCC_OPM-SAME: (float [[X:%.*]]) #[[ATTR15]] { +; IS__CGSCC_OPM-NEXT: [[C:%.*]] = call float @llvm.cos.f32(float [[X]]) #[[ATTR22:[0-9]+]] ; IS__CGSCC_OPM-NEXT: ret float [[C]] ; %c = call float @llvm.cos(float %x) @@ -486,13 +486,12 @@ ; NOT_CGSCC_OPM: attributes #[[ATTR13]] = { readnone } ; NOT_CGSCC_OPM: attributes #[[ATTR14]] = { nounwind } ; NOT_CGSCC_OPM: attributes #[[ATTR15]] = { nofree norecurse nosync nounwind readnone willreturn } -; NOT_CGSCC_OPM: attributes #[[ATTR16]] = { nofree nosync nounwind readnone willreturn } -; NOT_CGSCC_OPM: attributes #[[ATTR17:[0-9]+]] = { argmemonly nofree nounwind willreturn writeonly } -; NOT_CGSCC_OPM: attributes #[[ATTR18:[0-9]+]] = { nofree nosync nounwind readnone speculatable willreturn } -; NOT_CGSCC_OPM: attributes #[[ATTR19]] = { nofree nounwind } -; NOT_CGSCC_OPM: attributes #[[ATTR20]] = { willreturn } -; NOT_CGSCC_OPM: attributes #[[ATTR21]] = { willreturn writeonly } -; NOT_CGSCC_OPM: attributes #[[ATTR22]] = { readnone willreturn } +; NOT_CGSCC_OPM: attributes #[[ATTR16:[0-9]+]] = { argmemonly nofree nounwind willreturn writeonly } +; NOT_CGSCC_OPM: attributes #[[ATTR17:[0-9]+]] = { nocallback nofree nosync nounwind readnone speculatable willreturn } +; NOT_CGSCC_OPM: attributes #[[ATTR18]] = { nofree nounwind } +; NOT_CGSCC_OPM: attributes #[[ATTR19]] = { willreturn } +; NOT_CGSCC_OPM: attributes #[[ATTR20]] = { willreturn writeonly } +; NOT_CGSCC_OPM: attributes #[[ATTR21]] = { readnone willreturn } ;. ; IS__CGSCC_OPM: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind optsize readnone ssp uwtable willreturn } ; IS__CGSCC_OPM: attributes #[[ATTR1]] = { argmemonly nofree norecurse nosync nounwind uwtable willreturn } @@ -510,12 +509,11 @@ ; IS__CGSCC_OPM: attributes #[[ATTR13]] = { readnone } ; IS__CGSCC_OPM: attributes #[[ATTR14]] = { nounwind } ; IS__CGSCC_OPM: attributes #[[ATTR15]] = { nofree norecurse nosync nounwind readnone willreturn } -; IS__CGSCC_OPM: attributes #[[ATTR16]] = { nofree nosync nounwind readnone willreturn } -; IS__CGSCC_OPM: attributes #[[ATTR17:[0-9]+]] = { argmemonly nofree nounwind willreturn writeonly } -; IS__CGSCC_OPM: attributes #[[ATTR18:[0-9]+]] = { nofree nosync nounwind readnone speculatable willreturn } -; IS__CGSCC_OPM: attributes #[[ATTR19]] = { nofree nounwind } -; IS__CGSCC_OPM: attributes #[[ATTR20]] = { nounwind willreturn } -; IS__CGSCC_OPM: attributes #[[ATTR21]] = { willreturn } -; IS__CGSCC_OPM: attributes #[[ATTR22]] = { willreturn writeonly } -; IS__CGSCC_OPM: attributes #[[ATTR23]] = { readnone willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR16:[0-9]+]] = { argmemonly nofree nounwind willreturn writeonly } +; IS__CGSCC_OPM: attributes #[[ATTR17:[0-9]+]] = { nocallback nofree nosync nounwind readnone speculatable willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR18]] = { nofree nounwind } +; IS__CGSCC_OPM: attributes #[[ATTR19]] = { nounwind willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR20]] = { willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR21]] = { willreturn writeonly } +; IS__CGSCC_OPM: attributes #[[ATTR22]] = { readnone willreturn } ;. diff --git a/llvm/test/Transforms/Attributor/openmp_parallel.ll b/llvm/test/Transforms/Attributor/openmp_parallel.ll --- a/llvm/test/Transforms/Attributor/openmp_parallel.ll +++ b/llvm/test/Transforms/Attributor/openmp_parallel.ll @@ -286,7 +286,7 @@ ;. ; CHECK: attributes #[[ATTR0:[0-9]+]] = { nounwind uwtable } ; CHECK: attributes #[[ATTR1:[0-9]+]] = { alwaysinline nofree norecurse nounwind uwtable } -; CHECK: attributes #[[ATTR2:[0-9]+]] = { argmemonly nofree nosync nounwind willreturn } +; CHECK: attributes #[[ATTR2:[0-9]+]] = { argmemonly nocallback nofree nosync nounwind willreturn } ;. ; CHECK: [[META0:![0-9]+]] = !{i32 7, !"openmp", i32 50} ; CHECK: [[META1:![0-9]+]] = !{!2} diff --git a/llvm/test/Transforms/Attributor/readattrs.ll b/llvm/test/Transforms/Attributor/readattrs.ll --- a/llvm/test/Transforms/Attributor/readattrs.ll +++ b/llvm/test/Transforms/Attributor/readattrs.ll @@ -129,10 +129,10 @@ ; CHECK-NOT: readnone ; CHECK-NOT: readonly define void @test9(<4 x i32*> %ptrs, <4 x i32>%val) { -; CHECK: Function Attrs: nofree nosync nounwind willreturn writeonly +; CHECK: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly ; CHECK-LABEL: define {{[^@]+}}@test9 -; CHECK-SAME: (<4 x i32*> [[PTRS:%.*]], <4 x i32> [[VAL:%.*]]) #[[ATTR4:[0-9]+]] { -; CHECK-NEXT: call void @llvm.masked.scatter.v4i32.v4p0i32(<4 x i32> [[VAL]], <4 x i32*> [[PTRS]], i32 noundef 4, <4 x i1> noundef ) #[[ATTR11:[0-9]+]] +; CHECK-SAME: (<4 x i32*> [[PTRS:%.*]], <4 x i32> [[VAL:%.*]]) #[[ATTR0]] { +; CHECK-NEXT: call void @llvm.masked.scatter.v4i32.v4p0i32(<4 x i32> [[VAL]], <4 x i32*> [[PTRS]], i32 noundef 4, <4 x i1> noundef ) #[[ATTR12:[0-9]+]] ; CHECK-NEXT: ret void ; call void @llvm.masked.scatter.v4i32.v4p0i32(<4 x i32>%val, <4 x i32*> %ptrs, i32 4, <4 x i1>) @@ -142,10 +142,10 @@ ; CHECK: declare <4 x i32> @llvm.masked.gather declare <4 x i32> @llvm.masked.gather.v4i32.v4p0i32(<4 x i32*>, i32, <4 x i1>, <4 x i32>) define <4 x i32> @test10(<4 x i32*> %ptrs) { -; CHECK: Function Attrs: nofree nosync nounwind readonly willreturn +; CHECK: Function Attrs: nofree norecurse nosync nounwind readonly willreturn ; CHECK-LABEL: define {{[^@]+}}@test10 -; CHECK-SAME: (<4 x i32*> [[PTRS:%.*]]) #[[ATTR5:[0-9]+]] { -; CHECK-NEXT: [[RES:%.*]] = call <4 x i32> @llvm.masked.gather.v4i32.v4p0i32(<4 x i32*> [[PTRS]], i32 noundef 4, <4 x i1> noundef , <4 x i32> undef) #[[ATTR12:[0-9]+]] +; CHECK-SAME: (<4 x i32*> [[PTRS:%.*]]) #[[ATTR6:[0-9]+]] { +; CHECK-NEXT: [[RES:%.*]] = call <4 x i32> @llvm.masked.gather.v4i32.v4p0i32(<4 x i32*> [[PTRS]], i32 noundef 4, <4 x i1> noundef , <4 x i32> undef) #[[ATTR13:[0-9]+]] ; CHECK-NEXT: ret <4 x i32> [[RES]] ; %res = call <4 x i32> @llvm.masked.gather.v4i32.v4p0i32(<4 x i32*> %ptrs, i32 4, <4 x i1>, <4 x i32>undef) @@ -157,8 +157,8 @@ define <4 x i32> @test11_2(<4 x i32*> %ptrs) { ; CHECK: Function Attrs: argmemonly nounwind readonly ; CHECK-LABEL: define {{[^@]+}}@test11_2 -; CHECK-SAME: (<4 x i32*> [[PTRS:%.*]]) #[[ATTR6:[0-9]+]] { -; CHECK-NEXT: [[RES:%.*]] = call <4 x i32> @test11_1(<4 x i32*> [[PTRS]]) #[[ATTR10:[0-9]+]] +; CHECK-SAME: (<4 x i32*> [[PTRS:%.*]]) #[[ATTR7:[0-9]+]] { +; CHECK-NEXT: [[RES:%.*]] = call <4 x i32> @test11_1(<4 x i32*> [[PTRS]]) #[[ATTR11:[0-9]+]] ; CHECK-NEXT: ret <4 x i32> [[RES]] ; %res = call <4 x i32> @test11_1(<4 x i32*> %ptrs) @@ -170,8 +170,8 @@ define <4 x i32> @test12_2(<4 x i32*> %ptrs) { ; CHECK: Function Attrs: argmemonly nounwind ; CHECK-LABEL: define {{[^@]+}}@test12_2 -; CHECK-SAME: (<4 x i32*> [[PTRS:%.*]]) #[[ATTR7:[0-9]+]] { -; CHECK-NEXT: [[RES:%.*]] = call <4 x i32> @test12_1(<4 x i32*> [[PTRS]]) #[[ATTR13:[0-9]+]] +; CHECK-SAME: (<4 x i32*> [[PTRS:%.*]]) #[[ATTR8:[0-9]+]] { +; CHECK-NEXT: [[RES:%.*]] = call <4 x i32> @test12_1(<4 x i32*> [[PTRS]]) #[[ATTR14:[0-9]+]] ; CHECK-NEXT: ret <4 x i32> [[RES]] ; %res = call <4 x i32> @test12_1(<4 x i32*> %ptrs) @@ -181,7 +181,7 @@ define i32 @volatile_load(i32* %p) { ; CHECK: Function Attrs: argmemonly nofree norecurse nounwind willreturn ; CHECK-LABEL: define {{[^@]+}}@volatile_load -; CHECK-SAME: (i32* nofree noundef align 4 [[P:%.*]]) #[[ATTR8:[0-9]+]] { +; CHECK-SAME: (i32* nofree noundef align 4 [[P:%.*]]) #[[ATTR9:[0-9]+]] { ; CHECK-NEXT: [[LOAD:%.*]] = load volatile i32, i32* [[P]], align 4 ; CHECK-NEXT: ret i32 [[LOAD]] ; @@ -259,7 +259,7 @@ define void @byval_not_readnone_1(i8* byval(i8) %written) readnone { ; CHECK: Function Attrs: readnone ; CHECK-LABEL: define {{[^@]+}}@byval_not_readnone_1 -; CHECK-SAME: (i8* noalias nonnull byval(i8) dereferenceable(1) [[WRITTEN:%.*]]) #[[ATTR9:[0-9]+]] { +; CHECK-SAME: (i8* noalias nonnull byval(i8) dereferenceable(1) [[WRITTEN:%.*]]) #[[ATTR10:[0-9]+]] { ; CHECK-NEXT: call void @escape_i8(i8* nonnull dereferenceable(1) [[WRITTEN]]) ; CHECK-NEXT: ret void ; @@ -294,14 +294,14 @@ ; IS__TUNIT____-SAME: (i8* nocapture readonly [[READ_ONLY:%.*]]) { ; IS__TUNIT____-NEXT: call void @byval_not_readonly_1(i8* nocapture readonly byval(i8) [[READ_ONLY]]) #[[ATTR2]] ; IS__TUNIT____-NEXT: call void @byval_not_readnone_1(i8* noalias nocapture readnone byval(i8) [[READ_ONLY]]) -; IS__TUNIT____-NEXT: call void @byval_no_fnarg(i8* nocapture nofree readonly byval(i8) [[READ_ONLY]]) #[[ATTR14:[0-9]+]] +; IS__TUNIT____-NEXT: call void @byval_no_fnarg(i8* nocapture nofree readonly byval(i8) [[READ_ONLY]]) #[[ATTR15:[0-9]+]] ; IS__TUNIT____-NEXT: ret void ; ; IS__CGSCC____-LABEL: define {{[^@]+}}@testbyval ; IS__CGSCC____-SAME: (i8* nocapture noundef nonnull readonly dereferenceable(1) [[READ_ONLY:%.*]]) { ; IS__CGSCC____-NEXT: call void @byval_not_readonly_1(i8* noalias nocapture noundef nonnull readonly byval(i8) dereferenceable(1) [[READ_ONLY]]) #[[ATTR2]] ; IS__CGSCC____-NEXT: call void @byval_not_readnone_1(i8* noalias nocapture noundef nonnull readnone byval(i8) dereferenceable(1) [[READ_ONLY]]) -; IS__CGSCC____-NEXT: call void @byval_no_fnarg(i8* noalias nocapture nofree noundef nonnull readnone byval(i8) dereferenceable(1) [[READ_ONLY]]) #[[ATTR14:[0-9]+]] +; IS__CGSCC____-NEXT: call void @byval_no_fnarg(i8* noalias nocapture nofree noundef nonnull readnone byval(i8) dereferenceable(1) [[READ_ONLY]]) #[[ATTR15:[0-9]+]] ; IS__CGSCC____-NEXT: ret void ; call void @byval_not_readonly_1(i8* byval(i8) %read_only) @@ -320,9 +320,9 @@ define void @ptr_uses(i8* %ptr) { ; CHECK: Function Attrs: nounwind readonly ; CHECK-LABEL: define {{[^@]+}}@ptr_uses -; CHECK-SAME: (i8* nocapture readonly [[PTR:%.*]]) #[[ATTR10]] { -; CHECK-NEXT: [[CALL_PTR:%.*]] = call i8* @maybe_returned_ptr(i8* readonly [[PTR]]) #[[ATTR10]] -; CHECK-NEXT: [[CALL_VAL:%.*]] = call i8 @maybe_returned_val(i8* readonly [[CALL_PTR]]) #[[ATTR10]] +; CHECK-SAME: (i8* nocapture readonly [[PTR:%.*]]) #[[ATTR11]] { +; CHECK-NEXT: [[CALL_PTR:%.*]] = call i8* @maybe_returned_ptr(i8* readonly [[PTR]]) #[[ATTR11]] +; CHECK-NEXT: [[CALL_VAL:%.*]] = call i8 @maybe_returned_val(i8* readonly [[CALL_PTR]]) #[[ATTR11]] ; CHECK-NEXT: ret void ; %call_ptr = call i8* @maybe_returned_ptr(i8* %ptr) @@ -375,15 +375,16 @@ ; CHECK: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn } ; CHECK: attributes #[[ATTR2]] = { readonly } ; CHECK: attributes #[[ATTR3]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } -; CHECK: attributes #[[ATTR4]] = { nofree nosync nounwind willreturn writeonly } -; CHECK: attributes #[[ATTR5]] = { nofree nosync nounwind readonly willreturn } -; CHECK: attributes #[[ATTR6]] = { argmemonly nounwind readonly } -; CHECK: attributes #[[ATTR7]] = { argmemonly nounwind } -; CHECK: attributes #[[ATTR8]] = { argmemonly nofree norecurse nounwind willreturn } -; CHECK: attributes #[[ATTR9]] = { readnone } -; CHECK: attributes #[[ATTR10]] = { nounwind readonly } -; CHECK: attributes #[[ATTR11]] = { willreturn writeonly } -; CHECK: attributes #[[ATTR12]] = { readonly willreturn } -; CHECK: attributes #[[ATTR13]] = { nounwind } -; CHECK: attributes #[[ATTR14:[0-9]+]] = { nounwind writeonly } +; CHECK: attributes #[[ATTR4:[0-9]+]] = { nocallback nofree nosync nounwind willreturn writeonly } +; CHECK: attributes #[[ATTR5:[0-9]+]] = { nocallback nofree nosync nounwind readonly willreturn } +; CHECK: attributes #[[ATTR6]] = { nofree norecurse nosync nounwind readonly willreturn } +; CHECK: attributes #[[ATTR7]] = { argmemonly nounwind readonly } +; CHECK: attributes #[[ATTR8]] = { argmemonly nounwind } +; CHECK: attributes #[[ATTR9]] = { argmemonly nofree norecurse nounwind willreturn } +; CHECK: attributes #[[ATTR10]] = { readnone } +; CHECK: attributes #[[ATTR11]] = { nounwind readonly } +; CHECK: attributes #[[ATTR12]] = { willreturn writeonly } +; CHECK: attributes #[[ATTR13]] = { readonly willreturn } +; CHECK: attributes #[[ATTR14]] = { nounwind } +; CHECK: attributes #[[ATTR15:[0-9]+]] = { nounwind writeonly } ;. diff --git a/llvm/test/Transforms/Attributor/value-simplify-pointer-info.ll b/llvm/test/Transforms/Attributor/value-simplify-pointer-info.ll --- a/llvm/test/Transforms/Attributor/value-simplify-pointer-info.ll +++ b/llvm/test/Transforms/Attributor/value-simplify-pointer-info.ll @@ -103,22 +103,22 @@ ; return r; ; } define void @local_alloca_simplifiable_1(%struct.S* noalias sret(%struct.S) align 4 %agg.result) { -; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind willreturn +; IS__TUNIT_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@local_alloca_simplifiable_1 ; IS__TUNIT_OPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]]) #[[ATTR1:[0-9]+]] { ; IS__TUNIT_OPM-NEXT: entry: ; IS__TUNIT_OPM-NEXT: [[S:%.*]] = alloca [[STRUCT_S]], align 4 ; IS__TUNIT_OPM-NEXT: [[I:%.*]] = bitcast %struct.S* [[S]] to i8* -; IS__TUNIT_OPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I]]) #[[ATTR14:[0-9]+]] +; IS__TUNIT_OPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I]]) #[[ATTR12:[0-9]+]] ; IS__TUNIT_OPM-NEXT: [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3 ; IS__TUNIT_OPM-NEXT: [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4 ; IS__TUNIT_OPM-NEXT: [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5 ; IS__TUNIT_OPM-NEXT: [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0 -; IS__TUNIT_OPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR15:[0-9]+]] +; IS__TUNIT_OPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR13:[0-9]+]] ; IS__TUNIT_OPM-NEXT: [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1 -; IS__TUNIT_OPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR15]] +; IS__TUNIT_OPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR13]] ; IS__TUNIT_OPM-NEXT: [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2 -; IS__TUNIT_OPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR15]] +; IS__TUNIT_OPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR13]] ; IS__TUNIT_OPM-NEXT: [[F12:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3 ; IS__TUNIT_OPM-NEXT: store float 0x3FF19999A0000000, float* [[F12]], align 4, !tbaa [[TBAA7:![0-9]+]] ; IS__TUNIT_OPM-NEXT: [[MUL:%.*]] = fmul float 0x40019999A0000000, 2.000000e+00 @@ -144,25 +144,25 @@ ; IS__TUNIT_OPM-NEXT: [[I316:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2 ; IS__TUNIT_OPM-NEXT: store i32 [[ADD15]], i32* [[I316]], align 4, !tbaa [[TBAA14]] ; IS__TUNIT_OPM-NEXT: [[I12:%.*]] = bitcast %struct.S* [[S]] to i8* -; IS__TUNIT_OPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I12]]) #[[ATTR14]] +; IS__TUNIT_OPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I12]]) #[[ATTR12]] ; IS__TUNIT_OPM-NEXT: ret void ; -; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn +; IS__TUNIT_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@local_alloca_simplifiable_1 ; IS__TUNIT_NPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]]) #[[ATTR1:[0-9]+]] { ; IS__TUNIT_NPM-NEXT: entry: ; IS__TUNIT_NPM-NEXT: [[S:%.*]] = alloca [[STRUCT_S]], align 4 ; IS__TUNIT_NPM-NEXT: [[I:%.*]] = bitcast %struct.S* [[S]] to i8* -; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I]]) #[[ATTR11:[0-9]+]] +; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I]]) #[[ATTR10:[0-9]+]] ; IS__TUNIT_NPM-NEXT: [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3 ; IS__TUNIT_NPM-NEXT: [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4 ; IS__TUNIT_NPM-NEXT: [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5 ; IS__TUNIT_NPM-NEXT: [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0 -; IS__TUNIT_NPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR12:[0-9]+]] +; IS__TUNIT_NPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR11:[0-9]+]] ; IS__TUNIT_NPM-NEXT: [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1 -; IS__TUNIT_NPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR12]] +; IS__TUNIT_NPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR11]] ; IS__TUNIT_NPM-NEXT: [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2 -; IS__TUNIT_NPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR12]] +; IS__TUNIT_NPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR11]] ; IS__TUNIT_NPM-NEXT: [[F12:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3 ; IS__TUNIT_NPM-NEXT: store float 0x3FF19999A0000000, float* [[F12]], align 4, !tbaa [[TBAA7:![0-9]+]] ; IS__TUNIT_NPM-NEXT: [[MUL:%.*]] = fmul float 0x40019999A0000000, 2.000000e+00 @@ -188,25 +188,25 @@ ; IS__TUNIT_NPM-NEXT: [[I316:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2 ; IS__TUNIT_NPM-NEXT: store i32 [[ADD15]], i32* [[I316]], align 4, !tbaa [[TBAA14]] ; IS__TUNIT_NPM-NEXT: [[I12:%.*]] = bitcast %struct.S* [[S]] to i8* -; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I12]]) #[[ATTR11]] +; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I12]]) #[[ATTR10]] ; IS__TUNIT_NPM-NEXT: ret void ; -; IS__CGSCC_OPM: Function Attrs: argmemonly nofree nosync nounwind willreturn +; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@local_alloca_simplifiable_1 ; IS__CGSCC_OPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]]) #[[ATTR1:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: entry: ; IS__CGSCC_OPM-NEXT: [[S:%.*]] = alloca [[STRUCT_S]], align 4 ; IS__CGSCC_OPM-NEXT: [[I:%.*]] = bitcast %struct.S* [[S]] to i8* -; IS__CGSCC_OPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I]]) #[[ATTR13:[0-9]+]] +; IS__CGSCC_OPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I]]) #[[ATTR12:[0-9]+]] ; IS__CGSCC_OPM-NEXT: [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3 ; IS__CGSCC_OPM-NEXT: [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4 ; IS__CGSCC_OPM-NEXT: [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5 ; IS__CGSCC_OPM-NEXT: [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0 -; IS__CGSCC_OPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR14:[0-9]+]] +; IS__CGSCC_OPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR13:[0-9]+]] ; IS__CGSCC_OPM-NEXT: [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1 -; IS__CGSCC_OPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR14]] +; IS__CGSCC_OPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR13]] ; IS__CGSCC_OPM-NEXT: [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2 -; IS__CGSCC_OPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR14]] +; IS__CGSCC_OPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR13]] ; IS__CGSCC_OPM-NEXT: [[F12:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3 ; IS__CGSCC_OPM-NEXT: store float 0x3FF19999A0000000, float* [[F12]], align 4, !tbaa [[TBAA7:![0-9]+]] ; IS__CGSCC_OPM-NEXT: [[MUL:%.*]] = fmul float 0x40019999A0000000, 2.000000e+00 @@ -232,25 +232,25 @@ ; IS__CGSCC_OPM-NEXT: [[I316:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2 ; IS__CGSCC_OPM-NEXT: store i32 [[ADD15]], i32* [[I316]], align 4, !tbaa [[TBAA14]] ; IS__CGSCC_OPM-NEXT: [[I12:%.*]] = bitcast %struct.S* [[S]] to i8* -; IS__CGSCC_OPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I12]]) #[[ATTR13]] +; IS__CGSCC_OPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I12]]) #[[ATTR12]] ; IS__CGSCC_OPM-NEXT: ret void ; -; IS__CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn +; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@local_alloca_simplifiable_1 ; IS__CGSCC_NPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]]) #[[ATTR1:[0-9]+]] { ; IS__CGSCC_NPM-NEXT: entry: ; IS__CGSCC_NPM-NEXT: [[S:%.*]] = alloca [[STRUCT_S]], align 4 ; IS__CGSCC_NPM-NEXT: [[I:%.*]] = bitcast %struct.S* [[S]] to i8* -; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I]]) #[[ATTR11:[0-9]+]] +; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I]]) #[[ATTR10:[0-9]+]] ; IS__CGSCC_NPM-NEXT: [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3 ; IS__CGSCC_NPM-NEXT: [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4 ; IS__CGSCC_NPM-NEXT: [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5 ; IS__CGSCC_NPM-NEXT: [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0 -; IS__CGSCC_NPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR12:[0-9]+]] +; IS__CGSCC_NPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR11:[0-9]+]] ; IS__CGSCC_NPM-NEXT: [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1 -; IS__CGSCC_NPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR12]] +; IS__CGSCC_NPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR11]] ; IS__CGSCC_NPM-NEXT: [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2 -; IS__CGSCC_NPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR12]] +; IS__CGSCC_NPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR11]] ; IS__CGSCC_NPM-NEXT: [[F12:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3 ; IS__CGSCC_NPM-NEXT: store float 0x3FF19999A0000000, float* [[F12]], align 4, !tbaa [[TBAA7:![0-9]+]] ; IS__CGSCC_NPM-NEXT: [[MUL:%.*]] = fmul float 0x40019999A0000000, 2.000000e+00 @@ -276,7 +276,7 @@ ; IS__CGSCC_NPM-NEXT: [[I316:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2 ; IS__CGSCC_NPM-NEXT: store i32 [[ADD15]], i32* [[I316]], align 4, !tbaa [[TBAA14]] ; IS__CGSCC_NPM-NEXT: [[I12:%.*]] = bitcast %struct.S* [[S]] to i8* -; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I12]]) #[[ATTR11]] +; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I12]]) #[[ATTR10]] ; IS__CGSCC_NPM-NEXT: ret void ; entry: @@ -352,9 +352,9 @@ ; } ; define void @local_alloca_simplifiable_2() { -; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind +; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@local_alloca_simplifiable_2 -; IS__TUNIT_OPM-SAME: () #[[ATTR2:[0-9]+]] { +; IS__TUNIT_OPM-SAME: () #[[ATTR3:[0-9]+]] { ; IS__TUNIT_OPM-NEXT: entry: ; IS__TUNIT_OPM-NEXT: [[BYTES:%.*]] = alloca [1024 x i8], align 16 ; IS__TUNIT_OPM-NEXT: [[I:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 0 @@ -411,7 +411,7 @@ ; IS__TUNIT_OPM-NEXT: [[ARRAYIDX25:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 1023 ; IS__TUNIT_OPM-NEXT: [[ARRAYIDX26:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 500 ; IS__TUNIT_OPM-NEXT: [[I22:%.*]] = bitcast i8* [[ARRAYIDX26]] to i32* -; IS__TUNIT_OPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(524) [[I22]], i32 noundef 0) #[[ATTR16:[0-9]+]] +; IS__TUNIT_OPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(524) [[I22]], i32 noundef 0) #[[ATTR14:[0-9]+]] ; IS__TUNIT_OPM-NEXT: br label [[FOR_COND28:%.*]] ; IS__TUNIT_OPM: for.cond28: ; IS__TUNIT_OPM-NEXT: [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC36:%.*]] ], [ 0, [[FOR_END24]] ] @@ -431,13 +431,13 @@ ; IS__TUNIT_OPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 1024, i8* nocapture nofree noundef nonnull align 16 dereferenceable(1024) [[I24]]) ; IS__TUNIT_OPM-NEXT: ret void ; -; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn +; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@local_alloca_simplifiable_2 -; IS__TUNIT_NPM-SAME: () #[[ATTR2:[0-9]+]] { +; IS__TUNIT_NPM-SAME: () #[[ATTR3:[0-9]+]] { ; IS__TUNIT_NPM-NEXT: entry: ; IS__TUNIT_NPM-NEXT: [[BYTES:%.*]] = alloca [1024 x i8], align 16 ; IS__TUNIT_NPM-NEXT: [[I:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 0 -; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 1024, i8* nocapture nofree noundef nonnull align 16 dereferenceable(1024) [[I]]) #[[ATTR11]] +; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 1024, i8* nocapture nofree noundef nonnull align 16 dereferenceable(1024) [[I]]) #[[ATTR10]] ; IS__TUNIT_NPM-NEXT: br label [[FOR_COND:%.*]] ; IS__TUNIT_NPM: for.cond: ; IS__TUNIT_NPM-NEXT: [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ] @@ -490,7 +490,7 @@ ; IS__TUNIT_NPM-NEXT: [[ARRAYIDX25:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 1023 ; IS__TUNIT_NPM-NEXT: [[ARRAYIDX26:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 500 ; IS__TUNIT_NPM-NEXT: [[I22:%.*]] = bitcast i8* [[ARRAYIDX26]] to i32* -; IS__TUNIT_NPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(524) [[I22]], i32 noundef 0) #[[ATTR12]] +; IS__TUNIT_NPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(524) [[I22]], i32 noundef 0) #[[ATTR11]] ; IS__TUNIT_NPM-NEXT: br label [[FOR_COND28:%.*]] ; IS__TUNIT_NPM: for.cond28: ; IS__TUNIT_NPM-NEXT: [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC36:%.*]] ], [ 0, [[FOR_END24]] ] @@ -507,7 +507,7 @@ ; IS__TUNIT_NPM-NEXT: br label [[FOR_COND28]], !llvm.loop [[LOOP20:![0-9]+]] ; IS__TUNIT_NPM: for.end38: ; IS__TUNIT_NPM-NEXT: [[I24:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 0 -; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 1024, i8* nocapture nofree noundef nonnull align 16 dereferenceable(1024) [[I24]]) #[[ATTR11]] +; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 1024, i8* nocapture nofree noundef nonnull align 16 dereferenceable(1024) [[I24]]) #[[ATTR10]] ; IS__TUNIT_NPM-NEXT: ret void ; ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@local_alloca_simplifiable_2() { @@ -571,7 +571,7 @@ ; IS__CGSCC_OPM-NEXT: store i8 0, i8* [[ARRAYIDX25]], align 1, !tbaa [[TBAA15]] ; IS__CGSCC_OPM-NEXT: [[ARRAYIDX26:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 500 ; IS__CGSCC_OPM-NEXT: [[I22:%.*]] = bitcast i8* [[ARRAYIDX26]] to i32* -; IS__CGSCC_OPM-NEXT: call void @write_arg(i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) [[I22]], i32 noundef 0) #[[ATTR15:[0-9]+]] +; IS__CGSCC_OPM-NEXT: call void @write_arg(i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) [[I22]], i32 noundef 0) #[[ATTR14:[0-9]+]] ; IS__CGSCC_OPM-NEXT: br label [[FOR_COND28:%.*]] ; IS__CGSCC_OPM: for.cond28: ; IS__CGSCC_OPM-NEXT: [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC36:%.*]] ], [ 0, [[FOR_END24]] ] @@ -597,7 +597,7 @@ ; IS__CGSCC_NPM-NEXT: entry: ; IS__CGSCC_NPM-NEXT: [[BYTES:%.*]] = alloca [1024 x i8], align 16 ; IS__CGSCC_NPM-NEXT: [[I:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 0 -; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 1024, i8* nocapture nofree noundef nonnull align 16 dereferenceable(1024) [[I]]) #[[ATTR11]] +; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 1024, i8* nocapture nofree noundef nonnull align 16 dereferenceable(1024) [[I]]) #[[ATTR10]] ; IS__CGSCC_NPM-NEXT: br label [[FOR_COND:%.*]] ; IS__CGSCC_NPM: for.cond: ; IS__CGSCC_NPM-NEXT: [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ] @@ -654,7 +654,7 @@ ; IS__CGSCC_NPM-NEXT: store i8 0, i8* [[ARRAYIDX25]], align 1, !tbaa [[TBAA15]] ; IS__CGSCC_NPM-NEXT: [[ARRAYIDX26:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 500 ; IS__CGSCC_NPM-NEXT: [[I22:%.*]] = bitcast i8* [[ARRAYIDX26]] to i32* -; IS__CGSCC_NPM-NEXT: call void @write_arg(i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) [[I22]], i32 noundef 0) #[[ATTR13:[0-9]+]] +; IS__CGSCC_NPM-NEXT: call void @write_arg(i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) [[I22]], i32 noundef 0) #[[ATTR12:[0-9]+]] ; IS__CGSCC_NPM-NEXT: br label [[FOR_COND28:%.*]] ; IS__CGSCC_NPM: for.cond28: ; IS__CGSCC_NPM-NEXT: [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC36:%.*]] ], [ 0, [[FOR_END24]] ] @@ -789,7 +789,7 @@ define i32 @local_alloca_simplifiable_3() { ; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@local_alloca_simplifiable_3 -; IS__TUNIT____-SAME: () #[[ATTR3:[0-9]+]] { +; IS__TUNIT____-SAME: () #[[ATTR4:[0-9]+]] { ; IS__TUNIT____-NEXT: [[A:%.*]] = alloca i32, align 4 ; IS__TUNIT____-NEXT: store i32 1, i32* [[A]], align 4 ; IS__TUNIT____-NEXT: br label [[SPLIT:%.*]] @@ -800,7 +800,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@local_alloca_simplifiable_3 -; IS__CGSCC____-SAME: () #[[ATTR2:[0-9]+]] { +; IS__CGSCC____-SAME: () #[[ATTR3:[0-9]+]] { ; IS__CGSCC____-NEXT: [[A:%.*]] = alloca i32, align 4 ; IS__CGSCC____-NEXT: store i32 1, i32* [[A]], align 4 ; IS__CGSCC____-NEXT: br label [[SPLIT:%.*]] @@ -825,12 +825,12 @@ define i32 @local_alloca_simplifiable_4() { ; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@local_alloca_simplifiable_4 -; IS__TUNIT____-SAME: () #[[ATTR3]] { +; IS__TUNIT____-SAME: () #[[ATTR4]] { ; IS__TUNIT____-NEXT: ret i32 undef ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@local_alloca_simplifiable_4 -; IS__CGSCC____-SAME: () #[[ATTR2]] { +; IS__CGSCC____-SAME: () #[[ATTR3]] { ; IS__CGSCC____-NEXT: ret i32 undef ; %A = alloca i32, align 4 @@ -845,13 +845,13 @@ ; return *p; ; } define i32 @multi_obj_simplifiable_1(i32 %cnd) { -; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind willreturn +; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@multi_obj_simplifiable_1 -; IS__TUNIT_OPM-SAME: (i32 [[CND:%.*]]) #[[ATTR4:[0-9]+]] { +; IS__TUNIT_OPM-SAME: (i32 [[CND:%.*]]) #[[ATTR5:[0-9]+]] { ; IS__TUNIT_OPM-NEXT: entry: ; IS__TUNIT_OPM-NEXT: [[L:%.*]] = alloca i32, align 4 ; IS__TUNIT_OPM-NEXT: [[I:%.*]] = bitcast i32* [[L]] to i8* -; IS__TUNIT_OPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR14]] +; IS__TUNIT_OPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR12]] ; IS__TUNIT_OPM-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[CND]], 0 ; IS__TUNIT_OPM-NEXT: br i1 [[TOBOOL_NOT]], label [[COND_FALSE:%.*]], label [[COND_TRUE:%.*]] ; IS__TUNIT_OPM: cond.true: @@ -860,16 +860,16 @@ ; IS__TUNIT_OPM-NEXT: br label [[COND_END]] ; IS__TUNIT_OPM: cond.end: ; IS__TUNIT_OPM-NEXT: [[I2:%.*]] = bitcast i32* [[L]] to i8* -; IS__TUNIT_OPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I2]]) #[[ATTR14]] +; IS__TUNIT_OPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I2]]) #[[ATTR12]] ; IS__TUNIT_OPM-NEXT: ret i32 5 ; -; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn +; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@multi_obj_simplifiable_1 -; IS__TUNIT_NPM-SAME: (i32 [[CND:%.*]]) #[[ATTR2]] { +; IS__TUNIT_NPM-SAME: (i32 [[CND:%.*]]) #[[ATTR3]] { ; IS__TUNIT_NPM-NEXT: entry: ; IS__TUNIT_NPM-NEXT: [[L:%.*]] = alloca i32, align 4 ; IS__TUNIT_NPM-NEXT: [[I:%.*]] = bitcast i32* [[L]] to i8* -; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR11]] +; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR10]] ; IS__TUNIT_NPM-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[CND]], 0 ; IS__TUNIT_NPM-NEXT: br i1 [[TOBOOL_NOT]], label [[COND_FALSE:%.*]], label [[COND_TRUE:%.*]] ; IS__TUNIT_NPM: cond.true: @@ -878,16 +878,16 @@ ; IS__TUNIT_NPM-NEXT: br label [[COND_END]] ; IS__TUNIT_NPM: cond.end: ; IS__TUNIT_NPM-NEXT: [[I2:%.*]] = bitcast i32* [[L]] to i8* -; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I2]]) #[[ATTR11]] +; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I2]]) #[[ATTR10]] ; IS__TUNIT_NPM-NEXT: ret i32 5 ; -; IS__CGSCC_OPM: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@multi_obj_simplifiable_1 -; IS__CGSCC_OPM-SAME: (i32 [[CND:%.*]]) #[[ATTR3:[0-9]+]] { +; IS__CGSCC_OPM-SAME: (i32 [[CND:%.*]]) #[[ATTR4:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: entry: ; IS__CGSCC_OPM-NEXT: [[L:%.*]] = alloca i32, align 4 ; IS__CGSCC_OPM-NEXT: [[I:%.*]] = bitcast i32* [[L]] to i8* -; IS__CGSCC_OPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR13]] +; IS__CGSCC_OPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR12]] ; IS__CGSCC_OPM-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[CND]], 0 ; IS__CGSCC_OPM-NEXT: br i1 [[TOBOOL_NOT]], label [[COND_FALSE:%.*]], label [[COND_TRUE:%.*]] ; IS__CGSCC_OPM: cond.true: @@ -896,16 +896,16 @@ ; IS__CGSCC_OPM-NEXT: br label [[COND_END]] ; IS__CGSCC_OPM: cond.end: ; IS__CGSCC_OPM-NEXT: [[I2:%.*]] = bitcast i32* [[L]] to i8* -; IS__CGSCC_OPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I2]]) #[[ATTR13]] +; IS__CGSCC_OPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I2]]) #[[ATTR12]] ; IS__CGSCC_OPM-NEXT: ret i32 5 ; -; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@multi_obj_simplifiable_1 -; IS__CGSCC_NPM-SAME: (i32 [[CND:%.*]]) #[[ATTR3:[0-9]+]] { +; IS__CGSCC_NPM-SAME: (i32 [[CND:%.*]]) #[[ATTR4:[0-9]+]] { ; IS__CGSCC_NPM-NEXT: entry: ; IS__CGSCC_NPM-NEXT: [[L:%.*]] = alloca i32, align 4 ; IS__CGSCC_NPM-NEXT: [[I:%.*]] = bitcast i32* [[L]] to i8* -; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR11]] +; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR10]] ; IS__CGSCC_NPM-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[CND]], 0 ; IS__CGSCC_NPM-NEXT: br i1 [[TOBOOL_NOT]], label [[COND_FALSE:%.*]], label [[COND_TRUE:%.*]] ; IS__CGSCC_NPM: cond.true: @@ -914,7 +914,7 @@ ; IS__CGSCC_NPM-NEXT: br label [[COND_END]] ; IS__CGSCC_NPM: cond.end: ; IS__CGSCC_NPM-NEXT: [[I2:%.*]] = bitcast i32* [[L]] to i8* -; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I2]]) #[[ATTR11]] +; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I2]]) #[[ATTR10]] ; IS__CGSCC_NPM-NEXT: ret i32 5 ; entry: @@ -949,13 +949,13 @@ ; } ; define i32 @multi_obj_simplifiable_2(i32 %cnd) { -; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind willreturn +; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@multi_obj_simplifiable_2 -; IS__TUNIT_OPM-SAME: (i32 [[CND:%.*]]) #[[ATTR4]] { +; IS__TUNIT_OPM-SAME: (i32 [[CND:%.*]]) #[[ATTR5]] { ; IS__TUNIT_OPM-NEXT: entry: ; IS__TUNIT_OPM-NEXT: [[L:%.*]] = alloca i32, align 4 ; IS__TUNIT_OPM-NEXT: [[I:%.*]] = bitcast i32* [[L]] to i8* -; IS__TUNIT_OPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR14]] +; IS__TUNIT_OPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR12]] ; IS__TUNIT_OPM-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[CND]], 0 ; IS__TUNIT_OPM-NEXT: br i1 [[TOBOOL_NOT]], label [[COND_FALSE:%.*]], label [[COND_TRUE:%.*]] ; IS__TUNIT_OPM: cond.true: @@ -964,16 +964,16 @@ ; IS__TUNIT_OPM-NEXT: br label [[COND_END]] ; IS__TUNIT_OPM: cond.end: ; IS__TUNIT_OPM-NEXT: [[I1:%.*]] = bitcast i32* [[L]] to i8* -; IS__TUNIT_OPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR14]] +; IS__TUNIT_OPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR12]] ; IS__TUNIT_OPM-NEXT: ret i32 5 ; -; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn +; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@multi_obj_simplifiable_2 -; IS__TUNIT_NPM-SAME: (i32 [[CND:%.*]]) #[[ATTR2]] { +; IS__TUNIT_NPM-SAME: (i32 [[CND:%.*]]) #[[ATTR3]] { ; IS__TUNIT_NPM-NEXT: entry: ; IS__TUNIT_NPM-NEXT: [[L:%.*]] = alloca i32, align 4 ; IS__TUNIT_NPM-NEXT: [[I:%.*]] = bitcast i32* [[L]] to i8* -; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR11]] +; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR10]] ; IS__TUNIT_NPM-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[CND]], 0 ; IS__TUNIT_NPM-NEXT: br i1 [[TOBOOL_NOT]], label [[COND_FALSE:%.*]], label [[COND_TRUE:%.*]] ; IS__TUNIT_NPM: cond.true: @@ -982,16 +982,16 @@ ; IS__TUNIT_NPM-NEXT: br label [[COND_END]] ; IS__TUNIT_NPM: cond.end: ; IS__TUNIT_NPM-NEXT: [[I1:%.*]] = bitcast i32* [[L]] to i8* -; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR11]] +; IS__TUNIT_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR10]] ; IS__TUNIT_NPM-NEXT: ret i32 5 ; -; IS__CGSCC_OPM: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@multi_obj_simplifiable_2 -; IS__CGSCC_OPM-SAME: (i32 [[CND:%.*]]) #[[ATTR3]] { +; IS__CGSCC_OPM-SAME: (i32 [[CND:%.*]]) #[[ATTR4]] { ; IS__CGSCC_OPM-NEXT: entry: ; IS__CGSCC_OPM-NEXT: [[L:%.*]] = alloca i32, align 4 ; IS__CGSCC_OPM-NEXT: [[I:%.*]] = bitcast i32* [[L]] to i8* -; IS__CGSCC_OPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR13]] +; IS__CGSCC_OPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR12]] ; IS__CGSCC_OPM-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[CND]], 0 ; IS__CGSCC_OPM-NEXT: br i1 [[TOBOOL_NOT]], label [[COND_FALSE:%.*]], label [[COND_TRUE:%.*]] ; IS__CGSCC_OPM: cond.true: @@ -1000,16 +1000,16 @@ ; IS__CGSCC_OPM-NEXT: br label [[COND_END]] ; IS__CGSCC_OPM: cond.end: ; IS__CGSCC_OPM-NEXT: [[I1:%.*]] = bitcast i32* [[L]] to i8* -; IS__CGSCC_OPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR13]] +; IS__CGSCC_OPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR12]] ; IS__CGSCC_OPM-NEXT: ret i32 5 ; -; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@multi_obj_simplifiable_2 -; IS__CGSCC_NPM-SAME: (i32 [[CND:%.*]]) #[[ATTR3]] { +; IS__CGSCC_NPM-SAME: (i32 [[CND:%.*]]) #[[ATTR4]] { ; IS__CGSCC_NPM-NEXT: entry: ; IS__CGSCC_NPM-NEXT: [[L:%.*]] = alloca i32, align 4 ; IS__CGSCC_NPM-NEXT: [[I:%.*]] = bitcast i32* [[L]] to i8* -; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR11]] +; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR10]] ; IS__CGSCC_NPM-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[CND]], 0 ; IS__CGSCC_NPM-NEXT: br i1 [[TOBOOL_NOT]], label [[COND_FALSE:%.*]], label [[COND_TRUE:%.*]] ; IS__CGSCC_NPM: cond.true: @@ -1018,7 +1018,7 @@ ; IS__CGSCC_NPM-NEXT: br label [[COND_END]] ; IS__CGSCC_NPM: cond.end: ; IS__CGSCC_NPM-NEXT: [[I1:%.*]] = bitcast i32* [[L]] to i8* -; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR11]] +; IS__CGSCC_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR10]] ; IS__CGSCC_NPM-NEXT: ret i32 5 ; entry: @@ -1064,11 +1064,11 @@ define void @static_global_simplifiable_1(%struct.S* noalias sret(%struct.S) align 4 %agg.result) { ; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@static_global_simplifiable_1 -; IS__TUNIT_OPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]]) #[[ATTR5:[0-9]+]] { +; IS__TUNIT_OPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]]) #[[ATTR5]] { ; IS__TUNIT_OPM-NEXT: entry: -; IS__TUNIT_OPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(24) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i32 0, i32 0), i32 noundef 1) #[[ATTR15]] -; IS__TUNIT_OPM-NEXT: call void @write_arg(i32* nocapture nofree writeonly align 4 dereferenceable_or_null(20) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 1), i32 noundef 2) #[[ATTR15]] -; IS__TUNIT_OPM-NEXT: call void @write_arg(i32* nocapture nofree writeonly align 4 dereferenceable_or_null(16) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 2), i32 noundef 3) #[[ATTR15]] +; IS__TUNIT_OPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(24) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i32 0, i32 0), i32 noundef 1) #[[ATTR13]] +; IS__TUNIT_OPM-NEXT: call void @write_arg(i32* nocapture nofree writeonly align 4 dereferenceable_or_null(20) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 1), i32 noundef 2) #[[ATTR13]] +; IS__TUNIT_OPM-NEXT: call void @write_arg(i32* nocapture nofree writeonly align 4 dereferenceable_or_null(16) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 2), i32 noundef 3) #[[ATTR13]] ; IS__TUNIT_OPM-NEXT: [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3 ; IS__TUNIT_OPM-NEXT: store float 0x3FF19999A0000000, float* [[F1]], align 4, !tbaa [[TBAA7]] ; IS__TUNIT_OPM-NEXT: [[MUL:%.*]] = fmul float 0x40019999A0000000, 2.000000e+00 @@ -1093,11 +1093,11 @@ ; ; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@static_global_simplifiable_1 -; IS__TUNIT_NPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]]) #[[ATTR4:[0-9]+]] { +; IS__TUNIT_NPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]]) #[[ATTR3]] { ; IS__TUNIT_NPM-NEXT: entry: -; IS__TUNIT_NPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(24) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i32 0, i32 0), i32 noundef 1) #[[ATTR12]] -; IS__TUNIT_NPM-NEXT: call void @write_arg(i32* nocapture nofree writeonly align 4 dereferenceable_or_null(20) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 1), i32 noundef 2) #[[ATTR12]] -; IS__TUNIT_NPM-NEXT: call void @write_arg(i32* nocapture nofree writeonly align 4 dereferenceable_or_null(16) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 2), i32 noundef 3) #[[ATTR12]] +; IS__TUNIT_NPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(24) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i32 0, i32 0), i32 noundef 1) #[[ATTR11]] +; IS__TUNIT_NPM-NEXT: call void @write_arg(i32* nocapture nofree writeonly align 4 dereferenceable_or_null(20) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 1), i32 noundef 2) #[[ATTR11]] +; IS__TUNIT_NPM-NEXT: call void @write_arg(i32* nocapture nofree writeonly align 4 dereferenceable_or_null(16) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 2), i32 noundef 3) #[[ATTR11]] ; IS__TUNIT_NPM-NEXT: [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3 ; IS__TUNIT_NPM-NEXT: store float 0x3FF19999A0000000, float* [[F1]], align 4, !tbaa [[TBAA7]] ; IS__TUNIT_NPM-NEXT: [[MUL:%.*]] = fmul float 0x40019999A0000000, 2.000000e+00 @@ -1122,11 +1122,11 @@ ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@static_global_simplifiable_1 -; IS__CGSCC_OPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]]) #[[ATTR4:[0-9]+]] { +; IS__CGSCC_OPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]]) #[[ATTR4]] { ; IS__CGSCC_OPM-NEXT: entry: -; IS__CGSCC_OPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(24) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i32 0, i32 0), i32 noundef 1) #[[ATTR14]] -; IS__CGSCC_OPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(20) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 1), i32 noundef 2) #[[ATTR14]] -; IS__CGSCC_OPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(16) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 2), i32 noundef 3) #[[ATTR14]] +; IS__CGSCC_OPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(24) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i32 0, i32 0), i32 noundef 1) #[[ATTR13]] +; IS__CGSCC_OPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(20) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 1), i32 noundef 2) #[[ATTR13]] +; IS__CGSCC_OPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(16) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 2), i32 noundef 3) #[[ATTR13]] ; IS__CGSCC_OPM-NEXT: [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3 ; IS__CGSCC_OPM-NEXT: store float 0x3FF19999A0000000, float* [[F1]], align 4, !tbaa [[TBAA7]] ; IS__CGSCC_OPM-NEXT: [[MUL:%.*]] = fmul float 0x40019999A0000000, 2.000000e+00 @@ -1151,11 +1151,11 @@ ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@static_global_simplifiable_1 -; IS__CGSCC_NPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]]) #[[ATTR4:[0-9]+]] { +; IS__CGSCC_NPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]]) #[[ATTR4]] { ; IS__CGSCC_NPM-NEXT: entry: -; IS__CGSCC_NPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(24) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i32 0, i32 0), i32 noundef 1) #[[ATTR12]] -; IS__CGSCC_NPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(20) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 1), i32 noundef 2) #[[ATTR12]] -; IS__CGSCC_NPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(16) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 2), i32 noundef 3) #[[ATTR12]] +; IS__CGSCC_NPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(24) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i32 0, i32 0), i32 noundef 1) #[[ATTR11]] +; IS__CGSCC_NPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(20) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 1), i32 noundef 2) #[[ATTR11]] +; IS__CGSCC_NPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(16) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 2), i32 noundef 3) #[[ATTR11]] ; IS__CGSCC_NPM-NEXT: [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3 ; IS__CGSCC_NPM-NEXT: store float 0x3FF19999A0000000, float* [[F1]], align 4, !tbaa [[TBAA7]] ; IS__CGSCC_NPM-NEXT: [[MUL:%.*]] = fmul float 0x40019999A0000000, 2.000000e+00 @@ -1279,7 +1279,7 @@ ; IS__TUNIT_OPM-NEXT: [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1 ; IS__TUNIT_OPM-NEXT: br label [[FOR_COND13]], !llvm.loop [[LOOP23:![0-9]+]] ; IS__TUNIT_OPM: for.end23: -; IS__TUNIT_OPM-NEXT: call void @write_arg(i32* nocapture nofree writeonly align 4 dereferenceable_or_null(524) bitcast (i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 500) to i32*), i32 noundef 0) #[[ATTR16]] +; IS__TUNIT_OPM-NEXT: call void @write_arg(i32* nocapture nofree writeonly align 4 dereferenceable_or_null(524) bitcast (i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 500) to i32*), i32 noundef 0) #[[ATTR14]] ; IS__TUNIT_OPM-NEXT: br label [[FOR_COND25:%.*]] ; IS__TUNIT_OPM: for.cond25: ; IS__TUNIT_OPM-NEXT: [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC33:%.*]] ], [ 0, [[FOR_END23]] ] @@ -1348,7 +1348,7 @@ ; IS__TUNIT_NPM-NEXT: [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1 ; IS__TUNIT_NPM-NEXT: br label [[FOR_COND13]], !llvm.loop [[LOOP23:![0-9]+]] ; IS__TUNIT_NPM: for.end23: -; IS__TUNIT_NPM-NEXT: call void @write_arg(i32* nocapture nofree writeonly align 4 dereferenceable_or_null(524) bitcast (i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 500) to i32*), i32 noundef 0) #[[ATTR12]] +; IS__TUNIT_NPM-NEXT: call void @write_arg(i32* nocapture nofree writeonly align 4 dereferenceable_or_null(524) bitcast (i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 500) to i32*), i32 noundef 0) #[[ATTR11]] ; IS__TUNIT_NPM-NEXT: br label [[FOR_COND25:%.*]] ; IS__TUNIT_NPM: for.cond25: ; IS__TUNIT_NPM-NEXT: [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC33:%.*]] ], [ 0, [[FOR_END23]] ] @@ -1419,7 +1419,7 @@ ; IS__CGSCC_OPM-NEXT: br label [[FOR_COND13]], !llvm.loop [[LOOP26:![0-9]+]] ; IS__CGSCC_OPM: for.end23: ; IS__CGSCC_OPM-NEXT: store i8 0, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 1023), align 1, !tbaa [[TBAA15]] -; IS__CGSCC_OPM-NEXT: call void @write_arg(i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) bitcast (i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 500) to i32*), i32 noundef 0) #[[ATTR15]] +; IS__CGSCC_OPM-NEXT: call void @write_arg(i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) bitcast (i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 500) to i32*), i32 noundef 0) #[[ATTR14]] ; IS__CGSCC_OPM-NEXT: br label [[FOR_COND25:%.*]] ; IS__CGSCC_OPM: for.cond25: ; IS__CGSCC_OPM-NEXT: [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC33:%.*]] ], [ 0, [[FOR_END23]] ] @@ -1492,7 +1492,7 @@ ; IS__CGSCC_NPM-NEXT: br label [[FOR_COND13]], !llvm.loop [[LOOP26:![0-9]+]] ; IS__CGSCC_NPM: for.end23: ; IS__CGSCC_NPM-NEXT: store i8 0, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 1023), align 1, !tbaa [[TBAA15]] -; IS__CGSCC_NPM-NEXT: call void @write_arg(i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) bitcast (i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 500) to i32*), i32 noundef 0) #[[ATTR13]] +; IS__CGSCC_NPM-NEXT: call void @write_arg(i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) bitcast (i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 500) to i32*), i32 noundef 0) #[[ATTR12]] ; IS__CGSCC_NPM-NEXT: br label [[FOR_COND25:%.*]] ; IS__CGSCC_NPM: for.cond25: ; IS__CGSCC_NPM-NEXT: [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC33:%.*]] ], [ 0, [[FOR_END23]] ] @@ -1618,12 +1618,19 @@ ; IS__TUNIT_OPM-NEXT: [[I:%.*]] = load i32, i32* @Flag3, align 4, !tbaa [[TBAA3]] ; IS__TUNIT_OPM-NEXT: ret i32 [[I]] ; -; NOT_TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn -; NOT_TUNIT_OPM-LABEL: define {{[^@]+}}@static_global_simplifiable_3 -; NOT_TUNIT_OPM-SAME: () #[[ATTR4:[0-9]+]] { -; NOT_TUNIT_OPM-NEXT: store i32 1, i32* @Flag3, align 4, !tbaa [[TBAA3]] -; NOT_TUNIT_OPM-NEXT: [[I:%.*]] = load i32, i32* @Flag3, align 4, !tbaa [[TBAA3]] -; NOT_TUNIT_OPM-NEXT: ret i32 [[I]] +; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn +; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@static_global_simplifiable_3 +; IS__TUNIT_NPM-SAME: () #[[ATTR3]] { +; IS__TUNIT_NPM-NEXT: store i32 1, i32* @Flag3, align 4, !tbaa [[TBAA3]] +; IS__TUNIT_NPM-NEXT: [[I:%.*]] = load i32, i32* @Flag3, align 4, !tbaa [[TBAA3]] +; IS__TUNIT_NPM-NEXT: ret i32 [[I]] +; +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn +; IS__CGSCC____-LABEL: define {{[^@]+}}@static_global_simplifiable_3 +; IS__CGSCC____-SAME: () #[[ATTR4:[0-9]+]] { +; IS__CGSCC____-NEXT: store i32 1, i32* @Flag3, align 4, !tbaa [[TBAA3]] +; IS__CGSCC____-NEXT: [[I:%.*]] = load i32, i32* @Flag3, align 4, !tbaa [[TBAA3]] +; IS__CGSCC____-NEXT: ret i32 [[I]] ; store i32 1, i32* @Flag3, align 4, !tbaa !3 %i = load i32, i32* @Flag3, align 4, !tbaa !3 @@ -1650,7 +1657,7 @@ define void @noalias_arg_simplifiable_1(%struct.S* noalias sret(%struct.S) align 4 %agg.result, %struct.S* byval(%struct.S) align 8 %s) { ; IS__TUNIT_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@noalias_arg_simplifiable_1 -; IS__TUNIT_OPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]], %struct.S* noalias nocapture nofree nonnull byval([[STRUCT_S]]) align 8 dereferenceable(24) [[S:%.*]]) #[[ATTR7:[0-9]+]] { +; IS__TUNIT_OPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]], %struct.S* noalias nocapture nofree nonnull byval([[STRUCT_S]]) align 8 dereferenceable(24) [[S:%.*]]) #[[ATTR1]] { ; IS__TUNIT_OPM-NEXT: entry: ; IS__TUNIT_OPM-NEXT: [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3 ; IS__TUNIT_OPM-NEXT: store float 0x3FF19999A0000000, float* [[F1]], align 4, !tbaa [[TBAA7]] @@ -1659,11 +1666,11 @@ ; IS__TUNIT_OPM-NEXT: [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5 ; IS__TUNIT_OPM-NEXT: store float 0x400A666660000000, float* [[F3]], align 4, !tbaa [[TBAA11]] ; IS__TUNIT_OPM-NEXT: [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0 -; IS__TUNIT_OPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 8 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR15]] +; IS__TUNIT_OPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 8 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR13]] ; IS__TUNIT_OPM-NEXT: [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1 -; IS__TUNIT_OPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR15]] +; IS__TUNIT_OPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR13]] ; IS__TUNIT_OPM-NEXT: [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2 -; IS__TUNIT_OPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 8 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR15]] +; IS__TUNIT_OPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 8 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR13]] ; IS__TUNIT_OPM-NEXT: [[F11:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3 ; IS__TUNIT_OPM-NEXT: [[I:%.*]] = load float, float* [[F11]], align 4, !tbaa [[TBAA7]] ; IS__TUNIT_OPM-NEXT: [[F12:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3 @@ -1700,7 +1707,7 @@ ; ; IS__TUNIT_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@noalias_arg_simplifiable_1 -; IS__TUNIT_NPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]], %struct.S* noalias nocapture nofree nonnull byval([[STRUCT_S]]) align 8 dereferenceable(24) [[S:%.*]]) #[[ATTR6:[0-9]+]] { +; IS__TUNIT_NPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]], %struct.S* noalias nocapture nofree nonnull byval([[STRUCT_S]]) align 8 dereferenceable(24) [[S:%.*]]) #[[ATTR1]] { ; IS__TUNIT_NPM-NEXT: entry: ; IS__TUNIT_NPM-NEXT: [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3 ; IS__TUNIT_NPM-NEXT: store float 0x3FF19999A0000000, float* [[F1]], align 4, !tbaa [[TBAA7]] @@ -1709,11 +1716,11 @@ ; IS__TUNIT_NPM-NEXT: [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5 ; IS__TUNIT_NPM-NEXT: store float 0x400A666660000000, float* [[F3]], align 4, !tbaa [[TBAA11]] ; IS__TUNIT_NPM-NEXT: [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0 -; IS__TUNIT_NPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 8 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR12]] +; IS__TUNIT_NPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 8 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR11]] ; IS__TUNIT_NPM-NEXT: [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1 -; IS__TUNIT_NPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR12]] +; IS__TUNIT_NPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR11]] ; IS__TUNIT_NPM-NEXT: [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2 -; IS__TUNIT_NPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 8 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR12]] +; IS__TUNIT_NPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 8 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR11]] ; IS__TUNIT_NPM-NEXT: [[F11:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3 ; IS__TUNIT_NPM-NEXT: [[I:%.*]] = load float, float* [[F11]], align 4, !tbaa [[TBAA7]] ; IS__TUNIT_NPM-NEXT: [[F12:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3 @@ -1750,7 +1757,7 @@ ; ; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@noalias_arg_simplifiable_1 -; IS__CGSCC_OPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]], %struct.S* noalias nocapture nofree nonnull byval([[STRUCT_S]]) align 8 dereferenceable(24) [[S:%.*]]) #[[ATTR5:[0-9]+]] { +; IS__CGSCC_OPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]], %struct.S* noalias nocapture nofree nonnull byval([[STRUCT_S]]) align 8 dereferenceable(24) [[S:%.*]]) #[[ATTR1]] { ; IS__CGSCC_OPM-NEXT: entry: ; IS__CGSCC_OPM-NEXT: [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3 ; IS__CGSCC_OPM-NEXT: store float 0x3FF19999A0000000, float* [[F1]], align 4, !tbaa [[TBAA7]] @@ -1759,11 +1766,11 @@ ; IS__CGSCC_OPM-NEXT: [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5 ; IS__CGSCC_OPM-NEXT: store float 0x400A666660000000, float* [[F3]], align 4, !tbaa [[TBAA11]] ; IS__CGSCC_OPM-NEXT: [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0 -; IS__CGSCC_OPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 8 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR14]] +; IS__CGSCC_OPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 8 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR13]] ; IS__CGSCC_OPM-NEXT: [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1 -; IS__CGSCC_OPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR14]] +; IS__CGSCC_OPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR13]] ; IS__CGSCC_OPM-NEXT: [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2 -; IS__CGSCC_OPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 8 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR14]] +; IS__CGSCC_OPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 8 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR13]] ; IS__CGSCC_OPM-NEXT: [[F11:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3 ; IS__CGSCC_OPM-NEXT: [[I:%.*]] = load float, float* [[F11]], align 4, !tbaa [[TBAA7]] ; IS__CGSCC_OPM-NEXT: [[F12:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3 @@ -1800,7 +1807,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@noalias_arg_simplifiable_1 -; IS__CGSCC_NPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]], %struct.S* noalias nocapture nofree nonnull byval([[STRUCT_S]]) align 8 dereferenceable(24) [[S:%.*]]) #[[ATTR5:[0-9]+]] { +; IS__CGSCC_NPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]], %struct.S* noalias nocapture nofree nonnull byval([[STRUCT_S]]) align 8 dereferenceable(24) [[S:%.*]]) #[[ATTR1]] { ; IS__CGSCC_NPM-NEXT: entry: ; IS__CGSCC_NPM-NEXT: [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3 ; IS__CGSCC_NPM-NEXT: store float 0x3FF19999A0000000, float* [[F1]], align 4, !tbaa [[TBAA7]] @@ -1809,11 +1816,11 @@ ; IS__CGSCC_NPM-NEXT: [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5 ; IS__CGSCC_NPM-NEXT: store float 0x400A666660000000, float* [[F3]], align 4, !tbaa [[TBAA11]] ; IS__CGSCC_NPM-NEXT: [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0 -; IS__CGSCC_NPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 8 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR12]] +; IS__CGSCC_NPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 8 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR11]] ; IS__CGSCC_NPM-NEXT: [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1 -; IS__CGSCC_NPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR12]] +; IS__CGSCC_NPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR11]] ; IS__CGSCC_NPM-NEXT: [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2 -; IS__CGSCC_NPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 8 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR12]] +; IS__CGSCC_NPM-NEXT: call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 8 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR11]] ; IS__CGSCC_NPM-NEXT: [[F11:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3 ; IS__CGSCC_NPM-NEXT: [[I:%.*]] = load float, float* [[F11]], align 4, !tbaa [[TBAA7]] ; IS__CGSCC_NPM-NEXT: [[F12:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3 @@ -1913,7 +1920,7 @@ define void @noalias_arg_simplifiable_2(i8* %Bytes) { ; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@noalias_arg_simplifiable_2 -; IS__TUNIT_OPM-SAME: (i8* nocapture nofree [[BYTES:%.*]]) #[[ATTR8:[0-9]+]] { +; IS__TUNIT_OPM-SAME: (i8* nocapture nofree [[BYTES:%.*]]) #[[ATTR3]] { ; IS__TUNIT_OPM-NEXT: entry: ; IS__TUNIT_OPM-NEXT: br label [[FOR_COND:%.*]] ; IS__TUNIT_OPM: for.cond: @@ -1971,7 +1978,7 @@ ; IS__TUNIT_OPM-NEXT: store i8 0, i8* [[ARRAYIDX24]], align 1, !tbaa [[TBAA19]] ; IS__TUNIT_OPM-NEXT: [[ARRAYIDX25:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 500 ; IS__TUNIT_OPM-NEXT: [[I21:%.*]] = bitcast i8* [[ARRAYIDX25]] to i32* -; IS__TUNIT_OPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 [[I21]], i32 noundef 0) #[[ATTR16]] +; IS__TUNIT_OPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 [[I21]], i32 noundef 0) #[[ATTR14]] ; IS__TUNIT_OPM-NEXT: br label [[FOR_COND27:%.*]] ; IS__TUNIT_OPM: for.cond27: ; IS__TUNIT_OPM-NEXT: [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC35:%.*]] ], [ 0, [[FOR_END23]] ] @@ -1993,7 +2000,7 @@ ; ; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@noalias_arg_simplifiable_2 -; IS__TUNIT_NPM-SAME: (i8* nocapture nofree [[BYTES:%.*]]) #[[ATTR4]] { +; IS__TUNIT_NPM-SAME: (i8* nocapture nofree [[BYTES:%.*]]) #[[ATTR3]] { ; IS__TUNIT_NPM-NEXT: entry: ; IS__TUNIT_NPM-NEXT: br label [[FOR_COND:%.*]] ; IS__TUNIT_NPM: for.cond: @@ -2051,7 +2058,7 @@ ; IS__TUNIT_NPM-NEXT: store i8 0, i8* [[ARRAYIDX24]], align 1, !tbaa [[TBAA19]] ; IS__TUNIT_NPM-NEXT: [[ARRAYIDX25:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 500 ; IS__TUNIT_NPM-NEXT: [[I21:%.*]] = bitcast i8* [[ARRAYIDX25]] to i32* -; IS__TUNIT_NPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 [[I21]], i32 noundef 0) #[[ATTR12]] +; IS__TUNIT_NPM-NEXT: call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 [[I21]], i32 noundef 0) #[[ATTR11]] ; IS__TUNIT_NPM-NEXT: br label [[FOR_COND27:%.*]] ; IS__TUNIT_NPM: for.cond27: ; IS__TUNIT_NPM-NEXT: [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC35:%.*]] ], [ 0, [[FOR_END23]] ] @@ -2130,7 +2137,7 @@ ; IS__CGSCC_OPM-NEXT: store i8 0, i8* [[ARRAYIDX24]], align 1, !tbaa [[TBAA15]] ; IS__CGSCC_OPM-NEXT: [[ARRAYIDX25:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 500 ; IS__CGSCC_OPM-NEXT: [[I21:%.*]] = bitcast i8* [[ARRAYIDX25]] to i32* -; IS__CGSCC_OPM-NEXT: call void @write_arg(i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) [[I21]], i32 noundef 0) #[[ATTR15]] +; IS__CGSCC_OPM-NEXT: call void @write_arg(i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) [[I21]], i32 noundef 0) #[[ATTR14]] ; IS__CGSCC_OPM-NEXT: br label [[FOR_COND27:%.*]] ; IS__CGSCC_OPM: for.cond27: ; IS__CGSCC_OPM-NEXT: [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC35:%.*]] ], [ 0, [[FOR_END23]] ] @@ -2209,7 +2216,7 @@ ; IS__CGSCC_NPM-NEXT: store i8 0, i8* [[ARRAYIDX24]], align 1, !tbaa [[TBAA15]] ; IS__CGSCC_NPM-NEXT: [[ARRAYIDX25:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 500 ; IS__CGSCC_NPM-NEXT: [[I21:%.*]] = bitcast i8* [[ARRAYIDX25]] to i32* -; IS__CGSCC_NPM-NEXT: call void @write_arg(i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) [[I21]], i32 noundef 0) #[[ATTR13]] +; IS__CGSCC_NPM-NEXT: call void @write_arg(i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) [[I21]], i32 noundef 0) #[[ATTR12]] ; IS__CGSCC_NPM-NEXT: br label [[FOR_COND27:%.*]] ; IS__CGSCC_NPM: for.cond27: ; IS__CGSCC_NPM-NEXT: [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC35:%.*]] ], [ 0, [[FOR_END23]] ] @@ -2337,39 +2344,39 @@ ; } ; define i32 @local_alloca_not_simplifiable_1() { -; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@local_alloca_not_simplifiable_1() { -; IS__TUNIT_OPM-NEXT: entry: -; IS__TUNIT_OPM-NEXT: [[X:%.*]] = alloca i32, align 4 -; IS__TUNIT_OPM-NEXT: [[Y:%.*]] = alloca i32, align 4 -; IS__TUNIT_OPM-NEXT: [[I:%.*]] = bitcast i32* [[X]] to i8* -; IS__TUNIT_OPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR14]] -; IS__TUNIT_OPM-NEXT: [[I1:%.*]] = bitcast i32* [[Y]] to i8* -; IS__TUNIT_OPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR14]] -; IS__TUNIT_OPM-NEXT: store i32 1, i32* [[Y]], align 4, !tbaa [[TBAA3]] -; IS__TUNIT_OPM-NEXT: store i32 1, i32* [[X]], align 4, !tbaa [[TBAA3]] -; IS__TUNIT_OPM-NEXT: [[I2:%.*]] = bitcast i32* [[X]] to i8* -; IS__TUNIT_OPM-NEXT: call void @escape(i8* noundef nonnull align 4 dereferenceable(4) [[I2]]) -; IS__TUNIT_OPM-NEXT: call void @write_random(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[Y]]) -; IS__TUNIT_OPM-NEXT: [[I3:%.*]] = load i32, i32* [[X]], align 4, !tbaa [[TBAA3]] -; IS__TUNIT_OPM-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[I3]], 0 -; IS__TUNIT_OPM-NEXT: [[COND:%.*]] = select i1 [[TOBOOL_NOT]], i32 2, i32 1 -; IS__TUNIT_OPM-NEXT: [[I4:%.*]] = load i32, i32* [[Y]], align 4, !tbaa [[TBAA3]] -; IS__TUNIT_OPM-NEXT: [[ADD:%.*]] = add nsw i32 [[I3]], [[I4]] -; IS__TUNIT_OPM-NEXT: [[ADD1:%.*]] = add nsw i32 [[ADD]], [[COND]] -; IS__TUNIT_OPM-NEXT: [[I5:%.*]] = bitcast i32* [[Y]] to i8* -; IS__TUNIT_OPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I5]]) -; IS__TUNIT_OPM-NEXT: [[I6:%.*]] = bitcast i32* [[X]] to i8* -; IS__TUNIT_OPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I6]]) -; IS__TUNIT_OPM-NEXT: ret i32 [[ADD1]] +; IS________OPM-LABEL: define {{[^@]+}}@local_alloca_not_simplifiable_1() { +; IS________OPM-NEXT: entry: +; IS________OPM-NEXT: [[X:%.*]] = alloca i32, align 4 +; IS________OPM-NEXT: [[Y:%.*]] = alloca i32, align 4 +; IS________OPM-NEXT: [[I:%.*]] = bitcast i32* [[X]] to i8* +; IS________OPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR12:[0-9]+]] +; IS________OPM-NEXT: [[I1:%.*]] = bitcast i32* [[Y]] to i8* +; IS________OPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR12]] +; IS________OPM-NEXT: store i32 1, i32* [[Y]], align 4, !tbaa [[TBAA3]] +; IS________OPM-NEXT: store i32 1, i32* [[X]], align 4, !tbaa [[TBAA3]] +; IS________OPM-NEXT: [[I2:%.*]] = bitcast i32* [[X]] to i8* +; IS________OPM-NEXT: call void @escape(i8* noundef nonnull align 4 dereferenceable(4) [[I2]]) +; IS________OPM-NEXT: call void @write_random(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[Y]]) +; IS________OPM-NEXT: [[I3:%.*]] = load i32, i32* [[X]], align 4, !tbaa [[TBAA3]] +; IS________OPM-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[I3]], 0 +; IS________OPM-NEXT: [[COND:%.*]] = select i1 [[TOBOOL_NOT]], i32 2, i32 1 +; IS________OPM-NEXT: [[I4:%.*]] = load i32, i32* [[Y]], align 4, !tbaa [[TBAA3]] +; IS________OPM-NEXT: [[ADD:%.*]] = add nsw i32 [[I3]], [[I4]] +; IS________OPM-NEXT: [[ADD1:%.*]] = add nsw i32 [[ADD]], [[COND]] +; IS________OPM-NEXT: [[I5:%.*]] = bitcast i32* [[Y]] to i8* +; IS________OPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I5]]) +; IS________OPM-NEXT: [[I6:%.*]] = bitcast i32* [[X]] to i8* +; IS________OPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I6]]) +; IS________OPM-NEXT: ret i32 [[ADD1]] ; ; IS________NPM-LABEL: define {{[^@]+}}@local_alloca_not_simplifiable_1() { ; IS________NPM-NEXT: entry: ; IS________NPM-NEXT: [[X:%.*]] = alloca i32, align 4 ; IS________NPM-NEXT: [[Y:%.*]] = alloca i32, align 4 ; IS________NPM-NEXT: [[I:%.*]] = bitcast i32* [[X]] to i8* -; IS________NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR11:[0-9]+]] +; IS________NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR10:[0-9]+]] ; IS________NPM-NEXT: [[I1:%.*]] = bitcast i32* [[Y]] to i8* -; IS________NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR11]] +; IS________NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR10]] ; IS________NPM-NEXT: store i32 1, i32* [[Y]], align 4, !tbaa [[TBAA3]] ; IS________NPM-NEXT: store i32 1, i32* [[X]], align 4, !tbaa [[TBAA3]] ; IS________NPM-NEXT: [[I2:%.*]] = bitcast i32* [[X]] to i8* @@ -2387,31 +2394,6 @@ ; IS________NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I6]]) ; IS________NPM-NEXT: ret i32 [[ADD1]] ; -; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@local_alloca_not_simplifiable_1() { -; IS__CGSCC_OPM-NEXT: entry: -; IS__CGSCC_OPM-NEXT: [[X:%.*]] = alloca i32, align 4 -; IS__CGSCC_OPM-NEXT: [[Y:%.*]] = alloca i32, align 4 -; IS__CGSCC_OPM-NEXT: [[I:%.*]] = bitcast i32* [[X]] to i8* -; IS__CGSCC_OPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR13]] -; IS__CGSCC_OPM-NEXT: [[I1:%.*]] = bitcast i32* [[Y]] to i8* -; IS__CGSCC_OPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR13]] -; IS__CGSCC_OPM-NEXT: store i32 1, i32* [[Y]], align 4, !tbaa [[TBAA3]] -; IS__CGSCC_OPM-NEXT: store i32 1, i32* [[X]], align 4, !tbaa [[TBAA3]] -; IS__CGSCC_OPM-NEXT: [[I2:%.*]] = bitcast i32* [[X]] to i8* -; IS__CGSCC_OPM-NEXT: call void @escape(i8* noundef nonnull align 4 dereferenceable(4) [[I2]]) -; IS__CGSCC_OPM-NEXT: call void @write_random(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[Y]]) -; IS__CGSCC_OPM-NEXT: [[I3:%.*]] = load i32, i32* [[X]], align 4, !tbaa [[TBAA3]] -; IS__CGSCC_OPM-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[I3]], 0 -; IS__CGSCC_OPM-NEXT: [[COND:%.*]] = select i1 [[TOBOOL_NOT]], i32 2, i32 1 -; IS__CGSCC_OPM-NEXT: [[I4:%.*]] = load i32, i32* [[Y]], align 4, !tbaa [[TBAA3]] -; IS__CGSCC_OPM-NEXT: [[ADD:%.*]] = add nsw i32 [[I3]], [[I4]] -; IS__CGSCC_OPM-NEXT: [[ADD1:%.*]] = add nsw i32 [[ADD]], [[COND]] -; IS__CGSCC_OPM-NEXT: [[I5:%.*]] = bitcast i32* [[Y]] to i8* -; IS__CGSCC_OPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I5]]) -; IS__CGSCC_OPM-NEXT: [[I6:%.*]] = bitcast i32* [[X]] to i8* -; IS__CGSCC_OPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I6]]) -; IS__CGSCC_OPM-NEXT: ret i32 [[ADD1]] -; entry: %X = alloca i32, align 4 %Y = alloca i32, align 4 @@ -2441,7 +2423,7 @@ define i32 @unknown_access_mixed_simplifiable(i32 %arg1, i32 %arg2) { ; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@unknown_access_mixed_simplifiable -; IS__TUNIT____-SAME: (i32 [[ARG1:%.*]], i32 [[ARG2:%.*]]) #[[ATTR3]] { +; IS__TUNIT____-SAME: (i32 [[ARG1:%.*]], i32 [[ARG2:%.*]]) #[[ATTR4]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: [[S:%.*]] = alloca [[STRUCT_S:%.*]], align 4 ; IS__TUNIT____-NEXT: [[BC:%.*]] = bitcast %struct.S* [[S]] to i32* @@ -2460,7 +2442,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@unknown_access_mixed_simplifiable -; IS__CGSCC____-SAME: (i32 [[ARG1:%.*]], i32 [[ARG2:%.*]]) #[[ATTR2]] { +; IS__CGSCC____-SAME: (i32 [[ARG1:%.*]], i32 [[ARG2:%.*]]) #[[ATTR3]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: [[S:%.*]] = alloca [[STRUCT_S:%.*]], align 4 ; IS__CGSCC____-NEXT: [[BC:%.*]] = bitcast %struct.S* [[S]] to i32* @@ -2498,7 +2480,7 @@ define i32 @unknown_access_mixed_not_simplifiable(i32 %arg1, i32 %arg2, i32 %arg3) { ; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@unknown_access_mixed_not_simplifiable -; IS__TUNIT____-SAME: (i32 [[ARG1:%.*]], i32 [[ARG2:%.*]], i32 [[ARG3:%.*]]) #[[ATTR3]] { +; IS__TUNIT____-SAME: (i32 [[ARG1:%.*]], i32 [[ARG2:%.*]], i32 [[ARG3:%.*]]) #[[ATTR4]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: [[S:%.*]] = alloca [[STRUCT_S:%.*]], align 4 ; IS__TUNIT____-NEXT: [[BC:%.*]] = bitcast %struct.S* [[S]] to i32* @@ -2523,7 +2505,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@unknown_access_mixed_not_simplifiable -; IS__CGSCC____-SAME: (i32 [[ARG1:%.*]], i32 [[ARG2:%.*]], i32 [[ARG3:%.*]]) #[[ATTR2]] { +; IS__CGSCC____-SAME: (i32 [[ARG1:%.*]], i32 [[ARG2:%.*]], i32 [[ARG3:%.*]]) #[[ATTR3]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: [[S:%.*]] = alloca [[STRUCT_S:%.*]], align 4 ; IS__CGSCC____-NEXT: [[BC:%.*]] = bitcast %struct.S* [[S]] to i32* @@ -2579,21 +2561,21 @@ define i32 @global_not_simplifiable_1(i32 %cnd) { ; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind readonly willreturn ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@global_not_simplifiable_1 -; IS__TUNIT_OPM-SAME: (i32 [[CND:%.*]]) #[[ATTR9:[0-9]+]] { +; IS__TUNIT_OPM-SAME: (i32 [[CND:%.*]]) #[[ATTR7:[0-9]+]] { ; IS__TUNIT_OPM-NEXT: entry: ; IS__TUNIT_OPM-NEXT: [[I:%.*]] = load i32, i32* @Flag0, align 4, !tbaa [[TBAA3]] ; IS__TUNIT_OPM-NEXT: ret i32 [[I]] ; ; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readonly willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@global_not_simplifiable_1 -; IS__TUNIT_NPM-SAME: (i32 [[CND:%.*]]) #[[ATTR7:[0-9]+]] { +; IS__TUNIT_NPM-SAME: (i32 [[CND:%.*]]) #[[ATTR6:[0-9]+]] { ; IS__TUNIT_NPM-NEXT: entry: ; IS__TUNIT_NPM-NEXT: [[I:%.*]] = load i32, i32* @Flag0, align 4, !tbaa [[TBAA3]] ; IS__TUNIT_NPM-NEXT: ret i32 [[I]] ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@global_not_simplifiable_1 -; IS__CGSCC____-SAME: (i32 [[CND:%.*]]) #[[ATTR6:[0-9]+]] { +; IS__CGSCC____-SAME: (i32 [[CND:%.*]]) #[[ATTR5:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: [[I:%.*]] = load i32, i32* @Flag0, align 4, !tbaa [[TBAA3]] ; IS__CGSCC____-NEXT: ret i32 [[I]] @@ -2687,12 +2669,19 @@ ; IS__TUNIT_OPM-NEXT: [[L:%.*]] = load i32, i32* @Gint1, align 4 ; IS__TUNIT_OPM-NEXT: ret i32 [[L]] ; -; NOT_TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn -; NOT_TUNIT_OPM-LABEL: define {{[^@]+}}@write_read_global -; NOT_TUNIT_OPM-SAME: () #[[ATTR4]] { -; NOT_TUNIT_OPM-NEXT: store i32 7, i32* @Gint1, align 4 -; NOT_TUNIT_OPM-NEXT: [[L:%.*]] = load i32, i32* @Gint1, align 4 -; NOT_TUNIT_OPM-NEXT: ret i32 [[L]] +; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn +; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@write_read_global +; IS__TUNIT_NPM-SAME: () #[[ATTR3]] { +; IS__TUNIT_NPM-NEXT: store i32 7, i32* @Gint1, align 4 +; IS__TUNIT_NPM-NEXT: [[L:%.*]] = load i32, i32* @Gint1, align 4 +; IS__TUNIT_NPM-NEXT: ret i32 [[L]] +; +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn +; IS__CGSCC____-LABEL: define {{[^@]+}}@write_read_global +; IS__CGSCC____-SAME: () #[[ATTR4]] { +; IS__CGSCC____-NEXT: store i32 7, i32* @Gint1, align 4 +; IS__CGSCC____-NEXT: [[L:%.*]] = load i32, i32* @Gint1, align 4 +; IS__CGSCC____-NEXT: ret i32 [[L]] ; store i32 7, i32* @Gint1 %l = load i32, i32* @Gint1 @@ -2701,7 +2690,7 @@ define void @write_global() { ; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@write_global -; IS__TUNIT_OPM-SAME: () #[[ATTR10:[0-9]+]] { +; IS__TUNIT_OPM-SAME: () #[[ATTR8:[0-9]+]] { ; IS__TUNIT_OPM-NEXT: store i32 7, i32* @Gint2, align 4 ; IS__TUNIT_OPM-NEXT: ret void ; @@ -2713,7 +2702,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly ; IS__CGSCC____-LABEL: define {{[^@]+}}@write_global -; IS__CGSCC____-SAME: () #[[ATTR7:[0-9]+]] { +; IS__CGSCC____-SAME: () #[[ATTR6:[0-9]+]] { ; IS__CGSCC____-NEXT: store i32 7, i32* @Gint2, align 4 ; IS__CGSCC____-NEXT: ret void ; @@ -2723,19 +2712,19 @@ define i32 @read_global() { ; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind readonly willreturn ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@read_global -; IS__TUNIT_OPM-SAME: () #[[ATTR9]] { +; IS__TUNIT_OPM-SAME: () #[[ATTR7]] { ; IS__TUNIT_OPM-NEXT: [[L:%.*]] = load i32, i32* @Gint2, align 4 ; IS__TUNIT_OPM-NEXT: ret i32 [[L]] ; ; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readonly willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@read_global -; IS__TUNIT_NPM-SAME: () #[[ATTR7]] { +; IS__TUNIT_NPM-SAME: () #[[ATTR6]] { ; IS__TUNIT_NPM-NEXT: [[L:%.*]] = load i32, i32* @Gint2, align 4 ; IS__TUNIT_NPM-NEXT: ret i32 [[L]] ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@read_global -; IS__CGSCC____-SAME: () #[[ATTR6]] { +; IS__CGSCC____-SAME: () #[[ATTR5]] { ; IS__CGSCC____-NEXT: [[L:%.*]] = load i32, i32* @Gint2, align 4 ; IS__CGSCC____-NEXT: ret i32 [[L]] ; @@ -2751,12 +2740,19 @@ ; IS__TUNIT_OPM-NEXT: [[L:%.*]] = load i32, i32* @Gstatic_int1, align 4 ; IS__TUNIT_OPM-NEXT: ret i32 [[L]] ; -; NOT_TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn -; NOT_TUNIT_OPM-LABEL: define {{[^@]+}}@write_read_static_global -; NOT_TUNIT_OPM-SAME: () #[[ATTR4]] { -; NOT_TUNIT_OPM-NEXT: store i32 7, i32* @Gstatic_int1, align 4 -; NOT_TUNIT_OPM-NEXT: [[L:%.*]] = load i32, i32* @Gstatic_int1, align 4 -; NOT_TUNIT_OPM-NEXT: ret i32 [[L]] +; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn +; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@write_read_static_global +; IS__TUNIT_NPM-SAME: () #[[ATTR3]] { +; IS__TUNIT_NPM-NEXT: store i32 7, i32* @Gstatic_int1, align 4 +; IS__TUNIT_NPM-NEXT: [[L:%.*]] = load i32, i32* @Gstatic_int1, align 4 +; IS__TUNIT_NPM-NEXT: ret i32 [[L]] +; +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn +; IS__CGSCC____-LABEL: define {{[^@]+}}@write_read_static_global +; IS__CGSCC____-SAME: () #[[ATTR4]] { +; IS__CGSCC____-NEXT: store i32 7, i32* @Gstatic_int1, align 4 +; IS__CGSCC____-NEXT: [[L:%.*]] = load i32, i32* @Gstatic_int1, align 4 +; IS__CGSCC____-NEXT: ret i32 [[L]] ; store i32 7, i32* @Gstatic_int1 %l = load i32, i32* @Gstatic_int1 @@ -2765,7 +2761,7 @@ define void @write_static_global() { ; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@write_static_global -; IS__TUNIT_OPM-SAME: () #[[ATTR10]] { +; IS__TUNIT_OPM-SAME: () #[[ATTR8]] { ; IS__TUNIT_OPM-NEXT: store i32 7, i32* @Gstatic_int2, align 4 ; IS__TUNIT_OPM-NEXT: ret void ; @@ -2777,7 +2773,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly ; IS__CGSCC____-LABEL: define {{[^@]+}}@write_static_global -; IS__CGSCC____-SAME: () #[[ATTR7]] { +; IS__CGSCC____-SAME: () #[[ATTR6]] { ; IS__CGSCC____-NEXT: store i32 7, i32* @Gstatic_int2, align 4 ; IS__CGSCC____-NEXT: ret void ; @@ -2787,19 +2783,19 @@ define i32 @read_static_global() { ; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind readonly willreturn ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@read_static_global -; IS__TUNIT_OPM-SAME: () #[[ATTR9]] { +; IS__TUNIT_OPM-SAME: () #[[ATTR7]] { ; IS__TUNIT_OPM-NEXT: [[L:%.*]] = load i32, i32* @Gstatic_int2, align 4 ; IS__TUNIT_OPM-NEXT: ret i32 [[L]] ; ; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readonly willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@read_static_global -; IS__TUNIT_NPM-SAME: () #[[ATTR7]] { +; IS__TUNIT_NPM-SAME: () #[[ATTR6]] { ; IS__TUNIT_NPM-NEXT: [[L:%.*]] = load i32, i32* @Gstatic_int2, align 4 ; IS__TUNIT_NPM-NEXT: ret i32 [[L]] ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@read_static_global -; IS__CGSCC____-SAME: () #[[ATTR6]] { +; IS__CGSCC____-SAME: () #[[ATTR5]] { ; IS__CGSCC____-NEXT: [[L:%.*]] = load i32, i32* @Gstatic_int2, align 4 ; IS__CGSCC____-NEXT: ret i32 [[L]] ; @@ -2809,7 +2805,7 @@ define i32 @write_read_static_undef_global() { ; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@write_read_static_undef_global -; IS__TUNIT_OPM-SAME: () #[[ATTR10]] { +; IS__TUNIT_OPM-SAME: () #[[ATTR8]] { ; IS__TUNIT_OPM-NEXT: ret i32 7 ; ; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly @@ -2819,7 +2815,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly ; IS__CGSCC____-LABEL: define {{[^@]+}}@write_read_static_undef_global -; IS__CGSCC____-SAME: () #[[ATTR7]] { +; IS__CGSCC____-SAME: () #[[ATTR6]] { ; IS__CGSCC____-NEXT: ret i32 7 ; store i32 7, i32* @Gstatic_undef_int1 @@ -2829,7 +2825,7 @@ define void @write_static_undef_global() { ; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@write_static_undef_global -; IS__TUNIT_OPM-SAME: () #[[ATTR10]] { +; IS__TUNIT_OPM-SAME: () #[[ATTR8]] { ; IS__TUNIT_OPM-NEXT: ret void ; ; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly @@ -2839,7 +2835,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly ; IS__CGSCC____-LABEL: define {{[^@]+}}@write_static_undef_global -; IS__CGSCC____-SAME: () #[[ATTR7]] { +; IS__CGSCC____-SAME: () #[[ATTR6]] { ; IS__CGSCC____-NEXT: store i32 7, i32* @Gstatic_undef_int2, align 4 ; IS__CGSCC____-NEXT: ret void ; @@ -2849,12 +2845,12 @@ define i32 @read_static_undef_global() { ; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@read_static_undef_global -; IS__TUNIT____-SAME: () #[[ATTR3]] { +; IS__TUNIT____-SAME: () #[[ATTR4]] { ; IS__TUNIT____-NEXT: ret i32 7 ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@read_static_undef_global -; IS__CGSCC____-SAME: () #[[ATTR2]] { +; IS__CGSCC____-SAME: () #[[ATTR3]] { ; IS__CGSCC____-NEXT: ret i32 7 ; %l = load i32, i32* @Gstatic_undef_int2 @@ -2864,12 +2860,12 @@ define i32 @single_read_of_static_global() { ; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@single_read_of_static_global -; IS__TUNIT____-SAME: () #[[ATTR3]] { +; IS__TUNIT____-SAME: () #[[ATTR4]] { ; IS__TUNIT____-NEXT: ret i32 0 ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@single_read_of_static_global -; IS__CGSCC____-SAME: () #[[ATTR2]] { +; IS__CGSCC____-SAME: () #[[ATTR3]] { ; IS__CGSCC____-NEXT: ret i32 0 ; %l = load i32, i32* @Gstatic_int3 @@ -2879,7 +2875,7 @@ define i8 @phi_store() { ; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind readnone ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@phi_store -; IS__TUNIT_OPM-SAME: () #[[ATTR11:[0-9]+]] { +; IS__TUNIT_OPM-SAME: () #[[ATTR9:[0-9]+]] { ; IS__TUNIT_OPM-NEXT: entry: ; IS__TUNIT_OPM-NEXT: [[A:%.*]] = alloca i16, align 2 ; IS__TUNIT_OPM-NEXT: [[B:%.*]] = bitcast i16* [[A]] to i8* @@ -2898,7 +2894,7 @@ ; ; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@phi_store -; IS__TUNIT_NPM-SAME: () #[[ATTR3]] { +; IS__TUNIT_NPM-SAME: () #[[ATTR4]] { ; IS__TUNIT_NPM-NEXT: entry: ; IS__TUNIT_NPM-NEXT: [[A:%.*]] = alloca i16, align 2 ; IS__TUNIT_NPM-NEXT: [[B:%.*]] = bitcast i16* [[A]] to i8* @@ -2917,7 +2913,7 @@ ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@phi_store -; IS__CGSCC_OPM-SAME: () #[[ATTR8:[0-9]+]] { +; IS__CGSCC_OPM-SAME: () #[[ATTR7:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: entry: ; IS__CGSCC_OPM-NEXT: [[A:%.*]] = alloca i16, align 2 ; IS__CGSCC_OPM-NEXT: [[B:%.*]] = bitcast i16* [[A]] to i8* @@ -2936,7 +2932,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@phi_store -; IS__CGSCC_NPM-SAME: () #[[ATTR2]] { +; IS__CGSCC_NPM-SAME: () #[[ATTR3]] { ; IS__CGSCC_NPM-NEXT: entry: ; IS__CGSCC_NPM-NEXT: [[A:%.*]] = alloca i16, align 2 ; IS__CGSCC_NPM-NEXT: [[B:%.*]] = bitcast i16* [[A]] to i8* @@ -2975,7 +2971,7 @@ define i8 @phi_no_store_1() { ; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@phi_no_store_1 -; IS__TUNIT_OPM-SAME: () #[[ATTR8]] { +; IS__TUNIT_OPM-SAME: () #[[ATTR3]] { ; IS__TUNIT_OPM-NEXT: entry: ; IS__TUNIT_OPM-NEXT: br label [[LOOP:%.*]] ; IS__TUNIT_OPM: loop: @@ -2991,27 +2987,27 @@ ; IS__TUNIT_OPM-NEXT: [[ADD:%.*]] = add i8 [[L11]], [[L12]] ; IS__TUNIT_OPM-NEXT: ret i8 [[ADD]] ; -; IS________NPM: Function Attrs: nofree norecurse nosync nounwind willreturn -; IS________NPM-LABEL: define {{[^@]+}}@phi_no_store_1 -; IS________NPM-SAME: () #[[ATTR4]] { -; IS________NPM-NEXT: entry: -; IS________NPM-NEXT: br label [[LOOP:%.*]] -; IS________NPM: loop: -; IS________NPM-NEXT: [[P:%.*]] = phi i8* [ bitcast (i32* @a1 to i8*), [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ] -; IS________NPM-NEXT: [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ] -; IS________NPM-NEXT: [[G]] = getelementptr i8, i8* [[P]], i64 1 -; IS________NPM-NEXT: [[O]] = add nsw i8 [[I]], 1 -; IS________NPM-NEXT: [[C:%.*]] = icmp eq i8 [[O]], 3 -; IS________NPM-NEXT: br i1 [[C]], label [[END:%.*]], label [[LOOP]] -; IS________NPM: end: -; IS________NPM-NEXT: [[L11:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a1 to i8*), i64 2), align 2 -; IS________NPM-NEXT: [[L12:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a1 to i8*), i64 3), align 1 -; IS________NPM-NEXT: [[ADD:%.*]] = add i8 [[L11]], [[L12]] -; IS________NPM-NEXT: ret i8 [[ADD]] +; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn +; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@phi_no_store_1 +; IS__TUNIT_NPM-SAME: () #[[ATTR3]] { +; IS__TUNIT_NPM-NEXT: entry: +; IS__TUNIT_NPM-NEXT: br label [[LOOP:%.*]] +; IS__TUNIT_NPM: loop: +; IS__TUNIT_NPM-NEXT: [[P:%.*]] = phi i8* [ bitcast (i32* @a1 to i8*), [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ] +; IS__TUNIT_NPM-NEXT: [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ] +; IS__TUNIT_NPM-NEXT: [[G]] = getelementptr i8, i8* [[P]], i64 1 +; IS__TUNIT_NPM-NEXT: [[O]] = add nsw i8 [[I]], 1 +; IS__TUNIT_NPM-NEXT: [[C:%.*]] = icmp eq i8 [[O]], 3 +; IS__TUNIT_NPM-NEXT: br i1 [[C]], label [[END:%.*]], label [[LOOP]] +; IS__TUNIT_NPM: end: +; IS__TUNIT_NPM-NEXT: [[L11:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a1 to i8*), i64 2), align 2 +; IS__TUNIT_NPM-NEXT: [[L12:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a1 to i8*), i64 3), align 1 +; IS__TUNIT_NPM-NEXT: [[ADD:%.*]] = add i8 [[L11]], [[L12]] +; IS__TUNIT_NPM-NEXT: ret i8 [[ADD]] ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@phi_no_store_1 -; IS__CGSCC_OPM-SAME: () #[[ATTR9:[0-9]+]] { +; IS__CGSCC_OPM-SAME: () #[[ATTR8:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: entry: ; IS__CGSCC_OPM-NEXT: br label [[LOOP:%.*]] ; IS__CGSCC_OPM: loop: @@ -3027,6 +3023,24 @@ ; IS__CGSCC_OPM-NEXT: [[ADD:%.*]] = add i8 [[L11]], [[L12]] ; IS__CGSCC_OPM-NEXT: ret i8 [[ADD]] ; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@phi_no_store_1 +; IS__CGSCC_NPM-SAME: () #[[ATTR4]] { +; IS__CGSCC_NPM-NEXT: entry: +; IS__CGSCC_NPM-NEXT: br label [[LOOP:%.*]] +; IS__CGSCC_NPM: loop: +; IS__CGSCC_NPM-NEXT: [[P:%.*]] = phi i8* [ bitcast (i32* @a1 to i8*), [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ] +; IS__CGSCC_NPM-NEXT: [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ] +; IS__CGSCC_NPM-NEXT: [[G]] = getelementptr i8, i8* [[P]], i64 1 +; IS__CGSCC_NPM-NEXT: [[O]] = add nsw i8 [[I]], 1 +; IS__CGSCC_NPM-NEXT: [[C:%.*]] = icmp eq i8 [[O]], 3 +; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[END:%.*]], label [[LOOP]] +; IS__CGSCC_NPM: end: +; IS__CGSCC_NPM-NEXT: [[L11:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a1 to i8*), i64 2), align 2 +; IS__CGSCC_NPM-NEXT: [[L12:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a1 to i8*), i64 3), align 1 +; IS__CGSCC_NPM-NEXT: [[ADD:%.*]] = add i8 [[L11]], [[L12]] +; IS__CGSCC_NPM-NEXT: ret i8 [[ADD]] +; entry: %b = bitcast i32* @a1 to i8* br label %loop @@ -3051,7 +3065,7 @@ define i8 @phi_no_store_2() { ; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@phi_no_store_2 -; IS__TUNIT_OPM-SAME: () #[[ATTR8]] { +; IS__TUNIT_OPM-SAME: () #[[ATTR3]] { ; IS__TUNIT_OPM-NEXT: entry: ; IS__TUNIT_OPM-NEXT: br label [[LOOP:%.*]] ; IS__TUNIT_OPM: loop: @@ -3066,26 +3080,26 @@ ; IS__TUNIT_OPM-NEXT: [[ADD:%.*]] = add i8 [[L21]], 0 ; IS__TUNIT_OPM-NEXT: ret i8 [[ADD]] ; -; IS________NPM: Function Attrs: nofree norecurse nosync nounwind willreturn -; IS________NPM-LABEL: define {{[^@]+}}@phi_no_store_2 -; IS________NPM-SAME: () #[[ATTR4]] { -; IS________NPM-NEXT: entry: -; IS________NPM-NEXT: br label [[LOOP:%.*]] -; IS________NPM: loop: -; IS________NPM-NEXT: [[P:%.*]] = phi i8* [ bitcast (i32* @a2 to i8*), [[ENTRY:%.*]] ], [ getelementptr (i8, i8* bitcast (i32* @a2 to i8*), i64 2), [[LOOP]] ] -; IS________NPM-NEXT: [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ] -; IS________NPM-NEXT: store i8 1, i8* [[P]], align 2 -; IS________NPM-NEXT: [[O]] = add nsw i8 [[I]], 1 -; IS________NPM-NEXT: [[C:%.*]] = icmp eq i8 [[O]], 7 -; IS________NPM-NEXT: br i1 [[C]], label [[END:%.*]], label [[LOOP]] -; IS________NPM: end: -; IS________NPM-NEXT: [[L21:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a2 to i8*), i64 2), align 2 -; IS________NPM-NEXT: [[ADD:%.*]] = add i8 [[L21]], 0 -; IS________NPM-NEXT: ret i8 [[ADD]] +; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn +; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@phi_no_store_2 +; IS__TUNIT_NPM-SAME: () #[[ATTR3]] { +; IS__TUNIT_NPM-NEXT: entry: +; IS__TUNIT_NPM-NEXT: br label [[LOOP:%.*]] +; IS__TUNIT_NPM: loop: +; IS__TUNIT_NPM-NEXT: [[P:%.*]] = phi i8* [ bitcast (i32* @a2 to i8*), [[ENTRY:%.*]] ], [ getelementptr (i8, i8* bitcast (i32* @a2 to i8*), i64 2), [[LOOP]] ] +; IS__TUNIT_NPM-NEXT: [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ] +; IS__TUNIT_NPM-NEXT: store i8 1, i8* [[P]], align 2 +; IS__TUNIT_NPM-NEXT: [[O]] = add nsw i8 [[I]], 1 +; IS__TUNIT_NPM-NEXT: [[C:%.*]] = icmp eq i8 [[O]], 7 +; IS__TUNIT_NPM-NEXT: br i1 [[C]], label [[END:%.*]], label [[LOOP]] +; IS__TUNIT_NPM: end: +; IS__TUNIT_NPM-NEXT: [[L21:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a2 to i8*), i64 2), align 2 +; IS__TUNIT_NPM-NEXT: [[ADD:%.*]] = add i8 [[L21]], 0 +; IS__TUNIT_NPM-NEXT: ret i8 [[ADD]] ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@phi_no_store_2 -; IS__CGSCC_OPM-SAME: () #[[ATTR9]] { +; IS__CGSCC_OPM-SAME: () #[[ATTR8]] { ; IS__CGSCC_OPM-NEXT: entry: ; IS__CGSCC_OPM-NEXT: br label [[LOOP:%.*]] ; IS__CGSCC_OPM: loop: @@ -3100,6 +3114,23 @@ ; IS__CGSCC_OPM-NEXT: [[ADD:%.*]] = add i8 [[L21]], 0 ; IS__CGSCC_OPM-NEXT: ret i8 [[ADD]] ; +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn +; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@phi_no_store_2 +; IS__CGSCC_NPM-SAME: () #[[ATTR4]] { +; IS__CGSCC_NPM-NEXT: entry: +; IS__CGSCC_NPM-NEXT: br label [[LOOP:%.*]] +; IS__CGSCC_NPM: loop: +; IS__CGSCC_NPM-NEXT: [[P:%.*]] = phi i8* [ bitcast (i32* @a2 to i8*), [[ENTRY:%.*]] ], [ getelementptr (i8, i8* bitcast (i32* @a2 to i8*), i64 2), [[LOOP]] ] +; IS__CGSCC_NPM-NEXT: [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ] +; IS__CGSCC_NPM-NEXT: store i8 1, i8* [[P]], align 2 +; IS__CGSCC_NPM-NEXT: [[O]] = add nsw i8 [[I]], 1 +; IS__CGSCC_NPM-NEXT: [[C:%.*]] = icmp eq i8 [[O]], 7 +; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[END:%.*]], label [[LOOP]] +; IS__CGSCC_NPM: end: +; IS__CGSCC_NPM-NEXT: [[L21:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a2 to i8*), i64 2), align 2 +; IS__CGSCC_NPM-NEXT: [[ADD:%.*]] = add i8 [[L21]], 0 +; IS__CGSCC_NPM-NEXT: ret i8 [[ADD]] +; entry: %b = bitcast i32* @a2 to i8* br label %loop @@ -3151,7 +3182,7 @@ ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind writeonly ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@phi_no_store_3 -; IS__CGSCC_OPM-SAME: () #[[ATTR10:[0-9]+]] { +; IS__CGSCC_OPM-SAME: () #[[ATTR9:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: entry: ; IS__CGSCC_OPM-NEXT: br label [[LOOP:%.*]] ; IS__CGSCC_OPM: loop: @@ -3165,7 +3196,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@phi_no_store_3 -; IS__CGSCC_NPM-SAME: () #[[ATTR7]] { +; IS__CGSCC_NPM-SAME: () #[[ATTR6]] { ; IS__CGSCC_NPM-NEXT: entry: ; IS__CGSCC_NPM-NEXT: br label [[LOOP:%.*]] ; IS__CGSCC_NPM: loop: @@ -3207,12 +3238,19 @@ ; IS__TUNIT_OPM-NEXT: [[L:%.*]] = load i8, i8* bitcast (i32* @bytes1 to i8*), align 4 ; IS__TUNIT_OPM-NEXT: ret i8 [[L]] ; -; NOT_TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn -; NOT_TUNIT_OPM-LABEL: define {{[^@]+}}@cast_and_load_1 -; NOT_TUNIT_OPM-SAME: () #[[ATTR4]] { -; NOT_TUNIT_OPM-NEXT: store i32 42, i32* @bytes1, align 4 -; NOT_TUNIT_OPM-NEXT: [[L:%.*]] = load i8, i8* bitcast (i32* @bytes1 to i8*), align 4 -; NOT_TUNIT_OPM-NEXT: ret i8 [[L]] +; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn +; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@cast_and_load_1 +; IS__TUNIT_NPM-SAME: () #[[ATTR3]] { +; IS__TUNIT_NPM-NEXT: store i32 42, i32* @bytes1, align 4 +; IS__TUNIT_NPM-NEXT: [[L:%.*]] = load i8, i8* bitcast (i32* @bytes1 to i8*), align 4 +; IS__TUNIT_NPM-NEXT: ret i8 [[L]] +; +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn +; IS__CGSCC____-LABEL: define {{[^@]+}}@cast_and_load_1 +; IS__CGSCC____-SAME: () #[[ATTR4]] { +; IS__CGSCC____-NEXT: store i32 42, i32* @bytes1, align 4 +; IS__CGSCC____-NEXT: [[L:%.*]] = load i8, i8* bitcast (i32* @bytes1 to i8*), align 4 +; IS__CGSCC____-NEXT: ret i8 [[L]] ; store i32 42, i32* @bytes1 %bc = bitcast i32* @bytes1 to i8* @@ -3228,12 +3266,19 @@ ; IS__TUNIT_OPM-NEXT: [[L:%.*]] = load i64, i64* bitcast (i32* @bytes2 to i64*), align 4 ; IS__TUNIT_OPM-NEXT: ret i64 [[L]] ; -; NOT_TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn -; NOT_TUNIT_OPM-LABEL: define {{[^@]+}}@cast_and_load_2 -; NOT_TUNIT_OPM-SAME: () #[[ATTR4]] { -; NOT_TUNIT_OPM-NEXT: store i32 42, i32* @bytes2, align 4 -; NOT_TUNIT_OPM-NEXT: [[L:%.*]] = load i64, i64* bitcast (i32* @bytes2 to i64*), align 4 -; NOT_TUNIT_OPM-NEXT: ret i64 [[L]] +; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn +; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@cast_and_load_2 +; IS__TUNIT_NPM-SAME: () #[[ATTR3]] { +; IS__TUNIT_NPM-NEXT: store i32 42, i32* @bytes2, align 4 +; IS__TUNIT_NPM-NEXT: [[L:%.*]] = load i64, i64* bitcast (i32* @bytes2 to i64*), align 4 +; IS__TUNIT_NPM-NEXT: ret i64 [[L]] +; +; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn +; IS__CGSCC____-LABEL: define {{[^@]+}}@cast_and_load_2 +; IS__CGSCC____-SAME: () #[[ATTR4]] { +; IS__CGSCC____-NEXT: store i32 42, i32* @bytes2, align 4 +; IS__CGSCC____-NEXT: [[L:%.*]] = load i64, i64* bitcast (i32* @bytes2 to i64*), align 4 +; IS__CGSCC____-NEXT: ret i64 [[L]] ; store i32 42, i32* @bytes2 %bc = bitcast i32* @bytes2 to i64* @@ -3259,7 +3304,7 @@ ; ; IS________NPM: Function Attrs: nofree norecurse nosync nounwind writeonly ; IS________NPM-LABEL: define {{[^@]+}}@recursive_load_store -; IS________NPM-SAME: (i64 [[N:%.*]], i32 [[V:%.*]]) #[[ATTR8:[0-9]+]] { +; IS________NPM-SAME: (i64 [[N:%.*]], i32 [[V:%.*]]) #[[ATTR7:[0-9]+]] { ; IS________NPM-NEXT: entry: ; IS________NPM-NEXT: br label [[FOR_COND:%.*]] ; IS________NPM: for.cond: @@ -3274,7 +3319,7 @@ ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind writeonly ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@recursive_load_store -; IS__CGSCC_OPM-SAME: (i64 [[N:%.*]], i32 [[V:%.*]]) #[[ATTR10]] { +; IS__CGSCC_OPM-SAME: (i64 [[N:%.*]], i32 [[V:%.*]]) #[[ATTR9]] { ; IS__CGSCC_OPM-NEXT: entry: ; IS__CGSCC_OPM-NEXT: br label [[FOR_COND:%.*]] ; IS__CGSCC_OPM: for.cond: @@ -3309,16 +3354,16 @@ } define dso_local i32 @round_trip_malloc(i32 %x) { -; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@round_trip_malloc -; IS__TUNIT_OPM-SAME: (i32 [[X:%.*]]) { -; IS__TUNIT_OPM-NEXT: entry: -; IS__TUNIT_OPM-NEXT: [[CALL:%.*]] = call noalias i8* @malloc(i64 noundef 4) #[[ATTR17:[0-9]+]] -; IS__TUNIT_OPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32* -; IS__TUNIT_OPM-NEXT: store i32 [[X]], i32* [[TMP0]], align 4 -; IS__TUNIT_OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4 -; IS__TUNIT_OPM-NEXT: [[TMP2:%.*]] = bitcast i32* [[TMP0]] to i8* -; IS__TUNIT_OPM-NEXT: call void @free(i8* noundef [[TMP2]]) #[[ATTR17]] -; IS__TUNIT_OPM-NEXT: ret i32 [[TMP1]] +; IS________OPM-LABEL: define {{[^@]+}}@round_trip_malloc +; IS________OPM-SAME: (i32 [[X:%.*]]) { +; IS________OPM-NEXT: entry: +; IS________OPM-NEXT: [[CALL:%.*]] = call noalias i8* @malloc(i64 noundef 4) #[[ATTR15:[0-9]+]] +; IS________OPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32* +; IS________OPM-NEXT: store i32 [[X]], i32* [[TMP0]], align 4 +; IS________OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4 +; IS________OPM-NEXT: [[TMP2:%.*]] = bitcast i32* [[TMP0]] to i8* +; IS________OPM-NEXT: call void @free(i8* noundef [[TMP2]]) #[[ATTR15]] +; IS________OPM-NEXT: ret i32 [[TMP1]] ; ; IS________NPM-LABEL: define {{[^@]+}}@round_trip_malloc ; IS________NPM-SAME: (i32 [[X:%.*]]) { @@ -3329,17 +3374,6 @@ ; IS________NPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[TMP1]], align 4 ; IS________NPM-NEXT: ret i32 [[TMP2]] ; -; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@round_trip_malloc -; IS__CGSCC_OPM-SAME: (i32 [[X:%.*]]) { -; IS__CGSCC_OPM-NEXT: entry: -; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call noalias i8* @malloc(i64 noundef 4) #[[ATTR16:[0-9]+]] -; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32* -; IS__CGSCC_OPM-NEXT: store i32 [[X]], i32* [[TMP0]], align 4 -; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4 -; IS__CGSCC_OPM-NEXT: [[TMP2:%.*]] = bitcast i32* [[TMP0]] to i8* -; IS__CGSCC_OPM-NEXT: call void @free(i8* noundef [[TMP2]]) #[[ATTR16]] -; IS__CGSCC_OPM-NEXT: ret i32 [[TMP1]] -; entry: %call = call noalias i8* @malloc(i64 4) norecurse %0 = bitcast i8* %call to i32* @@ -3351,30 +3385,20 @@ } define dso_local i32 @round_trip_malloc_constant() { -; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@round_trip_malloc_constant() { -; IS__TUNIT_OPM-NEXT: entry: -; IS__TUNIT_OPM-NEXT: [[CALL:%.*]] = call noalias i8* @malloc(i64 noundef 4) #[[ATTR17]] -; IS__TUNIT_OPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32* -; IS__TUNIT_OPM-NEXT: store i32 7, i32* [[TMP0]], align 4 -; IS__TUNIT_OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4 -; IS__TUNIT_OPM-NEXT: [[TMP2:%.*]] = bitcast i32* [[TMP0]] to i8* -; IS__TUNIT_OPM-NEXT: call void @free(i8* noundef [[TMP2]]) #[[ATTR17]] -; IS__TUNIT_OPM-NEXT: ret i32 [[TMP1]] +; IS________OPM-LABEL: define {{[^@]+}}@round_trip_malloc_constant() { +; IS________OPM-NEXT: entry: +; IS________OPM-NEXT: [[CALL:%.*]] = call noalias i8* @malloc(i64 noundef 4) #[[ATTR15]] +; IS________OPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32* +; IS________OPM-NEXT: store i32 7, i32* [[TMP0]], align 4 +; IS________OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4 +; IS________OPM-NEXT: [[TMP2:%.*]] = bitcast i32* [[TMP0]] to i8* +; IS________OPM-NEXT: call void @free(i8* noundef [[TMP2]]) #[[ATTR15]] +; IS________OPM-NEXT: ret i32 [[TMP1]] ; ; IS________NPM-LABEL: define {{[^@]+}}@round_trip_malloc_constant() { ; IS________NPM-NEXT: entry: ; IS________NPM-NEXT: ret i32 7 ; -; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@round_trip_malloc_constant() { -; IS__CGSCC_OPM-NEXT: entry: -; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call noalias i8* @malloc(i64 noundef 4) #[[ATTR16]] -; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32* -; IS__CGSCC_OPM-NEXT: store i32 7, i32* [[TMP0]], align 4 -; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4 -; IS__CGSCC_OPM-NEXT: [[TMP2:%.*]] = bitcast i32* [[TMP0]] to i8* -; IS__CGSCC_OPM-NEXT: call void @free(i8* noundef [[TMP2]]) #[[ATTR16]] -; IS__CGSCC_OPM-NEXT: ret i32 [[TMP1]] -; entry: %call = call noalias i8* @malloc(i64 4) norecurse %0 = bitcast i8* %call to i32* @@ -3390,19 +3414,19 @@ declare void @free(i8*) define dso_local i32 @conditional_malloc(i32 %x) { -; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@conditional_malloc -; IS__TUNIT_OPM-SAME: (i32 [[X:%.*]]) { -; IS__TUNIT_OPM-NEXT: entry: -; IS__TUNIT_OPM-NEXT: [[CALL:%.*]] = call noalias i8* @malloc(i64 noundef 4) #[[ATTR17]] -; IS__TUNIT_OPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32* -; IS__TUNIT_OPM-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[X]], 0 -; IS__TUNIT_OPM-NEXT: br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]] -; IS__TUNIT_OPM: if.then: -; IS__TUNIT_OPM-NEXT: store i32 [[X]], i32* [[TMP0]], align 4 -; IS__TUNIT_OPM-NEXT: br label [[IF_END]] -; IS__TUNIT_OPM: if.end: -; IS__TUNIT_OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4 -; IS__TUNIT_OPM-NEXT: ret i32 [[TMP1]] +; IS________OPM-LABEL: define {{[^@]+}}@conditional_malloc +; IS________OPM-SAME: (i32 [[X:%.*]]) { +; IS________OPM-NEXT: entry: +; IS________OPM-NEXT: [[CALL:%.*]] = call noalias i8* @malloc(i64 noundef 4) #[[ATTR15]] +; IS________OPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32* +; IS________OPM-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[X]], 0 +; IS________OPM-NEXT: br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]] +; IS________OPM: if.then: +; IS________OPM-NEXT: store i32 [[X]], i32* [[TMP0]], align 4 +; IS________OPM-NEXT: br label [[IF_END]] +; IS________OPM: if.end: +; IS________OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4 +; IS________OPM-NEXT: ret i32 [[TMP1]] ; ; IS________NPM-LABEL: define {{[^@]+}}@conditional_malloc ; IS________NPM-SAME: (i32 [[X:%.*]]) { @@ -3418,20 +3442,6 @@ ; IS________NPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[TMP1]], align 4 ; IS________NPM-NEXT: ret i32 [[TMP2]] ; -; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@conditional_malloc -; IS__CGSCC_OPM-SAME: (i32 [[X:%.*]]) { -; IS__CGSCC_OPM-NEXT: entry: -; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call noalias i8* @malloc(i64 noundef 4) #[[ATTR16]] -; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32* -; IS__CGSCC_OPM-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[X]], 0 -; IS__CGSCC_OPM-NEXT: br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]] -; IS__CGSCC_OPM: if.then: -; IS__CGSCC_OPM-NEXT: store i32 [[X]], i32* [[TMP0]], align 4 -; IS__CGSCC_OPM-NEXT: br label [[IF_END]] -; IS__CGSCC_OPM: if.end: -; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4 -; IS__CGSCC_OPM-NEXT: ret i32 [[TMP1]] -; entry: %call = call noalias i8* @malloc(i64 4) norecurse %0 = bitcast i8* %call to i32* @@ -3448,14 +3458,14 @@ } define dso_local i32 @round_trip_calloc(i32 %x) { -; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@round_trip_calloc -; IS__TUNIT_OPM-SAME: (i32 [[X:%.*]]) { -; IS__TUNIT_OPM-NEXT: entry: -; IS__TUNIT_OPM-NEXT: [[CALL:%.*]] = call noalias i8* @calloc(i64 noundef 4, i64 noundef 1) #[[ATTR17]] -; IS__TUNIT_OPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32* -; IS__TUNIT_OPM-NEXT: store i32 [[X]], i32* [[TMP0]], align 4 -; IS__TUNIT_OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4 -; IS__TUNIT_OPM-NEXT: ret i32 [[TMP1]] +; IS________OPM-LABEL: define {{[^@]+}}@round_trip_calloc +; IS________OPM-SAME: (i32 [[X:%.*]]) { +; IS________OPM-NEXT: entry: +; IS________OPM-NEXT: [[CALL:%.*]] = call noalias i8* @calloc(i64 noundef 4, i64 noundef 1) #[[ATTR15]] +; IS________OPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32* +; IS________OPM-NEXT: store i32 [[X]], i32* [[TMP0]], align 4 +; IS________OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4 +; IS________OPM-NEXT: ret i32 [[TMP1]] ; ; IS________NPM-LABEL: define {{[^@]+}}@round_trip_calloc ; IS________NPM-SAME: (i32 [[X:%.*]]) { @@ -3467,15 +3477,6 @@ ; IS________NPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[TMP1]], align 4 ; IS________NPM-NEXT: ret i32 [[TMP2]] ; -; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@round_trip_calloc -; IS__CGSCC_OPM-SAME: (i32 [[X:%.*]]) { -; IS__CGSCC_OPM-NEXT: entry: -; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call noalias i8* @calloc(i64 noundef 4, i64 noundef 1) #[[ATTR16]] -; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32* -; IS__CGSCC_OPM-NEXT: store i32 [[X]], i32* [[TMP0]], align 4 -; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4 -; IS__CGSCC_OPM-NEXT: ret i32 [[TMP1]] -; entry: %call = call noalias i8* @calloc(i64 4, i64 1) norecurse %0 = bitcast i8* %call to i32* @@ -3485,13 +3486,13 @@ } define dso_local i32 @round_trip_calloc_constant() { -; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@round_trip_calloc_constant() { -; IS__TUNIT_OPM-NEXT: entry: -; IS__TUNIT_OPM-NEXT: [[CALL:%.*]] = call noalias i8* @calloc(i64 noundef 4, i64 noundef 1) #[[ATTR17]] -; IS__TUNIT_OPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32* -; IS__TUNIT_OPM-NEXT: store i32 11, i32* [[TMP0]], align 4 -; IS__TUNIT_OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4 -; IS__TUNIT_OPM-NEXT: ret i32 [[TMP1]] +; IS________OPM-LABEL: define {{[^@]+}}@round_trip_calloc_constant() { +; IS________OPM-NEXT: entry: +; IS________OPM-NEXT: [[CALL:%.*]] = call noalias i8* @calloc(i64 noundef 4, i64 noundef 1) #[[ATTR15]] +; IS________OPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32* +; IS________OPM-NEXT: store i32 11, i32* [[TMP0]], align 4 +; IS________OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4 +; IS________OPM-NEXT: ret i32 [[TMP1]] ; ; IS________NPM-LABEL: define {{[^@]+}}@round_trip_calloc_constant() { ; IS________NPM-NEXT: entry: @@ -3502,14 +3503,6 @@ ; IS________NPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[TMP1]], align 4 ; IS________NPM-NEXT: ret i32 [[TMP2]] ; -; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@round_trip_calloc_constant() { -; IS__CGSCC_OPM-NEXT: entry: -; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call noalias i8* @calloc(i64 noundef 4, i64 noundef 1) #[[ATTR16]] -; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32* -; IS__CGSCC_OPM-NEXT: store i32 11, i32* [[TMP0]], align 4 -; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4 -; IS__CGSCC_OPM-NEXT: ret i32 [[TMP1]] -; entry: %call = call noalias i8* @calloc(i64 4, i64 1) norecurse %0 = bitcast i8* %call to i32* @@ -3521,21 +3514,21 @@ declare noalias i8* @calloc(i64, i64) define dso_local i32 @conditional_calloc(i32 %x) { -; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@conditional_calloc -; IS__TUNIT_OPM-SAME: (i32 [[X:%.*]]) { -; IS__TUNIT_OPM-NEXT: entry: -; IS__TUNIT_OPM-NEXT: [[CALL:%.*]] = call noalias i8* @calloc(i64 noundef 1, i64 noundef 4) #[[ATTR17]] -; IS__TUNIT_OPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32* -; IS__TUNIT_OPM-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[X]], 0 -; IS__TUNIT_OPM-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]] -; IS__TUNIT_OPM: if.then: -; IS__TUNIT_OPM-NEXT: store i32 [[X]], i32* [[TMP0]], align 4 -; IS__TUNIT_OPM-NEXT: br label [[IF_END]] -; IS__TUNIT_OPM: if.end: -; IS__TUNIT_OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4 -; IS__TUNIT_OPM-NEXT: [[TMP2:%.*]] = bitcast i32* [[TMP0]] to i8* -; IS__TUNIT_OPM-NEXT: call void @free(i8* [[TMP2]]) #[[ATTR17]] -; IS__TUNIT_OPM-NEXT: ret i32 [[TMP1]] +; IS________OPM-LABEL: define {{[^@]+}}@conditional_calloc +; IS________OPM-SAME: (i32 [[X:%.*]]) { +; IS________OPM-NEXT: entry: +; IS________OPM-NEXT: [[CALL:%.*]] = call noalias i8* @calloc(i64 noundef 1, i64 noundef 4) #[[ATTR15]] +; IS________OPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32* +; IS________OPM-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[X]], 0 +; IS________OPM-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]] +; IS________OPM: if.then: +; IS________OPM-NEXT: store i32 [[X]], i32* [[TMP0]], align 4 +; IS________OPM-NEXT: br label [[IF_END]] +; IS________OPM: if.end: +; IS________OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4 +; IS________OPM-NEXT: [[TMP2:%.*]] = bitcast i32* [[TMP0]] to i8* +; IS________OPM-NEXT: call void @free(i8* [[TMP2]]) #[[ATTR15]] +; IS________OPM-NEXT: ret i32 [[TMP1]] ; ; IS________NPM-LABEL: define {{[^@]+}}@conditional_calloc ; IS________NPM-SAME: (i32 [[X:%.*]]) { @@ -3552,22 +3545,6 @@ ; IS________NPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[TMP1]], align 4 ; IS________NPM-NEXT: ret i32 [[TMP2]] ; -; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@conditional_calloc -; IS__CGSCC_OPM-SAME: (i32 [[X:%.*]]) { -; IS__CGSCC_OPM-NEXT: entry: -; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call noalias i8* @calloc(i64 noundef 1, i64 noundef 4) #[[ATTR16]] -; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32* -; IS__CGSCC_OPM-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[X]], 0 -; IS__CGSCC_OPM-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]] -; IS__CGSCC_OPM: if.then: -; IS__CGSCC_OPM-NEXT: store i32 [[X]], i32* [[TMP0]], align 4 -; IS__CGSCC_OPM-NEXT: br label [[IF_END]] -; IS__CGSCC_OPM: if.end: -; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4 -; IS__CGSCC_OPM-NEXT: [[TMP2:%.*]] = bitcast i32* [[TMP0]] to i8* -; IS__CGSCC_OPM-NEXT: call void @free(i8* [[TMP2]]) #[[ATTR16]] -; IS__CGSCC_OPM-NEXT: ret i32 [[TMP1]] -; entry: %call = call noalias i8* @calloc(i64 1, i64 4) norecurse %0 = bitcast i8* %call to i32* @@ -3586,20 +3563,20 @@ } define dso_local i32 @conditional_calloc_zero(i1 %c) { -; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@conditional_calloc_zero -; IS__TUNIT_OPM-SAME: (i1 [[C:%.*]]) { -; IS__TUNIT_OPM-NEXT: entry: -; IS__TUNIT_OPM-NEXT: [[CALL:%.*]] = call noalias i8* @calloc(i64 noundef 1, i64 noundef 4) #[[ATTR17]] -; IS__TUNIT_OPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32* -; IS__TUNIT_OPM-NEXT: br i1 [[C]], label [[IF_END:%.*]], label [[IF_THEN:%.*]] -; IS__TUNIT_OPM: if.then: -; IS__TUNIT_OPM-NEXT: store i32 0, i32* [[TMP0]], align 4 -; IS__TUNIT_OPM-NEXT: br label [[IF_END]] -; IS__TUNIT_OPM: if.end: -; IS__TUNIT_OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4 -; IS__TUNIT_OPM-NEXT: [[TMP2:%.*]] = bitcast i32* [[TMP0]] to i8* -; IS__TUNIT_OPM-NEXT: call void @free(i8* [[TMP2]]) #[[ATTR17]] -; IS__TUNIT_OPM-NEXT: ret i32 [[TMP1]] +; IS________OPM-LABEL: define {{[^@]+}}@conditional_calloc_zero +; IS________OPM-SAME: (i1 [[C:%.*]]) { +; IS________OPM-NEXT: entry: +; IS________OPM-NEXT: [[CALL:%.*]] = call noalias i8* @calloc(i64 noundef 1, i64 noundef 4) #[[ATTR15]] +; IS________OPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32* +; IS________OPM-NEXT: br i1 [[C]], label [[IF_END:%.*]], label [[IF_THEN:%.*]] +; IS________OPM: if.then: +; IS________OPM-NEXT: store i32 0, i32* [[TMP0]], align 4 +; IS________OPM-NEXT: br label [[IF_END]] +; IS________OPM: if.end: +; IS________OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4 +; IS________OPM-NEXT: [[TMP2:%.*]] = bitcast i32* [[TMP0]] to i8* +; IS________OPM-NEXT: call void @free(i8* [[TMP2]]) #[[ATTR15]] +; IS________OPM-NEXT: ret i32 [[TMP1]] ; ; IS________NPM-LABEL: define {{[^@]+}}@conditional_calloc_zero ; IS________NPM-SAME: (i1 [[C:%.*]]) { @@ -3612,21 +3589,6 @@ ; IS________NPM: if.end: ; IS________NPM-NEXT: ret i32 0 ; -; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@conditional_calloc_zero -; IS__CGSCC_OPM-SAME: (i1 [[C:%.*]]) { -; IS__CGSCC_OPM-NEXT: entry: -; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call noalias i8* @calloc(i64 noundef 1, i64 noundef 4) #[[ATTR16]] -; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32* -; IS__CGSCC_OPM-NEXT: br i1 [[C]], label [[IF_END:%.*]], label [[IF_THEN:%.*]] -; IS__CGSCC_OPM: if.then: -; IS__CGSCC_OPM-NEXT: store i32 0, i32* [[TMP0]], align 4 -; IS__CGSCC_OPM-NEXT: br label [[IF_END]] -; IS__CGSCC_OPM: if.end: -; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4 -; IS__CGSCC_OPM-NEXT: [[TMP2:%.*]] = bitcast i32* [[TMP0]] to i8* -; IS__CGSCC_OPM-NEXT: call void @free(i8* [[TMP2]]) #[[ATTR16]] -; IS__CGSCC_OPM-NEXT: ret i32 [[TMP1]] -; entry: %call = call noalias i8* @calloc(i64 1, i64 4) norecurse %0 = bitcast i8* %call to i32* @@ -3644,35 +3606,27 @@ } define dso_local i32* @malloc_like(i32 %s) { -; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@malloc_like -; IS__TUNIT_OPM-SAME: (i32 [[S:%.*]]) { -; IS__TUNIT_OPM-NEXT: entry: -; IS__TUNIT_OPM-NEXT: [[CONV:%.*]] = sext i32 [[S]] to i64 -; IS__TUNIT_OPM-NEXT: [[CALL:%.*]] = call noalias i8* @malloc(i64 [[CONV]]) #[[ATTR17]] -; IS__TUNIT_OPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32* -; IS__TUNIT_OPM-NEXT: ret i32* [[TMP0]] +; IS________OPM-LABEL: define {{[^@]+}}@malloc_like +; IS________OPM-SAME: (i32 [[S:%.*]]) { +; IS________OPM-NEXT: entry: +; IS________OPM-NEXT: [[CONV:%.*]] = sext i32 [[S]] to i64 +; IS________OPM-NEXT: [[CALL:%.*]] = call noalias i8* @malloc(i64 [[CONV]]) #[[ATTR15]] +; IS________OPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32* +; IS________OPM-NEXT: ret i32* [[TMP0]] ; ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@malloc_like ; IS__TUNIT_NPM-SAME: (i32 [[S:%.*]]) { ; IS__TUNIT_NPM-NEXT: entry: ; IS__TUNIT_NPM-NEXT: [[CONV:%.*]] = sext i32 [[S]] to i64 -; IS__TUNIT_NPM-NEXT: [[CALL:%.*]] = call noalias i8* @malloc(i64 [[CONV]]) #[[ATTR13:[0-9]+]] +; IS__TUNIT_NPM-NEXT: [[CALL:%.*]] = call noalias i8* @malloc(i64 [[CONV]]) #[[ATTR12:[0-9]+]] ; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32* ; IS__TUNIT_NPM-NEXT: ret i32* [[TMP0]] ; -; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@malloc_like -; IS__CGSCC_OPM-SAME: (i32 [[S:%.*]]) { -; IS__CGSCC_OPM-NEXT: entry: -; IS__CGSCC_OPM-NEXT: [[CONV:%.*]] = sext i32 [[S]] to i64 -; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call noalias i8* @malloc(i64 [[CONV]]) #[[ATTR16]] -; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32* -; IS__CGSCC_OPM-NEXT: ret i32* [[TMP0]] -; ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@malloc_like ; IS__CGSCC_NPM-SAME: (i32 [[S:%.*]]) { ; IS__CGSCC_NPM-NEXT: entry: ; IS__CGSCC_NPM-NEXT: [[CONV:%.*]] = sext i32 [[S]] to i64 -; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call noalias i8* @malloc(i64 [[CONV]]) #[[ATTR14:[0-9]+]] +; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call noalias i8* @malloc(i64 [[CONV]]) #[[ATTR13:[0-9]+]] ; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32* ; IS__CGSCC_NPM-NEXT: ret i32* [[TMP0]] ; @@ -3684,44 +3638,34 @@ } define dso_local i32 @round_trip_malloc_like(i32 %x) { -; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@round_trip_malloc_like -; IS__TUNIT_OPM-SAME: (i32 [[X:%.*]]) { -; IS__TUNIT_OPM-NEXT: entry: -; IS__TUNIT_OPM-NEXT: [[CALL:%.*]] = call i32* @malloc_like(i32 noundef 4) #[[ATTR17]] -; IS__TUNIT_OPM-NEXT: store i32 [[X]], i32* [[CALL]], align 4 -; IS__TUNIT_OPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4 -; IS__TUNIT_OPM-NEXT: [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8* -; IS__TUNIT_OPM-NEXT: call void @free(i8* noundef [[TMP1]]) #[[ATTR17]] -; IS__TUNIT_OPM-NEXT: ret i32 [[TMP0]] +; IS________OPM-LABEL: define {{[^@]+}}@round_trip_malloc_like +; IS________OPM-SAME: (i32 [[X:%.*]]) { +; IS________OPM-NEXT: entry: +; IS________OPM-NEXT: [[CALL:%.*]] = call i32* @malloc_like(i32 noundef 4) #[[ATTR15]] +; IS________OPM-NEXT: store i32 [[X]], i32* [[CALL]], align 4 +; IS________OPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4 +; IS________OPM-NEXT: [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8* +; IS________OPM-NEXT: call void @free(i8* noundef [[TMP1]]) #[[ATTR15]] +; IS________OPM-NEXT: ret i32 [[TMP0]] ; ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@round_trip_malloc_like ; IS__TUNIT_NPM-SAME: (i32 [[X:%.*]]) { ; IS__TUNIT_NPM-NEXT: entry: -; IS__TUNIT_NPM-NEXT: [[CALL:%.*]] = call i32* @malloc_like(i32 noundef 4) #[[ATTR13]] +; IS__TUNIT_NPM-NEXT: [[CALL:%.*]] = call i32* @malloc_like(i32 noundef 4) #[[ATTR12]] ; IS__TUNIT_NPM-NEXT: store i32 [[X]], i32* [[CALL]], align 4 ; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4 ; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8* -; IS__TUNIT_NPM-NEXT: call void @free(i8* noundef [[TMP1]]) #[[ATTR13]] +; IS__TUNIT_NPM-NEXT: call void @free(i8* noundef [[TMP1]]) #[[ATTR12]] ; IS__TUNIT_NPM-NEXT: ret i32 [[TMP0]] ; -; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@round_trip_malloc_like -; IS__CGSCC_OPM-SAME: (i32 [[X:%.*]]) { -; IS__CGSCC_OPM-NEXT: entry: -; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call i32* @malloc_like(i32 noundef 4) #[[ATTR16]] -; IS__CGSCC_OPM-NEXT: store i32 [[X]], i32* [[CALL]], align 4 -; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4 -; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8* -; IS__CGSCC_OPM-NEXT: call void @free(i8* noundef [[TMP1]]) #[[ATTR16]] -; IS__CGSCC_OPM-NEXT: ret i32 [[TMP0]] -; ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@round_trip_malloc_like ; IS__CGSCC_NPM-SAME: (i32 [[X:%.*]]) { ; IS__CGSCC_NPM-NEXT: entry: -; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call i32* @malloc_like(i32 noundef 4) #[[ATTR14]] +; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call i32* @malloc_like(i32 noundef 4) #[[ATTR13]] ; IS__CGSCC_NPM-NEXT: store i32 [[X]], i32* [[CALL]], align 4 ; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4 ; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8* -; IS__CGSCC_NPM-NEXT: call void @free(i8* noundef [[TMP1]]) #[[ATTR14]] +; IS__CGSCC_NPM-NEXT: call void @free(i8* noundef [[TMP1]]) #[[ATTR13]] ; IS__CGSCC_NPM-NEXT: ret i32 [[TMP0]] ; entry: @@ -3734,44 +3678,34 @@ } define dso_local i32 @round_trip_unknown_alloc(i32 %x) { -; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@round_trip_unknown_alloc -; IS__TUNIT_OPM-SAME: (i32 [[X:%.*]]) { -; IS__TUNIT_OPM-NEXT: entry: -; IS__TUNIT_OPM-NEXT: [[CALL:%.*]] = call i32* @unknown_alloc(i32 noundef 4) #[[ATTR17]] -; IS__TUNIT_OPM-NEXT: store i32 [[X]], i32* [[CALL]], align 4 -; IS__TUNIT_OPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4 -; IS__TUNIT_OPM-NEXT: [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8* -; IS__TUNIT_OPM-NEXT: call void @free(i8* noundef [[TMP1]]) #[[ATTR17]] -; IS__TUNIT_OPM-NEXT: ret i32 [[TMP0]] +; IS________OPM-LABEL: define {{[^@]+}}@round_trip_unknown_alloc +; IS________OPM-SAME: (i32 [[X:%.*]]) { +; IS________OPM-NEXT: entry: +; IS________OPM-NEXT: [[CALL:%.*]] = call i32* @unknown_alloc(i32 noundef 4) #[[ATTR15]] +; IS________OPM-NEXT: store i32 [[X]], i32* [[CALL]], align 4 +; IS________OPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4 +; IS________OPM-NEXT: [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8* +; IS________OPM-NEXT: call void @free(i8* noundef [[TMP1]]) #[[ATTR15]] +; IS________OPM-NEXT: ret i32 [[TMP0]] ; ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@round_trip_unknown_alloc ; IS__TUNIT_NPM-SAME: (i32 [[X:%.*]]) { ; IS__TUNIT_NPM-NEXT: entry: -; IS__TUNIT_NPM-NEXT: [[CALL:%.*]] = call i32* @unknown_alloc(i32 noundef 4) #[[ATTR13]] +; IS__TUNIT_NPM-NEXT: [[CALL:%.*]] = call i32* @unknown_alloc(i32 noundef 4) #[[ATTR12]] ; IS__TUNIT_NPM-NEXT: store i32 [[X]], i32* [[CALL]], align 4 ; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4 ; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8* -; IS__TUNIT_NPM-NEXT: call void @free(i8* noundef [[TMP1]]) #[[ATTR13]] +; IS__TUNIT_NPM-NEXT: call void @free(i8* noundef [[TMP1]]) #[[ATTR12]] ; IS__TUNIT_NPM-NEXT: ret i32 [[TMP0]] ; -; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@round_trip_unknown_alloc -; IS__CGSCC_OPM-SAME: (i32 [[X:%.*]]) { -; IS__CGSCC_OPM-NEXT: entry: -; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call i32* @unknown_alloc(i32 noundef 4) #[[ATTR16]] -; IS__CGSCC_OPM-NEXT: store i32 [[X]], i32* [[CALL]], align 4 -; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4 -; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8* -; IS__CGSCC_OPM-NEXT: call void @free(i8* noundef [[TMP1]]) #[[ATTR16]] -; IS__CGSCC_OPM-NEXT: ret i32 [[TMP0]] -; ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@round_trip_unknown_alloc ; IS__CGSCC_NPM-SAME: (i32 [[X:%.*]]) { ; IS__CGSCC_NPM-NEXT: entry: -; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call i32* @unknown_alloc(i32 noundef 4) #[[ATTR14]] +; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call i32* @unknown_alloc(i32 noundef 4) #[[ATTR13]] ; IS__CGSCC_NPM-NEXT: store i32 [[X]], i32* [[CALL]], align 4 ; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4 ; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8* -; IS__CGSCC_NPM-NEXT: call void @free(i8* noundef [[TMP1]]) #[[ATTR14]] +; IS__CGSCC_NPM-NEXT: call void @free(i8* noundef [[TMP1]]) #[[ATTR13]] ; IS__CGSCC_NPM-NEXT: ret i32 [[TMP0]] ; entry: @@ -3786,25 +3720,25 @@ declare noalias i32* @unknown_alloc(i32) define dso_local i32 @conditional_unknown_alloc(i32 %x) { -; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@conditional_unknown_alloc -; IS__TUNIT_OPM-SAME: (i32 [[X:%.*]]) { -; IS__TUNIT_OPM-NEXT: entry: -; IS__TUNIT_OPM-NEXT: [[CALL:%.*]] = call noalias i32* @unknown_alloc(i32 noundef 4) #[[ATTR17]] -; IS__TUNIT_OPM-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[X]], 0 -; IS__TUNIT_OPM-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]] -; IS__TUNIT_OPM: if.then: -; IS__TUNIT_OPM-NEXT: store i32 [[X]], i32* [[CALL]], align 4 -; IS__TUNIT_OPM-NEXT: br label [[IF_END]] -; IS__TUNIT_OPM: if.end: -; IS__TUNIT_OPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4 -; IS__TUNIT_OPM-NEXT: [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8* -; IS__TUNIT_OPM-NEXT: call void @free(i8* [[TMP1]]) #[[ATTR17]] -; IS__TUNIT_OPM-NEXT: ret i32 [[TMP0]] +; IS________OPM-LABEL: define {{[^@]+}}@conditional_unknown_alloc +; IS________OPM-SAME: (i32 [[X:%.*]]) { +; IS________OPM-NEXT: entry: +; IS________OPM-NEXT: [[CALL:%.*]] = call noalias i32* @unknown_alloc(i32 noundef 4) #[[ATTR15]] +; IS________OPM-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[X]], 0 +; IS________OPM-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]] +; IS________OPM: if.then: +; IS________OPM-NEXT: store i32 [[X]], i32* [[CALL]], align 4 +; IS________OPM-NEXT: br label [[IF_END]] +; IS________OPM: if.end: +; IS________OPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4 +; IS________OPM-NEXT: [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8* +; IS________OPM-NEXT: call void @free(i8* [[TMP1]]) #[[ATTR15]] +; IS________OPM-NEXT: ret i32 [[TMP0]] ; ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@conditional_unknown_alloc ; IS__TUNIT_NPM-SAME: (i32 [[X:%.*]]) { ; IS__TUNIT_NPM-NEXT: entry: -; IS__TUNIT_NPM-NEXT: [[CALL:%.*]] = call noalias i32* @unknown_alloc(i32 noundef 4) #[[ATTR13]] +; IS__TUNIT_NPM-NEXT: [[CALL:%.*]] = call noalias i32* @unknown_alloc(i32 noundef 4) #[[ATTR12]] ; IS__TUNIT_NPM-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[X]], 0 ; IS__TUNIT_NPM-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]] ; IS__TUNIT_NPM: if.then: @@ -3813,28 +3747,13 @@ ; IS__TUNIT_NPM: if.end: ; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4 ; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8* -; IS__TUNIT_NPM-NEXT: call void @free(i8* [[TMP1]]) #[[ATTR13]] +; IS__TUNIT_NPM-NEXT: call void @free(i8* [[TMP1]]) #[[ATTR12]] ; IS__TUNIT_NPM-NEXT: ret i32 [[TMP0]] ; -; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@conditional_unknown_alloc -; IS__CGSCC_OPM-SAME: (i32 [[X:%.*]]) { -; IS__CGSCC_OPM-NEXT: entry: -; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call noalias i32* @unknown_alloc(i32 noundef 4) #[[ATTR16]] -; IS__CGSCC_OPM-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[X]], 0 -; IS__CGSCC_OPM-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]] -; IS__CGSCC_OPM: if.then: -; IS__CGSCC_OPM-NEXT: store i32 [[X]], i32* [[CALL]], align 4 -; IS__CGSCC_OPM-NEXT: br label [[IF_END]] -; IS__CGSCC_OPM: if.end: -; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4 -; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8* -; IS__CGSCC_OPM-NEXT: call void @free(i8* [[TMP1]]) #[[ATTR16]] -; IS__CGSCC_OPM-NEXT: ret i32 [[TMP0]] -; ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@conditional_unknown_alloc ; IS__CGSCC_NPM-SAME: (i32 [[X:%.*]]) { ; IS__CGSCC_NPM-NEXT: entry: -; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call noalias i32* @unknown_alloc(i32 noundef 4) #[[ATTR14]] +; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call noalias i32* @unknown_alloc(i32 noundef 4) #[[ATTR13]] ; IS__CGSCC_NPM-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[X]], 0 ; IS__CGSCC_NPM-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]] ; IS__CGSCC_NPM: if.then: @@ -3843,7 +3762,7 @@ ; IS__CGSCC_NPM: if.end: ; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4 ; IS__CGSCC_NPM-NEXT: [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8* -; IS__CGSCC_NPM-NEXT: call void @free(i8* [[TMP1]]) #[[ATTR14]] +; IS__CGSCC_NPM-NEXT: call void @free(i8* [[TMP1]]) #[[ATTR13]] ; IS__CGSCC_NPM-NEXT: ret i32 [[TMP0]] ; entry: @@ -3881,7 +3800,7 @@ ; IS__TUNIT_OPM-NEXT: [[TMP1:%.*]] = bitcast i8* [[SRC2]] to double** ; IS__TUNIT_OPM-NEXT: store double* [[SRC]], double** [[TMP1]], align 8 ; IS__TUNIT_OPM-NEXT: store i8* [[CALL]], i8** bitcast (%struct.STy** getelementptr inbounds ([[STRUCT_STY]], %struct.STy* @global, i64 0, i32 2) to i8**), align 8 -; IS__TUNIT_OPM-NEXT: call fastcc void @nested_memory_callee() #[[ATTR18:[0-9]+]] +; IS__TUNIT_OPM-NEXT: call fastcc void @nested_memory_callee() #[[ATTR16:[0-9]+]] ; IS__TUNIT_OPM-NEXT: ret void ; ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@test_nested_memory @@ -3897,7 +3816,7 @@ ; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = bitcast i8* [[SRC2]] to double** ; IS__TUNIT_NPM-NEXT: store double* [[SRC]], double** [[TMP2]], align 8 ; IS__TUNIT_NPM-NEXT: store i8* [[TMP1]], i8** bitcast (%struct.STy** getelementptr inbounds ([[STRUCT_STY]], %struct.STy* @global, i64 0, i32 2) to i8**), align 8 -; IS__TUNIT_NPM-NEXT: call fastcc void @nested_memory_callee() #[[ATTR14:[0-9]+]] +; IS__TUNIT_NPM-NEXT: call fastcc void @nested_memory_callee() #[[ATTR13:[0-9]+]] ; IS__TUNIT_NPM-NEXT: ret void ; ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test_nested_memory @@ -3913,7 +3832,7 @@ ; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = bitcast i8* [[SRC2]] to double** ; IS__CGSCC_OPM-NEXT: store double* [[SRC]], double** [[TMP1]], align 8 ; IS__CGSCC_OPM-NEXT: store i8* [[CALL]], i8** bitcast (%struct.STy** getelementptr inbounds ([[STRUCT_STY]], %struct.STy* @global, i64 0, i32 2) to i8**), align 8 -; IS__CGSCC_OPM-NEXT: call fastcc void @nested_memory_callee() #[[ATTR15]] +; IS__CGSCC_OPM-NEXT: call fastcc void @nested_memory_callee() #[[ATTR14]] ; IS__CGSCC_OPM-NEXT: ret void ; ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test_nested_memory @@ -3929,7 +3848,7 @@ ; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = bitcast i8* [[SRC2]] to double** ; IS__CGSCC_NPM-NEXT: store double* [[SRC]], double** [[TMP2]], align 8 ; IS__CGSCC_NPM-NEXT: store i8* [[TMP1]], i8** bitcast (%struct.STy** getelementptr inbounds ([[STRUCT_STY]], %struct.STy* @global, i64 0, i32 2) to i8**), align 8 -; IS__CGSCC_NPM-NEXT: call fastcc void @nested_memory_callee() #[[ATTR13]] +; IS__CGSCC_NPM-NEXT: call fastcc void @nested_memory_callee() #[[ATTR12]] ; IS__CGSCC_NPM-NEXT: ret void ; entry: @@ -3949,23 +3868,23 @@ } define internal fastcc void @nested_memory_callee(%struct.STy* nocapture readonly %S) nofree norecurse nounwind uwtable { -; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind uwtable willreturn -; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@nested_memory_callee -; IS__TUNIT_OPM-SAME: () #[[ATTR12:[0-9]+]] { -; IS__TUNIT_OPM-NEXT: entry: -; IS__TUNIT_OPM-NEXT: [[TMP0:%.*]] = load %struct.STy*, %struct.STy** getelementptr inbounds ([[STRUCT_STY:%.*]], %struct.STy* @global, i64 0, i32 2), align 8 -; IS__TUNIT_OPM-NEXT: [[SRC:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[TMP0]], i64 0, i32 1 -; IS__TUNIT_OPM-NEXT: [[TMP1:%.*]] = load double*, double** [[SRC]], align 8 -; IS__TUNIT_OPM-NEXT: [[TMP2:%.*]] = load double, double* [[TMP1]], align 8 -; IS__TUNIT_OPM-NEXT: [[CONV:%.*]] = fptrunc double [[TMP2]] to float -; IS__TUNIT_OPM-NEXT: [[DST:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[TMP0]], i64 0, i32 0 -; IS__TUNIT_OPM-NEXT: [[TMP3:%.*]] = load float*, float** [[DST]], align 8 -; IS__TUNIT_OPM-NEXT: store float [[CONV]], float* [[TMP3]], align 4 -; IS__TUNIT_OPM-NEXT: ret void +; IS________OPM: Function Attrs: nofree norecurse nosync nounwind uwtable willreturn +; IS________OPM-LABEL: define {{[^@]+}}@nested_memory_callee +; IS________OPM-SAME: () #[[ATTR10:[0-9]+]] { +; IS________OPM-NEXT: entry: +; IS________OPM-NEXT: [[TMP0:%.*]] = load %struct.STy*, %struct.STy** getelementptr inbounds ([[STRUCT_STY:%.*]], %struct.STy* @global, i64 0, i32 2), align 8 +; IS________OPM-NEXT: [[SRC:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[TMP0]], i64 0, i32 1 +; IS________OPM-NEXT: [[TMP1:%.*]] = load double*, double** [[SRC]], align 8 +; IS________OPM-NEXT: [[TMP2:%.*]] = load double, double* [[TMP1]], align 8 +; IS________OPM-NEXT: [[CONV:%.*]] = fptrunc double [[TMP2]] to float +; IS________OPM-NEXT: [[DST:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[TMP0]], i64 0, i32 0 +; IS________OPM-NEXT: [[TMP3:%.*]] = load float*, float** [[DST]], align 8 +; IS________OPM-NEXT: store float [[CONV]], float* [[TMP3]], align 4 +; IS________OPM-NEXT: ret void ; ; IS________NPM: Function Attrs: nofree norecurse nosync nounwind uwtable willreturn ; IS________NPM-LABEL: define {{[^@]+}}@nested_memory_callee -; IS________NPM-SAME: () #[[ATTR9:[0-9]+]] { +; IS________NPM-SAME: () #[[ATTR8:[0-9]+]] { ; IS________NPM-NEXT: entry: ; IS________NPM-NEXT: [[TMP0:%.*]] = load %struct.STy*, %struct.STy** getelementptr inbounds ([[STRUCT_STY:%.*]], %struct.STy* @global, i64 0, i32 2), align 8 ; IS________NPM-NEXT: [[SRC:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[TMP0]], i64 0, i32 1 @@ -3977,20 +3896,6 @@ ; IS________NPM-NEXT: store float [[CONV]], float* [[TMP3]], align 4 ; IS________NPM-NEXT: ret void ; -; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind uwtable willreturn -; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@nested_memory_callee -; IS__CGSCC_OPM-SAME: () #[[ATTR11:[0-9]+]] { -; IS__CGSCC_OPM-NEXT: entry: -; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = load %struct.STy*, %struct.STy** getelementptr inbounds ([[STRUCT_STY:%.*]], %struct.STy* @global, i64 0, i32 2), align 8 -; IS__CGSCC_OPM-NEXT: [[SRC:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[TMP0]], i64 0, i32 1 -; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = load double*, double** [[SRC]], align 8 -; IS__CGSCC_OPM-NEXT: [[TMP2:%.*]] = load double, double* [[TMP1]], align 8 -; IS__CGSCC_OPM-NEXT: [[CONV:%.*]] = fptrunc double [[TMP2]] to float -; IS__CGSCC_OPM-NEXT: [[DST:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[TMP0]], i64 0, i32 0 -; IS__CGSCC_OPM-NEXT: [[TMP3:%.*]] = load float*, float** [[DST]], align 8 -; IS__CGSCC_OPM-NEXT: store float [[CONV]], float* [[TMP3]], align 4 -; IS__CGSCC_OPM-NEXT: ret void -; entry: %inner = getelementptr inbounds %struct.STy, %struct.STy* %S, i64 0, i32 2 %0 = load %struct.STy*, %struct.STy** %inner, align 8 @@ -4009,56 +3914,56 @@ ; Make sure the access %1 is not forwarded to the loads %2 and %3 as the indices are ; varying and the accesses thus not "exact". This used to simplify %cmp12 to true. define hidden void @no_propagation_of_unknown_index_access(i32* %in, i32* %out, i32 %idx) #0 { -; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind -; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@no_propagation_of_unknown_index_access -; IS__TUNIT_OPM-SAME: (i32* nocapture nofree readonly [[IN:%.*]], i32* nocapture nofree writeonly [[OUT:%.*]], i32 [[IDX:%.*]]) #[[ATTR13:[0-9]+]] { -; IS__TUNIT_OPM-NEXT: entry: -; IS__TUNIT_OPM-NEXT: [[BUF:%.*]] = alloca [128 x i32], align 16 -; IS__TUNIT_OPM-NEXT: [[TMP0:%.*]] = bitcast [128 x i32]* [[BUF]] to i8* -; IS__TUNIT_OPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 512, i8* nocapture nofree noundef nonnull align 16 dereferenceable(512) [[TMP0]]) -; IS__TUNIT_OPM-NEXT: br label [[FOR_COND:%.*]] -; IS__TUNIT_OPM: for.cond: -; IS__TUNIT_OPM-NEXT: [[I_0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[INC:%.*]], [[FOR_BODY:%.*]] ] -; IS__TUNIT_OPM-NEXT: [[CMP:%.*]] = icmp slt i32 [[I_0]], 128 -; IS__TUNIT_OPM-NEXT: br i1 [[CMP]], label [[FOR_BODY]], label [[FOR_COND_CLEANUP:%.*]] -; IS__TUNIT_OPM: for.cond.cleanup: -; IS__TUNIT_OPM-NEXT: br label [[FOR_COND4:%.*]] -; IS__TUNIT_OPM: for.body: -; IS__TUNIT_OPM-NEXT: [[IDXPROM:%.*]] = sext i32 [[I_0]] to i64 -; IS__TUNIT_OPM-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds i32, i32* [[IN]], i64 [[IDXPROM]] -; IS__TUNIT_OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[ARRAYIDX]], align 4 -; IS__TUNIT_OPM-NEXT: [[ARRAYIDX2:%.*]] = getelementptr inbounds [128 x i32], [128 x i32]* [[BUF]], i64 0, i64 [[IDXPROM]] -; IS__TUNIT_OPM-NEXT: store i32 [[TMP1]], i32* [[ARRAYIDX2]], align 4 -; IS__TUNIT_OPM-NEXT: [[INC]] = add nsw i32 [[I_0]], 1 -; IS__TUNIT_OPM-NEXT: br label [[FOR_COND]], !llvm.loop [[TBAA10]] -; IS__TUNIT_OPM: for.cond4: -; IS__TUNIT_OPM-NEXT: [[I3_0:%.*]] = phi i32 [ 0, [[FOR_COND_CLEANUP]] ], [ [[INC16:%.*]], [[FOR_BODY7:%.*]] ] -; IS__TUNIT_OPM-NEXT: [[CMP5:%.*]] = icmp slt i32 [[I3_0]], 128 -; IS__TUNIT_OPM-NEXT: br i1 [[CMP5]], label [[FOR_BODY7]], label [[FOR_COND_CLEANUP6:%.*]] -; IS__TUNIT_OPM: for.cond.cleanup6: -; IS__TUNIT_OPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 512, i8* nocapture nofree noundef nonnull align 16 dereferenceable(512) [[TMP0]]) -; IS__TUNIT_OPM-NEXT: ret void -; IS__TUNIT_OPM: for.body7: -; IS__TUNIT_OPM-NEXT: [[IDXPROM8:%.*]] = sext i32 [[I3_0]] to i64 -; IS__TUNIT_OPM-NEXT: [[ARRAYIDX9:%.*]] = getelementptr inbounds [128 x i32], [128 x i32]* [[BUF]], i64 0, i64 [[IDXPROM8]] -; IS__TUNIT_OPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[ARRAYIDX9]], align 4 -; IS__TUNIT_OPM-NEXT: [[IDXPROM10:%.*]] = sext i32 [[IDX]] to i64 -; IS__TUNIT_OPM-NEXT: [[ARRAYIDX11:%.*]] = getelementptr inbounds [128 x i32], [128 x i32]* [[BUF]], i64 0, i64 [[IDXPROM10]] -; IS__TUNIT_OPM-NEXT: [[TMP3:%.*]] = load i32, i32* [[ARRAYIDX11]], align 4 -; IS__TUNIT_OPM-NEXT: [[CMP12:%.*]] = icmp sle i32 [[TMP2]], [[TMP3]] -; IS__TUNIT_OPM-NEXT: [[CONV:%.*]] = zext i1 [[CMP12]] to i32 -; IS__TUNIT_OPM-NEXT: [[ARRAYIDX14:%.*]] = getelementptr inbounds i32, i32* [[OUT]], i64 [[IDXPROM8]] -; IS__TUNIT_OPM-NEXT: store i32 [[CONV]], i32* [[ARRAYIDX14]], align 4 -; IS__TUNIT_OPM-NEXT: [[INC16]] = add nsw i32 [[I3_0]], 1 -; IS__TUNIT_OPM-NEXT: br label [[FOR_COND4]], !llvm.loop [[TBAA12]] -; -; IS________NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn +; IS________OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind +; IS________OPM-LABEL: define {{[^@]+}}@no_propagation_of_unknown_index_access +; IS________OPM-SAME: (i32* nocapture nofree readonly [[IN:%.*]], i32* nocapture nofree writeonly [[OUT:%.*]], i32 [[IDX:%.*]]) #[[ATTR11:[0-9]+]] { +; IS________OPM-NEXT: entry: +; IS________OPM-NEXT: [[BUF:%.*]] = alloca [128 x i32], align 16 +; IS________OPM-NEXT: [[TMP0:%.*]] = bitcast [128 x i32]* [[BUF]] to i8* +; IS________OPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 512, i8* nocapture nofree noundef nonnull align 16 dereferenceable(512) [[TMP0]]) +; IS________OPM-NEXT: br label [[FOR_COND:%.*]] +; IS________OPM: for.cond: +; IS________OPM-NEXT: [[I_0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[INC:%.*]], [[FOR_BODY:%.*]] ] +; IS________OPM-NEXT: [[CMP:%.*]] = icmp slt i32 [[I_0]], 128 +; IS________OPM-NEXT: br i1 [[CMP]], label [[FOR_BODY]], label [[FOR_COND_CLEANUP:%.*]] +; IS________OPM: for.cond.cleanup: +; IS________OPM-NEXT: br label [[FOR_COND4:%.*]] +; IS________OPM: for.body: +; IS________OPM-NEXT: [[IDXPROM:%.*]] = sext i32 [[I_0]] to i64 +; IS________OPM-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds i32, i32* [[IN]], i64 [[IDXPROM]] +; IS________OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[ARRAYIDX]], align 4 +; IS________OPM-NEXT: [[ARRAYIDX2:%.*]] = getelementptr inbounds [128 x i32], [128 x i32]* [[BUF]], i64 0, i64 [[IDXPROM]] +; IS________OPM-NEXT: store i32 [[TMP1]], i32* [[ARRAYIDX2]], align 4 +; IS________OPM-NEXT: [[INC]] = add nsw i32 [[I_0]], 1 +; IS________OPM-NEXT: br label [[FOR_COND]], !llvm.loop [[LOOP10:![0-9]+]] +; IS________OPM: for.cond4: +; IS________OPM-NEXT: [[I3_0:%.*]] = phi i32 [ 0, [[FOR_COND_CLEANUP]] ], [ [[INC16:%.*]], [[FOR_BODY7:%.*]] ] +; IS________OPM-NEXT: [[CMP5:%.*]] = icmp slt i32 [[I3_0]], 128 +; IS________OPM-NEXT: br i1 [[CMP5]], label [[FOR_BODY7]], label [[FOR_COND_CLEANUP6:%.*]] +; IS________OPM: for.cond.cleanup6: +; IS________OPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 512, i8* nocapture nofree noundef nonnull align 16 dereferenceable(512) [[TMP0]]) +; IS________OPM-NEXT: ret void +; IS________OPM: for.body7: +; IS________OPM-NEXT: [[IDXPROM8:%.*]] = sext i32 [[I3_0]] to i64 +; IS________OPM-NEXT: [[ARRAYIDX9:%.*]] = getelementptr inbounds [128 x i32], [128 x i32]* [[BUF]], i64 0, i64 [[IDXPROM8]] +; IS________OPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[ARRAYIDX9]], align 4 +; IS________OPM-NEXT: [[IDXPROM10:%.*]] = sext i32 [[IDX]] to i64 +; IS________OPM-NEXT: [[ARRAYIDX11:%.*]] = getelementptr inbounds [128 x i32], [128 x i32]* [[BUF]], i64 0, i64 [[IDXPROM10]] +; IS________OPM-NEXT: [[TMP3:%.*]] = load i32, i32* [[ARRAYIDX11]], align 4 +; IS________OPM-NEXT: [[CMP12:%.*]] = icmp sle i32 [[TMP2]], [[TMP3]] +; IS________OPM-NEXT: [[CONV:%.*]] = zext i1 [[CMP12]] to i32 +; IS________OPM-NEXT: [[ARRAYIDX14:%.*]] = getelementptr inbounds i32, i32* [[OUT]], i64 [[IDXPROM8]] +; IS________OPM-NEXT: store i32 [[CONV]], i32* [[ARRAYIDX14]], align 4 +; IS________OPM-NEXT: [[INC16]] = add nsw i32 [[I3_0]], 1 +; IS________OPM-NEXT: br label [[FOR_COND4]], !llvm.loop [[LOOP12:![0-9]+]] +; +; IS________NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn ; IS________NPM-LABEL: define {{[^@]+}}@no_propagation_of_unknown_index_access ; IS________NPM-SAME: (i32* nocapture nofree readonly [[IN:%.*]], i32* nocapture nofree writeonly [[OUT:%.*]], i32 [[IDX:%.*]]) #[[ATTR1:[0-9]+]] { ; IS________NPM-NEXT: entry: ; IS________NPM-NEXT: [[BUF:%.*]] = alloca [128 x i32], align 16 ; IS________NPM-NEXT: [[TMP0:%.*]] = bitcast [128 x i32]* [[BUF]] to i8* -; IS________NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 512, i8* nocapture nofree noundef nonnull align 16 dereferenceable(512) [[TMP0]]) #[[ATTR11]] +; IS________NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 512, i8* nocapture nofree noundef nonnull align 16 dereferenceable(512) [[TMP0]]) #[[ATTR10]] ; IS________NPM-NEXT: br label [[FOR_COND:%.*]] ; IS________NPM: for.cond: ; IS________NPM-NEXT: [[I_0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[INC:%.*]], [[FOR_BODY:%.*]] ] @@ -4079,7 +3984,7 @@ ; IS________NPM-NEXT: [[CMP5:%.*]] = icmp slt i32 [[I3_0]], 128 ; IS________NPM-NEXT: br i1 [[CMP5]], label [[FOR_BODY7]], label [[FOR_COND_CLEANUP6:%.*]] ; IS________NPM: for.cond.cleanup6: -; IS________NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 512, i8* nocapture nofree noundef nonnull align 16 dereferenceable(512) [[TMP0]]) #[[ATTR11]] +; IS________NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 512, i8* nocapture nofree noundef nonnull align 16 dereferenceable(512) [[TMP0]]) #[[ATTR10]] ; IS________NPM-NEXT: ret void ; IS________NPM: for.body7: ; IS________NPM-NEXT: [[IDXPROM8:%.*]] = sext i32 [[I3_0]] to i64 @@ -4095,49 +4000,6 @@ ; IS________NPM-NEXT: [[INC16]] = add nsw i32 [[I3_0]], 1 ; IS________NPM-NEXT: br label [[FOR_COND4]], !llvm.loop [[LOOP12:![0-9]+]] ; -; IS__CGSCC_OPM: Function Attrs: argmemonly nofree nosync nounwind -; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@no_propagation_of_unknown_index_access -; IS__CGSCC_OPM-SAME: (i32* nocapture nofree readonly [[IN:%.*]], i32* nocapture nofree writeonly [[OUT:%.*]], i32 [[IDX:%.*]]) #[[ATTR12:[0-9]+]] { -; IS__CGSCC_OPM-NEXT: entry: -; IS__CGSCC_OPM-NEXT: [[BUF:%.*]] = alloca [128 x i32], align 16 -; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = bitcast [128 x i32]* [[BUF]] to i8* -; IS__CGSCC_OPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 512, i8* nocapture nofree noundef nonnull align 16 dereferenceable(512) [[TMP0]]) -; IS__CGSCC_OPM-NEXT: br label [[FOR_COND:%.*]] -; IS__CGSCC_OPM: for.cond: -; IS__CGSCC_OPM-NEXT: [[I_0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[INC:%.*]], [[FOR_BODY:%.*]] ] -; IS__CGSCC_OPM-NEXT: [[CMP:%.*]] = icmp slt i32 [[I_0]], 128 -; IS__CGSCC_OPM-NEXT: br i1 [[CMP]], label [[FOR_BODY]], label [[FOR_COND_CLEANUP:%.*]] -; IS__CGSCC_OPM: for.cond.cleanup: -; IS__CGSCC_OPM-NEXT: br label [[FOR_COND4:%.*]] -; IS__CGSCC_OPM: for.body: -; IS__CGSCC_OPM-NEXT: [[IDXPROM:%.*]] = sext i32 [[I_0]] to i64 -; IS__CGSCC_OPM-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds i32, i32* [[IN]], i64 [[IDXPROM]] -; IS__CGSCC_OPM-NEXT: [[TMP1:%.*]] = load i32, i32* [[ARRAYIDX]], align 4 -; IS__CGSCC_OPM-NEXT: [[ARRAYIDX2:%.*]] = getelementptr inbounds [128 x i32], [128 x i32]* [[BUF]], i64 0, i64 [[IDXPROM]] -; IS__CGSCC_OPM-NEXT: store i32 [[TMP1]], i32* [[ARRAYIDX2]], align 4 -; IS__CGSCC_OPM-NEXT: [[INC]] = add nsw i32 [[I_0]], 1 -; IS__CGSCC_OPM-NEXT: br label [[FOR_COND]], !llvm.loop [[TBAA10]] -; IS__CGSCC_OPM: for.cond4: -; IS__CGSCC_OPM-NEXT: [[I3_0:%.*]] = phi i32 [ 0, [[FOR_COND_CLEANUP]] ], [ [[INC16:%.*]], [[FOR_BODY7:%.*]] ] -; IS__CGSCC_OPM-NEXT: [[CMP5:%.*]] = icmp slt i32 [[I3_0]], 128 -; IS__CGSCC_OPM-NEXT: br i1 [[CMP5]], label [[FOR_BODY7]], label [[FOR_COND_CLEANUP6:%.*]] -; IS__CGSCC_OPM: for.cond.cleanup6: -; IS__CGSCC_OPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 512, i8* nocapture nofree noundef nonnull align 16 dereferenceable(512) [[TMP0]]) -; IS__CGSCC_OPM-NEXT: ret void -; IS__CGSCC_OPM: for.body7: -; IS__CGSCC_OPM-NEXT: [[IDXPROM8:%.*]] = sext i32 [[I3_0]] to i64 -; IS__CGSCC_OPM-NEXT: [[ARRAYIDX9:%.*]] = getelementptr inbounds [128 x i32], [128 x i32]* [[BUF]], i64 0, i64 [[IDXPROM8]] -; IS__CGSCC_OPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[ARRAYIDX9]], align 4 -; IS__CGSCC_OPM-NEXT: [[IDXPROM10:%.*]] = sext i32 [[IDX]] to i64 -; IS__CGSCC_OPM-NEXT: [[ARRAYIDX11:%.*]] = getelementptr inbounds [128 x i32], [128 x i32]* [[BUF]], i64 0, i64 [[IDXPROM10]] -; IS__CGSCC_OPM-NEXT: [[TMP3:%.*]] = load i32, i32* [[ARRAYIDX11]], align 4 -; IS__CGSCC_OPM-NEXT: [[CMP12:%.*]] = icmp sle i32 [[TMP2]], [[TMP3]] -; IS__CGSCC_OPM-NEXT: [[CONV:%.*]] = zext i1 [[CMP12]] to i32 -; IS__CGSCC_OPM-NEXT: [[ARRAYIDX14:%.*]] = getelementptr inbounds i32, i32* [[OUT]], i64 [[IDXPROM8]] -; IS__CGSCC_OPM-NEXT: store i32 [[CONV]], i32* [[ARRAYIDX14]], align 4 -; IS__CGSCC_OPM-NEXT: [[INC16]] = add nsw i32 [[I3_0]], 1 -; IS__CGSCC_OPM-NEXT: br label [[FOR_COND4]], !llvm.loop [[TBAA12]] -; entry: %buf = alloca [128 x i32], align 16 %0 = bitcast [128 x i32]* %buf to i8* @@ -4222,74 +4084,69 @@ !31 = distinct !{!31, !17} ;. ; IS__TUNIT_OPM: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } -; IS__TUNIT_OPM: attributes #[[ATTR1]] = { argmemonly nofree nosync nounwind willreturn } -; IS__TUNIT_OPM: attributes #[[ATTR2]] = { nofree nosync nounwind } -; IS__TUNIT_OPM: attributes #[[ATTR3]] = { nofree norecurse nosync nounwind readnone willreturn } -; IS__TUNIT_OPM: attributes #[[ATTR4]] = { nofree nosync nounwind willreturn } +; IS__TUNIT_OPM: attributes #[[ATTR1]] = { argmemonly nofree norecurse nosync nounwind willreturn } +; IS__TUNIT_OPM: attributes #[[ATTR2:[0-9]+]] = { argmemonly nocallback nofree nosync nounwind willreturn } +; IS__TUNIT_OPM: attributes #[[ATTR3]] = { nofree norecurse nosync nounwind } +; IS__TUNIT_OPM: attributes #[[ATTR4]] = { nofree norecurse nosync nounwind readnone willreturn } ; IS__TUNIT_OPM: attributes #[[ATTR5]] = { nofree norecurse nosync nounwind willreturn } ; IS__TUNIT_OPM: attributes #[[ATTR6]] = { nofree norecurse nosync nounwind writeonly } -; IS__TUNIT_OPM: attributes #[[ATTR7]] = { argmemonly nofree norecurse nosync nounwind willreturn } -; IS__TUNIT_OPM: attributes #[[ATTR8]] = { nofree norecurse nosync nounwind } -; IS__TUNIT_OPM: attributes #[[ATTR9]] = { nofree norecurse nosync nounwind readonly willreturn } -; IS__TUNIT_OPM: attributes #[[ATTR10]] = { nofree norecurse nosync nounwind willreturn writeonly } -; IS__TUNIT_OPM: attributes #[[ATTR11]] = { nofree norecurse nosync nounwind readnone } -; IS__TUNIT_OPM: attributes #[[ATTR12]] = { nofree norecurse nosync nounwind uwtable willreturn } -; IS__TUNIT_OPM: attributes #[[ATTR13]] = { argmemonly nofree nosync nounwind } -; IS__TUNIT_OPM: attributes #[[ATTR14]] = { willreturn } -; IS__TUNIT_OPM: attributes #[[ATTR15]] = { nofree nosync nounwind willreturn writeonly } -; IS__TUNIT_OPM: attributes #[[ATTR16]] = { nofree nosync nounwind writeonly } -; IS__TUNIT_OPM: attributes #[[ATTR17]] = { norecurse } -; IS__TUNIT_OPM: attributes #[[ATTR18]] = { nounwind } +; IS__TUNIT_OPM: attributes #[[ATTR7]] = { nofree norecurse nosync nounwind readonly willreturn } +; IS__TUNIT_OPM: attributes #[[ATTR8]] = { nofree norecurse nosync nounwind willreturn writeonly } +; IS__TUNIT_OPM: attributes #[[ATTR9]] = { nofree norecurse nosync nounwind readnone } +; IS__TUNIT_OPM: attributes #[[ATTR10]] = { nofree norecurse nosync nounwind uwtable willreturn } +; IS__TUNIT_OPM: attributes #[[ATTR11]] = { argmemonly nofree norecurse nosync nounwind } +; IS__TUNIT_OPM: attributes #[[ATTR12]] = { willreturn } +; IS__TUNIT_OPM: attributes #[[ATTR13]] = { nofree nosync nounwind willreturn writeonly } +; IS__TUNIT_OPM: attributes #[[ATTR14]] = { nofree nosync nounwind writeonly } +; IS__TUNIT_OPM: attributes #[[ATTR15]] = { norecurse } +; IS__TUNIT_OPM: attributes #[[ATTR16]] = { nounwind } ;. ; IS__TUNIT_NPM: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } -; IS__TUNIT_NPM: attributes #[[ATTR1]] = { argmemonly nofree nosync nounwind willreturn } -; IS__TUNIT_NPM: attributes #[[ATTR2]] = { nofree nosync nounwind willreturn } -; IS__TUNIT_NPM: attributes #[[ATTR3]] = { nofree norecurse nosync nounwind readnone willreturn } -; IS__TUNIT_NPM: attributes #[[ATTR4]] = { nofree norecurse nosync nounwind willreturn } +; IS__TUNIT_NPM: attributes #[[ATTR1]] = { argmemonly nofree norecurse nosync nounwind willreturn } +; IS__TUNIT_NPM: attributes #[[ATTR2:[0-9]+]] = { argmemonly nocallback nofree nosync nounwind willreturn } +; IS__TUNIT_NPM: attributes #[[ATTR3]] = { nofree norecurse nosync nounwind willreturn } +; IS__TUNIT_NPM: attributes #[[ATTR4]] = { nofree norecurse nosync nounwind readnone willreturn } ; IS__TUNIT_NPM: attributes #[[ATTR5]] = { nofree norecurse nosync nounwind willreturn writeonly } -; IS__TUNIT_NPM: attributes #[[ATTR6]] = { argmemonly nofree norecurse nosync nounwind willreturn } -; IS__TUNIT_NPM: attributes #[[ATTR7]] = { nofree norecurse nosync nounwind readonly willreturn } -; IS__TUNIT_NPM: attributes #[[ATTR8]] = { nofree norecurse nosync nounwind writeonly } -; IS__TUNIT_NPM: attributes #[[ATTR9]] = { nofree norecurse nosync nounwind uwtable willreturn } -; IS__TUNIT_NPM: attributes #[[ATTR10:[0-9]+]] = { argmemonly nofree nounwind willreturn writeonly } -; IS__TUNIT_NPM: attributes #[[ATTR11]] = { willreturn } -; IS__TUNIT_NPM: attributes #[[ATTR12]] = { nofree nosync nounwind willreturn writeonly } -; IS__TUNIT_NPM: attributes #[[ATTR13]] = { norecurse } -; IS__TUNIT_NPM: attributes #[[ATTR14]] = { nounwind } +; IS__TUNIT_NPM: attributes #[[ATTR6]] = { nofree norecurse nosync nounwind readonly willreturn } +; IS__TUNIT_NPM: attributes #[[ATTR7]] = { nofree norecurse nosync nounwind writeonly } +; IS__TUNIT_NPM: attributes #[[ATTR8]] = { nofree norecurse nosync nounwind uwtable willreturn } +; IS__TUNIT_NPM: attributes #[[ATTR9:[0-9]+]] = { argmemonly nofree nounwind willreturn writeonly } +; IS__TUNIT_NPM: attributes #[[ATTR10]] = { willreturn } +; IS__TUNIT_NPM: attributes #[[ATTR11]] = { nofree nosync nounwind willreturn writeonly } +; IS__TUNIT_NPM: attributes #[[ATTR12]] = { norecurse } +; IS__TUNIT_NPM: attributes #[[ATTR13]] = { nounwind } ;. ; IS__CGSCC_OPM: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } -; IS__CGSCC_OPM: attributes #[[ATTR1]] = { argmemonly nofree nosync nounwind willreturn } -; IS__CGSCC_OPM: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind readnone willreturn } -; IS__CGSCC_OPM: attributes #[[ATTR3]] = { nofree nosync nounwind willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR1]] = { argmemonly nofree norecurse nosync nounwind willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR2:[0-9]+]] = { argmemonly nocallback nofree nosync nounwind willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR3]] = { nofree norecurse nosync nounwind readnone willreturn } ; IS__CGSCC_OPM: attributes #[[ATTR4]] = { nofree norecurse nosync nounwind willreturn } -; IS__CGSCC_OPM: attributes #[[ATTR5]] = { argmemonly nofree norecurse nosync nounwind willreturn } -; IS__CGSCC_OPM: attributes #[[ATTR6]] = { nofree norecurse nosync nounwind readonly willreturn } -; IS__CGSCC_OPM: attributes #[[ATTR7]] = { nofree norecurse nosync nounwind willreturn writeonly } -; IS__CGSCC_OPM: attributes #[[ATTR8]] = { nofree norecurse nosync nounwind readnone } -; IS__CGSCC_OPM: attributes #[[ATTR9]] = { nofree norecurse nosync nounwind } -; IS__CGSCC_OPM: attributes #[[ATTR10]] = { nofree norecurse nosync nounwind writeonly } -; IS__CGSCC_OPM: attributes #[[ATTR11]] = { nofree norecurse nosync nounwind uwtable willreturn } -; IS__CGSCC_OPM: attributes #[[ATTR12]] = { argmemonly nofree nosync nounwind } -; IS__CGSCC_OPM: attributes #[[ATTR13]] = { willreturn } -; IS__CGSCC_OPM: attributes #[[ATTR14]] = { nounwind willreturn writeonly } -; IS__CGSCC_OPM: attributes #[[ATTR15]] = { nounwind } -; IS__CGSCC_OPM: attributes #[[ATTR16]] = { norecurse } +; IS__CGSCC_OPM: attributes #[[ATTR5]] = { nofree norecurse nosync nounwind readonly willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR6]] = { nofree norecurse nosync nounwind willreturn writeonly } +; IS__CGSCC_OPM: attributes #[[ATTR7]] = { nofree norecurse nosync nounwind readnone } +; IS__CGSCC_OPM: attributes #[[ATTR8]] = { nofree norecurse nosync nounwind } +; IS__CGSCC_OPM: attributes #[[ATTR9]] = { nofree norecurse nosync nounwind writeonly } +; IS__CGSCC_OPM: attributes #[[ATTR10]] = { nofree norecurse nosync nounwind uwtable willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR11]] = { argmemonly nofree norecurse nosync nounwind } +; IS__CGSCC_OPM: attributes #[[ATTR12]] = { willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR13]] = { nounwind willreturn writeonly } +; IS__CGSCC_OPM: attributes #[[ATTR14]] = { nounwind } +; IS__CGSCC_OPM: attributes #[[ATTR15]] = { norecurse } ;. ; IS__CGSCC_NPM: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } -; IS__CGSCC_NPM: attributes #[[ATTR1]] = { argmemonly nofree nosync nounwind willreturn } -; IS__CGSCC_NPM: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind readnone willreturn } -; IS__CGSCC_NPM: attributes #[[ATTR3]] = { nofree nosync nounwind willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR1]] = { argmemonly nofree norecurse nosync nounwind willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR2:[0-9]+]] = { argmemonly nocallback nofree nosync nounwind willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR3]] = { nofree norecurse nosync nounwind readnone willreturn } ; IS__CGSCC_NPM: attributes #[[ATTR4]] = { nofree norecurse nosync nounwind willreturn } -; IS__CGSCC_NPM: attributes #[[ATTR5]] = { argmemonly nofree norecurse nosync nounwind willreturn } -; IS__CGSCC_NPM: attributes #[[ATTR6]] = { nofree norecurse nosync nounwind readonly willreturn } -; IS__CGSCC_NPM: attributes #[[ATTR7]] = { nofree norecurse nosync nounwind willreturn writeonly } -; IS__CGSCC_NPM: attributes #[[ATTR8]] = { nofree norecurse nosync nounwind writeonly } -; IS__CGSCC_NPM: attributes #[[ATTR9]] = { nofree norecurse nosync nounwind uwtable willreturn } -; IS__CGSCC_NPM: attributes #[[ATTR10:[0-9]+]] = { argmemonly nofree nounwind willreturn writeonly } -; IS__CGSCC_NPM: attributes #[[ATTR11]] = { willreturn } -; IS__CGSCC_NPM: attributes #[[ATTR12]] = { nounwind willreturn writeonly } -; IS__CGSCC_NPM: attributes #[[ATTR13]] = { nounwind } -; IS__CGSCC_NPM: attributes #[[ATTR14]] = { norecurse } +; IS__CGSCC_NPM: attributes #[[ATTR5]] = { nofree norecurse nosync nounwind readonly willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR6]] = { nofree norecurse nosync nounwind willreturn writeonly } +; IS__CGSCC_NPM: attributes #[[ATTR7]] = { nofree norecurse nosync nounwind writeonly } +; IS__CGSCC_NPM: attributes #[[ATTR8]] = { nofree norecurse nosync nounwind uwtable willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR9:[0-9]+]] = { argmemonly nofree nounwind willreturn writeonly } +; IS__CGSCC_NPM: attributes #[[ATTR10]] = { willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR11]] = { nounwind willreturn writeonly } +; IS__CGSCC_NPM: attributes #[[ATTR12]] = { nounwind } +; IS__CGSCC_NPM: attributes #[[ATTR13]] = { norecurse } ;. ; IS__TUNIT____: [[META0:![0-9]+]] = !{i32 1, !"wchar_size", i32 4} ; IS__TUNIT____: [[META1:![0-9]+]] = !{i32 7, !"uwtable", i32 1} diff --git a/llvm/test/Transforms/Attributor/value-simplify.ll b/llvm/test/Transforms/Attributor/value-simplify.ll --- a/llvm/test/Transforms/Attributor/value-simplify.ll +++ b/llvm/test/Transforms/Attributor/value-simplify.ll @@ -373,13 +373,13 @@ ; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@complicated_args_inalloca ; IS__TUNIT_OPM-SAME: (i32* nofree readnone "no-capture-maybe-returned" [[ARG:%.*]]) #[[ATTR1]] { -; IS__TUNIT_OPM-NEXT: [[CALL:%.*]] = call nonnull dereferenceable(4) i32* @test_inalloca(i32* noalias nofree writeonly inalloca(i32) "no-capture-maybe-returned" [[ARG]]) #[[ATTR5:[0-9]+]] +; IS__TUNIT_OPM-NEXT: [[CALL:%.*]] = call nonnull dereferenceable(4) i32* @test_inalloca(i32* noalias nofree writeonly inalloca(i32) "no-capture-maybe-returned" [[ARG]]) #[[ATTR6:[0-9]+]] ; IS__TUNIT_OPM-NEXT: ret i32* [[CALL]] ; ; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@complicated_args_inalloca ; IS__TUNIT_NPM-SAME: (i32* nofree readnone "no-capture-maybe-returned" [[ARG:%.*]]) #[[ATTR1]] { -; IS__TUNIT_NPM-NEXT: [[CALL:%.*]] = call nonnull dereferenceable(4) i32* @test_inalloca(i32* noalias nofree writeonly inalloca(i32) "no-capture-maybe-returned" [[ARG]]) #[[ATTR4:[0-9]+]] +; IS__TUNIT_NPM-NEXT: [[CALL:%.*]] = call nonnull dereferenceable(4) i32* @test_inalloca(i32* noalias nofree writeonly inalloca(i32) "no-capture-maybe-returned" [[ARG]]) #[[ATTR5:[0-9]+]] ; IS__TUNIT_NPM-NEXT: ret i32* [[CALL]] ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn @@ -400,30 +400,30 @@ ret i32* %a } define i32* @complicated_args_preallocated() { -; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind willreturn +; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@complicated_args_preallocated -; IS__TUNIT_OPM-SAME: () #[[ATTR0:[0-9]+]] { -; IS__TUNIT_OPM-NEXT: [[C:%.*]] = call token @llvm.call.preallocated.setup(i32 noundef 1) #[[ATTR6:[0-9]+]] -; IS__TUNIT_OPM-NEXT: [[CALL:%.*]] = call noundef nonnull align 4294967296 dereferenceable(4) i32* @test_preallocated(i32* noalias nocapture nofree noundef writeonly preallocated(i32) align 4294967296 null) #[[ATTR5]] [ "preallocated"(token [[C]]) ] +; IS__TUNIT_OPM-SAME: () #[[ATTR2:[0-9]+]] { +; IS__TUNIT_OPM-NEXT: [[C:%.*]] = call token @llvm.call.preallocated.setup(i32 noundef 1) #[[ATTR7:[0-9]+]] +; IS__TUNIT_OPM-NEXT: [[CALL:%.*]] = call noundef nonnull align 4294967296 dereferenceable(4) i32* @test_preallocated(i32* noalias nocapture nofree noundef writeonly preallocated(i32) align 4294967296 null) #[[ATTR6]] [ "preallocated"(token [[C]]) ] ; IS__TUNIT_OPM-NEXT: ret i32* [[CALL]] ; -; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn +; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@complicated_args_preallocated -; IS__TUNIT_NPM-SAME: () #[[ATTR0:[0-9]+]] { -; IS__TUNIT_NPM-NEXT: [[C:%.*]] = call token @llvm.call.preallocated.setup(i32 noundef 1) #[[ATTR5:[0-9]+]] -; IS__TUNIT_NPM-NEXT: [[CALL:%.*]] = call noundef nonnull align 4294967296 dereferenceable(4) i32* @test_preallocated(i32* noalias nocapture nofree noundef writeonly preallocated(i32) align 4294967296 null) #[[ATTR4]] [ "preallocated"(token [[C]]) ] +; IS__TUNIT_NPM-SAME: () #[[ATTR2:[0-9]+]] { +; IS__TUNIT_NPM-NEXT: [[C:%.*]] = call token @llvm.call.preallocated.setup(i32 noundef 1) #[[ATTR6:[0-9]+]] +; IS__TUNIT_NPM-NEXT: [[CALL:%.*]] = call noundef nonnull align 4294967296 dereferenceable(4) i32* @test_preallocated(i32* noalias nocapture nofree noundef writeonly preallocated(i32) align 4294967296 null) #[[ATTR5]] [ "preallocated"(token [[C]]) ] ; IS__TUNIT_NPM-NEXT: ret i32* [[CALL]] ; -; IS__CGSCC_OPM: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@complicated_args_preallocated -; IS__CGSCC_OPM-SAME: () #[[ATTR0:[0-9]+]] { -; IS__CGSCC_OPM-NEXT: [[C:%.*]] = call token @llvm.call.preallocated.setup(i32 noundef 1) #[[ATTR5:[0-9]+]] +; IS__CGSCC_OPM-SAME: () #[[ATTR2:[0-9]+]] { +; IS__CGSCC_OPM-NEXT: [[C:%.*]] = call token @llvm.call.preallocated.setup(i32 noundef 1) #[[ATTR6:[0-9]+]] ; IS__CGSCC_OPM-NEXT: ret i32* null ; -; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn +; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@complicated_args_preallocated -; IS__CGSCC_NPM-SAME: () #[[ATTR0:[0-9]+]] { -; IS__CGSCC_NPM-NEXT: [[C:%.*]] = call token @llvm.call.preallocated.setup(i32 noundef 1) #[[ATTR4:[0-9]+]] +; IS__CGSCC_NPM-SAME: () #[[ATTR2:[0-9]+]] { +; IS__CGSCC_NPM-NEXT: [[C:%.*]] = call token @llvm.call.preallocated.setup(i32 noundef 1) #[[ATTR5:[0-9]+]] ; IS__CGSCC_NPM-NEXT: ret i32* null ; %c = call token @llvm.call.preallocated.setup(i32 1) @@ -435,7 +435,7 @@ ; ; CHECK: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly ; CHECK-LABEL: define {{[^@]+}}@test_sret -; CHECK-SAME: (%struct.X* noalias nofree noundef nonnull writeonly sret([[STRUCT_X:%.*]]) align 4294967296 dereferenceable(8) [[A:%.*]], %struct.X** nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[B:%.*]]) #[[ATTR2:[0-9]+]] { +; CHECK-SAME: (%struct.X* noalias nofree noundef nonnull writeonly sret([[STRUCT_X:%.*]]) align 4294967296 dereferenceable(8) [[A:%.*]], %struct.X** nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[B:%.*]]) #[[ATTR3:[0-9]+]] { ; CHECK-NEXT: store %struct.X* [[A]], %struct.X** [[B]], align 8 ; CHECK-NEXT: ret void ; @@ -448,19 +448,19 @@ ; ; IS__TUNIT_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@complicated_args_sret -; IS__TUNIT_OPM-SAME: (%struct.X** nocapture nofree writeonly [[B:%.*]]) #[[ATTR2]] { -; IS__TUNIT_OPM-NEXT: call void @test_sret(%struct.X* noalias nocapture nofree noundef writeonly sret([[STRUCT_X:%.*]]) align 4294967296 null, %struct.X** nocapture nofree writeonly align 8 [[B]]) #[[ATTR7:[0-9]+]] +; IS__TUNIT_OPM-SAME: (%struct.X** nocapture nofree writeonly [[B:%.*]]) #[[ATTR3]] { +; IS__TUNIT_OPM-NEXT: call void @test_sret(%struct.X* noalias nocapture nofree noundef writeonly sret([[STRUCT_X:%.*]]) align 4294967296 null, %struct.X** nocapture nofree writeonly align 8 [[B]]) #[[ATTR8:[0-9]+]] ; IS__TUNIT_OPM-NEXT: ret void ; ; IS__TUNIT_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@complicated_args_sret -; IS__TUNIT_NPM-SAME: (%struct.X** nocapture nofree writeonly [[B:%.*]]) #[[ATTR2]] { -; IS__TUNIT_NPM-NEXT: call void @test_sret(%struct.X* noalias nocapture nofree noundef writeonly sret([[STRUCT_X:%.*]]) align 4294967296 null, %struct.X** nocapture nofree writeonly align 8 [[B]]) #[[ATTR6:[0-9]+]] +; IS__TUNIT_NPM-SAME: (%struct.X** nocapture nofree writeonly [[B:%.*]]) #[[ATTR3]] { +; IS__TUNIT_NPM-NEXT: call void @test_sret(%struct.X* noalias nocapture nofree noundef writeonly sret([[STRUCT_X:%.*]]) align 4294967296 null, %struct.X** nocapture nofree writeonly align 8 [[B]]) #[[ATTR7:[0-9]+]] ; IS__TUNIT_NPM-NEXT: ret void ; ; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly ; IS__CGSCC____-LABEL: define {{[^@]+}}@complicated_args_sret -; IS__CGSCC____-SAME: (%struct.X** nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[B:%.*]]) #[[ATTR2]] { +; IS__CGSCC____-SAME: (%struct.X** nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[B:%.*]]) #[[ATTR3]] { ; IS__CGSCC____-NEXT: unreachable ; call void @test_sret(%struct.X* sret(%struct.X) null, %struct.X** %b) @@ -489,14 +489,14 @@ define internal void @test_byval(%struct.X* byval(%struct.X) %a) { ; IS________OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly ; IS________OPM-LABEL: define {{[^@]+}}@test_byval -; IS________OPM-SAME: (%struct.X* noalias nocapture nofree noundef nonnull writeonly byval([[STRUCT_X:%.*]]) align 8 dereferenceable(8) [[A:%.*]]) #[[ATTR2]] { +; IS________OPM-SAME: (%struct.X* noalias nocapture nofree noundef nonnull writeonly byval([[STRUCT_X:%.*]]) align 8 dereferenceable(8) [[A:%.*]]) #[[ATTR3]] { ; IS________OPM-NEXT: [[G0:%.*]] = getelementptr [[STRUCT_X]], %struct.X* [[A]], i32 0, i32 0 ; IS________OPM-NEXT: store i8* null, i8** [[G0]], align 8 ; IS________OPM-NEXT: ret void ; ; IS__TUNIT_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@test_byval -; IS__TUNIT_NPM-SAME: (i8* [[TMP0:%.*]]) #[[ATTR2]] { +; IS__TUNIT_NPM-SAME: (i8* [[TMP0:%.*]]) #[[ATTR3]] { ; IS__TUNIT_NPM-NEXT: [[A_PRIV:%.*]] = alloca [[STRUCT_X:%.*]], align 8 ; IS__TUNIT_NPM-NEXT: [[A_PRIV_CAST:%.*]] = bitcast %struct.X* [[A_PRIV]] to i8** ; IS__TUNIT_NPM-NEXT: store i8* [[TMP0]], i8** [[A_PRIV_CAST]], align 8 @@ -519,22 +519,22 @@ define void @complicated_args_byval() { ; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@complicated_args_byval -; IS__TUNIT_OPM-SAME: () #[[ATTR3:[0-9]+]] { -; IS__TUNIT_OPM-NEXT: call void @test_byval(%struct.X* nocapture nofree noundef nonnull readonly byval([[STRUCT_X:%.*]]) align 8 dereferenceable(8) @S) #[[ATTR7]] +; IS__TUNIT_OPM-SAME: () #[[ATTR4:[0-9]+]] { +; IS__TUNIT_OPM-NEXT: call void @test_byval(%struct.X* nocapture nofree noundef nonnull readonly byval([[STRUCT_X:%.*]]) align 8 dereferenceable(8) @S) #[[ATTR8]] ; IS__TUNIT_OPM-NEXT: ret void ; ; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@complicated_args_byval -; IS__TUNIT_NPM-SAME: () #[[ATTR3:[0-9]+]] { +; IS__TUNIT_NPM-SAME: () #[[ATTR4:[0-9]+]] { ; IS__TUNIT_NPM-NEXT: [[S_CAST:%.*]] = bitcast %struct.X* @S to i8** ; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = load i8*, i8** [[S_CAST]], align 8 -; IS__TUNIT_NPM-NEXT: call void @test_byval(i8* [[TMP1]]) #[[ATTR6]] +; IS__TUNIT_NPM-NEXT: call void @test_byval(i8* [[TMP1]]) #[[ATTR7]] ; IS__TUNIT_NPM-NEXT: ret void ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@complicated_args_byval ; IS__CGSCC_OPM-SAME: () #[[ATTR1]] { -; IS__CGSCC_OPM-NEXT: call void @test_byval(%struct.X* noalias nocapture nofree noundef nonnull readnone byval([[STRUCT_X:%.*]]) align 8 dereferenceable(8) @S) #[[ATTR6:[0-9]+]] +; IS__CGSCC_OPM-NEXT: call void @test_byval(%struct.X* noalias nocapture nofree noundef nonnull readnone byval([[STRUCT_X:%.*]]) align 8 dereferenceable(8) @S) #[[ATTR7:[0-9]+]] ; IS__CGSCC_OPM-NEXT: ret void ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn @@ -609,7 +609,7 @@ define void @fixpoint_changed(i32* %p) { ; IS__TUNIT_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind writeonly ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@fixpoint_changed -; IS__TUNIT_OPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]]) #[[ATTR4:[0-9]+]] { +; IS__TUNIT_OPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]]) #[[ATTR5:[0-9]+]] { ; IS__TUNIT_OPM-NEXT: entry: ; IS__TUNIT_OPM-NEXT: br label [[FOR_COND:%.*]] ; IS__TUNIT_OPM: for.cond: @@ -632,7 +632,7 @@ ; ; IS________NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly ; IS________NPM-LABEL: define {{[^@]+}}@fixpoint_changed -; IS________NPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]]) #[[ATTR2]] { +; IS________NPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]]) #[[ATTR3]] { ; IS________NPM-NEXT: entry: ; IS________NPM-NEXT: br label [[FOR_COND:%.*]] ; IS________NPM: for.cond: @@ -655,7 +655,7 @@ ; ; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind writeonly ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@fixpoint_changed -; IS__CGSCC_OPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]]) #[[ATTR3:[0-9]+]] { +; IS__CGSCC_OPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]]) #[[ATTR4:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: entry: ; IS__CGSCC_OPM-NEXT: br label [[FOR_COND:%.*]] ; IS__CGSCC_OPM: for.cond: @@ -770,13 +770,13 @@ define void @user_as3() { ; NOT_CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly ; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@user_as3 -; NOT_CGSCC_OPM-SAME: () #[[ATTR3:[0-9]+]] { +; NOT_CGSCC_OPM-SAME: () #[[ATTR4:[0-9]+]] { ; NOT_CGSCC_OPM-NEXT: store i32 0, i32 addrspace(3)* @ConstAS3Ptr, align 4 ; NOT_CGSCC_OPM-NEXT: ret void ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@user_as3 -; IS__CGSCC_OPM-SAME: () #[[ATTR4:[0-9]+]] { +; IS__CGSCC_OPM-SAME: () #[[ATTR5:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: store i32 0, i32 addrspace(3)* @ConstAS3Ptr, align 4 ; IS__CGSCC_OPM-NEXT: ret void ; @@ -787,13 +787,13 @@ define void @user() { ; NOT_CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly ; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@user -; NOT_CGSCC_OPM-SAME: () #[[ATTR3]] { +; NOT_CGSCC_OPM-SAME: () #[[ATTR4]] { ; NOT_CGSCC_OPM-NEXT: store i32 0, i32* addrspacecast (i32 addrspace(3)* @ConstAS3Ptr to i32*), align 4 ; NOT_CGSCC_OPM-NEXT: ret void ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@user -; IS__CGSCC_OPM-SAME: () #[[ATTR4]] { +; IS__CGSCC_OPM-SAME: () #[[ATTR5]] { ; IS__CGSCC_OPM-NEXT: store i32 0, i32* addrspacecast (i32 addrspace(3)* @ConstAS3Ptr to i32*), align 4 ; IS__CGSCC_OPM-NEXT: ret void ; @@ -942,7 +942,7 @@ define internal void @f1(i8*** %a) { ; CHECK: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly ; CHECK-LABEL: define {{[^@]+}}@f1 -; CHECK-SAME: (i8*** nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[A:%.*]]) #[[ATTR2]] { +; CHECK-SAME: (i8*** nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[A:%.*]]) #[[ATTR3]] { ; CHECK-NEXT: entry: ; CHECK-NEXT: [[X:%.*]] = getelementptr { [2 x i8*] }, { [2 x i8*] }* @g, i32 0, i32 0, i32 0 ; CHECK-NEXT: store i8** [[X]], i8*** [[A]], align 8 @@ -1100,36 +1100,40 @@ } ;. -; IS__TUNIT_OPM: attributes #[[ATTR0]] = { nofree nosync nounwind willreturn } +; IS__TUNIT_OPM: attributes #[[ATTR0:[0-9]+]] = { nocallback nofree nosync nounwind willreturn } ; IS__TUNIT_OPM: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn } -; IS__TUNIT_OPM: attributes #[[ATTR2]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } -; IS__TUNIT_OPM: attributes #[[ATTR3]] = { nofree norecurse nosync nounwind willreturn writeonly } -; IS__TUNIT_OPM: attributes #[[ATTR4]] = { argmemonly nofree norecurse nosync nounwind writeonly } -; IS__TUNIT_OPM: attributes #[[ATTR5]] = { nofree nosync nounwind readnone willreturn } -; IS__TUNIT_OPM: attributes #[[ATTR6]] = { willreturn } -; IS__TUNIT_OPM: attributes #[[ATTR7]] = { nofree nosync nounwind willreturn writeonly } +; IS__TUNIT_OPM: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind willreturn } +; IS__TUNIT_OPM: attributes #[[ATTR3]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } +; IS__TUNIT_OPM: attributes #[[ATTR4]] = { nofree norecurse nosync nounwind willreturn writeonly } +; IS__TUNIT_OPM: attributes #[[ATTR5]] = { argmemonly nofree norecurse nosync nounwind writeonly } +; IS__TUNIT_OPM: attributes #[[ATTR6]] = { nofree nosync nounwind readnone willreturn } +; IS__TUNIT_OPM: attributes #[[ATTR7]] = { willreturn } +; IS__TUNIT_OPM: attributes #[[ATTR8]] = { nofree nosync nounwind willreturn writeonly } ;. -; IS__TUNIT_NPM: attributes #[[ATTR0]] = { nofree nosync nounwind willreturn } +; IS__TUNIT_NPM: attributes #[[ATTR0:[0-9]+]] = { nocallback nofree nosync nounwind willreturn } ; IS__TUNIT_NPM: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn } -; IS__TUNIT_NPM: attributes #[[ATTR2]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } -; IS__TUNIT_NPM: attributes #[[ATTR3]] = { nofree norecurse nosync nounwind willreturn writeonly } -; IS__TUNIT_NPM: attributes #[[ATTR4]] = { nofree nosync nounwind readnone willreturn } -; IS__TUNIT_NPM: attributes #[[ATTR5]] = { willreturn } -; IS__TUNIT_NPM: attributes #[[ATTR6]] = { nofree nosync nounwind willreturn writeonly } +; IS__TUNIT_NPM: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind willreturn } +; IS__TUNIT_NPM: attributes #[[ATTR3]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } +; IS__TUNIT_NPM: attributes #[[ATTR4]] = { nofree norecurse nosync nounwind willreturn writeonly } +; IS__TUNIT_NPM: attributes #[[ATTR5]] = { nofree nosync nounwind readnone willreturn } +; IS__TUNIT_NPM: attributes #[[ATTR6]] = { willreturn } +; IS__TUNIT_NPM: attributes #[[ATTR7]] = { nofree nosync nounwind willreturn writeonly } ;. -; IS__CGSCC_OPM: attributes #[[ATTR0]] = { nofree nosync nounwind willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR0:[0-9]+]] = { nocallback nofree nosync nounwind willreturn } ; IS__CGSCC_OPM: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn } -; IS__CGSCC_OPM: attributes #[[ATTR2]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } -; IS__CGSCC_OPM: attributes #[[ATTR3]] = { argmemonly nofree norecurse nosync nounwind writeonly } -; IS__CGSCC_OPM: attributes #[[ATTR4]] = { nofree norecurse nosync nounwind willreturn writeonly } -; IS__CGSCC_OPM: attributes #[[ATTR5]] = { willreturn } -; IS__CGSCC_OPM: attributes #[[ATTR6]] = { nounwind willreturn writeonly } +; IS__CGSCC_OPM: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR3]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } +; IS__CGSCC_OPM: attributes #[[ATTR4]] = { argmemonly nofree norecurse nosync nounwind writeonly } +; IS__CGSCC_OPM: attributes #[[ATTR5]] = { nofree norecurse nosync nounwind willreturn writeonly } +; IS__CGSCC_OPM: attributes #[[ATTR6]] = { willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR7]] = { nounwind willreturn writeonly } ;. -; IS__CGSCC_NPM: attributes #[[ATTR0]] = { nofree nosync nounwind willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR0:[0-9]+]] = { nocallback nofree nosync nounwind willreturn } ; IS__CGSCC_NPM: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn } -; IS__CGSCC_NPM: attributes #[[ATTR2]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } -; IS__CGSCC_NPM: attributes #[[ATTR3]] = { nofree norecurse nosync nounwind willreturn writeonly } -; IS__CGSCC_NPM: attributes #[[ATTR4]] = { willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR2]] = { nofree norecurse nosync nounwind willreturn } +; IS__CGSCC_NPM: attributes #[[ATTR3]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } +; IS__CGSCC_NPM: attributes #[[ATTR4]] = { nofree norecurse nosync nounwind willreturn writeonly } +; IS__CGSCC_NPM: attributes #[[ATTR5]] = { willreturn } ;. ; CHECK: [[RNG0]] = !{i32 0, i32 -2147483648} ;. diff --git a/llvm/test/Transforms/Attributor/willreturn.ll b/llvm/test/Transforms/Attributor/willreturn.ll --- a/llvm/test/Transforms/Attributor/willreturn.ll +++ b/llvm/test/Transforms/Attributor/willreturn.ll @@ -37,9 +37,9 @@ ; IS________OPM-NEXT: br i1 [[TMP2]], label [[TMP9:%.*]], label [[TMP3:%.*]] ; IS________OPM: 3: ; IS________OPM-NEXT: [[TMP4:%.*]] = add nsw i32 [[TMP0]], -1 -; IS________OPM-NEXT: [[TMP5:%.*]] = tail call i32 @fib(i32 [[TMP4]]) #[[ATTR25:[0-9]+]] +; IS________OPM-NEXT: [[TMP5:%.*]] = tail call i32 @fib(i32 [[TMP4]]) #[[ATTR24:[0-9]+]] ; IS________OPM-NEXT: [[TMP6:%.*]] = add nsw i32 [[TMP0]], -2 -; IS________OPM-NEXT: [[TMP7:%.*]] = tail call i32 @fib(i32 [[TMP6]]) #[[ATTR25]] +; IS________OPM-NEXT: [[TMP7:%.*]] = tail call i32 @fib(i32 [[TMP6]]) #[[ATTR24]] ; IS________OPM-NEXT: [[TMP8:%.*]] = add nsw i32 [[TMP7]], [[TMP5]] ; IS________OPM-NEXT: ret i32 [[TMP8]] ; IS________OPM: 9: @@ -52,9 +52,9 @@ ; IS________NPM-NEXT: br i1 [[TMP2]], label [[TMP9:%.*]], label [[TMP3:%.*]] ; IS________NPM: 3: ; IS________NPM-NEXT: [[TMP4:%.*]] = add nsw i32 [[TMP0]], -1 -; IS________NPM-NEXT: [[TMP5:%.*]] = tail call i32 @fib(i32 [[TMP4]]) #[[ATTR27:[0-9]+]] +; IS________NPM-NEXT: [[TMP5:%.*]] = tail call i32 @fib(i32 [[TMP4]]) #[[ATTR26:[0-9]+]] ; IS________NPM-NEXT: [[TMP6:%.*]] = add nsw i32 [[TMP0]], -2 -; IS________NPM-NEXT: [[TMP7:%.*]] = tail call i32 @fib(i32 [[TMP6]]) #[[ATTR27]] +; IS________NPM-NEXT: [[TMP7:%.*]] = tail call i32 @fib(i32 [[TMP6]]) #[[ATTR26]] ; IS________NPM-NEXT: [[TMP8:%.*]] = add nsw i32 [[TMP7]], [[TMP5]] ; IS________NPM-NEXT: ret i32 [[TMP8]] ; IS________NPM: 9: @@ -199,8 +199,8 @@ ; IS________OPM-SAME: (i1 [[C:%.*]]) #[[ATTR4:[0-9]+]] { ; IS________OPM-NEXT: br i1 [[C]], label [[REC:%.*]], label [[END:%.*]] ; IS________OPM: rec: -; IS________OPM-NEXT: call void @sink() #[[ATTR13:[0-9]+]] -; IS________OPM-NEXT: call void @mutual_recursion2(i1 [[C]]) #[[ATTR26:[0-9]+]] +; IS________OPM-NEXT: call void @sink() #[[ATTR12:[0-9]+]] +; IS________OPM-NEXT: call void @mutual_recursion2(i1 [[C]]) #[[ATTR25:[0-9]+]] ; IS________OPM-NEXT: br label [[END]] ; IS________OPM: end: ; IS________OPM-NEXT: ret void @@ -210,8 +210,8 @@ ; IS________NPM-SAME: (i1 [[C:%.*]]) #[[ATTR4:[0-9]+]] { ; IS________NPM-NEXT: br i1 [[C]], label [[REC:%.*]], label [[END:%.*]] ; IS________NPM: rec: -; IS________NPM-NEXT: call void @sink() #[[ATTR13:[0-9]+]] -; IS________NPM-NEXT: call void @mutual_recursion2(i1 noundef [[C]]) #[[ATTR28:[0-9]+]] +; IS________NPM-NEXT: call void @sink() #[[ATTR12:[0-9]+]] +; IS________NPM-NEXT: call void @mutual_recursion2(i1 noundef [[C]]) #[[ATTR27:[0-9]+]] ; IS________NPM-NEXT: br label [[END]] ; IS________NPM: end: ; IS________NPM-NEXT: ret void @@ -230,13 +230,13 @@ ; IS________OPM: Function Attrs: nofree noinline nosync nounwind uwtable ; IS________OPM-LABEL: define {{[^@]+}}@mutual_recursion2 ; IS________OPM-SAME: (i1 [[C:%.*]]) #[[ATTR4]] { -; IS________OPM-NEXT: call void @mutual_recursion1(i1 [[C]]) #[[ATTR26]] +; IS________OPM-NEXT: call void @mutual_recursion1(i1 [[C]]) #[[ATTR25]] ; IS________OPM-NEXT: ret void ; ; IS________NPM: Function Attrs: nofree noinline nosync nounwind uwtable ; IS________NPM-LABEL: define {{[^@]+}}@mutual_recursion2 ; IS________NPM-SAME: (i1 [[C:%.*]]) #[[ATTR4]] { -; IS________NPM-NEXT: call void @mutual_recursion1(i1 [[C]]) #[[ATTR28]] +; IS________NPM-NEXT: call void @mutual_recursion1(i1 [[C]]) #[[ATTR27]] ; IS________NPM-NEXT: ret void ; call void @mutual_recursion1(i1 %c) @@ -312,7 +312,7 @@ ; TEST 6 (positive case) ; Call intrinsic function -; CHECK: Function Attrs: nofree nosync nounwind readnone speculatable willreturn +; CHECK: Function Attrs: nocallback nofree nosync nounwind readnone speculatable willreturn ; CHECK-NEXT: declare float @llvm.floor.f32(float) declare float @llvm.floor.f32(float) @@ -327,16 +327,16 @@ } define float @call_floor2(float %a) #0 { -; IS________OPM: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn +; IS________OPM: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn ; IS________OPM-LABEL: define {{[^@]+}}@call_floor2 -; IS________OPM-SAME: (float [[A:%.*]]) #[[ATTR9:[0-9]+]] { -; IS________OPM-NEXT: [[C:%.*]] = tail call float @llvm.floor.f32(float [[A]]) #[[ATTR27:[0-9]+]] +; IS________OPM-SAME: (float [[A:%.*]]) #[[ATTR0]] { +; IS________OPM-NEXT: [[C:%.*]] = tail call float @llvm.floor.f32(float [[A]]) #[[ATTR26:[0-9]+]] ; IS________OPM-NEXT: ret float [[C]] ; -; IS________NPM: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn +; IS________NPM: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn ; IS________NPM-LABEL: define {{[^@]+}}@call_floor2 -; IS________NPM-SAME: (float [[A:%.*]]) #[[ATTR9:[0-9]+]] { -; IS________NPM-NEXT: [[C:%.*]] = tail call float @llvm.floor.f32(float [[A]]) #[[ATTR29:[0-9]+]] +; IS________NPM-SAME: (float [[A:%.*]]) #[[ATTR0]] { +; IS________NPM-NEXT: [[C:%.*]] = tail call float @llvm.floor.f32(float [[A]]) #[[ATTR28:[0-9]+]] ; IS________NPM-NEXT: ret float [[C]] ; %c = tail call float @llvm.floor.f32(float %a) @@ -356,13 +356,13 @@ ; IS________OPM: Function Attrs: noinline nounwind uwtable ; IS________OPM-LABEL: define {{[^@]+}}@call_maybe_noreturn ; IS________OPM-SAME: () #[[ATTR7]] { -; IS________OPM-NEXT: tail call void @maybe_noreturn() #[[ATTR28:[0-9]+]] +; IS________OPM-NEXT: tail call void @maybe_noreturn() #[[ATTR27:[0-9]+]] ; IS________OPM-NEXT: ret void ; ; IS________NPM: Function Attrs: noinline nounwind uwtable ; IS________NPM-LABEL: define {{[^@]+}}@call_maybe_noreturn ; IS________NPM-SAME: () #[[ATTR7]] { -; IS________NPM-NEXT: tail call void @maybe_noreturn() #[[ATTR30:[0-9]+]] +; IS________NPM-NEXT: tail call void @maybe_noreturn() #[[ATTR29:[0-9]+]] ; IS________NPM-NEXT: ret void ; tail call void @maybe_noreturn() @@ -380,14 +380,14 @@ define void @f1() #0 { ; IS________OPM: Function Attrs: noinline nounwind uwtable willreturn ; IS________OPM-LABEL: define {{[^@]+}}@f1 -; IS________OPM-SAME: () #[[ATTR11:[0-9]+]] { -; IS________OPM-NEXT: tail call void @will_return() #[[ATTR29:[0-9]+]] +; IS________OPM-SAME: () #[[ATTR10:[0-9]+]] { +; IS________OPM-NEXT: tail call void @will_return() #[[ATTR28:[0-9]+]] ; IS________OPM-NEXT: ret void ; ; IS________NPM: Function Attrs: noinline nounwind uwtable willreturn ; IS________NPM-LABEL: define {{[^@]+}}@f1 -; IS________NPM-SAME: () #[[ATTR11:[0-9]+]] { -; IS________NPM-NEXT: tail call void @will_return() #[[ATTR31:[0-9]+]] +; IS________NPM-SAME: () #[[ATTR10:[0-9]+]] { +; IS________NPM-NEXT: tail call void @will_return() #[[ATTR30:[0-9]+]] ; IS________NPM-NEXT: ret void ; tail call void @will_return() @@ -397,8 +397,8 @@ define void @f2() #0 { ; CHECK: Function Attrs: noinline nounwind uwtable willreturn ; CHECK-LABEL: define {{[^@]+}}@f2 -; CHECK-SAME: () #[[ATTR11:[0-9]+]] { -; CHECK-NEXT: tail call void @f1() #[[ATTR13:[0-9]+]] +; CHECK-SAME: () #[[ATTR10:[0-9]+]] { +; CHECK-NEXT: tail call void @f1() #[[ATTR12:[0-9]+]] ; CHECK-NEXT: ret void ; tail call void @f1() @@ -439,8 +439,8 @@ define void @invoke_test() personality i32 (...)* @__gxx_personality_v0 { ; IS________OPM: Function Attrs: nounwind willreturn ; IS________OPM-LABEL: define {{[^@]+}}@invoke_test -; IS________OPM-SAME: () #[[ATTR13]] personality i32 (...)* @__gxx_personality_v0 { -; IS________OPM-NEXT: [[TMP1:%.*]] = invoke i1 @maybe_raise_exception() #[[ATTR29]] +; IS________OPM-SAME: () #[[ATTR12]] personality i32 (...)* @__gxx_personality_v0 { +; IS________OPM-NEXT: [[TMP1:%.*]] = invoke i1 @maybe_raise_exception() #[[ATTR28]] ; IS________OPM-NEXT: to label [[N:%.*]] unwind label [[F:%.*]] ; IS________OPM: N: ; IS________OPM-NEXT: ret void @@ -451,8 +451,8 @@ ; ; IS________NPM: Function Attrs: nounwind willreturn ; IS________NPM-LABEL: define {{[^@]+}}@invoke_test -; IS________NPM-SAME: () #[[ATTR13]] personality i32 (...)* @__gxx_personality_v0 { -; IS________NPM-NEXT: [[TMP1:%.*]] = invoke i1 @maybe_raise_exception() #[[ATTR31]] +; IS________NPM-SAME: () #[[ATTR12]] personality i32 (...)* @__gxx_personality_v0 { +; IS________NPM-NEXT: [[TMP1:%.*]] = invoke i1 @maybe_raise_exception() #[[ATTR30]] ; IS________NPM-NEXT: to label [[N:%.*]] unwind label [[F:%.*]] ; IS________NPM: N: ; IS________NPM-NEXT: ret void @@ -487,7 +487,7 @@ define i32 @loop_constant_trip_count(i32* nocapture readonly %0) #0 { ; IS________OPM: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly uwtable ; IS________OPM-LABEL: define {{[^@]+}}@loop_constant_trip_count -; IS________OPM-SAME: (i32* nocapture nofree readonly [[TMP0:%.*]]) #[[ATTR14:[0-9]+]] { +; IS________OPM-SAME: (i32* nocapture nofree readonly [[TMP0:%.*]]) #[[ATTR13:[0-9]+]] { ; IS________OPM-NEXT: br label [[TMP3:%.*]] ; IS________OPM: 2: ; IS________OPM-NEXT: ret i32 [[TMP8:%.*]] @@ -503,7 +503,7 @@ ; ; IS________NPM: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly uwtable willreturn ; IS________NPM-LABEL: define {{[^@]+}}@loop_constant_trip_count -; IS________NPM-SAME: (i32* nocapture nofree nonnull readonly dereferenceable(4) [[TMP0:%.*]]) #[[ATTR14:[0-9]+]] { +; IS________NPM-SAME: (i32* nocapture nofree nonnull readonly dereferenceable(4) [[TMP0:%.*]]) #[[ATTR13:[0-9]+]] { ; IS________NPM-NEXT: br label [[TMP3:%.*]] ; IS________NPM: 2: ; IS________NPM-NEXT: ret i32 [[TMP8:%.*]] @@ -547,7 +547,7 @@ define i32 @loop_trip_count_unbound(i32 %0, i32 %1, i32* nocapture readonly %2, i32 %3) local_unnamed_addr #0 { ; IS________OPM: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly uwtable ; IS________OPM-LABEL: define {{[^@]+}}@loop_trip_count_unbound -; IS________OPM-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]], i32* nocapture nofree readonly [[TMP2:%.*]], i32 [[TMP3:%.*]]) local_unnamed_addr #[[ATTR14]] { +; IS________OPM-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]], i32* nocapture nofree readonly [[TMP2:%.*]], i32 [[TMP3:%.*]]) local_unnamed_addr #[[ATTR13]] { ; IS________OPM-NEXT: [[TMP5:%.*]] = icmp eq i32 [[TMP0]], [[TMP1]] ; IS________OPM-NEXT: br i1 [[TMP5]], label [[TMP6:%.*]], label [[TMP8:%.*]] ; IS________OPM: 6: @@ -566,7 +566,7 @@ ; ; IS________NPM: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly uwtable ; IS________NPM-LABEL: define {{[^@]+}}@loop_trip_count_unbound -; IS________NPM-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]], i32* nocapture nofree readonly [[TMP2:%.*]], i32 [[TMP3:%.*]]) local_unnamed_addr #[[ATTR15:[0-9]+]] { +; IS________NPM-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]], i32* nocapture nofree readonly [[TMP2:%.*]], i32 [[TMP3:%.*]]) local_unnamed_addr #[[ATTR14:[0-9]+]] { ; IS________NPM-NEXT: [[TMP5:%.*]] = icmp eq i32 [[TMP0]], [[TMP1]] ; IS________NPM-NEXT: br i1 [[TMP5]], label [[TMP6:%.*]], label [[TMP8:%.*]] ; IS________NPM: 6: @@ -617,7 +617,7 @@ define i32 @loop_trip_dec(i32 %0, i32* nocapture readonly %1) local_unnamed_addr #0 { ; IS________OPM: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly uwtable ; IS________OPM-LABEL: define {{[^@]+}}@loop_trip_dec -; IS________OPM-SAME: (i32 [[TMP0:%.*]], i32* nocapture nofree readonly [[TMP1:%.*]]) local_unnamed_addr #[[ATTR14]] { +; IS________OPM-SAME: (i32 [[TMP0:%.*]], i32* nocapture nofree readonly [[TMP1:%.*]]) local_unnamed_addr #[[ATTR13]] { ; IS________OPM-NEXT: [[TMP3:%.*]] = icmp sgt i32 [[TMP0]], -1 ; IS________OPM-NEXT: br i1 [[TMP3]], label [[TMP4:%.*]], label [[TMP14:%.*]] ; IS________OPM: 4: @@ -638,7 +638,7 @@ ; ; IS________NPM: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly uwtable willreturn ; IS________NPM-LABEL: define {{[^@]+}}@loop_trip_dec -; IS________NPM-SAME: (i32 [[TMP0:%.*]], i32* nocapture nofree readonly [[TMP1:%.*]]) local_unnamed_addr #[[ATTR14]] { +; IS________NPM-SAME: (i32 [[TMP0:%.*]], i32* nocapture nofree readonly [[TMP1:%.*]]) local_unnamed_addr #[[ATTR13]] { ; IS________NPM-NEXT: [[TMP3:%.*]] = icmp sgt i32 [[TMP0]], -1 ; IS________NPM-NEXT: br i1 [[TMP3]], label [[TMP4:%.*]], label [[TMP14:%.*]] ; IS________NPM: 4: @@ -709,16 +709,16 @@ define void @unreachable_exit_positive1() #0 { ; IS________OPM: Function Attrs: noinline nounwind uwtable willreturn ; IS________OPM-LABEL: define {{[^@]+}}@unreachable_exit_positive1 -; IS________OPM-SAME: () #[[ATTR11]] { -; IS________OPM-NEXT: tail call void @will_return() #[[ATTR29]] +; IS________OPM-SAME: () #[[ATTR10]] { +; IS________OPM-NEXT: tail call void @will_return() #[[ATTR28]] ; IS________OPM-NEXT: ret void ; IS________OPM: unreachable_label: ; IS________OPM-NEXT: unreachable ; ; IS________NPM: Function Attrs: noinline nounwind uwtable willreturn ; IS________NPM-LABEL: define {{[^@]+}}@unreachable_exit_positive1 -; IS________NPM-SAME: () #[[ATTR11]] { -; IS________NPM-NEXT: tail call void @will_return() #[[ATTR31]] +; IS________NPM-SAME: () #[[ATTR10]] { +; IS________NPM-NEXT: tail call void @will_return() #[[ATTR30]] ; IS________NPM-NEXT: ret void ; IS________NPM: unreachable_label: ; IS________NPM-NEXT: unreachable @@ -811,7 +811,7 @@ define void @unreachable_exit_negative2() #0 { ; IS________OPM: Function Attrs: nofree noinline norecurse noreturn nosync nounwind readnone uwtable ; IS________OPM-LABEL: define {{[^@]+}}@unreachable_exit_negative2 -; IS________OPM-SAME: () #[[ATTR15:[0-9]+]] { +; IS________OPM-SAME: () #[[ATTR14:[0-9]+]] { ; IS________OPM-NEXT: br label [[L1:%.*]] ; IS________OPM: L1: ; IS________OPM-NEXT: br label [[L2:%.*]] @@ -822,7 +822,7 @@ ; ; IS________NPM: Function Attrs: nofree noinline norecurse noreturn nosync nounwind readnone uwtable ; IS________NPM-LABEL: define {{[^@]+}}@unreachable_exit_negative2 -; IS________NPM-SAME: () #[[ATTR16:[0-9]+]] { +; IS________NPM-SAME: () #[[ATTR15:[0-9]+]] { ; IS________NPM-NEXT: br label [[L1:%.*]] ; IS________NPM: L1: ; IS________NPM-NEXT: br label [[L2:%.*]] @@ -871,7 +871,7 @@ define i32 @infinite_loop_inside_bounded_loop(i32 %n) { ; IS________OPM: Function Attrs: nofree norecurse nosync nounwind readnone ; IS________OPM-LABEL: define {{[^@]+}}@infinite_loop_inside_bounded_loop -; IS________OPM-SAME: (i32 [[N:%.*]]) #[[ATTR17:[0-9]+]] { +; IS________OPM-SAME: (i32 [[N:%.*]]) #[[ATTR16:[0-9]+]] { ; IS________OPM-NEXT: entry: ; IS________OPM-NEXT: br label [[FOR_COND:%.*]] ; IS________OPM: for.cond: @@ -892,7 +892,7 @@ ; ; IS________NPM: Function Attrs: nofree norecurse nosync nounwind readnone ; IS________NPM-LABEL: define {{[^@]+}}@infinite_loop_inside_bounded_loop -; IS________NPM-SAME: (i32 [[N:%.*]]) #[[ATTR18:[0-9]+]] { +; IS________NPM-SAME: (i32 [[N:%.*]]) #[[ATTR17:[0-9]+]] { ; IS________NPM-NEXT: entry: ; IS________NPM-NEXT: br label [[FOR_COND:%.*]] ; IS________NPM: for.cond: @@ -953,7 +953,7 @@ define i32 @bounded_nested_loops(i32 %n) { ; IS________OPM: Function Attrs: nofree norecurse nosync nounwind readnone ; IS________OPM-LABEL: define {{[^@]+}}@bounded_nested_loops -; IS________OPM-SAME: (i32 [[N:%.*]]) #[[ATTR17]] { +; IS________OPM-SAME: (i32 [[N:%.*]]) #[[ATTR16]] { ; IS________OPM-NEXT: entry: ; IS________OPM-NEXT: br label [[FOR_COND:%.*]] ; IS________OPM: for.cond: @@ -982,7 +982,7 @@ ; ; IS________NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS________NPM-LABEL: define {{[^@]+}}@bounded_nested_loops -; IS________NPM-SAME: (i32 [[N:%.*]]) #[[ATTR19:[0-9]+]] { +; IS________NPM-SAME: (i32 [[N:%.*]]) #[[ATTR18:[0-9]+]] { ; IS________NPM-NEXT: entry: ; IS________NPM-NEXT: br label [[FOR_COND:%.*]] ; IS________NPM: for.cond: @@ -1059,7 +1059,7 @@ define i32 @bounded_loop_inside_unbounded_loop(i32 %n) { ; IS________OPM: Function Attrs: nofree norecurse nosync nounwind readnone ; IS________OPM-LABEL: define {{[^@]+}}@bounded_loop_inside_unbounded_loop -; IS________OPM-SAME: (i32 [[N:%.*]]) #[[ATTR17]] { +; IS________OPM-SAME: (i32 [[N:%.*]]) #[[ATTR16]] { ; IS________OPM-NEXT: entry: ; IS________OPM-NEXT: br label [[WHILE_COND:%.*]] ; IS________OPM: while.cond: @@ -1090,7 +1090,7 @@ ; ; IS________NPM: Function Attrs: nofree norecurse nosync nounwind readnone ; IS________NPM-LABEL: define {{[^@]+}}@bounded_loop_inside_unbounded_loop -; IS________NPM-SAME: (i32 [[N:%.*]]) #[[ATTR18]] { +; IS________NPM-SAME: (i32 [[N:%.*]]) #[[ATTR17]] { ; IS________NPM-NEXT: entry: ; IS________NPM-NEXT: br label [[WHILE_COND:%.*]] ; IS________NPM: while.cond: @@ -1174,7 +1174,7 @@ define i32 @nested_unbounded_loops(i32 %n) { ; IS________OPM: Function Attrs: nofree norecurse nosync nounwind readnone ; IS________OPM-LABEL: define {{[^@]+}}@nested_unbounded_loops -; IS________OPM-SAME: (i32 [[N:%.*]]) #[[ATTR17]] { +; IS________OPM-SAME: (i32 [[N:%.*]]) #[[ATTR16]] { ; IS________OPM-NEXT: entry: ; IS________OPM-NEXT: br label [[WHILE_COND:%.*]] ; IS________OPM: while.cond: @@ -1204,7 +1204,7 @@ ; ; IS________NPM: Function Attrs: nofree norecurse nosync nounwind readnone ; IS________NPM-LABEL: define {{[^@]+}}@nested_unbounded_loops -; IS________NPM-SAME: (i32 [[N:%.*]]) #[[ATTR18]] { +; IS________NPM-SAME: (i32 [[N:%.*]]) #[[ATTR17]] { ; IS________NPM-NEXT: entry: ; IS________NPM-NEXT: br label [[WHILE_COND:%.*]] ; IS________NPM: while.cond: @@ -1294,9 +1294,9 @@ define void @non_loop_cycle(i32 %n) { ; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind readnone ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@non_loop_cycle -; IS__TUNIT_OPM-SAME: (i32 [[N:%.*]]) #[[ATTR17]] { +; IS__TUNIT_OPM-SAME: (i32 [[N:%.*]]) #[[ATTR16]] { ; IS__TUNIT_OPM-NEXT: entry: -; IS__TUNIT_OPM-NEXT: [[CALL:%.*]] = call i32 @fact_loop(i32 [[N]]) #[[ATTR25]] +; IS__TUNIT_OPM-NEXT: [[CALL:%.*]] = call i32 @fact_loop(i32 [[N]]) #[[ATTR24]] ; IS__TUNIT_OPM-NEXT: [[CMP:%.*]] = icmp sgt i32 [[CALL]], 5 ; IS__TUNIT_OPM-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]] ; IS__TUNIT_OPM: if.then: @@ -1304,7 +1304,7 @@ ; IS__TUNIT_OPM: if.else: ; IS__TUNIT_OPM-NEXT: br label [[ENTRY2:%.*]] ; IS__TUNIT_OPM: entry1: -; IS__TUNIT_OPM-NEXT: [[CALL1:%.*]] = call i32 @fact_loop(i32 [[N]]) #[[ATTR25]] +; IS__TUNIT_OPM-NEXT: [[CALL1:%.*]] = call i32 @fact_loop(i32 [[N]]) #[[ATTR24]] ; IS__TUNIT_OPM-NEXT: [[CMP2:%.*]] = icmp sgt i32 [[CALL1]], 5 ; IS__TUNIT_OPM-NEXT: br i1 [[CMP2]], label [[IF_THEN3:%.*]], label [[IF_ELSE4:%.*]] ; IS__TUNIT_OPM: if.then3: @@ -1312,7 +1312,7 @@ ; IS__TUNIT_OPM: if.else4: ; IS__TUNIT_OPM-NEXT: br label [[ENTRY2]] ; IS__TUNIT_OPM: entry2: -; IS__TUNIT_OPM-NEXT: [[CALL5:%.*]] = call i32 @fact_loop(i32 [[N]]) #[[ATTR25]] +; IS__TUNIT_OPM-NEXT: [[CALL5:%.*]] = call i32 @fact_loop(i32 [[N]]) #[[ATTR24]] ; IS__TUNIT_OPM-NEXT: [[CMP6:%.*]] = icmp sgt i32 [[CALL5]], 5 ; IS__TUNIT_OPM-NEXT: br i1 [[CMP6]], label [[IF_THEN7:%.*]], label [[IF_ELSE8:%.*]] ; IS__TUNIT_OPM: if.then7: @@ -1324,9 +1324,9 @@ ; ; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_loop_cycle -; IS__TUNIT_NPM-SAME: (i32 [[N:%.*]]) #[[ATTR18]] { +; IS__TUNIT_NPM-SAME: (i32 [[N:%.*]]) #[[ATTR17]] { ; IS__TUNIT_NPM-NEXT: entry: -; IS__TUNIT_NPM-NEXT: [[CALL:%.*]] = call i32 @fact_loop(i32 [[N]]) #[[ATTR27]] +; IS__TUNIT_NPM-NEXT: [[CALL:%.*]] = call i32 @fact_loop(i32 [[N]]) #[[ATTR26]] ; IS__TUNIT_NPM-NEXT: [[CMP:%.*]] = icmp sgt i32 [[CALL]], 5 ; IS__TUNIT_NPM-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]] ; IS__TUNIT_NPM: if.then: @@ -1334,7 +1334,7 @@ ; IS__TUNIT_NPM: if.else: ; IS__TUNIT_NPM-NEXT: br label [[ENTRY2:%.*]] ; IS__TUNIT_NPM: entry1: -; IS__TUNIT_NPM-NEXT: [[CALL1:%.*]] = call i32 @fact_loop(i32 [[N]]) #[[ATTR27]] +; IS__TUNIT_NPM-NEXT: [[CALL1:%.*]] = call i32 @fact_loop(i32 [[N]]) #[[ATTR26]] ; IS__TUNIT_NPM-NEXT: [[CMP2:%.*]] = icmp sgt i32 [[CALL1]], 5 ; IS__TUNIT_NPM-NEXT: br i1 [[CMP2]], label [[IF_THEN3:%.*]], label [[IF_ELSE4:%.*]] ; IS__TUNIT_NPM: if.then3: @@ -1342,7 +1342,7 @@ ; IS__TUNIT_NPM: if.else4: ; IS__TUNIT_NPM-NEXT: br label [[ENTRY2]] ; IS__TUNIT_NPM: entry2: -; IS__TUNIT_NPM-NEXT: [[CALL5:%.*]] = call i32 @fact_loop(i32 [[N]]) #[[ATTR27]] +; IS__TUNIT_NPM-NEXT: [[CALL5:%.*]] = call i32 @fact_loop(i32 [[N]]) #[[ATTR26]] ; IS__TUNIT_NPM-NEXT: [[CMP6:%.*]] = icmp sgt i32 [[CALL5]], 5 ; IS__TUNIT_NPM-NEXT: br i1 [[CMP6]], label [[IF_THEN7:%.*]], label [[IF_ELSE8:%.*]] ; IS__TUNIT_NPM: if.then7: @@ -1354,9 +1354,9 @@ ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@non_loop_cycle -; IS__CGSCC_OPM-SAME: (i32 [[N:%.*]]) #[[ATTR17]] { +; IS__CGSCC_OPM-SAME: (i32 [[N:%.*]]) #[[ATTR16]] { ; IS__CGSCC_OPM-NEXT: entry: -; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call i32 @fact_loop(i32 [[N]]) #[[ATTR30:[0-9]+]] +; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call i32 @fact_loop(i32 [[N]]) #[[ATTR29:[0-9]+]] ; IS__CGSCC_OPM-NEXT: [[CMP:%.*]] = icmp sgt i32 [[CALL]], 5 ; IS__CGSCC_OPM-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]] ; IS__CGSCC_OPM: if.then: @@ -1364,7 +1364,7 @@ ; IS__CGSCC_OPM: if.else: ; IS__CGSCC_OPM-NEXT: br label [[ENTRY2:%.*]] ; IS__CGSCC_OPM: entry1: -; IS__CGSCC_OPM-NEXT: [[CALL1:%.*]] = call i32 @fact_loop(i32 [[N]]) #[[ATTR30]] +; IS__CGSCC_OPM-NEXT: [[CALL1:%.*]] = call i32 @fact_loop(i32 [[N]]) #[[ATTR29]] ; IS__CGSCC_OPM-NEXT: [[CMP2:%.*]] = icmp sgt i32 [[CALL1]], 5 ; IS__CGSCC_OPM-NEXT: br i1 [[CMP2]], label [[IF_THEN3:%.*]], label [[IF_ELSE4:%.*]] ; IS__CGSCC_OPM: if.then3: @@ -1372,7 +1372,7 @@ ; IS__CGSCC_OPM: if.else4: ; IS__CGSCC_OPM-NEXT: br label [[ENTRY2]] ; IS__CGSCC_OPM: entry2: -; IS__CGSCC_OPM-NEXT: [[CALL5:%.*]] = call i32 @fact_loop(i32 [[N]]) #[[ATTR30]] +; IS__CGSCC_OPM-NEXT: [[CALL5:%.*]] = call i32 @fact_loop(i32 [[N]]) #[[ATTR29]] ; IS__CGSCC_OPM-NEXT: [[CMP6:%.*]] = icmp sgt i32 [[CALL5]], 5 ; IS__CGSCC_OPM-NEXT: br i1 [[CMP6]], label [[IF_THEN7:%.*]], label [[IF_ELSE8:%.*]] ; IS__CGSCC_OPM: if.then7: @@ -1384,7 +1384,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@non_loop_cycle -; IS__CGSCC_NPM-SAME: (i32 [[N:%.*]]) #[[ATTR18]] { +; IS__CGSCC_NPM-SAME: (i32 [[N:%.*]]) #[[ATTR17]] { ; IS__CGSCC_NPM-NEXT: entry: ; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call i32 @fact_loop(i32 [[N]]) ; IS__CGSCC_NPM-NEXT: [[CMP:%.*]] = icmp sgt i32 [[CALL]], 5 @@ -1458,13 +1458,13 @@ define void @willreturn_mustprogress_caller_1() mustprogress { ; IS________OPM: Function Attrs: mustprogress ; IS________OPM-LABEL: define {{[^@]+}}@willreturn_mustprogress_caller_1 -; IS________OPM-SAME: () #[[ATTR20:[0-9]+]] { +; IS________OPM-SAME: () #[[ATTR19:[0-9]+]] { ; IS________OPM-NEXT: call void @unknown() ; IS________OPM-NEXT: ret void ; ; IS________NPM: Function Attrs: mustprogress ; IS________NPM-LABEL: define {{[^@]+}}@willreturn_mustprogress_caller_1 -; IS________NPM-SAME: () #[[ATTR22:[0-9]+]] { +; IS________NPM-SAME: () #[[ATTR21:[0-9]+]] { ; IS________NPM-NEXT: call void @unknown() ; IS________NPM-NEXT: ret void ; @@ -1474,14 +1474,14 @@ define void @willreturn_mustprogress_caller_2() mustprogress { ; IS________OPM: Function Attrs: mustprogress readonly willreturn ; IS________OPM-LABEL: define {{[^@]+}}@willreturn_mustprogress_caller_2 -; IS________OPM-SAME: () #[[ATTR22:[0-9]+]] { -; IS________OPM-NEXT: call void @readonly() #[[ATTR18:[0-9]+]] +; IS________OPM-SAME: () #[[ATTR21:[0-9]+]] { +; IS________OPM-NEXT: call void @readonly() #[[ATTR17:[0-9]+]] ; IS________OPM-NEXT: ret void ; ; IS________NPM: Function Attrs: mustprogress readonly willreturn ; IS________NPM-LABEL: define {{[^@]+}}@willreturn_mustprogress_caller_2 -; IS________NPM-SAME: () #[[ATTR24:[0-9]+]] { -; IS________NPM-NEXT: call void @readonly() #[[ATTR20:[0-9]+]] +; IS________NPM-SAME: () #[[ATTR23:[0-9]+]] { +; IS________NPM-NEXT: call void @readonly() #[[ATTR19:[0-9]+]] ; IS________NPM-NEXT: ret void ; call void @readonly() @@ -1490,13 +1490,13 @@ define void @willreturn_mustprogress_caller_3() mustprogress { ; IS________OPM: Function Attrs: mustprogress nosync readnone willreturn ; IS________OPM-LABEL: define {{[^@]+}}@willreturn_mustprogress_caller_3 -; IS________OPM-SAME: () #[[ATTR23:[0-9]+]] { +; IS________OPM-SAME: () #[[ATTR22:[0-9]+]] { ; IS________OPM-NEXT: call void @readnone() ; IS________OPM-NEXT: ret void ; ; IS________NPM: Function Attrs: mustprogress nosync readnone willreturn ; IS________NPM-LABEL: define {{[^@]+}}@willreturn_mustprogress_caller_3 -; IS________NPM-SAME: () #[[ATTR25:[0-9]+]] { +; IS________NPM-SAME: () #[[ATTR24:[0-9]+]] { ; IS________NPM-NEXT: call void @readnone() ; IS________NPM-NEXT: ret void ; @@ -1514,14 +1514,14 @@ define void @willreturn_mustprogress_callee_2() { ; IS________OPM: Function Attrs: readonly willreturn ; IS________OPM-LABEL: define {{[^@]+}}@willreturn_mustprogress_callee_2 -; IS________OPM-SAME: () #[[ATTR24:[0-9]+]] { -; IS________OPM-NEXT: call void @readonly_mustprogress() #[[ATTR24]] +; IS________OPM-SAME: () #[[ATTR23:[0-9]+]] { +; IS________OPM-NEXT: call void @readonly_mustprogress() #[[ATTR23]] ; IS________OPM-NEXT: ret void ; ; IS________NPM: Function Attrs: readonly willreturn ; IS________NPM-LABEL: define {{[^@]+}}@willreturn_mustprogress_callee_2 -; IS________NPM-SAME: () #[[ATTR26:[0-9]+]] { -; IS________NPM-NEXT: call void @readonly_mustprogress() #[[ATTR26]] +; IS________NPM-SAME: () #[[ATTR25:[0-9]+]] { +; IS________NPM-NEXT: call void @readonly_mustprogress() #[[ATTR25]] ; IS________NPM-NEXT: ret void ; call void @readonly_mustprogress() @@ -1538,14 +1538,14 @@ define void @willreturn_mustprogress_callee_4() { ; IS________OPM: Function Attrs: readonly willreturn ; IS________OPM-LABEL: define {{[^@]+}}@willreturn_mustprogress_callee_4 -; IS________OPM-SAME: () #[[ATTR24]] { -; IS________OPM-NEXT: call void @willreturn_mustprogress_callee_2() #[[ATTR24]] +; IS________OPM-SAME: () #[[ATTR23]] { +; IS________OPM-NEXT: call void @willreturn_mustprogress_callee_2() #[[ATTR23]] ; IS________OPM-NEXT: ret void ; ; IS________NPM: Function Attrs: readonly willreturn ; IS________NPM-LABEL: define {{[^@]+}}@willreturn_mustprogress_callee_4 -; IS________NPM-SAME: () #[[ATTR26]] { -; IS________NPM-NEXT: call void @willreturn_mustprogress_callee_2() #[[ATTR26]] +; IS________NPM-SAME: () #[[ATTR25]] { +; IS________NPM-NEXT: call void @willreturn_mustprogress_callee_2() #[[ATTR25]] ; IS________NPM-NEXT: ret void ; call void @willreturn_mustprogress_callee_2() @@ -1563,28 +1563,27 @@ ; IS__TUNIT_OPM: attributes #[[ATTR5]] = { noreturn } ; IS__TUNIT_OPM: attributes #[[ATTR6]] = { noinline noreturn nounwind uwtable } ; IS__TUNIT_OPM: attributes #[[ATTR7]] = { noinline nounwind uwtable } -; IS__TUNIT_OPM: attributes #[[ATTR8:[0-9]+]] = { nofree nosync nounwind readnone speculatable willreturn } -; IS__TUNIT_OPM: attributes #[[ATTR9]] = { nofree noinline nosync nounwind readnone uwtable willreturn } -; IS__TUNIT_OPM: attributes #[[ATTR10:[0-9]+]] = { norecurse willreturn } -; IS__TUNIT_OPM: attributes #[[ATTR11]] = { noinline nounwind uwtable willreturn } -; IS__TUNIT_OPM: attributes #[[ATTR12:[0-9]+]] = { noinline uwtable willreturn } -; IS__TUNIT_OPM: attributes #[[ATTR13]] = { nounwind willreturn } -; IS__TUNIT_OPM: attributes #[[ATTR14]] = { argmemonly nofree noinline norecurse nosync nounwind readonly uwtable } -; IS__TUNIT_OPM: attributes #[[ATTR15]] = { nofree noinline norecurse noreturn nosync nounwind readnone uwtable } -; IS__TUNIT_OPM: attributes #[[ATTR16:[0-9]+]] = { noreturn nounwind } -; IS__TUNIT_OPM: attributes #[[ATTR17]] = { nofree norecurse nosync nounwind readnone } -; IS__TUNIT_OPM: attributes #[[ATTR18]] = { readonly } -; IS__TUNIT_OPM: attributes #[[ATTR19:[0-9]+]] = { readnone } -; IS__TUNIT_OPM: attributes #[[ATTR20]] = { mustprogress } -; IS__TUNIT_OPM: attributes #[[ATTR21:[0-9]+]] = { mustprogress readonly } -; IS__TUNIT_OPM: attributes #[[ATTR22]] = { mustprogress readonly willreturn } -; IS__TUNIT_OPM: attributes #[[ATTR23]] = { mustprogress nosync readnone willreturn } -; IS__TUNIT_OPM: attributes #[[ATTR24]] = { readonly willreturn } -; IS__TUNIT_OPM: attributes #[[ATTR25]] = { nofree nosync nounwind readnone } -; IS__TUNIT_OPM: attributes #[[ATTR26]] = { nofree nosync nounwind } -; IS__TUNIT_OPM: attributes #[[ATTR27]] = { readnone willreturn } -; IS__TUNIT_OPM: attributes #[[ATTR28]] = { nounwind } -; IS__TUNIT_OPM: attributes #[[ATTR29]] = { willreturn } +; IS__TUNIT_OPM: attributes #[[ATTR8:[0-9]+]] = { nocallback nofree nosync nounwind readnone speculatable willreturn } +; IS__TUNIT_OPM: attributes #[[ATTR9:[0-9]+]] = { norecurse willreturn } +; IS__TUNIT_OPM: attributes #[[ATTR10]] = { noinline nounwind uwtable willreturn } +; IS__TUNIT_OPM: attributes #[[ATTR11:[0-9]+]] = { noinline uwtable willreturn } +; IS__TUNIT_OPM: attributes #[[ATTR12]] = { nounwind willreturn } +; IS__TUNIT_OPM: attributes #[[ATTR13]] = { argmemonly nofree noinline norecurse nosync nounwind readonly uwtable } +; IS__TUNIT_OPM: attributes #[[ATTR14]] = { nofree noinline norecurse noreturn nosync nounwind readnone uwtable } +; IS__TUNIT_OPM: attributes #[[ATTR15:[0-9]+]] = { noreturn nounwind } +; IS__TUNIT_OPM: attributes #[[ATTR16]] = { nofree norecurse nosync nounwind readnone } +; IS__TUNIT_OPM: attributes #[[ATTR17]] = { readonly } +; IS__TUNIT_OPM: attributes #[[ATTR18:[0-9]+]] = { readnone } +; IS__TUNIT_OPM: attributes #[[ATTR19]] = { mustprogress } +; IS__TUNIT_OPM: attributes #[[ATTR20:[0-9]+]] = { mustprogress readonly } +; IS__TUNIT_OPM: attributes #[[ATTR21]] = { mustprogress readonly willreturn } +; IS__TUNIT_OPM: attributes #[[ATTR22]] = { mustprogress nosync readnone willreturn } +; IS__TUNIT_OPM: attributes #[[ATTR23]] = { readonly willreturn } +; IS__TUNIT_OPM: attributes #[[ATTR24]] = { nofree nosync nounwind readnone } +; IS__TUNIT_OPM: attributes #[[ATTR25]] = { nofree nosync nounwind } +; IS__TUNIT_OPM: attributes #[[ATTR26]] = { readnone willreturn } +; IS__TUNIT_OPM: attributes #[[ATTR27]] = { nounwind } +; IS__TUNIT_OPM: attributes #[[ATTR28]] = { willreturn } ;. ; IS________NPM: attributes #[[ATTR0]] = { nofree noinline norecurse nosync nounwind readnone uwtable willreturn } ; IS________NPM: attributes #[[ATTR1]] = { nofree noinline nosync nounwind readnone uwtable } @@ -1594,30 +1593,29 @@ ; IS________NPM: attributes #[[ATTR5]] = { noreturn } ; IS________NPM: attributes #[[ATTR6]] = { noinline noreturn nounwind uwtable } ; IS________NPM: attributes #[[ATTR7]] = { noinline nounwind uwtable } -; IS________NPM: attributes #[[ATTR8:[0-9]+]] = { nofree nosync nounwind readnone speculatable willreturn } -; IS________NPM: attributes #[[ATTR9]] = { nofree noinline nosync nounwind readnone uwtable willreturn } -; IS________NPM: attributes #[[ATTR10:[0-9]+]] = { norecurse willreturn } -; IS________NPM: attributes #[[ATTR11]] = { noinline nounwind uwtable willreturn } -; IS________NPM: attributes #[[ATTR12:[0-9]+]] = { noinline uwtable willreturn } -; IS________NPM: attributes #[[ATTR13]] = { nounwind willreturn } -; IS________NPM: attributes #[[ATTR14]] = { argmemonly nofree noinline norecurse nosync nounwind readonly uwtable willreturn } -; IS________NPM: attributes #[[ATTR15]] = { argmemonly nofree noinline norecurse nosync nounwind readonly uwtable } -; IS________NPM: attributes #[[ATTR16]] = { nofree noinline norecurse noreturn nosync nounwind readnone uwtable } -; IS________NPM: attributes #[[ATTR17:[0-9]+]] = { noreturn nounwind } -; IS________NPM: attributes #[[ATTR18]] = { nofree norecurse nosync nounwind readnone } -; IS________NPM: attributes #[[ATTR19]] = { nofree norecurse nosync nounwind readnone willreturn } -; IS________NPM: attributes #[[ATTR20]] = { readonly } -; IS________NPM: attributes #[[ATTR21:[0-9]+]] = { readnone } -; IS________NPM: attributes #[[ATTR22]] = { mustprogress } -; IS________NPM: attributes #[[ATTR23:[0-9]+]] = { mustprogress readonly } -; IS________NPM: attributes #[[ATTR24]] = { mustprogress readonly willreturn } -; IS________NPM: attributes #[[ATTR25]] = { mustprogress nosync readnone willreturn } -; IS________NPM: attributes #[[ATTR26]] = { readonly willreturn } -; IS________NPM: attributes #[[ATTR27]] = { nofree nosync nounwind readnone } -; IS________NPM: attributes #[[ATTR28]] = { nofree nosync nounwind } -; IS________NPM: attributes #[[ATTR29]] = { readnone willreturn } -; IS________NPM: attributes #[[ATTR30]] = { nounwind } -; IS________NPM: attributes #[[ATTR31]] = { willreturn } +; IS________NPM: attributes #[[ATTR8:[0-9]+]] = { nocallback nofree nosync nounwind readnone speculatable willreturn } +; IS________NPM: attributes #[[ATTR9:[0-9]+]] = { norecurse willreturn } +; IS________NPM: attributes #[[ATTR10]] = { noinline nounwind uwtable willreturn } +; IS________NPM: attributes #[[ATTR11:[0-9]+]] = { noinline uwtable willreturn } +; IS________NPM: attributes #[[ATTR12]] = { nounwind willreturn } +; IS________NPM: attributes #[[ATTR13]] = { argmemonly nofree noinline norecurse nosync nounwind readonly uwtable willreturn } +; IS________NPM: attributes #[[ATTR14]] = { argmemonly nofree noinline norecurse nosync nounwind readonly uwtable } +; IS________NPM: attributes #[[ATTR15]] = { nofree noinline norecurse noreturn nosync nounwind readnone uwtable } +; IS________NPM: attributes #[[ATTR16:[0-9]+]] = { noreturn nounwind } +; IS________NPM: attributes #[[ATTR17]] = { nofree norecurse nosync nounwind readnone } +; IS________NPM: attributes #[[ATTR18]] = { nofree norecurse nosync nounwind readnone willreturn } +; IS________NPM: attributes #[[ATTR19]] = { readonly } +; IS________NPM: attributes #[[ATTR20:[0-9]+]] = { readnone } +; IS________NPM: attributes #[[ATTR21]] = { mustprogress } +; IS________NPM: attributes #[[ATTR22:[0-9]+]] = { mustprogress readonly } +; IS________NPM: attributes #[[ATTR23]] = { mustprogress readonly willreturn } +; IS________NPM: attributes #[[ATTR24]] = { mustprogress nosync readnone willreturn } +; IS________NPM: attributes #[[ATTR25]] = { readonly willreturn } +; IS________NPM: attributes #[[ATTR26]] = { nofree nosync nounwind readnone } +; IS________NPM: attributes #[[ATTR27]] = { nofree nosync nounwind } +; IS________NPM: attributes #[[ATTR28]] = { readnone willreturn } +; IS________NPM: attributes #[[ATTR29]] = { nounwind } +; IS________NPM: attributes #[[ATTR30]] = { willreturn } ;. ; IS__CGSCC_OPM: attributes #[[ATTR0]] = { nofree noinline norecurse nosync nounwind readnone uwtable willreturn } ; IS__CGSCC_OPM: attributes #[[ATTR1]] = { nofree noinline nosync nounwind readnone uwtable } @@ -1627,27 +1625,26 @@ ; IS__CGSCC_OPM: attributes #[[ATTR5]] = { noreturn } ; IS__CGSCC_OPM: attributes #[[ATTR6]] = { noinline noreturn nounwind uwtable } ; IS__CGSCC_OPM: attributes #[[ATTR7]] = { noinline nounwind uwtable } -; IS__CGSCC_OPM: attributes #[[ATTR8:[0-9]+]] = { nofree nosync nounwind readnone speculatable willreturn } -; IS__CGSCC_OPM: attributes #[[ATTR9]] = { nofree noinline nosync nounwind readnone uwtable willreturn } -; IS__CGSCC_OPM: attributes #[[ATTR10:[0-9]+]] = { norecurse willreturn } -; IS__CGSCC_OPM: attributes #[[ATTR11]] = { noinline nounwind uwtable willreturn } -; IS__CGSCC_OPM: attributes #[[ATTR12:[0-9]+]] = { noinline uwtable willreturn } -; IS__CGSCC_OPM: attributes #[[ATTR13]] = { nounwind willreturn } -; IS__CGSCC_OPM: attributes #[[ATTR14]] = { argmemonly nofree noinline norecurse nosync nounwind readonly uwtable } -; IS__CGSCC_OPM: attributes #[[ATTR15]] = { nofree noinline norecurse noreturn nosync nounwind readnone uwtable } -; IS__CGSCC_OPM: attributes #[[ATTR16:[0-9]+]] = { noreturn nounwind } -; IS__CGSCC_OPM: attributes #[[ATTR17]] = { nofree norecurse nosync nounwind readnone } -; IS__CGSCC_OPM: attributes #[[ATTR18]] = { readonly } -; IS__CGSCC_OPM: attributes #[[ATTR19:[0-9]+]] = { readnone } -; IS__CGSCC_OPM: attributes #[[ATTR20]] = { mustprogress } -; IS__CGSCC_OPM: attributes #[[ATTR21:[0-9]+]] = { mustprogress readonly } -; IS__CGSCC_OPM: attributes #[[ATTR22]] = { mustprogress readonly willreturn } -; IS__CGSCC_OPM: attributes #[[ATTR23]] = { mustprogress nosync readnone willreturn } -; IS__CGSCC_OPM: attributes #[[ATTR24]] = { readonly willreturn } -; IS__CGSCC_OPM: attributes #[[ATTR25]] = { nofree nosync nounwind readnone } -; IS__CGSCC_OPM: attributes #[[ATTR26]] = { nofree nosync nounwind } -; IS__CGSCC_OPM: attributes #[[ATTR27]] = { readnone willreturn } -; IS__CGSCC_OPM: attributes #[[ATTR28]] = { nounwind } -; IS__CGSCC_OPM: attributes #[[ATTR29]] = { willreturn } -; IS__CGSCC_OPM: attributes #[[ATTR30]] = { nounwind readnone } +; IS__CGSCC_OPM: attributes #[[ATTR8:[0-9]+]] = { nocallback nofree nosync nounwind readnone speculatable willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR9:[0-9]+]] = { norecurse willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR10]] = { noinline nounwind uwtable willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR11:[0-9]+]] = { noinline uwtable willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR12]] = { nounwind willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR13]] = { argmemonly nofree noinline norecurse nosync nounwind readonly uwtable } +; IS__CGSCC_OPM: attributes #[[ATTR14]] = { nofree noinline norecurse noreturn nosync nounwind readnone uwtable } +; IS__CGSCC_OPM: attributes #[[ATTR15:[0-9]+]] = { noreturn nounwind } +; IS__CGSCC_OPM: attributes #[[ATTR16]] = { nofree norecurse nosync nounwind readnone } +; IS__CGSCC_OPM: attributes #[[ATTR17]] = { readonly } +; IS__CGSCC_OPM: attributes #[[ATTR18:[0-9]+]] = { readnone } +; IS__CGSCC_OPM: attributes #[[ATTR19]] = { mustprogress } +; IS__CGSCC_OPM: attributes #[[ATTR20:[0-9]+]] = { mustprogress readonly } +; IS__CGSCC_OPM: attributes #[[ATTR21]] = { mustprogress readonly willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR22]] = { mustprogress nosync readnone willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR23]] = { readonly willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR24]] = { nofree nosync nounwind readnone } +; IS__CGSCC_OPM: attributes #[[ATTR25]] = { nofree nosync nounwind } +; IS__CGSCC_OPM: attributes #[[ATTR26]] = { readnone willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR27]] = { nounwind } +; IS__CGSCC_OPM: attributes #[[ATTR28]] = { willreturn } +; IS__CGSCC_OPM: attributes #[[ATTR29]] = { nounwind readnone } ;. diff --git a/llvm/test/Transforms/OpenMP/replace_globalization.ll b/llvm/test/Transforms/OpenMP/replace_globalization.ll --- a/llvm/test/Transforms/OpenMP/replace_globalization.ll +++ b/llvm/test/Transforms/OpenMP/replace_globalization.ll @@ -185,7 +185,7 @@ ; CHECK: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind willreturn writeonly } ; CHECK: attributes #[[ATTR1:[0-9]+]] = { nosync nounwind } ; CHECK: attributes #[[ATTR2:[0-9]+]] = { nounwind readnone speculatable } -; CHECK: attributes #[[ATTR3:[0-9]+]] = { nofree nosync nounwind readnone speculatable willreturn } +; CHECK: attributes #[[ATTR3:[0-9]+]] = { nocallback nofree nosync nounwind readnone speculatable willreturn } ; CHECK: attributes #[[ATTR4]] = { "llvm.assume"="omp_no_openmp" } ; CHECK: attributes #[[ATTR5]] = { nounwind } ; CHECK: attributes #[[ATTR6]] = { nounwind writeonly } diff --git a/llvm/test/Transforms/OpenMP/spmdization.ll b/llvm/test/Transforms/OpenMP/spmdization.ll --- a/llvm/test/Transforms/OpenMP/spmdization.ll +++ b/llvm/test/Transforms/OpenMP/spmdization.ll @@ -2393,7 +2393,7 @@ ; AMDGPU: attributes #[[ATTR4:[0-9]+]] = { nofree nosync nounwind } ; AMDGPU: attributes #[[ATTR5]] = { convergent "llvm.assume"="ompx_spmd_amenable" } ; AMDGPU: attributes #[[ATTR6]] = { convergent } -; AMDGPU: attributes #[[ATTR7:[0-9]+]] = { argmemonly nofree nosync nounwind willreturn } +; AMDGPU: attributes #[[ATTR7:[0-9]+]] = { argmemonly nocallback nofree nosync nounwind willreturn } ; AMDGPU: attributes #[[ATTR8:[0-9]+]] = { alwaysinline } ; AMDGPU: attributes #[[ATTR9:[0-9]+]] = { convergent nounwind } ;. @@ -2404,7 +2404,7 @@ ; NVPTX: attributes #[[ATTR4:[0-9]+]] = { nofree nosync nounwind } ; NVPTX: attributes #[[ATTR5]] = { convergent "llvm.assume"="ompx_spmd_amenable" } ; NVPTX: attributes #[[ATTR6]] = { convergent } -; NVPTX: attributes #[[ATTR7:[0-9]+]] = { argmemonly nofree nosync nounwind willreturn } +; NVPTX: attributes #[[ATTR7:[0-9]+]] = { argmemonly nocallback nofree nosync nounwind willreturn } ; NVPTX: attributes #[[ATTR8:[0-9]+]] = { alwaysinline } ; NVPTX: attributes #[[ATTR9:[0-9]+]] = { convergent nounwind } ;. @@ -2415,7 +2415,7 @@ ; AMDGPU-DISABLED: attributes #[[ATTR4:[0-9]+]] = { nofree nosync nounwind } ; AMDGPU-DISABLED: attributes #[[ATTR5]] = { convergent "llvm.assume"="ompx_spmd_amenable" } ; AMDGPU-DISABLED: attributes #[[ATTR6]] = { convergent } -; AMDGPU-DISABLED: attributes #[[ATTR7:[0-9]+]] = { argmemonly nofree nosync nounwind willreturn } +; AMDGPU-DISABLED: attributes #[[ATTR7:[0-9]+]] = { argmemonly nocallback nofree nosync nounwind willreturn } ; AMDGPU-DISABLED: attributes #[[ATTR8:[0-9]+]] = { alwaysinline } ; AMDGPU-DISABLED: attributes #[[ATTR9:[0-9]+]] = { convergent nounwind } ;. @@ -2426,7 +2426,7 @@ ; NVPTX-DISABLED: attributes #[[ATTR4:[0-9]+]] = { nofree nosync nounwind } ; NVPTX-DISABLED: attributes #[[ATTR5]] = { convergent "llvm.assume"="ompx_spmd_amenable" } ; NVPTX-DISABLED: attributes #[[ATTR6]] = { convergent } -; NVPTX-DISABLED: attributes #[[ATTR7:[0-9]+]] = { argmemonly nofree nosync nounwind willreturn } +; NVPTX-DISABLED: attributes #[[ATTR7:[0-9]+]] = { argmemonly nocallback nofree nosync nounwind willreturn } ; NVPTX-DISABLED: attributes #[[ATTR8:[0-9]+]] = { alwaysinline } ; NVPTX-DISABLED: attributes #[[ATTR9:[0-9]+]] = { convergent nounwind } ;. diff --git a/llvm/test/Transforms/OpenMP/spmdization_guarding.ll b/llvm/test/Transforms/OpenMP/spmdization_guarding.ll --- a/llvm/test/Transforms/OpenMP/spmdization_guarding.ll +++ b/llvm/test/Transforms/OpenMP/spmdization_guarding.ll @@ -384,7 +384,7 @@ ; CHECK: attributes #[[ATTR2:[0-9]+]] = { convergent "frame-pointer"="all" "llvm.assume"="omp_no_openmp,ompx_spmd_amenable" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="sm_53" "target-features"="+ptx32,+sm_53" } ; CHECK: attributes #[[ATTR3:[0-9]+]] = { convergent nounwind readonly willreturn "frame-pointer"="all" "llvm.assume"="ompx_spmd_amenable" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="sm_53" "target-features"="+ptx32,+sm_53" } ; CHECK: attributes #[[ATTR4]] = { nounwind } -; CHECK: attributes #[[ATTR5:[0-9]+]] = { inaccessiblememonly nofree nosync nounwind willreturn } +; CHECK: attributes #[[ATTR5:[0-9]+]] = { inaccessiblememonly nocallback nofree nosync nounwind willreturn } ; CHECK: attributes #[[ATTR6:[0-9]+]] = { convergent nounwind } ; CHECK: attributes #[[ATTR7]] = { convergent nounwind "llvm.assume"="omp_no_openmp,ompx_spmd_amenable" } ;. @@ -393,7 +393,7 @@ ; CHECK-DISABLED: attributes #[[ATTR2:[0-9]+]] = { convergent "frame-pointer"="all" "llvm.assume"="omp_no_openmp,ompx_spmd_amenable" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="sm_53" "target-features"="+ptx32,+sm_53" } ; CHECK-DISABLED: attributes #[[ATTR3:[0-9]+]] = { convergent nounwind readonly willreturn "frame-pointer"="all" "llvm.assume"="ompx_spmd_amenable" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="sm_53" "target-features"="+ptx32,+sm_53" } ; CHECK-DISABLED: attributes #[[ATTR4]] = { nounwind } -; CHECK-DISABLED: attributes #[[ATTR5:[0-9]+]] = { inaccessiblememonly nofree nosync nounwind willreturn } +; CHECK-DISABLED: attributes #[[ATTR5:[0-9]+]] = { inaccessiblememonly nocallback nofree nosync nounwind willreturn } ; CHECK-DISABLED: attributes #[[ATTR6:[0-9]+]] = { convergent nounwind } ; CHECK-DISABLED: attributes #[[ATTR7]] = { convergent nounwind "llvm.assume"="omp_no_openmp,ompx_spmd_amenable" } ;. diff --git a/llvm/utils/TableGen/CodeGenIntrinsics.h b/llvm/utils/TableGen/CodeGenIntrinsics.h --- a/llvm/utils/TableGen/CodeGenIntrinsics.h +++ b/llvm/utils/TableGen/CodeGenIntrinsics.h @@ -125,6 +125,9 @@ /// True if the intrinsic is no-return. bool isNoReturn; + /// True if the intrinsic is no-callback. + bool isNoCallback; + /// True if the intrinsic is no-sync. bool isNoSync; diff --git a/llvm/utils/TableGen/CodeGenTarget.cpp b/llvm/utils/TableGen/CodeGenTarget.cpp --- a/llvm/utils/TableGen/CodeGenTarget.cpp +++ b/llvm/utils/TableGen/CodeGenTarget.cpp @@ -666,6 +666,7 @@ isCommutative = false; canThrow = false; isNoReturn = false; + isNoCallback = false; isNoSync = false; isNoFree = false; isWillReturn = false; @@ -864,6 +865,8 @@ isConvergent = true; else if (R->getName() == "IntrNoReturn") isNoReturn = true; + else if (R->getName() == "IntrNoCallback") + isNoCallback = true; else if (R->getName() == "IntrNoSync") isNoSync = true; else if (R->getName() == "IntrNoFree") diff --git a/llvm/utils/TableGen/IntrinsicEmitter.cpp b/llvm/utils/TableGen/IntrinsicEmitter.cpp --- a/llvm/utils/TableGen/IntrinsicEmitter.cpp +++ b/llvm/utils/TableGen/IntrinsicEmitter.cpp @@ -600,6 +600,9 @@ if (L->isNoReturn != R->isNoReturn) return R->isNoReturn; + if (L->isNoCallback != R->isNoCallback) + return R->isNoCallback; + if (L->isNoSync != R->isNoSync) return R->isNoSync; @@ -749,7 +752,7 @@ if (!Intrinsic.canThrow || (Intrinsic.ModRef != CodeGenIntrinsic::ReadWriteMem && !Intrinsic.hasSideEffects) || - Intrinsic.isNoReturn || Intrinsic.isNoSync || Intrinsic.isNoFree || + Intrinsic.isNoReturn || Intrinsic.isNoCallback || Intrinsic.isNoSync || Intrinsic.isNoFree || Intrinsic.isWillReturn || Intrinsic.isCold || Intrinsic.isNoDuplicate || Intrinsic.isNoMerge || Intrinsic.isConvergent || Intrinsic.isSpeculatable) { @@ -759,6 +762,8 @@ OS << LS << "Attribute::NoUnwind"; if (Intrinsic.isNoReturn) OS << LS << "Attribute::NoReturn"; + if (Intrinsic.isNoCallback) + OS << LS << "Attribute::NoCallback"; if (Intrinsic.isNoSync) OS << LS << "Attribute::NoSync"; if (Intrinsic.isNoFree)