@@ -34,54 +34,45 @@ define i32 @test3(i16 %P) {
34
34
; CHECK: ret i32 %tmp.5
35
35
}
36
36
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 ) {
48
38
%tmp.1 = and i32 %x , 255 ; <i32> [#uses=1]
49
39
%tmp.2 = xor i32 %tmp.1 , 128 ; <i32> [#uses=1]
50
40
%tmp.3 = add i32 %tmp.2 , -128 ; <i32> [#uses=1]
51
41
ret i32 %tmp.3
52
- ; CHECK-LABEL: @test5 (
42
+ ; CHECK-LABEL: @test4 (
53
43
; CHECK: %sext = shl i32 %x, 24
54
44
; CHECK: %tmp.3 = ashr exact i32 %sext, 24
55
45
; CHECK: ret i32 %tmp.3
56
46
}
57
47
58
- define i32 @test6 (i32 %x ) {
48
+ define i32 @test5 (i32 %x ) {
59
49
%tmp.2 = shl i32 %x , 16 ; <i32> [#uses=1]
60
50
%tmp.4 = ashr i32 %tmp.2 , 16 ; <i32> [#uses=1]
61
51
ret i32 %tmp.4
62
- ; CHECK-LABEL: @test6 (
52
+ ; CHECK-LABEL: @test5 (
63
53
; CHECK: %tmp.2 = shl i32 %x, 16
64
54
; CHECK: %tmp.4 = ashr exact i32 %tmp.2, 16
65
55
; CHECK: ret i32 %tmp.4
66
56
}
67
57
68
- define i32 @test7 (i16 %P ) {
58
+ define i32 @test6 (i16 %P ) {
69
59
%tmp.1 = zext i16 %P to i32 ; <i32> [#uses=1]
70
60
%sext1 = shl i32 %tmp.1 , 16 ; <i32> [#uses=1]
71
61
%tmp.5 = ashr i32 %sext1 , 16 ; <i32> [#uses=1]
72
62
ret i32 %tmp.5
73
- ; CHECK-LABEL: @test7 (
63
+ ; CHECK-LABEL: @test6 (
74
64
; CHECK: %tmp.5 = sext i16 %P to i32
75
65
; CHECK: ret i32 %tmp.5
76
66
}
77
67
78
- define i32 @test8 (i32 %x ) nounwind readnone {
68
+ define i32 @test7 (i32 %x ) nounwind readnone {
79
69
entry:
80
70
%shr = lshr i32 %x , 5 ; <i32> [#uses=1]
81
71
%xor = xor i32 %shr , 67108864 ; <i32> [#uses=1]
82
72
%sub = add i32 %xor , -67108864 ; <i32> [#uses=1]
83
73
ret i32 %sub
84
- ; CHECK-LABEL: @test8 (
74
+ ; CHECK-LABEL: @test7 (
85
75
; CHECK: %sub = ashr i32 %x, 5
86
76
; CHECK: ret i32 %sub
87
77
}
78
+
0 commit comments