1 ; RUN: llc -march=mips64el -mcpu=mips64r2 < %s | FileCheck -check-prefixes=ALL,MIPS %s
2 ; RUN: llc -march=mips64el -mcpu=mips64r6 -mattr=micromips < %s | FileCheck -check-prefixes=ALL,MICROMIPS %s
4 define i64 @f0(i64 %a0, i64 %a1) nounwind readnone {
7 %shl = shl i64 %a0, %a1
11 define i64 @f1(i64 %a0, i64 %a1) nounwind readnone {
14 %shr = ashr i64 %a0, %a1
18 define i64 @f2(i64 %a0, i64 %a1) nounwind readnone {
21 %shr = lshr i64 %a0, %a1
25 define i64 @f3(i64 %a0) nounwind readnone {
27 ; ALL: dsll ${{[0-9]+}}, ${{[0-9]+}}, 10
28 %shl = shl i64 %a0, 10
32 define i64 @f4(i64 %a0) nounwind readnone {
34 ; ALL: dsra ${{[0-9]+}}, ${{[0-9]+}}, 10
35 %shr = ashr i64 %a0, 10
39 define i64 @f5(i64 %a0) nounwind readnone {
41 ; ALL: dsrl ${{[0-9]+}}, ${{[0-9]+}}, 10
42 %shr = lshr i64 %a0, 10
46 define i64 @f6(i64 %a0) nounwind readnone {
48 ; ALL: dsll ${{[0-9]+}}, ${{[0-9]+}}, 40
49 %shl = shl i64 %a0, 40
53 define i64 @f7(i64 %a0) nounwind readnone {
55 ; ALL: dsra ${{[0-9]+}}, ${{[0-9]+}}, 40
56 %shr = ashr i64 %a0, 40
60 define i64 @f8(i64 %a0) nounwind readnone {
62 ; ALL: dsrl ${{[0-9]+}}, ${{[0-9]+}}, 40
63 %shr = lshr i64 %a0, 40
67 define i64 @f9(i64 %a0, i64 %a1) nounwind readnone {
71 %shr = lshr i64 %a0, %a1
72 %sub = sub i64 64, %a1
73 %shl = shl i64 %a0, %sub
74 %or = or i64 %shl, %shr
78 define i64 @f10(i64 %a0, i64 %a1) nounwind readnone {
82 %shl = shl i64 %a0, %a1
83 %sub = sub i64 64, %a1
84 %shr = lshr i64 %a0, %sub
85 %or = or i64 %shr, %shl
89 define i64 @f11(i64 %a0) nounwind readnone {
91 ; ALL: drotr ${{[0-9]+}}, ${{[0-9]+}}, 10
92 %shr = lshr i64 %a0, 10
93 %shl = shl i64 %a0, 54
94 %or = or i64 %shr, %shl
98 define i64 @f12(i64 %a0) nounwind readnone {
100 ; ALL: drotr ${{[0-9]+}}, ${{[0-9]+}}, 54
101 %shl = shl i64 %a0, 10
102 %shr = lshr i64 %a0, 54
103 %or = or i64 %shl, %shr