1; RUN: llc -mtriple armv6-apple-darwin -filetype asm -o - %s | FileCheck %s
2
3define i32 @test1(i32 %x) {
4  %tmp1 = and i32 %x, 16711935
5  ret i32 %tmp1
6}
7
8; CHECK-LABEL: test1:
9; CHECK: uxt
10
11define i32 @test2(i32 %x) {
12  %tmp1 = lshr i32 %x, 8
13  %tmp2 = and i32 %tmp1, 16711935
14  ret i32 %tmp2
15}
16
17; CHECK-LABEL: test2:
18; CHECK: uxt
19
20define i32 @test3(i32 %x) {
21  %tmp1 = lshr i32 %x, 8
22  %tmp2 = and i32 %tmp1, 16711935
23  ret i32 %tmp2
24}
25
26; CHECK-LABEL: test3:
27; CHECK: uxt
28
29define i32 @test4(i32 %x) {
30  %tmp1 = lshr i32 %x, 8
31  %tmp6 = and i32 %tmp1, 16711935
32  ret i32 %tmp6
33}
34
35; CHECK-LABEL: test4:
36; CHECK: uxt
37
38define i32 @test5(i32 %x) {
39  %tmp1 = lshr i32 %x, 8
40  %tmp2 = and i32 %tmp1, 16711935
41  ret i32 %tmp2
42}
43
44; CHECK-LABEL: test5:
45; CHECK: uxt
46
47define i32 @test6(i32 %x) {
48  %tmp1 = lshr i32 %x, 16
49  %tmp2 = and i32 %tmp1, 255
50  %tmp4 = shl i32 %x, 16
51  %tmp5 = and i32 %tmp4, 16711680
52  %tmp6 = or i32 %tmp2, %tmp5
53  ret i32 %tmp6
54}
55
56; CHECK-LABEL: test6:
57; CHECK: uxt
58
59define i32 @test7(i32 %x) {
60  %tmp1 = lshr i32 %x, 16
61  %tmp2 = and i32 %tmp1, 255
62  %tmp4 = shl i32 %x, 16
63  %tmp5 = and i32 %tmp4, 16711680
64  %tmp6 = or i32 %tmp2, %tmp5
65  ret i32 %tmp6
66}
67
68; CHECK-LABEL: test7:
69; CHECK: uxt
70
71define i32 @test8(i32 %x) {
72  %tmp1 = shl i32 %x, 8
73  %tmp2 = and i32 %tmp1, 16711680
74  %tmp5 = lshr i32 %x, 24
75  %tmp6 = or i32 %tmp2, %tmp5
76  ret i32 %tmp6
77}
78
79; CHECK-LABEL: test8:
80; CHECK: uxt
81
82define i32 @test9(i32 %x) {
83  %tmp1 = lshr i32 %x, 24
84  %tmp4 = shl i32 %x, 8
85  %tmp5 = and i32 %tmp4, 16711680
86  %tmp6 = or i32 %tmp5, %tmp1
87  ret i32 %tmp6
88}
89
90; CHECK-LABEL: test9:
91; CHECK: uxt
92
93define i32 @test10(i32 %p0) {
94  %tmp1 = lshr i32 %p0, 7
95  %tmp2 = and i32 %tmp1, 16253176
96  %tmp4 = lshr i32 %tmp2, 5
97  %tmp5 = and i32 %tmp4, 458759
98  %tmp7 = or i32 %tmp5, %tmp2
99  ret i32 %tmp7
100}
101
102; CHECK-LABEL: test10:
103; CHECK: uxt
104
105