@@ -34,54 +34,45 @@ define i32 @test3(i16 %P) {
3434; CHECK: ret i32 %tmp.5
3535}
3636
37- define i32 @test4 (i16 %P ) {
38- %tmp.1 = zext i16 %P to i32 ; <i32> [#uses=1]
39- %tmp.4 = xor i32 %tmp.1 , 32768 ; <i32> [#uses=1]
40- %tmp.5 = add i32 %tmp.4 , -32768 ; <i32> [#uses=1]
41- ret i32 %tmp.5
42- ; CHECK-LABEL: @test4(
43- ; CHECK: %tmp.5 = sext i16 %P to i32
44- ; CHECK: ret i32 %tmp.5
45- }
46-
47- define i32 @test5 (i32 %x ) {
37+ define i32 @test4 (i32 %x ) {
4838 %tmp.1 = and i32 %x , 255 ; <i32> [#uses=1]
4939 %tmp.2 = xor i32 %tmp.1 , 128 ; <i32> [#uses=1]
5040 %tmp.3 = add i32 %tmp.2 , -128 ; <i32> [#uses=1]
5141 ret i32 %tmp.3
52- ; CHECK-LABEL: @test5 (
42+ ; CHECK-LABEL: @test4 (
5343; CHECK: %sext = shl i32 %x, 24
5444; CHECK: %tmp.3 = ashr exact i32 %sext, 24
5545; CHECK: ret i32 %tmp.3
5646}
5747
58- define i32 @test6 (i32 %x ) {
48+ define i32 @test5 (i32 %x ) {
5949 %tmp.2 = shl i32 %x , 16 ; <i32> [#uses=1]
6050 %tmp.4 = ashr i32 %tmp.2 , 16 ; <i32> [#uses=1]
6151 ret i32 %tmp.4
62- ; CHECK-LABEL: @test6 (
52+ ; CHECK-LABEL: @test5 (
6353; CHECK: %tmp.2 = shl i32 %x, 16
6454; CHECK: %tmp.4 = ashr exact i32 %tmp.2, 16
6555; CHECK: ret i32 %tmp.4
6656}
6757
68- define i32 @test7 (i16 %P ) {
58+ define i32 @test6 (i16 %P ) {
6959 %tmp.1 = zext i16 %P to i32 ; <i32> [#uses=1]
7060 %sext1 = shl i32 %tmp.1 , 16 ; <i32> [#uses=1]
7161 %tmp.5 = ashr i32 %sext1 , 16 ; <i32> [#uses=1]
7262 ret i32 %tmp.5
73- ; CHECK-LABEL: @test7 (
63+ ; CHECK-LABEL: @test6 (
7464; CHECK: %tmp.5 = sext i16 %P to i32
7565; CHECK: ret i32 %tmp.5
7666}
7767
78- define i32 @test8 (i32 %x ) nounwind readnone {
68+ define i32 @test7 (i32 %x ) nounwind readnone {
7969entry:
8070 %shr = lshr i32 %x , 5 ; <i32> [#uses=1]
8171 %xor = xor i32 %shr , 67108864 ; <i32> [#uses=1]
8272 %sub = add i32 %xor , -67108864 ; <i32> [#uses=1]
8373 ret i32 %sub
84- ; CHECK-LABEL: @test8 (
74+ ; CHECK-LABEL: @test7 (
8575; CHECK: %sub = ashr i32 %x, 5
8676; CHECK: ret i32 %sub
8777}
78+
0 commit comments