1 ; RUN: llc -mtriple=thumb-eabi -mcpu=arm1156t2-s -mattr=+thumb2 %s -o - | FileCheck %s
2 ; RUN: llc -mtriple=thumb-eabi %s -o - | FileCheck %s -check-prefix=THUMB1
5 ; CHECK: ror.w r0, r0, #22
6 define i32 @f1(i32 %a) {
18 define i32 @f2(i32 %v, i32 %nbits) {
20 %and = and i32 %nbits, 31
21 %shr = lshr i32 %v, %and
22 %sub = sub i32 32, %and
23 %shl = shl i32 %v, %sub
24 %or = or i32 %shl, %shr