mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-22 10:29:35 +00:00
Test cases for 64-bit multiplication and division.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145717 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fa341d919f
commit
99f50fb3ee
41
test/CodeGen/Mips/mips64muldiv.ll
Normal file
41
test/CodeGen/Mips/mips64muldiv.ll
Normal file
@ -0,0 +1,41 @@
|
||||
; RUN: llc -march=mips64el -mcpu=mips64 < %s | FileCheck %s
|
||||
|
||||
define i64 @m0(i64 %a0, i64 %a1) nounwind readnone {
|
||||
entry:
|
||||
; CHECK: dmult
|
||||
; CHECK: mflo
|
||||
%mul = mul i64 %a1, %a0
|
||||
ret i64 %mul
|
||||
}
|
||||
|
||||
define i64 @d0(i64 %a0, i64 %a1) nounwind readnone {
|
||||
entry:
|
||||
; CHECK: ddivu
|
||||
; CHECK: mflo
|
||||
%div = udiv i64 %a0, %a1
|
||||
ret i64 %div
|
||||
}
|
||||
|
||||
define i64 @d1(i64 %a0, i64 %a1) nounwind readnone {
|
||||
entry:
|
||||
; CHECK: ddiv
|
||||
; CHECK: mflo
|
||||
%div = sdiv i64 %a0, %a1
|
||||
ret i64 %div
|
||||
}
|
||||
|
||||
define i64 @d2(i64 %a0, i64 %a1) nounwind readnone {
|
||||
entry:
|
||||
; CHECK: ddivu
|
||||
; CHECK: mfhi
|
||||
%rem = urem i64 %a0, %a1
|
||||
ret i64 %rem
|
||||
}
|
||||
|
||||
define i64 @d3(i64 %a0, i64 %a1) nounwind readnone {
|
||||
entry:
|
||||
; CHECK: ddiv
|
||||
; CHECK: mfhi
|
||||
%rem = srem i64 %a0, %a1
|
||||
ret i64 %rem
|
||||
}
|
Loading…
Reference in New Issue
Block a user