Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Differential D108099 Diff 366547 llvm/test/Transforms/Attributor/ArgumentPromotion/live_called_from_dead_2.ll
Changeset View
Changeset View
Standalone View
Standalone View
llvm/test/Transforms/Attributor/ArgumentPromotion/live_called_from_dead_2.ll
Show All 9 Lines | |||||
; IS__CGSCC____-NEXT: [[TMP1:%.*]] = call i32 @test(i32* noalias noundef align 536870912 null) | ; IS__CGSCC____-NEXT: [[TMP1:%.*]] = call i32 @test(i32* noalias noundef align 536870912 null) | ||||
; IS__CGSCC____-NEXT: ret void | ; IS__CGSCC____-NEXT: ret void | ||||
; | ; | ||||
call i32 @test(i32* null, i32* null) | call i32 @test(i32* null, i32* null) | ||||
ret void | ret void | ||||
} | } | ||||
define internal i32 @test(i32* %X, i32* %Y) { | define internal i32 @test(i32* %X, i32* %Y) { | ||||
; NOT_CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly | ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly | ||||
; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@test | ; IS__TUNIT____-LABEL: define {{[^@]+}}@test | ||||
; NOT_CGSCC_NPM-SAME: (i32* noalias nocapture nofree noundef writeonly align 4 [[X:%.*]]) #[[ATTR0:[0-9]+]] { | ; IS__TUNIT____-SAME: (i32* noalias nocapture nofree noundef writeonly align 4 [[X:%.*]], i32* noalias nocapture nofree noundef readnone align 4 [[Y:%.*]]) #[[ATTR0:[0-9]+]] { | ||||
; NOT_CGSCC_NPM-NEXT: br i1 true, label [[LIVE:%.*]], label [[DEAD:%.*]] | ; IS__TUNIT____-NEXT: br i1 true, label [[LIVE:%.*]], label [[DEAD:%.*]] | ||||
; NOT_CGSCC_NPM: live: | ; IS__TUNIT____: live: | ||||
; NOT_CGSCC_NPM-NEXT: store i32 0, i32* [[X]], align 4 | ; IS__TUNIT____-NEXT: store i32 0, i32* [[X]], align 4 | ||||
; NOT_CGSCC_NPM-NEXT: ret i32 undef | ; IS__TUNIT____-NEXT: ret i32 undef | ||||
; NOT_CGSCC_NPM: dead: | ; IS__TUNIT____: dead: | ||||
; NOT_CGSCC_NPM-NEXT: unreachable | ; IS__TUNIT____-NEXT: unreachable | ||||
; | |||||
; IS__CGSCC_OPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly | |||||
; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test | |||||
; IS__CGSCC_OPM-SAME: (i32* noalias nocapture nofree noundef writeonly align 4 [[X:%.*]]) #[[ATTR0:[0-9]+]] { | |||||
; IS__CGSCC_OPM-NEXT: br i1 true, label [[LIVE:%.*]], label [[DEAD:%.*]] | |||||
; IS__CGSCC_OPM: live: | |||||
; IS__CGSCC_OPM-NEXT: store i32 0, i32* [[X]], align 4 | |||||
; IS__CGSCC_OPM-NEXT: ret i32 undef | |||||
; IS__CGSCC_OPM: dead: | |||||
; IS__CGSCC_OPM-NEXT: unreachable | |||||
; | ; | ||||
; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly | ; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly | ||||
; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test | ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test | ||||
; IS__CGSCC_NPM-SAME: (i32* noalias nocapture nofree noundef writeonly align 4 [[X:%.*]]) #[[ATTR0:[0-9]+]] { | ; IS__CGSCC_NPM-SAME: (i32* noalias nocapture nofree noundef writeonly align 4 [[X:%.*]]) #[[ATTR0:[0-9]+]] { | ||||
; IS__CGSCC_NPM-NEXT: br i1 true, label [[LIVE:%.*]], label [[DEAD:%.*]] | ; IS__CGSCC_NPM-NEXT: br i1 true, label [[LIVE:%.*]], label [[DEAD:%.*]] | ||||
; IS__CGSCC_NPM: live: | ; IS__CGSCC_NPM: live: | ||||
; IS__CGSCC_NPM-NEXT: store i32 0, i32* [[X]], align 4 | ; IS__CGSCC_NPM-NEXT: store i32 0, i32* [[X]], align 4 | ||||
; IS__CGSCC_NPM-NEXT: ret i32 undef | ; IS__CGSCC_NPM-NEXT: ret i32 undef | ||||
; IS__CGSCC_NPM: dead: | ; IS__CGSCC_NPM: dead: | ||||
; IS__CGSCC_NPM-NEXT: unreachable | ; IS__CGSCC_NPM-NEXT: unreachable | ||||
; | ; | ||||
br i1 true, label %live, label %dead | br i1 true, label %live, label %dead | ||||
live: | live: | ||||
store i32 0, i32* %X | store i32 0, i32* %X | ||||
ret i32 0 | ret i32 0 | ||||
dead: | dead: | ||||
call i32 @caller(i32* null) | call i32 @caller(i32* null) | ||||
call void @dead() | call void @dead() | ||||
ret i32 1 | ret i32 1 | ||||
} | } | ||||
define internal i32 @caller(i32* %B) { | define internal i32 @caller(i32* %B) { | ||||
; NOT_CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly | ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly | ||||
; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@caller | ; IS__TUNIT____-LABEL: define {{[^@]+}}@caller | ||||
; NOT_CGSCC_NPM-SAME: (i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B:%.*]]) #[[ATTR0]] { | ; IS__TUNIT____-SAME: (i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B:%.*]]) #[[ATTR0]] { | ||||
; NOT_CGSCC_NPM-NEXT: [[A:%.*]] = alloca i32, align 4 | ; IS__TUNIT____-NEXT: [[A:%.*]] = alloca i32, align 4 | ||||
; NOT_CGSCC_NPM-NEXT: [[C:%.*]] = call i32 @test(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B]]) #[[ATTR2:[0-9]+]] | ; IS__TUNIT____-NEXT: [[C:%.*]] = call i32 @test(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B]], i32* noalias nocapture nofree noundef nonnull readnone align 4 dereferenceable(4) [[A]]) #[[ATTR2:[0-9]+]] | ||||
; NOT_CGSCC_NPM-NEXT: ret i32 undef | ; IS__TUNIT____-NEXT: ret i32 undef | ||||
; | |||||
; IS__CGSCC_OPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly | |||||
; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@caller | |||||
; IS__CGSCC_OPM-SAME: (i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B:%.*]]) #[[ATTR0]] { | |||||
; IS__CGSCC_OPM-NEXT: [[A:%.*]] = alloca i32, align 4 | |||||
; IS__CGSCC_OPM-NEXT: [[C:%.*]] = call i32 @test(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B]]) #[[ATTR2:[0-9]+]] | |||||
; IS__CGSCC_OPM-NEXT: ret i32 undef | |||||
; | ; | ||||
; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly | ; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly | ||||
; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@caller | ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@caller | ||||
; IS__CGSCC_NPM-SAME: (i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B:%.*]]) #[[ATTR0]] { | ; IS__CGSCC_NPM-SAME: (i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B:%.*]]) #[[ATTR0]] { | ||||
; IS__CGSCC_NPM-NEXT: [[A:%.*]] = alloca i32, align 4 | ; IS__CGSCC_NPM-NEXT: [[A:%.*]] = alloca i32, align 4 | ||||
; IS__CGSCC_NPM-NEXT: [[C:%.*]] = call i32 @test(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B]]) #[[ATTR2:[0-9]+]] | ; IS__CGSCC_NPM-NEXT: [[C:%.*]] = call i32 @test(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[B]]) #[[ATTR2:[0-9]+]] | ||||
; IS__CGSCC_NPM-NEXT: ret i32 undef | ; IS__CGSCC_NPM-NEXT: ret i32 undef | ||||
; | ; | ||||
▲ Show 20 Lines • Show All 49 Lines • Show Last 20 Lines |