1 ; RUN: llc -mtriple=arm-eabi -mattr=+v6t2 %s -o - | FileCheck %s
3 define i32 @f1(i32 %a) {
6 ; CHECK: sbfx r0, r0, #0, #20
8 %tmp2 = ashr i32 %tmp, 12
12 define i32 @f2(i32 %a) {
15 ; CHECK: bfc r0, #20, #12
17 %tmp2 = lshr i32 %tmp, 12
21 define i32 @f3(i32 %a) {
24 ; CHECK: sbfx r0, r0, #5, #3
26 %tmp2 = ashr i32 %tmp, 29
30 define i32 @f4(i32 %a) {
33 ; CHECK: ubfx r0, r0, #5, #3
35 %tmp2 = lshr i32 %tmp, 29
39 define i32 @f5(i32 %a) {
45 %tmp2 = ashr i32 %tmp, 1
49 define signext i8 @f6(i32 %a) {
51 ; CHECK: sbfx r0, r0, #23, #8
53 %tmp = lshr i32 %a, 23
54 %res = trunc i32 %tmp to i8
58 define signext i8 @f7(i32 %a) {
62 %tmp = lshr i32 %a, 25
63 %res = trunc i32 %tmp to i8