mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-15 07:34:33 +00:00
04d3762ff1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141017 91177308-0d34-0410-b5e6-96231b3b80d8
86 lines
1.5 KiB
LLVM
86 lines
1.5 KiB
LLVM
; RUN: llc -march=mips64el -mcpu=mips64r1 < %s | FileCheck %s
|
|
|
|
define i64 @f0(i64 %a0, i64 %a1) nounwind readnone {
|
|
entry:
|
|
; CHECK: daddu
|
|
%add = add nsw i64 %a1, %a0
|
|
ret i64 %add
|
|
}
|
|
|
|
define i64 @f1(i64 %a0, i64 %a1) nounwind readnone {
|
|
entry:
|
|
; CHECK: dsubu
|
|
%sub = sub nsw i64 %a0, %a1
|
|
ret i64 %sub
|
|
}
|
|
|
|
define i64 @f4(i64 %a0, i64 %a1) nounwind readnone {
|
|
entry:
|
|
; CHECK: and
|
|
%and = and i64 %a1, %a0
|
|
ret i64 %and
|
|
}
|
|
|
|
define i64 @f5(i64 %a0, i64 %a1) nounwind readnone {
|
|
entry:
|
|
; CHECK: or
|
|
%or = or i64 %a1, %a0
|
|
ret i64 %or
|
|
}
|
|
|
|
define i64 @f6(i64 %a0, i64 %a1) nounwind readnone {
|
|
entry:
|
|
; CHECK: xor
|
|
%xor = xor i64 %a1, %a0
|
|
ret i64 %xor
|
|
}
|
|
|
|
define i64 @f7(i64 %a0) nounwind readnone {
|
|
entry:
|
|
; CHECK: daddiu ${{[0-9]+}}, ${{[0-9]+}}, 20
|
|
%add = add nsw i64 %a0, 20
|
|
ret i64 %add
|
|
}
|
|
|
|
define i64 @f8(i64 %a0) nounwind readnone {
|
|
entry:
|
|
; CHECK: daddiu ${{[0-9]+}}, ${{[0-9]+}}, -20
|
|
%sub = add nsw i64 %a0, -20
|
|
ret i64 %sub
|
|
}
|
|
|
|
define i64 @f9(i64 %a0) nounwind readnone {
|
|
entry:
|
|
; CHECK: andi ${{[0-9]+}}, ${{[0-9]+}}, 20
|
|
%and = and i64 %a0, 20
|
|
ret i64 %and
|
|
}
|
|
|
|
define i64 @f10(i64 %a0) nounwind readnone {
|
|
entry:
|
|
; CHECK: ori ${{[0-9]+}}, ${{[0-9]+}}, 20
|
|
%or = or i64 %a0, 20
|
|
ret i64 %or
|
|
}
|
|
|
|
define i64 @f11(i64 %a0) nounwind readnone {
|
|
entry:
|
|
; CHECK: xori ${{[0-9]+}}, ${{[0-9]+}}, 20
|
|
%xor = xor i64 %a0, 20
|
|
ret i64 %xor
|
|
}
|
|
|
|
define i64 @f12(i64 %a, i64 %b) nounwind readnone {
|
|
entry:
|
|
; CHECK: mult
|
|
%mul = mul nsw i64 %b, %a
|
|
ret i64 %mul
|
|
}
|
|
|
|
define i64 @f13(i64 %a, i64 %b) nounwind readnone {
|
|
entry:
|
|
; CHECK: mult
|
|
%mul = mul i64 %b, %a
|
|
ret i64 %mul
|
|
}
|