1 ; RUN: llc -march=mips -mcpu=mips32r2 < %s | FileCheck %s
2 ; RUN: llc -mtriple=mipsel-linux-gnu -march=mipsel -mcpu=mips32r2 -mattr=+mips16 < %s | FileCheck %s -check-prefix=mips16
6 define i32 @rot0(i32 %a, i32 %b) nounwind readnone {
10 %shr = lshr i32 %a, %sub
11 %or = or i32 %shr, %shl
15 ; CHECK: rotr $2, $4, 22
17 define i32 @rot1(i32 %a) nounwind readnone {
20 %shr = lshr i32 %a, 22
21 %or = or i32 %shl, %shr
25 ; CHECK: rotrv $2, $4, $5
27 define i32 @rot2(i32 %a, i32 %b) nounwind readnone {
29 %shr = lshr i32 %a, %b
31 %shl = shl i32 %a, %sub
32 %or = or i32 %shl, %shr
36 ; CHECK: rotr $2, $4, 10
38 define i32 @rot3(i32 %a) nounwind readnone {
40 %shr = lshr i32 %a, 10
42 %or = or i32 %shr, %shl