blob: fd036a2ca9fbf4d9fa58f46de60280bff74ad242 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
; 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 @m1(i64 %a) nounwind readnone {
entry:
; CHECK: dmult
; CHECK: mfhi
%div = sdiv i64 %a, 3
ret i64 %div
}
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
}
|