1
; RUN: llc -march=mips64el -mcpu=mips64r2 < %s | FileCheck %s
3
define i64 @f0(i64 %a0, i64 %a1) nounwind readnone {
6
%shl = shl i64 %a0, %a1
10
define i64 @f1(i64 %a0, i64 %a1) nounwind readnone {
13
%shr = ashr i64 %a0, %a1
17
define i64 @f2(i64 %a0, i64 %a1) nounwind readnone {
20
%shr = lshr i64 %a0, %a1
24
define i64 @f3(i64 %a0) nounwind readnone {
26
; CHECK: dsll ${{[0-9]+}}, ${{[0-9]+}}, 10
27
%shl = shl i64 %a0, 10
31
define i64 @f4(i64 %a0) nounwind readnone {
33
; CHECK: dsra ${{[0-9]+}}, ${{[0-9]+}}, 10
34
%shr = ashr i64 %a0, 10
38
define i64 @f5(i64 %a0) nounwind readnone {
40
; CHECK: dsrl ${{[0-9]+}}, ${{[0-9]+}}, 10
41
%shr = lshr i64 %a0, 10
45
define i64 @f6(i64 %a0) nounwind readnone {
47
; CHECK: dsll ${{[0-9]+}}, ${{[0-9]+}}, 40
48
%shl = shl i64 %a0, 40
52
define i64 @f7(i64 %a0) nounwind readnone {
54
; CHECK: dsra ${{[0-9]+}}, ${{[0-9]+}}, 40
55
%shr = ashr i64 %a0, 40
59
define i64 @f8(i64 %a0) nounwind readnone {
61
; CHECK: dsrl ${{[0-9]+}}, ${{[0-9]+}}, 40
62
%shr = lshr i64 %a0, 40
66
define i64 @f9(i64 %a0, i64 %a1) nounwind readnone {
70
%shr = lshr i64 %a0, %a1
71
%sub = sub i64 64, %a1
72
%shl = shl i64 %a0, %sub
73
%or = or i64 %shl, %shr
77
define i64 @f10(i64 %a0, i64 %a1) nounwind readnone {
81
%shl = shl i64 %a0, %a1
82
%sub = sub i64 64, %a1
83
%shr = lshr i64 %a0, %sub
84
%or = or i64 %shr, %shl
88
define i64 @f11(i64 %a0) nounwind readnone {
90
; CHECK: drotr ${{[0-9]+}}, ${{[0-9]+}}, 10
91
%shr = lshr i64 %a0, 10
92
%shl = shl i64 %a0, 54
93
%or = or i64 %shr, %shl
97
define i64 @f12(i64 %a0) nounwind readnone {
99
; CHECK: drotr ${{[0-9]+}}, ${{[0-9]+}}, 54
100
%shl = shl i64 %a0, 10
101
%shr = lshr i64 %a0, 54
102
%or = or i64 %shl, %shr