1 ; RUN: llc -march=mips -mcpu=4ke < %s | FileCheck %s
3 ; CHECK: rotrv $2, $4, $2
4 define i32 @rot0(i32 %a, i32 %b) nounwind readnone {
8 %shr = lshr i32 %a, %sub
9 %or = or i32 %shr, %shl
13 ; CHECK: rotr $2, $4, 22
14 define i32 @rot1(i32 %a) nounwind readnone {
17 %shr = lshr i32 %a, 22
18 %or = or i32 %shl, %shr
22 ; CHECK: rotrv $2, $4, $5
23 define i32 @rot2(i32 %a, i32 %b) nounwind readnone {
25 %shr = lshr i32 %a, %b
27 %shl = shl i32 %a, %sub
28 %or = or i32 %shl, %shr
32 ; CHECK: rotr $2, $4, 10
33 define i32 @rot3(i32 %a) nounwind readnone {
35 %shr = lshr i32 %a, 10
37 %or = or i32 %shr, %shl