1 ; RUN: llc %s -mtriple=mipsisa32r6el-linux-gnu -o - | \
2 ; RUN: FileCheck %s --check-prefix=MIPS32R6EL
3 ; RUN: llc %s -mtriple=mipsisa64r6el-linux-gnuabi64 -o - | \
4 ; RUN: FileCheck %s --check-prefix=MIPS64R6EL
6 define float @mins(float %x, float %y) {
7 ; MIPS32R6EL-LABEL: mins
9 ; MIPS32R6EL-NEXT: min.s $f0, $f14, $f14
10 ; MIPS32R6EL-NEXT: min.s $f1, $f12, $f12
11 ; MIPS32R6EL-NEXT: jr $ra
12 ; MIPS32R6EL-NEXT: min.s $f0, $f1, $f0
14 ; MIPS64R6EL-LABEL: mins
15 ; MIPS64R6EL: # %bb.0:
16 ; MIPS64R6EL-NEXT: min.s $f0, $f13, $f13
17 ; MIPS64R6EL-NEXT: min.s $f1, $f12, $f12
18 ; MIPS64R6EL-NEXT: jr $ra
19 ; MIPS64R6EL-NEXT: min.s $f0, $f1, $f0
21 %r = tail call float @llvm.minnum.f32(float %x, float %y)
25 define float @maxs(float %x, float %y) {
26 ; MIPS32R6EL-LABEL: maxs
27 ; MIPS32R6EL: # %bb.0:
28 ; MIPS32R6EL-NEXT: min.s $f0, $f14, $f14
29 ; MIPS32R6EL-NEXT: min.s $f1, $f12, $f12
30 ; MIPS32R6EL-NEXT: jr $ra
31 ; MIPS32R6EL-NEXT: max.s $f0, $f1, $f0
33 ; MIPS64R6EL-LABEL: maxs
34 ; MIPS64R6EL: # %bb.0:
35 ; MIPS64R6EL-NEXT: min.s $f0, $f13, $f13
36 ; MIPS64R6EL-NEXT: min.s $f1, $f12, $f12
37 ; MIPS64R6EL-NEXT: jr $ra
38 ; MIPS64R6EL-NEXT: max.s $f0, $f1, $f0
40 %r = tail call float @llvm.maxnum.f32(float %x, float %y)
44 define double @mind(double %x, double %y) {
45 ; MIPS32R6EL-LABEL: mind
46 ; MIPS32R6EL: # %bb.0:
47 ; MIPS32R6EL-NEXT: min.d $f0, $f14, $f14
48 ; MIPS32R6EL-NEXT: min.d $f1, $f12, $f12
49 ; MIPS32R6EL-NEXT: jr $ra
50 ; MIPS32R6EL-NEXT: min.d $f0, $f1, $f0
52 ; MIPS64R6EL-LABEL: mind
53 ; MIPS64R6EL: # %bb.0:
54 ; MIPS64R6EL-NEXT: min.d $f0, $f13, $f13
55 ; MIPS64R6EL-NEXT: min.d $f1, $f12, $f12
56 ; MIPS64R6EL-NEXT: jr $ra
57 ; MIPS64R6EL-NEXT: min.d $f0, $f1, $f0
59 %r = tail call double @llvm.minnum.f64(double %x, double %y)
63 define double @maxd(double %x, double %y) {
64 ; MIPS32R6EL-LABEL: maxd
65 ; MIPS32R6EL: # %bb.0:
66 ; MIPS32R6EL-NEXT: min.d $f0, $f14, $f14
67 ; MIPS32R6EL-NEXT: min.d $f1, $f12, $f12
68 ; MIPS32R6EL-NEXT: jr $ra
69 ; MIPS32R6EL-NEXT: max.d $f0, $f1, $f0
71 ; MIPS64R6EL-LABEL: maxd
72 ; MIPS64R6EL: # %bb.0:
73 ; MIPS64R6EL-NEXT: min.d $f0, $f13, $f13
74 ; MIPS64R6EL-NEXT: min.d $f1, $f12, $f12
75 ; MIPS64R6EL-NEXT: jr $ra
76 ; MIPS64R6EL-NEXT: max.d $f0, $f1, $f0
78 %r = tail call double @llvm.maxnum.f64(double %x, double %y)
82 declare float @llvm.minnum.f32(float, float)
83 declare float @llvm.maxnum.f32(float, float)
84 declare double @llvm.minnum.f64(double, double)
85 declare double @llvm.maxnum.f64(double, double)