1 ; RUN: llc -mtriple armv6-apple-darwin -filetype asm -o - %s | FileCheck %s
3 define i32 @test1(i32 %x) {
6 ; CHECK-NEXT: uxtb16 r0, r0
8 %tmp1 = and i32 %x, 16711935
12 define i32 @test2(i32 %x) {
15 ; CHECK-NEXT: uxtb16 r0, r0, ror #8
17 %tmp1 = lshr i32 %x, 8
18 %tmp2 = and i32 %tmp1, 16711935
22 define i32 @test3(i32 %x) {
25 ; CHECK-NEXT: uxtb16 r0, r0, ror #8
27 %tmp1 = lshr i32 %x, 8
28 %tmp2 = and i32 %tmp1, 16711935
32 define i32 @test4(i32 %x) {
35 ; CHECK-NEXT: uxtb16 r0, r0, ror #8
37 %tmp1 = lshr i32 %x, 8
38 %tmp6 = and i32 %tmp1, 16711935
42 define i32 @test5(i32 %x) {
45 ; CHECK-NEXT: uxtb16 r0, r0, ror #8
47 %tmp1 = lshr i32 %x, 8
48 %tmp2 = and i32 %tmp1, 16711935
52 define i32 @test6(i32 %x) {
55 ; CHECK-NEXT: uxtb16 r0, r0, ror #16
57 %tmp1 = lshr i32 %x, 16
58 %tmp2 = and i32 %tmp1, 255
59 %tmp4 = shl i32 %x, 16
60 %tmp5 = and i32 %tmp4, 16711680
61 %tmp6 = or i32 %tmp2, %tmp5
65 define i32 @test7(i32 %x) {
68 ; CHECK-NEXT: uxtb16 r0, r0, ror #16
70 %tmp1 = lshr i32 %x, 16
71 %tmp2 = and i32 %tmp1, 255
72 %tmp4 = shl i32 %x, 16
73 %tmp5 = and i32 %tmp4, 16711680
74 %tmp6 = or i32 %tmp2, %tmp5
78 define i32 @test8(i32 %x) {
81 ; CHECK-NEXT: uxtb16 r0, r0, ror #24
84 %tmp2 = and i32 %tmp1, 16711680
85 %tmp5 = lshr i32 %x, 24
86 %tmp6 = or i32 %tmp2, %tmp5
90 define i32 @test9(i32 %x) {
93 ; CHECK-NEXT: uxtb16 r0, r0, ror #24
95 %tmp1 = lshr i32 %x, 24
97 %tmp5 = and i32 %tmp4, 16711680
98 %tmp6 = or i32 %tmp5, %tmp1
102 define i32 @test10(i32 %p0) {
103 ; CHECK-LABEL: test10:
105 ; CHECK-NEXT: mov r1, #248
106 ; CHECK-NEXT: orr r1, r1, #16252928
107 ; CHECK-NEXT: and r0, r1, r0, lsr #7
108 ; CHECK-NEXT: lsr r1, r0, #5
109 ; CHECK-NEXT: uxtb16 r1, r1
110 ; CHECK-NEXT: orr r0, r1, r0
112 %tmp1 = lshr i32 %p0, 7
113 %tmp2 = and i32 %tmp1, 16253176
114 %tmp4 = lshr i32 %tmp2, 5
115 %tmp5 = and i32 %tmp4, 458759
116 %tmp7 = or i32 %tmp5, %tmp2