1 ; RUN: llc -march=mips64el -mcpu=mips64r1 < %s | FileCheck %s
3 define i64 @f0(i64 %a0, i64 %a1) nounwind readnone {
6 %add = add nsw i64 %a1, %a0
10 define i64 @f1(i64 %a0, i64 %a1) nounwind readnone {
13 %sub = sub nsw i64 %a0, %a1
17 define i64 @f4(i64 %a0, i64 %a1) nounwind readnone {
20 %and = and i64 %a1, %a0
24 define i64 @f5(i64 %a0, i64 %a1) nounwind readnone {
31 define i64 @f6(i64 %a0, i64 %a1) nounwind readnone {
34 %xor = xor i64 %a1, %a0
38 define i64 @f7(i64 %a0) nounwind readnone {
40 ; CHECK: daddiu ${{[0-9]+}}, ${{[0-9]+}}, 20
41 %add = add nsw i64 %a0, 20
45 define i64 @f8(i64 %a0) nounwind readnone {
47 ; CHECK: daddiu ${{[0-9]+}}, ${{[0-9]+}}, -20
48 %sub = add nsw i64 %a0, -20
52 define i64 @f9(i64 %a0) nounwind readnone {
54 ; CHECK: andi ${{[0-9]+}}, ${{[0-9]+}}, 20
55 %and = and i64 %a0, 20
59 define i64 @f10(i64 %a0) nounwind readnone {
61 ; CHECK: ori ${{[0-9]+}}, ${{[0-9]+}}, 20
66 define i64 @f11(i64 %a0) nounwind readnone {
68 ; CHECK: xori ${{[0-9]+}}, ${{[0-9]+}}, 20
69 %xor = xor i64 %a0, 20
73 define i64 @f12(i64 %a, i64 %b) nounwind readnone {
76 %mul = mul nsw i64 %b, %a
80 define i64 @f13(i64 %a, i64 %b) nounwind readnone {
87 define i64 @f14(i64 %a, i64 %b) nounwind readnone {
91 %div = sdiv i64 %a, %b
95 define i64 @f15(i64 %a, i64 %b) nounwind readnone {
99 %div = udiv i64 %a, %b
103 define i64 @f16(i64 %a, i64 %b) nounwind readnone {
107 %rem = srem i64 %a, %b
111 define i64 @f17(i64 %a, i64 %b) nounwind readnone {
115 %rem = urem i64 %a, %b
119 declare i64 @llvm.ctlz.i64(i64) nounwind readnone
121 define i64 @f18(i64 %X) nounwind readnone {
124 %tmp1 = tail call i64 @llvm.ctlz.i64(i64 %X)
128 define i64 @f19(i64 %X) nounwind readnone {
131 %neg = xor i64 %X, -1
132 %tmp1 = tail call i64 @llvm.ctlz.i64(i64 %neg)
136 define i64 @f20(i64 %a, i64 %b) nounwind readnone {
140 %neg = xor i64 %or, -1