1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc -O0 -mtriple=mipsel-linux-gnu -global-isel \
3; RUN:     -verify-machineinstrs %s -o -| FileCheck %s
4; RUN: llc -O0 -mtriple=mipsel-linux-gnu -mattr=+fp64,+mips32r2 -global-isel \
5; RUN:     -verify-machineinstrs %s -o -| FileCheck %s
6
7define float @float_add(float %a, float %b) {
8; CHECK-LABEL: float_add:
9; CHECK:       # %bb.0: # %entry
10; CHECK-NEXT:    add.s $f0, $f12, $f14
11; CHECK-NEXT:    jr $ra
12; CHECK-NEXT:    nop
13entry:
14  %add = fadd float %a, %b
15  ret float %add
16}
17
18define float @float_sub(float %a, float %b) {
19; CHECK-LABEL: float_sub:
20; CHECK:       # %bb.0: # %entry
21; CHECK-NEXT:    sub.s $f0, $f12, $f14
22; CHECK-NEXT:    jr $ra
23; CHECK-NEXT:    nop
24entry:
25  %sub = fsub float %a, %b
26  ret float %sub
27}
28
29define float @float_mul(float %a, float %b) {
30; CHECK-LABEL: float_mul:
31; CHECK:       # %bb.0: # %entry
32; CHECK-NEXT:    mul.s $f0, $f12, $f14
33; CHECK-NEXT:    jr $ra
34; CHECK-NEXT:    nop
35entry:
36  %mul = fmul float %a, %b
37  ret float %mul
38}
39
40define float @float_div(float %a, float %b) {
41; CHECK-LABEL: float_div:
42; CHECK:       # %bb.0: # %entry
43; CHECK-NEXT:    div.s $f0, $f12, $f14
44; CHECK-NEXT:    jr $ra
45; CHECK-NEXT:    nop
46entry:
47  %div = fdiv float %a, %b
48  ret float %div
49}
50
51define double @double_add(double %a, double %b) {
52; CHECK-LABEL: double_add:
53; CHECK:       # %bb.0: # %entry
54; CHECK-NEXT:    add.d $f0, $f12, $f14
55; CHECK-NEXT:    jr $ra
56; CHECK-NEXT:    nop
57entry:
58  %add = fadd double %a, %b
59  ret double %add
60}
61
62define double @double_sub(double %a, double %b) {
63; CHECK-LABEL: double_sub:
64; CHECK:       # %bb.0: # %entry
65; CHECK-NEXT:    sub.d $f0, $f12, $f14
66; CHECK-NEXT:    jr $ra
67; CHECK-NEXT:    nop
68entry:
69  %sub = fsub double %a, %b
70  ret double %sub
71}
72
73define double @double_mul(double %a, double %b) {
74; CHECK-LABEL: double_mul:
75; CHECK:       # %bb.0: # %entry
76; CHECK-NEXT:    mul.d $f0, $f12, $f14
77; CHECK-NEXT:    jr $ra
78; CHECK-NEXT:    nop
79entry:
80  %mul = fmul double %a, %b
81  ret double %mul
82}
83
84define double @double_div(double %a, double %b) {
85; CHECK-LABEL: double_div:
86; CHECK:       # %bb.0: # %entry
87; CHECK-NEXT:    div.d $f0, $f12, $f14
88; CHECK-NEXT:    jr $ra
89; CHECK-NEXT:    nop
90entry:
91  %div = fdiv double %a, %b
92  ret double %div
93}
94