1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00

[Attributor][NFC] Strip check lines not used while 3 tests are partially disable

The three tests modified by this commit have been partially disabled
(one run line is commented out). As a consequence subsequent updates
will have weird effects on the check lines. This is a commit to avoid
such effects by making the check lines match the three remaining run
lines.
This commit is contained in:
Johannes Doerfert 2020-04-22 18:06:02 -05:00
parent bcaa6ccbe1
commit 030be9efdf
3 changed files with 136 additions and 137 deletions

View File

@ -72,22 +72,22 @@ define internal i64 @CaptureAStruct(%struct.Foo* byval %a) {
; IS__CGSCC_OPM-NEXT: [[GEP]] = getelementptr [[STRUCT_FOO:%.*]], %struct.Foo* [[A]], i64 0
; IS__CGSCC_OPM-NEXT: br label [[LOOP]]
;
; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@CaptureAStruct
; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]])
; IS__CGSCC_NPM-NEXT: entry:
; IS__CGSCC_NPM-NEXT: [[A_PRIV:%.*]] = alloca [[STRUCT_FOO:%.*]]
; IS__CGSCC_NPM-NEXT: [[A_PRIV_CAST:%.*]] = bitcast %struct.Foo* [[A_PRIV]] to i32*
; IS__CGSCC_NPM-NEXT: store i32 [[TMP0]], i32* [[A_PRIV_CAST]]
; IS__CGSCC_NPM-NEXT: [[A_PRIV_0_1:%.*]] = getelementptr [[STRUCT_FOO]], %struct.Foo* [[A_PRIV]], i32 0, i32 1
; IS__CGSCC_NPM-NEXT: store i64 [[TMP1]], i64* [[A_PRIV_0_1]]
; IS__CGSCC_NPM-NEXT: [[A_PTR:%.*]] = alloca %struct.Foo*
; IS__CGSCC_NPM-NEXT: br label [[LOOP:%.*]]
; IS__CGSCC_NPM: loop:
; IS__CGSCC_NPM-NEXT: [[PHI:%.*]] = phi %struct.Foo* [ null, [[ENTRY:%.*]] ], [ [[GEP:%.*]], [[LOOP]] ]
; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = phi %struct.Foo* [ [[A_PRIV]], [[ENTRY]] ], [ [[TMP2]], [[LOOP]] ]
; IS__CGSCC_NPM-NEXT: store %struct.Foo* [[PHI]], %struct.Foo** [[A_PTR]], align 8
; IS__CGSCC_NPM-NEXT: [[GEP]] = getelementptr [[STRUCT_FOO]], %struct.Foo* [[A_PRIV]], i64 0
; IS__CGSCC_NPM-NEXT: br label [[LOOP]]
; IS__CGSCC____-LABEL: define {{[^@]+}}@CaptureAStruct
; IS__CGSCC____-SAME: (i32 [[TMP0:%.*]], i64 [[TMP1:%.*]])
; IS__CGSCC____-NEXT: entry:
; IS__CGSCC____-NEXT: [[A_PRIV:%.*]] = alloca [[STRUCT_FOO:%.*]]
; IS__CGSCC____-NEXT: [[A_PRIV_CAST:%.*]] = bitcast %struct.Foo* [[A_PRIV]] to i32*
; IS__CGSCC____-NEXT: store i32 [[TMP0]], i32* [[A_PRIV_CAST]]
; IS__CGSCC____-NEXT: [[A_PRIV_0_1:%.*]] = getelementptr [[STRUCT_FOO]], %struct.Foo* [[A_PRIV]], i32 0, i32 1
; IS__CGSCC____-NEXT: store i64 [[TMP1]], i64* [[A_PRIV_0_1]]
; IS__CGSCC____-NEXT: [[A_PTR:%.*]] = alloca %struct.Foo*
; IS__CGSCC____-NEXT: br label [[LOOP:%.*]]
; IS__CGSCC____: loop:
; IS__CGSCC____-NEXT: [[PHI:%.*]] = phi %struct.Foo* [ null, [[ENTRY:%.*]] ], [ [[GEP:%.*]], [[LOOP]] ]
; IS__CGSCC____-NEXT: [[TMP2:%.*]] = phi %struct.Foo* [ [[A_PRIV]], [[ENTRY]] ], [ [[TMP2]], [[LOOP]] ]
; IS__CGSCC____-NEXT: store %struct.Foo* [[PHI]], %struct.Foo** [[A_PTR]], align 8
; IS__CGSCC____-NEXT: [[GEP]] = getelementptr [[STRUCT_FOO]], %struct.Foo* [[A_PRIV]], i64 0
; IS__CGSCC____-NEXT: br label [[LOOP]]
;
entry:
%a_ptr = alloca %struct.Foo*

View File

@ -1546,17 +1546,17 @@ define void @useless_arg_ext_int_ext(i32* %a) {
; FIXME: We should fold terminators.
define internal i32 @switch_default(i64 %i) nounwind {
; IS__TUNIT____-LABEL: define {{[^@]+}}@switch_default()
; IS__TUNIT____-NEXT: entry:
; IS__TUNIT____-NEXT: switch i64 0, label [[SW_DEFAULT:%.*]] [
; IS__TUNIT____-NEXT: i64 3, label [[RETURN:%.*]]
; IS__TUNIT____-NEXT: i64 10, label [[RETURN]]
; IS__TUNIT____-NEXT: ]
; IS__TUNIT____: sw.default:
; IS__TUNIT____-NEXT: call void @sink()
; IS__TUNIT____-NEXT: ret i32 undef
; IS__TUNIT____: return:
; IS__TUNIT____-NEXT: unreachable
; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@switch_default()
; NOT_CGSCC_NPM-NEXT: entry:
; NOT_CGSCC_NPM-NEXT: switch i64 0, label [[SW_DEFAULT:%.*]] [
; NOT_CGSCC_NPM-NEXT: i64 3, label [[RETURN:%.*]]
; NOT_CGSCC_NPM-NEXT: i64 10, label [[RETURN]]
; NOT_CGSCC_NPM-NEXT: ]
; NOT_CGSCC_NPM: sw.default:
; NOT_CGSCC_NPM-NEXT: call void @sink()
; NOT_CGSCC_NPM-NEXT: ret i32 undef
; NOT_CGSCC_NPM: return:
; NOT_CGSCC_NPM-NEXT: unreachable
;
; IS__CGSCC____-LABEL: define {{[^@]+}}@switch_default()
; IS__CGSCC____-NEXT: entry:
@ -1637,10 +1637,10 @@ define void @call_via_pointer_with_dead_args(i32* %a, i32* %b, void (i32*, i32*,
}
; FIXME: We have to prevent the propagation of %fp in the new pm CGSCC pass until the CallGraphUpdater can handle the new call edge.
define internal void @call_via_pointer_with_dead_args_internal_a(i32* %a, i32* %b, void (i32*, i32*, i32*, i64, i32**)* %fp) {
; IS__TUNIT____-LABEL: define {{[^@]+}}@call_via_pointer_with_dead_args_internal_a
; IS__TUNIT____-SAME: (i32* [[A:%.*]], i32* nonnull align 128 dereferenceable(4) [[B:%.*]], void (i32*, i32*, i32*, i64, i32**)* nocapture nofree nonnull [[FP:%.*]])
; IS__TUNIT____-NEXT: call void @called_via_pointer(i32* [[A]], i32* nonnull align 128 dereferenceable(4) [[B]], i32* [[A]], i64 -1, i32** null)
; IS__TUNIT____-NEXT: ret void
; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@call_via_pointer_with_dead_args_internal_a
; NOT_CGSCC_NPM-SAME: (i32* [[A:%.*]], i32* nonnull align 128 dereferenceable(4) [[B:%.*]], void (i32*, i32*, i32*, i64, i32**)* nocapture nofree nonnull [[FP:%.*]])
; NOT_CGSCC_NPM-NEXT: call void @called_via_pointer(i32* [[A]], i32* nonnull align 128 dereferenceable(4) [[B]], i32* [[A]], i64 -1, i32** null)
; NOT_CGSCC_NPM-NEXT: ret void
;
; IS__CGSCC____-LABEL: define {{[^@]+}}@call_via_pointer_with_dead_args_internal_a
; IS__CGSCC____-SAME: (i32* [[A:%.*]], i32* [[B:%.*]], void (i32*, i32*, i32*, i64, i32**)* nocapture nofree nonnull [[FP:%.*]])
@ -1651,10 +1651,10 @@ define internal void @call_via_pointer_with_dead_args_internal_a(i32* %a, i32* %
ret void
}
define internal void @call_via_pointer_with_dead_args_internal_b(i32* %a, i32* %b, void (i32*, i32*, i32*, i64, i32**)* %fp) {
; IS__TUNIT____-LABEL: define {{[^@]+}}@call_via_pointer_with_dead_args_internal_b
; IS__TUNIT____-SAME: (i32* [[A:%.*]], i32* nonnull align 128 dereferenceable(4) [[B:%.*]], void (i32*, i32*, i32*, i64, i32**)* nocapture nofree nonnull [[FP:%.*]])
; IS__TUNIT____-NEXT: call void @called_via_pointer_internal_2(i32* [[A]], i32* nonnull align 128 dereferenceable(4) [[B]], i32* [[A]], i64 -1, i32** null)
; IS__TUNIT____-NEXT: ret void
; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@call_via_pointer_with_dead_args_internal_b
; NOT_CGSCC_NPM-SAME: (i32* [[A:%.*]], i32* nonnull align 128 dereferenceable(4) [[B:%.*]], void (i32*, i32*, i32*, i64, i32**)* nocapture nofree nonnull [[FP:%.*]])
; NOT_CGSCC_NPM-NEXT: call void @called_via_pointer_internal_2(i32* [[A]], i32* nonnull align 128 dereferenceable(4) [[B]], i32* [[A]], i64 -1, i32** null)
; NOT_CGSCC_NPM-NEXT: ret void
;
; IS__CGSCC____-LABEL: define {{[^@]+}}@call_via_pointer_with_dead_args_internal_b
; IS__CGSCC____-SAME: (i32* [[A:%.*]], i32* [[B:%.*]], void (i32*, i32*, i32*, i64, i32**)* nocapture nofree nonnull [[FP:%.*]])

View File

@ -265,15 +265,15 @@ define internal void @test9c(i8* %a, i8* %b, i8* %c) {
ret void
}
define void @test9_helper(i8* %a, i8* %b) {
; IS__TUNIT____-LABEL: define {{[^@]+}}@test9_helper
; IS__TUNIT____-SAME: (i8* nocapture [[A:%.*]], i8* nocapture [[B:%.*]])
; IS__TUNIT____-NEXT: tail call void @test9a()
; IS__TUNIT____-NEXT: tail call void @test9a()
; IS__TUNIT____-NEXT: tail call void @test9b(i8* noalias nocapture [[A]], i8* nocapture [[B]])
; IS__TUNIT____-NEXT: tail call void @test9b(i8* noalias nocapture [[B]], i8* noalias nocapture [[A]])
; IS__TUNIT____-NEXT: tail call void @test9c(i8* noalias nocapture [[A]], i8* nocapture [[B]], i8* nocapture [[B]])
; IS__TUNIT____-NEXT: tail call void @test9c(i8* noalias nocapture [[B]], i8* noalias nocapture [[A]], i8* noalias nocapture [[A]])
; IS__TUNIT____-NEXT: ret void
; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@test9_helper
; NOT_CGSCC_NPM-SAME: (i8* nocapture [[A:%.*]], i8* nocapture [[B:%.*]])
; NOT_CGSCC_NPM-NEXT: tail call void @test9a()
; NOT_CGSCC_NPM-NEXT: tail call void @test9a()
; NOT_CGSCC_NPM-NEXT: tail call void @test9b(i8* noalias nocapture [[A]], i8* nocapture [[B]])
; NOT_CGSCC_NPM-NEXT: tail call void @test9b(i8* noalias nocapture [[B]], i8* noalias nocapture [[A]])
; NOT_CGSCC_NPM-NEXT: tail call void @test9c(i8* noalias nocapture [[A]], i8* nocapture [[B]], i8* nocapture [[B]])
; NOT_CGSCC_NPM-NEXT: tail call void @test9c(i8* noalias nocapture [[B]], i8* noalias nocapture [[A]], i8* noalias nocapture [[A]])
; NOT_CGSCC_NPM-NEXT: ret void
;
; IS__CGSCC____-LABEL: define {{[^@]+}}@test9_helper
; IS__CGSCC____-SAME: (i8* nocapture [[A:%.*]], i8* nocapture [[B:%.*]])
@ -351,14 +351,14 @@ define void @test12_1() {
; IS________OPM-NEXT: tail call void @use_nocapture(i8* noalias [[B]])
; IS________OPM-NEXT: ret void
;
; IS________NPM-LABEL: define {{[^@]+}}@test12_1()
; IS________NPM-NEXT: [[A:%.*]] = alloca i8, align 4
; IS________NPM-NEXT: [[B:%.*]] = tail call noalias i8* @malloc(i64 4)
; IS________NPM-NEXT: tail call void @use_nocapture(i8* noalias nonnull align 4 dereferenceable(1) [[A]])
; IS________NPM-NEXT: tail call void @use_nocapture(i8* noalias nonnull align 4 dereferenceable(1) [[A]])
; IS________NPM-NEXT: tail call void @use_nocapture(i8* noalias nocapture [[B]])
; IS________NPM-NEXT: tail call void @use_nocapture(i8* noalias nocapture [[B]])
; IS________NPM-NEXT: ret void
; NOT_TUNIT_OPM-LABEL: define {{[^@]+}}@test12_1()
; NOT_TUNIT_OPM-NEXT: [[A:%.*]] = alloca i8, align 4
; NOT_TUNIT_OPM-NEXT: [[B:%.*]] = tail call noalias i8* @malloc(i64 4)
; NOT_TUNIT_OPM-NEXT: tail call void @use_nocapture(i8* noalias nonnull align 4 dereferenceable(1) [[A]])
; NOT_TUNIT_OPM-NEXT: tail call void @use_nocapture(i8* noalias nonnull align 4 dereferenceable(1) [[A]])
; NOT_TUNIT_OPM-NEXT: tail call void @use_nocapture(i8* noalias nocapture [[B]])
; NOT_TUNIT_OPM-NEXT: tail call void @use_nocapture(i8* noalias nocapture [[B]])
; NOT_TUNIT_OPM-NEXT: ret void
;
%A = alloca i8, align 4
%B = tail call noalias i8* @malloc(i64 4)
@ -378,13 +378,13 @@ define void @test12_2(){
; IS________OPM-NEXT: tail call void @use_nocapture(i8* [[A]])
; IS________OPM-NEXT: ret void
;
; IS________NPM-LABEL: define {{[^@]+}}@test12_2()
; IS________NPM-NEXT: [[A:%.*]] = tail call noalias i8* @malloc(i64 4)
; IS________NPM-NEXT: tail call void @use_nocapture(i8* noalias nocapture [[A]])
; IS________NPM-NEXT: tail call void @use_nocapture(i8* noalias nocapture [[A]])
; IS________NPM-NEXT: tail call void @use(i8* [[A]])
; IS________NPM-NEXT: tail call void @use_nocapture(i8* nocapture [[A]])
; IS________NPM-NEXT: ret void
; NOT_TUNIT_OPM-LABEL: define {{[^@]+}}@test12_2()
; NOT_TUNIT_OPM-NEXT: [[A:%.*]] = tail call noalias i8* @malloc(i64 4)
; NOT_TUNIT_OPM-NEXT: tail call void @use_nocapture(i8* noalias nocapture [[A]])
; NOT_TUNIT_OPM-NEXT: tail call void @use_nocapture(i8* noalias nocapture [[A]])
; NOT_TUNIT_OPM-NEXT: tail call void @use(i8* [[A]])
; NOT_TUNIT_OPM-NEXT: tail call void @use_nocapture(i8* nocapture [[A]])
; NOT_TUNIT_OPM-NEXT: ret void
;
; FIXME: This should be @use_nocapture(i8* noalias [[A]])
; FIXME: This should be @use_nocapture(i8* noalias nocapture [[A]])
@ -403,10 +403,10 @@ define void @test12_3(){
; IS________OPM-NEXT: tail call void @two_args(i8* [[A]], i8* [[A]])
; IS________OPM-NEXT: ret void
;
; IS________NPM-LABEL: define {{[^@]+}}@test12_3()
; IS________NPM-NEXT: [[A:%.*]] = tail call noalias i8* @malloc(i64 4)
; IS________NPM-NEXT: tail call void @two_args(i8* nocapture [[A]], i8* nocapture [[A]])
; IS________NPM-NEXT: ret void
; NOT_TUNIT_OPM-LABEL: define {{[^@]+}}@test12_3()
; NOT_TUNIT_OPM-NEXT: [[A:%.*]] = tail call noalias i8* @malloc(i64 4)
; NOT_TUNIT_OPM-NEXT: tail call void @two_args(i8* nocapture [[A]], i8* nocapture [[A]])
; NOT_TUNIT_OPM-NEXT: ret void
;
%A = tail call noalias i8* @malloc(i64 4)
tail call void @two_args(i8* %A, i8* %A)
@ -426,17 +426,17 @@ define void @test12_4(){
; IS________OPM-NEXT: tail call void @two_args(i8* [[A_0]], i8* [[B_0]])
; IS________OPM-NEXT: ret void
;
; IS________NPM-LABEL: define {{[^@]+}}@test12_4()
; IS________NPM-NEXT: [[A:%.*]] = tail call noalias i8* @malloc(i64 4)
; IS________NPM-NEXT: [[B:%.*]] = tail call noalias i8* @malloc(i64 4)
; IS________NPM-NEXT: [[A_0:%.*]] = getelementptr i8, i8* [[A]], i64 0
; IS________NPM-NEXT: [[A_1:%.*]] = getelementptr i8, i8* [[A]], i64 1
; IS________NPM-NEXT: [[B_0:%.*]] = getelementptr i8, i8* [[B]], i64 0
; IS________NPM-NEXT: tail call void @two_args(i8* noalias nocapture [[A]], i8* noalias nocapture [[B]])
; IS________NPM-NEXT: tail call void @two_args(i8* nocapture [[A]], i8* nocapture [[A_0]])
; IS________NPM-NEXT: tail call void @two_args(i8* nocapture [[A]], i8* nocapture [[A_1]])
; IS________NPM-NEXT: tail call void @two_args(i8* nocapture [[A_0]], i8* nocapture [[B_0]])
; IS________NPM-NEXT: ret void
; NOT_TUNIT_OPM-LABEL: define {{[^@]+}}@test12_4()
; NOT_TUNIT_OPM-NEXT: [[A:%.*]] = tail call noalias i8* @malloc(i64 4)
; NOT_TUNIT_OPM-NEXT: [[B:%.*]] = tail call noalias i8* @malloc(i64 4)
; NOT_TUNIT_OPM-NEXT: [[A_0:%.*]] = getelementptr i8, i8* [[A]], i64 0
; NOT_TUNIT_OPM-NEXT: [[A_1:%.*]] = getelementptr i8, i8* [[A]], i64 1
; NOT_TUNIT_OPM-NEXT: [[B_0:%.*]] = getelementptr i8, i8* [[B]], i64 0
; NOT_TUNIT_OPM-NEXT: tail call void @two_args(i8* noalias nocapture [[A]], i8* noalias nocapture [[B]])
; NOT_TUNIT_OPM-NEXT: tail call void @two_args(i8* nocapture [[A]], i8* nocapture [[A_0]])
; NOT_TUNIT_OPM-NEXT: tail call void @two_args(i8* nocapture [[A]], i8* nocapture [[A_1]])
; NOT_TUNIT_OPM-NEXT: tail call void @two_args(i8* nocapture [[A_0]], i8* nocapture [[B_0]])
; NOT_TUNIT_OPM-NEXT: ret void
;
%A = tail call noalias i8* @malloc(i64 4)
%B = tail call noalias i8* @malloc(i64 4)
@ -467,12 +467,12 @@ define void @use_i8_internal(i8* %a) {
}
define void @test13_use_noalias(){
; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@test13_use_noalias()
; NOT_CGSCC_OPM-NEXT: [[M1:%.*]] = tail call noalias i8* @malloc(i64 4)
; NOT_CGSCC_OPM-NEXT: [[C1:%.*]] = bitcast i8* [[M1]] to i16*
; NOT_CGSCC_OPM-NEXT: [[C2:%.*]] = bitcast i16* [[C1]] to i8*
; NOT_CGSCC_OPM-NEXT: call void @use_i8_internal(i8* noalias nocapture [[C2]])
; NOT_CGSCC_OPM-NEXT: ret void
; CHECK-LABEL: define {{[^@]+}}@test13_use_noalias()
; CHECK-NEXT: [[M1:%.*]] = tail call noalias i8* @malloc(i64 4)
; CHECK-NEXT: [[C1:%.*]] = bitcast i8* [[M1]] to i16*
; CHECK-NEXT: [[C2:%.*]] = bitcast i16* [[C1]] to i8*
; CHECK-NEXT: call void @use_i8_internal(i8* noalias nocapture [[C2]])
; CHECK-NEXT: ret void
;
; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test13_use_noalias()
; IS__CGSCC_OPM-NEXT: [[M1:%.*]] = tail call noalias i8* @malloc(i64 4)
@ -480,7 +480,6 @@ define void @test13_use_noalias(){
; IS__CGSCC_OPM-NEXT: [[C2:%.*]] = bitcast i16* [[C1]] to i8*
; IS__CGSCC_OPM-NEXT: call void @use_i8_internal(i8* noalias [[C2]])
; IS__CGSCC_OPM-NEXT: ret void
;
%m1 = tail call noalias i8* @malloc(i64 4)
%c1 = bitcast i8* %m1 to i16*
%c2 = bitcast i16* %c1 to i8*
@ -498,14 +497,14 @@ define void @test13_use_alias(){
; IS________OPM-NEXT: call void @use_i8_internal(i8* [[C2B]])
; IS________OPM-NEXT: ret void
;
; IS________NPM-LABEL: define {{[^@]+}}@test13_use_alias()
; IS________NPM-NEXT: [[M1:%.*]] = tail call noalias i8* @malloc(i64 4)
; IS________NPM-NEXT: [[C1:%.*]] = bitcast i8* [[M1]] to i16*
; IS________NPM-NEXT: [[C2A:%.*]] = bitcast i16* [[C1]] to i8*
; IS________NPM-NEXT: [[C2B:%.*]] = bitcast i16* [[C1]] to i8*
; IS________NPM-NEXT: call void @use_i8_internal(i8* nocapture [[C2A]])
; IS________NPM-NEXT: call void @use_i8_internal(i8* nocapture [[C2B]])
; IS________NPM-NEXT: ret void
; NOT_TUNIT_OPM-LABEL: define {{[^@]+}}@test13_use_alias()
; NOT_TUNIT_OPM-NEXT: [[M1:%.*]] = tail call noalias i8* @malloc(i64 4)
; NOT_TUNIT_OPM-NEXT: [[C1:%.*]] = bitcast i8* [[M1]] to i16*
; NOT_TUNIT_OPM-NEXT: [[C2A:%.*]] = bitcast i16* [[C1]] to i8*
; NOT_TUNIT_OPM-NEXT: [[C2B:%.*]] = bitcast i16* [[C1]] to i8*
; NOT_TUNIT_OPM-NEXT: call void @use_i8_internal(i8* nocapture [[C2A]])
; NOT_TUNIT_OPM-NEXT: call void @use_i8_internal(i8* nocapture [[C2B]])
; NOT_TUNIT_OPM-NEXT: ret void
;
%m1 = tail call noalias i8* @malloc(i64 4)
%c1 = bitcast i8* %m1 to i16*
@ -518,10 +517,10 @@ define void @test13_use_alias(){
; TEST 14 i2p casts
define internal i32 @p2i(i32* %arg) {
; IS__TUNIT____-LABEL: define {{[^@]+}}@p2i
; IS__TUNIT____-SAME: (i32* noalias nofree readnone [[ARG:%.*]])
; IS__TUNIT____-NEXT: [[P2I:%.*]] = ptrtoint i32* [[ARG]] to i32
; IS__TUNIT____-NEXT: ret i32 [[P2I]]
; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@p2i
; NOT_CGSCC_NPM-SAME: (i32* noalias nofree readnone [[ARG:%.*]])
; NOT_CGSCC_NPM-NEXT: [[P2I:%.*]] = ptrtoint i32* [[ARG]] to i32
; NOT_CGSCC_NPM-NEXT: ret i32 [[P2I]]
;
; IS__CGSCC____-LABEL: define {{[^@]+}}@p2i
; IS__CGSCC____-SAME: (i32* nofree readnone [[ARG:%.*]])
@ -533,13 +532,13 @@ define internal i32 @p2i(i32* %arg) {
}
define i32 @i2p(i32* %arg) {
; IS__TUNIT____-LABEL: define {{[^@]+}}@i2p
; IS__TUNIT____-SAME: (i32* nofree readonly [[ARG:%.*]])
; IS__TUNIT____-NEXT: [[C:%.*]] = call i32 @p2i(i32* noalias nofree readnone [[ARG]])
; IS__TUNIT____-NEXT: [[I2P:%.*]] = inttoptr i32 [[C]] to i8*
; IS__TUNIT____-NEXT: [[BC:%.*]] = bitcast i8* [[I2P]] to i32*
; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32 @ret(i32* nofree readonly align 4 [[BC]])
; IS__TUNIT____-NEXT: ret i32 [[CALL]]
; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@i2p
; NOT_CGSCC_NPM-SAME: (i32* nofree readonly [[ARG:%.*]])
; NOT_CGSCC_NPM-NEXT: [[C:%.*]] = call i32 @p2i(i32* noalias nofree readnone [[ARG]])
; NOT_CGSCC_NPM-NEXT: [[I2P:%.*]] = inttoptr i32 [[C]] to i8*
; NOT_CGSCC_NPM-NEXT: [[BC:%.*]] = bitcast i8* [[I2P]] to i32*
; NOT_CGSCC_NPM-NEXT: [[CALL:%.*]] = call i32 @ret(i32* nofree readonly align 4 [[BC]])
; NOT_CGSCC_NPM-NEXT: ret i32 [[CALL]]
;
; IS__CGSCC____-LABEL: define {{[^@]+}}@i2p
; IS__CGSCC____-SAME: (i32* nofree readonly [[ARG:%.*]])
@ -575,17 +574,17 @@ define internal i32 @ret(i32* %arg) {
; Function Attrs: nounwind optsize
define internal fastcc double @strtox(i8* %s, i8** %p, i32 %prec) unnamed_addr {
; IS__TUNIT____-LABEL: define {{[^@]+}}@strtox
; IS__TUNIT____-SAME: (i8* noalias [[S:%.*]]) unnamed_addr
; IS__TUNIT____-NEXT: entry:
; IS__TUNIT____-NEXT: [[F:%.*]] = alloca [[STRUCT__IO_FILE:%.*]], align 8
; IS__TUNIT____-NEXT: [[TMP0:%.*]] = bitcast %struct._IO_FILE* [[F]] to i8*
; IS__TUNIT____-NEXT: call void @llvm.lifetime.start.p0i8(i64 144, i8* nonnull align 8 dereferenceable(240) [[TMP0]])
; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32 bitcast (i32 (...)* @sh_fromstring to i32 (%struct._IO_FILE*, i8*)*)(%struct._IO_FILE* nonnull align 8 dereferenceable(240) [[F]], i8* [[S]])
; IS__TUNIT____-NEXT: call void @__shlim(%struct._IO_FILE* nonnull align 8 dereferenceable(240) [[F]], i64 0)
; IS__TUNIT____-NEXT: [[CALL1:%.*]] = call double @__floatscan(%struct._IO_FILE* nonnull align 8 dereferenceable(240) [[F]], i32 1, i32 1)
; IS__TUNIT____-NEXT: call void @llvm.lifetime.end.p0i8(i64 144, i8* nonnull align 8 dereferenceable(240) [[TMP0]])
; IS__TUNIT____-NEXT: ret double [[CALL1]]
; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@strtox
; NOT_CGSCC_NPM-SAME: (i8* noalias [[S:%.*]]) unnamed_addr
; NOT_CGSCC_NPM-NEXT: entry:
; NOT_CGSCC_NPM-NEXT: [[F:%.*]] = alloca [[STRUCT__IO_FILE:%.*]], align 8
; NOT_CGSCC_NPM-NEXT: [[TMP0:%.*]] = bitcast %struct._IO_FILE* [[F]] to i8*
; NOT_CGSCC_NPM-NEXT: call void @llvm.lifetime.start.p0i8(i64 144, i8* nonnull align 8 dereferenceable(240) [[TMP0]])
; NOT_CGSCC_NPM-NEXT: [[CALL:%.*]] = call i32 bitcast (i32 (...)* @sh_fromstring to i32 (%struct._IO_FILE*, i8*)*)(%struct._IO_FILE* nonnull align 8 dereferenceable(240) [[F]], i8* [[S]])
; NOT_CGSCC_NPM-NEXT: call void @__shlim(%struct._IO_FILE* nonnull align 8 dereferenceable(240) [[F]], i64 0)
; NOT_CGSCC_NPM-NEXT: [[CALL1:%.*]] = call double @__floatscan(%struct._IO_FILE* nonnull align 8 dereferenceable(240) [[F]], i32 1, i32 1)
; NOT_CGSCC_NPM-NEXT: call void @llvm.lifetime.end.p0i8(i64 144, i8* nonnull align 8 dereferenceable(240) [[TMP0]])
; NOT_CGSCC_NPM-NEXT: ret double [[CALL1]]
;
; IS__CGSCC____-LABEL: define {{[^@]+}}@strtox
; IS__CGSCC____-SAME: (i8* [[S:%.*]]) unnamed_addr
@ -665,16 +664,16 @@ define void @only_store(i32* %p) {
}
define void @test15_caller(i32* noalias %p, i32 %c) {
; IS__TUNIT____-LABEL: define {{[^@]+}}@test15_caller
; IS__TUNIT____-SAME: (i32* noalias nofree writeonly [[P:%.*]], i32 [[C:%.*]])
; IS__TUNIT____-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[C]], 0
; IS__TUNIT____-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
; IS__TUNIT____: if.then:
; IS__TUNIT____-NEXT: tail call void @only_store(i32* noalias nocapture nofree writeonly align 4 [[P]])
; IS__TUNIT____-NEXT: br label [[IF_END]]
; IS__TUNIT____: if.end:
; IS__TUNIT____-NEXT: tail call void @make_alias(i32* nofree writeonly [[P]])
; IS__TUNIT____-NEXT: ret void
; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@test15_caller
; NOT_CGSCC_NPM-SAME: (i32* noalias nofree writeonly [[P:%.*]], i32 [[C:%.*]])
; NOT_CGSCC_NPM-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[C]], 0
; NOT_CGSCC_NPM-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
; NOT_CGSCC_NPM: if.then:
; NOT_CGSCC_NPM-NEXT: tail call void @only_store(i32* noalias nocapture nofree writeonly align 4 [[P]])
; NOT_CGSCC_NPM-NEXT: br label [[IF_END]]
; NOT_CGSCC_NPM: if.end:
; NOT_CGSCC_NPM-NEXT: tail call void @make_alias(i32* nofree writeonly [[P]])
; NOT_CGSCC_NPM-NEXT: ret void
;
; IS__CGSCC____-LABEL: define {{[^@]+}}@test15_caller
; IS__CGSCC____-SAME: (i32* noalias nofree writeonly [[P:%.*]], i32 [[C:%.*]])
@ -720,22 +719,22 @@ if.end:
; Therefore, only one of the two conditions of if statementes will be fulfilled.
define internal void @test16_sub(i32* noalias %p, i32 %c1, i32 %c2) {
; IS__TUNIT____-LABEL: define {{[^@]+}}@test16_sub
; IS__TUNIT____-SAME: (i32* noalias nofree writeonly [[P:%.*]], i32 [[C1:%.*]], i32 [[C2:%.*]])
; IS__TUNIT____-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[C1]], 0
; IS__TUNIT____-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
; IS__TUNIT____: if.then:
; IS__TUNIT____-NEXT: tail call void @only_store(i32* noalias nocapture nofree writeonly align 4 [[P]])
; IS__TUNIT____-NEXT: tail call void @make_alias(i32* nofree writeonly align 4 [[P]])
; IS__TUNIT____-NEXT: br label [[IF_END]]
; IS__TUNIT____: if.end:
; IS__TUNIT____-NEXT: [[TOBOOL1:%.*]] = icmp eq i32 [[C2]], 0
; IS__TUNIT____-NEXT: br i1 [[TOBOOL1]], label [[IF_THEN2:%.*]], label [[IF_END3:%.*]]
; IS__TUNIT____: if.then2:
; IS__TUNIT____-NEXT: tail call void @only_store(i32* nofree writeonly align 4 [[P]])
; IS__TUNIT____-NEXT: br label [[IF_END3]]
; IS__TUNIT____: if.end3:
; IS__TUNIT____-NEXT: ret void
; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@test16_sub
; NOT_CGSCC_NPM-SAME: (i32* noalias nofree writeonly [[P:%.*]], i32 [[C1:%.*]], i32 [[C2:%.*]])
; NOT_CGSCC_NPM-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[C1]], 0
; NOT_CGSCC_NPM-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
; NOT_CGSCC_NPM: if.then:
; NOT_CGSCC_NPM-NEXT: tail call void @only_store(i32* noalias nocapture nofree writeonly align 4 [[P]])
; NOT_CGSCC_NPM-NEXT: tail call void @make_alias(i32* nofree writeonly align 4 [[P]])
; NOT_CGSCC_NPM-NEXT: br label [[IF_END]]
; NOT_CGSCC_NPM: if.end:
; NOT_CGSCC_NPM-NEXT: [[TOBOOL1:%.*]] = icmp eq i32 [[C2]], 0
; NOT_CGSCC_NPM-NEXT: br i1 [[TOBOOL1]], label [[IF_THEN2:%.*]], label [[IF_END3:%.*]]
; NOT_CGSCC_NPM: if.then2:
; NOT_CGSCC_NPM-NEXT: tail call void @only_store(i32* nofree writeonly align 4 [[P]])
; NOT_CGSCC_NPM-NEXT: br label [[IF_END3]]
; NOT_CGSCC_NPM: if.end3:
; NOT_CGSCC_NPM-NEXT: ret void
;
; IS__CGSCC____-LABEL: define {{[^@]+}}@test16_sub
; IS__CGSCC____-SAME: (i32* noalias nofree writeonly [[P:%.*]], i32 [[C1:%.*]], i32 [[C2:%.*]])