1 ; Check that madd.[ds], msub.[ds], nmadd.[ds], and nmsub.[ds] are supported
3 ; The spec for nmadd.[ds], and nmsub.[ds] does not state that they obey the
4 ; the Has2008 and ABS2008 configuration bits which govern the conformance to
5 ; IEEE 754 (1985) and IEEE 754 (2008). These instructions are therefore only
6 ; available when -enable-no-nans-fp-math is given.
8 ; RUN: llc < %s -march=mipsel -mcpu=mips32r2 -enable-no-nans-fp-math | FileCheck %s -check-prefix=32R2 -check-prefix=CHECK
9 ; RUN: llc < %s -march=mips64el -mcpu=mips64r2 -mattr=n64 -enable-no-nans-fp-math | FileCheck %s -check-prefix=64R2 -check-prefix=CHECK
10 ; RUN: llc < %s -march=mipsel -mcpu=mips32r2 | FileCheck %s -check-prefix=32R2NAN -check-prefix=CHECK
11 ; RUN: llc < %s -march=mips64el -mcpu=mips64r2 -mattr=n64 | FileCheck %s -check-prefix=64R2NAN -check-prefix=CHECK
13 define float @FOO0float(float %a, float %b, float %c) nounwind readnone {
15 ; CHECK-LABEL: FOO0float:
17 %mul = fmul float %a, %b
18 %add = fadd float %mul, %c
19 %add1 = fadd float %add, 0.000000e+00
23 define float @FOO1float(float %a, float %b, float %c) nounwind readnone {
25 ; CHECK-LABEL: FOO1float:
27 %mul = fmul float %a, %b
28 %sub = fsub float %mul, %c
29 %add = fadd float %sub, 0.000000e+00
33 define float @FOO2float(float %a, float %b, float %c) nounwind readnone {
35 ; CHECK-LABEL: FOO2float:
40 %mul = fmul float %a, %b
41 %add = fadd float %mul, %c
42 %sub = fsub float 0.000000e+00, %add
46 define float @FOO3float(float %a, float %b, float %c) nounwind readnone {
48 ; CHECK-LABEL: FOO3float:
53 %mul = fmul float %a, %b
54 %sub = fsub float %mul, %c
55 %sub1 = fsub float 0.000000e+00, %sub
59 define double @FOO10double(double %a, double %b, double %c) nounwind readnone {
61 ; CHECK-LABEL: FOO10double:
63 %mul = fmul double %a, %b
64 %add = fadd double %mul, %c
65 %add1 = fadd double %add, 0.000000e+00
69 define double @FOO11double(double %a, double %b, double %c) nounwind readnone {
71 ; CHECK-LABEL: FOO11double:
73 %mul = fmul double %a, %b
74 %sub = fsub double %mul, %c
75 %add = fadd double %sub, 0.000000e+00
79 define double @FOO12double(double %a, double %b, double %c) nounwind readnone {
81 ; CHECK-LABEL: FOO12double:
86 %mul = fmul double %a, %b
87 %add = fadd double %mul, %c
88 %sub = fsub double 0.000000e+00, %add
92 define double @FOO13double(double %a, double %b, double %c) nounwind readnone {
94 ; CHECK-LABEL: FOO13double:
99 %mul = fmul double %a, %b
100 %sub = fsub double %mul, %c
101 %sub1 = fsub double 0.000000e+00, %sub