1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -O0 -mtriple=mipsel-linux-gnu -global-isel -verify-machineinstrs %s -o -| FileCheck %s -check-prefixes=MIPS32,FP32
3 ; RUN: llc -O0 -mtriple=mipsel-linux-gnu -mattr=+fp64,+mips32r2 -global-isel -verify-machineinstrs %s -o -| FileCheck %s -check-prefixes=MIPS32,FP64
5 define float @float_add(float %a, float %b) {
6 ; MIPS32-LABEL: float_add:
7 ; MIPS32: # %bb.0: # %entry
8 ; MIPS32-NEXT: add.s $f0, $f12, $f14
12 %add = fadd float %a, %b
16 define float @float_sub(float %a, float %b) {
17 ; MIPS32-LABEL: float_sub:
18 ; MIPS32: # %bb.0: # %entry
19 ; MIPS32-NEXT: sub.s $f0, $f12, $f14
23 %sub = fsub float %a, %b
27 define float @float_mul(float %a, float %b) {
28 ; MIPS32-LABEL: float_mul:
29 ; MIPS32: # %bb.0: # %entry
30 ; MIPS32-NEXT: mul.s $f0, $f12, $f14
34 %mul = fmul float %a, %b
38 define float @float_div(float %a, float %b) {
39 ; MIPS32-LABEL: float_div:
40 ; MIPS32: # %bb.0: # %entry
41 ; MIPS32-NEXT: div.s $f0, $f12, $f14
45 %div = fdiv float %a, %b
49 define double @double_add(double %a, double %b) {
50 ; MIPS32-LABEL: double_add:
51 ; MIPS32: # %bb.0: # %entry
52 ; MIPS32-NEXT: add.d $f0, $f12, $f14
56 %add = fadd double %a, %b
60 define double @double_sub(double %a, double %b) {
61 ; MIPS32-LABEL: double_sub:
62 ; MIPS32: # %bb.0: # %entry
63 ; MIPS32-NEXT: sub.d $f0, $f12, $f14
67 %sub = fsub double %a, %b
71 define double @double_mul(double %a, double %b) {
72 ; MIPS32-LABEL: double_mul:
73 ; MIPS32: # %bb.0: # %entry
74 ; MIPS32-NEXT: mul.d $f0, $f12, $f14
78 %mul = fmul double %a, %b
82 define double @double_div(double %a, double %b) {
83 ; MIPS32-LABEL: double_div:
84 ; MIPS32: # %bb.0: # %entry
85 ; MIPS32-NEXT: div.d $f0, $f12, $f14
89 %div = fdiv double %a, %b