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
3 ; RUN: llc -march=mips -mcpu=mips32r3 -mattr=+micromips < %s | FileCheck %s \
4 ; RUN: -check-prefix=MM32
5 ; RUN: llc -march=mips -mcpu=mips32r6 -mattr=+micromips < %s | FileCheck %s \
6 ; RUN: -check-prefix=MM32
11 ; MM32: subu16 $2, $2, $5
12 ; MM32: rotrv $2, $4, $2
13 define i32 @rot0(i32 %a, i32 %b) nounwind readnone {
17 %shr = lshr i32 %a, %sub
18 %or = or i32 %shr, %shl
22 ; CHECK: rotr $2, $4, 22
24 ; MM32: rotr $2, $4, 22
25 define i32 @rot1(i32 %a) nounwind readnone {
28 %shr = lshr i32 %a, 22
29 %or = or i32 %shl, %shr
33 ; CHECK: rotrv $2, $4, $5
35 ; MM32: rotrv $2, $4, $5
36 define i32 @rot2(i32 %a, i32 %b) nounwind readnone {
38 %shr = lshr i32 %a, %b
40 %shl = shl i32 %a, %sub
41 %or = or i32 %shl, %shr
45 ; CHECK: rotr $2, $4, 10
47 ; MM32: rotr $2, $4, 10
48 define i32 @rot3(i32 %a) nounwind readnone {
50 %shr = lshr i32 %a, 10
52 %or = or i32 %shr, %shl