1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=thumb-eabi -mcpu=arm1156t2-s -mattr=+thumb2 | FileCheck %s
3 ; RUN: llc < %s -mtriple=thumb-eabi | FileCheck %s -check-prefix=THUMB1
5 define i32 @f1(i32 %a) {
8 ; CHECK-NEXT: ror.w r0, r0, #22
13 ; THUMB1-NEXT: movs r1, #22
14 ; THUMB1-NEXT: rors r0, r1
18 %tmp = or i32 %l8, %r8
22 define i32 @f2(i32 %v, i32 %nbits) {
24 ; CHECK: @ %bb.0: @ %entry
25 ; CHECK-NEXT: rors r0, r1
29 ; THUMB1: @ %bb.0: @ %entry
30 ; THUMB1-NEXT: rors r0, r1
33 %and = and i32 %nbits, 31
34 %shr = lshr i32 %v, %and
35 %sub = sub i32 32, %and
36 %shl = shl i32 %v, %sub
37 %or = or i32 %shl, %shr