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=mips32 -enable-no-nans-fp-math | FileCheck %s -check-prefixes=ALL,32-NOMADD,32-NONAN-NOMADD
9 ; RUN: llc < %s -march=mipsel -mcpu=mips32r2 -enable-no-nans-fp-math | FileCheck %s -check-prefixes=ALL,32R2,32R2-NONAN
10 ; RUN: llc < %s -march=mipsel -mcpu=mips32r6 -enable-no-nans-fp-math | FileCheck %s -check-prefixes=ALL,32R6-NOMADD,32R6-NONAN-NOMADD
11 ; RUN: llc < %s -march=mips64el -mcpu=mips64 -target-abi=n64 -enable-no-nans-fp-math | FileCheck %s -check-prefixes=ALL,64,64-NONAN
12 ; RUN: llc < %s -march=mips64el -mcpu=mips64r2 -target-abi=n64 -enable-no-nans-fp-math | FileCheck %s -check-prefixes=ALL,64R2,64R2-NONAN
13 ; RUN: llc < %s -march=mips64el -mcpu=mips64r6 -target-abi=n64 -enable-no-nans-fp-math | FileCheck %s -check-prefixes=ALL,64R6-NOMADD,64R6-NONAN-NOMADD
14 ; RUN: llc < %s -march=mipsel -mcpu=mips32 | FileCheck %s -check-prefixes=ALL,32-NOMADD,32-NAN-NOMADD
15 ; RUN: llc < %s -march=mipsel -mcpu=mips32r2 | FileCheck %s -check-prefixes=ALL,32R2,32R2-NAN
16 ; RUN: llc < %s -march=mipsel -mcpu=mips32r6 | FileCheck %s -check-prefixes=ALL,32R6-NOMADD,32R6-NAN-NOMADD
17 ; RUN: llc < %s -march=mips64el -mcpu=mips64 -target-abi=n64 | FileCheck %s -check-prefixes=ALL,64,64-NAN
18 ; RUN: llc < %s -march=mips64el -mcpu=mips64r2 -target-abi=n64 | FileCheck %s -check-prefixes=ALL,64R2,64R2-NAN
19 ; RUN: llc < %s -march=mips64el -mcpu=mips64r6 -target-abi=n64 | FileCheck %s -check-prefixes=ALL,64R6-NOMADD,64R6-NAN-NOMADD
21 ; Check that madd.[ds], msub.[ds], nmadd.[ds], and nmsub.[ds] are not generated
22 ; when +nomadd attribute is specified.
23 ; Output for mips32 and mips64r6 reused since aforementioned instructions are
24 ; not generated in those cases.
25 ; RUN: llc < %s -march=mipsel -mcpu=mips32r2 -enable-no-nans-fp-math -mattr=+nomadd4 | FileCheck %s -check-prefixes=ALL,32-NOMADD,32-NONAN-NOMADD
26 ; RUN: llc < %s -march=mips64el -mcpu=mips64 -target-abi=n64 -enable-no-nans-fp-math -mattr=+nomadd4 | FileCheck %s -check-prefixes=ALL,64R6-NOMADD,64R6-NONAN-NOMADD
27 ; RUN: llc < %s -march=mips64el -mcpu=mips64r2 -target-abi=n64 -enable-no-nans-fp-math -mattr=+nomadd4 | FileCheck %s -check-prefixes=ALL,64R6-NOMADD,64R6-NONAN-NOMADD
28 ; RUN: llc < %s -march=mipsel -mcpu=mips32r2 -mattr=+nomadd4 | FileCheck %s -check-prefixes=ALL,32-NOMADD,32-NAN-NOMADD
29 ; RUN: llc < %s -march=mips64el -mcpu=mips64 -target-abi=n64 -mattr=+nomadd4 | FileCheck %s -check-prefixes=ALL,64R6-NOMADD,64R6-NAN-NOMADD
30 ; RUN: llc < %s -march=mips64el -mcpu=mips64r2 -target-abi=n64 -mattr=+nomadd4 | FileCheck %s -check-prefixes=ALL,64R6-NOMADD,64R6-NAN-NOMADD
32 define float @FOO0float(float %a, float %b, float %c) nounwind readnone {
34 ; ALL-LABEL: FOO0float:
36 ; 32-NOMADD-DAG: mtc1 $6, $[[T0:f[0-9]+]]
37 ; 32-NOMADD-DAG: mul.s $[[T1:f[0-9]+]], $f12, $f14
38 ; 32-NOMADD-DAG: add.s $[[T2:f[0-9]+]], $[[T1]], $[[T0]]
39 ; 32-NOMADD-DAG: mtc1 $zero, $[[T2:f[0-9]+]]
40 ; 32-NOMADD-DAG: add.s $f0, $[[T1]], $[[T2]]
42 ; 32R2: mtc1 $6, $[[T0:f[0-9]+]]
43 ; 32R2: madd.s $[[T1:f[0-9]+]], $[[T0]], $f12, $f14
44 ; 32R2: mtc1 $zero, $[[T2:f[0-9]+]]
45 ; 32R2: add.s $f0, $[[T1]], $[[T2]]
47 ; 32R6-NOMADD-DAG: mtc1 $6, $[[T0:f[0-9]+]]
48 ; 32R6-NOMADD-DAG: mul.s $[[T1:f[0-9]+]], $f12, $f14
49 ; 32R6-NOMADD-DAG: add.s $[[T2:f[0-9]+]], $[[T1]], $[[T0]]
50 ; 32R6-NOMADD-DAG: mtc1 $zero, $[[T2:f[0-9]+]]
51 ; 32R6-NOMADD-DAG: add.s $f0, $[[T1]], $[[T2]]
53 ; 64-DAG: madd.s $[[T0:f[0-9]+]], $f14, $f12, $f13
54 ; 64-DAG: mtc1 $zero, $[[T1:f[0-9]+]]
55 ; 64-DAG: add.s $f0, $[[T0]], $[[T1]]
57 ; 64R2: madd.s $[[T0:f[0-9]+]], $f14, $f12, $f13
58 ; 64R2: mtc1 $zero, $[[T1:f[0-9]+]]
59 ; 64R2: add.s $f0, $[[T0]], $[[T1]]
61 ; 64R6-NOMADD-DAG: mul.s $[[T0:f[0-9]+]], $f12, $f13
62 ; 64R6-NOMADD-DAG: add.s $[[T1:f[0-9]+]], $[[T0]], $f14
63 ; 64R6-NOMADD-DAG: mtc1 $zero, $[[T2:f[0-9]+]]
64 ; 64R6-NOMADD-DAG: add.s $f0, $[[T1]], $[[T2]]
66 %mul = fmul float %a, %b
67 %add = fadd float %mul, %c
68 %add1 = fadd float %add, 0.000000e+00
72 define float @FOO1float(float %a, float %b, float %c) nounwind readnone {
74 ; ALL-LABEL: FOO1float:
76 ; 32-NOMADD-DAG: mtc1 $6, $[[T0:f[0-9]+]]
77 ; 32-NOMADD-DAG: mul.s $[[T1:f[0-9]+]], $f12, $f14
78 ; 32-NOMADD-DAG: sub.s $[[T2:f[0-9]+]], $[[T1]], $[[T0]]
79 ; 32-NOMADD-DAG: mtc1 $zero, $[[T2:f[0-9]+]]
80 ; 32-NOMADD-DAG: add.s $f0, $[[T1]], $[[T2]]
82 ; 32R2: mtc1 $6, $[[T0:f[0-9]+]]
83 ; 32R2: msub.s $[[T1:f[0-9]+]], $[[T0]], $f12, $f14
84 ; 32R2: mtc1 $zero, $[[T2:f[0-9]+]]
85 ; 32R2: add.s $f0, $[[T1]], $[[T2]]
87 ; 32R6-NOMADD-DAG: mtc1 $6, $[[T0:f[0-9]+]]
88 ; 32R6-NOMADD-DAG: mul.s $[[T1:f[0-9]+]], $f12, $f14
89 ; 32R6-NOMADD-DAG: sub.s $[[T2:f[0-9]+]], $[[T1]], $[[T0]]
90 ; 32R6-NOMADD-DAG: mtc1 $zero, $[[T2:f[0-9]+]]
91 ; 32R6-NOMADD-DAG: add.s $f0, $[[T1]], $[[T2]]
93 ; 64-DAG: msub.s $[[T0:f[0-9]+]], $f14, $f12, $f13
94 ; 64-DAG: mtc1 $zero, $[[T1:f[0-9]+]]
95 ; 64-DAG: add.s $f0, $[[T0]], $[[T1]]
97 ; 64R2: msub.s $[[T0:f[0-9]+]], $f14, $f12, $f13
98 ; 64R2: mtc1 $zero, $[[T1:f[0-9]+]]
99 ; 64R2: add.s $f0, $[[T0]], $[[T1]]
101 ; 64R6-NOMADD-DAG: mul.s $[[T0:f[0-9]+]], $f12, $f13
102 ; 64R6-NOMADD-DAG: sub.s $[[T1:f[0-9]+]], $[[T0]], $f14
103 ; 64R6-NOMADD-DAG: mtc1 $zero, $[[T2:f[0-9]+]]
104 ; 64R6-NOMADD-DAG: add.s $f0, $[[T1]], $[[T2]]
106 %mul = fmul float %a, %b
107 %sub = fsub float %mul, %c
108 %add = fadd float %sub, 0.000000e+00
112 define float @FOO2float(float %a, float %b, float %c) nounwind readnone {
114 ; ALL-LABEL: FOO2float:
116 ; 32-NOMADD-DAG: mtc1 $6, $[[T0:f[0-9]+]]
117 ; 32-NOMADD-DAG: mul.s $[[T1:f[0-9]+]], $f12, $f14
118 ; 32-NOMADD-DAG: add.s $[[T2:f[0-9]+]], $[[T1]], $[[T0]]
119 ; 32-NOMADD-DAG: mtc1 $zero, $[[T2:f[0-9]+]]
120 ; 32-NOMADD-DAG: sub.s $f0, $[[T2]], $[[T1]]
122 ; 32R2-NONAN: mtc1 $6, $[[T0:f[0-9]+]]
123 ; 32R2-NONAN: nmadd.s $f0, $[[T0]], $f12, $f14
125 ; 32R2-NAN: mtc1 $6, $[[T0:f[0-9]+]]
126 ; 32R2-NAN: madd.s $[[T1:f[0-9]+]], $[[T0]], $f12, $f14
127 ; 32R2-NAN: mtc1 $zero, $[[T2:f[0-9]+]]
128 ; 32R2-NAN: sub.s $f0, $[[T2]], $[[T1]]
130 ; 32R6-NOMADD-DAG: mtc1 $6, $[[T0:f[0-9]+]]
131 ; 32R6-NOMADD-DAG: mul.s $[[T1:f[0-9]+]], $f12, $f14
132 ; 32R6-NOMADD-DAG: add.s $[[T2:f[0-9]+]], $[[T1]], $[[T0]]
133 ; 32R6-NOMADD-DAG: mtc1 $zero, $[[T2:f[0-9]+]]
134 ; 32R6-NOMADD-DAG: sub.s $f0, $[[T2]], $[[T1]]
136 ; 64-NONAN: nmadd.s $f0, $f14, $f12, $f13
138 ; 64-NAN: madd.s $[[T0:f[0-9]+]], $f14, $f12, $f13
139 ; 64-NAN: mtc1 $zero, $[[T1:f[0-9]+]]
140 ; 64-NAN: sub.s $f0, $[[T1]], $[[T0]]
142 ; 64R2-NONAN: nmadd.s $f0, $f14, $f12, $f13
144 ; 64R2-NAN: madd.s $[[T0:f[0-9]+]], $f14, $f12, $f13
145 ; 64R2-NAN: mtc1 $zero, $[[T1:f[0-9]+]]
146 ; 64R2-NAN: sub.s $f0, $[[T1]], $[[T0]]
148 ; 64R6-NOMADD-DAG: mul.s $[[T1:f[0-9]+]], $f12, $f13
149 ; 64R6-NOMADD-DAG: add.s $[[T2:f[0-9]+]], $[[T1]], $f14
150 ; 64R6-NOMADD-DAG: mtc1 $zero, $[[T2:f[0-9]+]]
151 ; 64R6-NOMADD-DAG: sub.s $f0, $[[T2]], $[[T1]]
153 %mul = fmul float %a, %b
154 %add = fadd float %mul, %c
155 %sub = fsub float 0.000000e+00, %add
159 define float @FOO3float(float %a, float %b, float %c) nounwind readnone {
161 ; ALL-LABEL: FOO3float:
163 ; 32-NOMADD-DAG: mtc1 $6, $[[T0:f[0-9]+]]
164 ; 32-NOMADD-DAG: mul.s $[[T1:f[0-9]+]], $f12, $f14
165 ; 32-NOMADD-DAG: sub.s $[[T2:f[0-9]+]], $[[T1]], $[[T0]]
166 ; 32-NOMADD-DAG: mtc1 $zero, $[[T2:f[0-9]+]]
167 ; 32-NOMADD-DAG: sub.s $f0, $[[T2]], $[[T1]]
169 ; 32R2-NONAN: mtc1 $6, $[[T0:f[0-9]+]]
170 ; 32R2-NONAN: nmsub.s $f0, $[[T0]], $f12, $f14
172 ; 32R2-NAN: mtc1 $6, $[[T0:f[0-9]+]]
173 ; 32R2-NAN: msub.s $[[T1:f[0-9]+]], $[[T0]], $f12, $f14
174 ; 32R2-NAN: mtc1 $zero, $[[T2:f[0-9]+]]
175 ; 32R2-NAN: sub.s $f0, $[[T2]], $[[T1]]
177 ; 64-NAN: msub.s $[[T0:f[0-9]+]], $f14, $f12, $f13
178 ; 64-NAN: mtc1 $zero, $[[T1:f[0-9]+]]
179 ; 64-NAN: sub.s $f0, $[[T1]], $[[T0]]
181 ; 64-NONAN: nmsub.s $f0, $f14, $f12, $f13
183 ; 64R2-NAN: msub.s $[[T0:f[0-9]+]], $f14, $f12, $f13
184 ; 64R2-NAN: mtc1 $zero, $[[T1:f[0-9]+]]
185 ; 64R2-NAN: sub.s $f0, $[[T1]], $[[T0]]
187 ; 64R6-NOMADD-DAG: mul.s $[[T1:f[0-9]+]], $f12, $f13
188 ; 64R6-NOMADD-DAG: sub.s $[[T2:f[0-9]+]], $[[T1]], $f14
189 ; 64R6-NOMADD-DAG: mtc1 $zero, $[[T2:f[0-9]+]]
190 ; 64R6-NOMADD-DAG: sub.s $f0, $[[T2]], $[[T1]]
192 %mul = fmul float %a, %b
193 %sub = fsub float %mul, %c
194 %sub1 = fsub float 0.000000e+00, %sub
198 define double @FOO10double(double %a, double %b, double %c) nounwind readnone {
200 ; ALL-LABEL: FOO10double:
202 ; 32-NOMADD-DAG: ldc1 $[[T0:f[0-9]+]], 16($sp)
203 ; 32-NOMADD-DAG: mul.d $[[T1:f[0-9]+]], $f12, $f14
204 ; 32-NOMADD-DAG: add.d $[[T2:f[0-9]+]], $[[T1]], $[[T0]]
205 ; 32-NOMADD-DAG: mtc1 $zero, $[[T2:f[0-9]+]]
206 ; 32-NOMADD-DAG: add.d $f0, $[[T1]], $[[T2]]
208 ; 32R2: ldc1 $[[T0:f[0-9]+]], 16($sp)
209 ; 32R2: madd.d $[[T1:f[0-9]+]], $[[T0]], $f12, $f14
210 ; 32R2: mtc1 $zero, $[[T2:f[0-9]+]]
211 ; 32R2: mthc1 $zero, $[[T2]]
212 ; 32R2: add.d $f0, $[[T1]], $[[T2]]
214 ; 32R6-NOMADD-DAG: ldc1 $[[T0:f[0-9]+]], 16($sp)
215 ; 32R6-NOMADD-DAG: mul.d $[[T1:f[0-9]+]], $f12, $f14
216 ; 32R6-NOMADD-DAG: add.d $[[T2:f[0-9]+]], $[[T1]], $[[T0]]
217 ; 32R6-NOMADD-DAG: mtc1 $zero, $[[T2:f[0-9]+]]
218 ; 32R6-NOMADD-DAG: add.d $f0, $[[T1]], $[[T2]]
220 ; 64-DAG: madd.d $[[T0:f[0-9]+]], $f14, $f12, $f13
221 ; 64-DAG: mtc1 $zero, $[[T1:f[0-9]+]]
222 ; 64-DAG: add.d $f0, $[[T0]], $[[T1]]
224 ; 64R2: madd.d $[[T0:f[0-9]+]], $f14, $f12, $f13
225 ; 64R2: mtc1 $zero, $[[T1:f[0-9]+]]
226 ; 64R2: add.d $f0, $[[T0]], $[[T1]]
228 ; 64R6-NOMADD-DAG: mul.d $[[T1:f[0-9]+]], $f12, $f13
229 ; 64R6-NOMADD-DAG: add.d $[[T2:f[0-9]+]], $[[T1]], $f14
230 ; 64R6-NOMADD-DAG: dmtc1 $zero, $[[T2:f[0-9]+]]
231 ; 64R6-NOMADD-DAG: add.d $f0, $[[T1]], $[[T2]]
233 %mul = fmul double %a, %b
234 %add = fadd double %mul, %c
235 %add1 = fadd double %add, 0.000000e+00
239 define double @FOO11double(double %a, double %b, double %c) nounwind readnone {
241 ; ALL-LABEL: FOO11double:
243 ; 32-NOMADD-DAG: ldc1 $[[T0:f[0-9]+]], 16($sp)
244 ; 32-NOMADD-DAG: mul.d $[[T1:f[0-9]+]], $f12, $f14
245 ; 32-NOMADD-DAG: sub.d $[[T2:f[0-9]+]], $[[T1]], $[[T0]]
246 ; 32-NOMADD-DAG: mtc1 $zero, $[[T2:f[0-9]+]]
247 ; 32-NOMADD-DAG: add.d $f0, $[[T1]], $[[T2]]
249 ; 32R2: ldc1 $[[T0:f[0-9]+]], 16($sp)
250 ; 32R2: msub.d $[[T1:f[0-9]+]], $[[T0]], $f12, $f14
251 ; 32R2: mtc1 $zero, $[[T2:f[0-9]+]]
252 ; 32R2: mthc1 $zero, $[[T2]]
253 ; 32R2: add.d $f0, $[[T1]], $[[T2]]
255 ; 32R6-NOMADD-DAG: ldc1 $[[T0:f[0-9]+]], 16($sp)
256 ; 32R6-NOMADD-DAG: mul.d $[[T1:f[0-9]+]], $f12, $f14
257 ; 32R6-NOMADD-DAG: sub.d $[[T2:f[0-9]+]], $[[T1]], $[[T0]]
258 ; 32R6-NOMADD-DAG: mtc1 $zero, $[[T2:f[0-9]+]]
259 ; 32R6-NOMADD-DAG: add.d $f0, $[[T1]], $[[T2]]
261 ; 64-DAG: msub.d $[[T0:f[0-9]+]], $f14, $f12, $f13
262 ; 64-DAG: mtc1 $zero, $[[T1:f[0-9]+]]
263 ; 64-DAG: add.d $f0, $[[T0]], $[[T1]]
265 ; 64R2: msub.d $[[T0:f[0-9]+]], $f14, $f12, $f13
266 ; 64R2: mtc1 $zero, $[[T1:f[0-9]+]]
267 ; 64R2: add.d $f0, $[[T0]], $[[T1]]
269 ; 64R6-NOMADD-DAG: mul.d $[[T1:f[0-9]+]], $f12, $f13
270 ; 64R6-NOMADD-DAG: sub.d $[[T2:f[0-9]+]], $[[T1]], $f14
271 ; 64R6-NOMADD-DAG: dmtc1 $zero, $[[T2:f[0-9]+]]
272 ; 64R6-NOMADD-DAG: add.d $f0, $[[T1]], $[[T2]]
274 %mul = fmul double %a, %b
275 %sub = fsub double %mul, %c
276 %add = fadd double %sub, 0.000000e+00
280 define double @FOO12double(double %a, double %b, double %c) nounwind readnone {
282 ; ALL-LABEL: FOO12double:
284 ; 32-NOMADD-DAG: ldc1 $[[T0:f[0-9]+]], 16($sp)
285 ; 32-NOMADD-DAG: mul.d $[[T1:f[0-9]+]], $f12, $f14
286 ; 32-NOMADD-DAG: add.d $[[T2:f[0-9]+]], $[[T1]], $[[T0]]
287 ; 32-NOMADD-DAG: mtc1 $zero, $[[T2:f[0-9]+]]
288 ; 32-NOMADD-DAG: sub.d $f0, $[[T2]], $[[T1]]
290 ; 32R2-NONAN: ldc1 $[[T0:f[0-9]+]], 16($sp)
291 ; 32R2-NONAN: nmadd.d $f0, $[[T0]], $f12, $f14
293 ; 32R2-NAN: ldc1 $[[T0:f[0-9]+]], 16($sp)
294 ; 32R2-NAN: madd.d $[[T1:f[0-9]+]], $[[T0]], $f12, $f14
295 ; 32R2-NAN: mtc1 $zero, $[[T2:f[0-9]+]]
296 ; 32R2-NAN: mthc1 $zero, $[[T2]]
297 ; 32R2-NAN: sub.d $f0, $[[T2]], $[[T1]]
299 ; 32R6-NOMADD-DAG: ldc1 $[[T0:f[0-9]+]], 16($sp)
300 ; 32R6-NOMADD-DAG: mul.d $[[T1:f[0-9]+]], $f12, $f14
301 ; 32R6-NOMADD-DAG: add.d $[[T2:f[0-9]+]], $[[T1]], $[[T0]]
302 ; 32R6-NOMADD-DAG: mtc1 $zero, $[[T2:f[0-9]+]]
303 ; 32R6-NOMADD-DAG: sub.d $f0, $[[T2]], $[[T1]]
305 ; 64-NONAN: nmadd.d $f0, $f14, $f12, $f13
307 ; 64-NAN: madd.d $[[T0:f[0-9]+]], $f14, $f12, $f13
308 ; 64-NAN: mtc1 $zero, $[[T1:f[0-9]+]]
309 ; 64-NAN: sub.d $f0, $[[T1]], $[[T0]]
311 ; 64R2-NONAN: nmadd.d $f0, $f14, $f12, $f13
313 ; 64R2-NAN: madd.d $[[T0:f[0-9]+]], $f14, $f12, $f13
314 ; 64R2-NAN: mtc1 $zero, $[[T1:f[0-9]+]]
315 ; 64R2-NAN: sub.d $f0, $[[T1]], $[[T0]]
317 ; 64R6-NOMADD-DAG: mul.d $[[T1:f[0-9]+]], $f12, $f13
318 ; 64R6-NOMADD-DAG: add.d $[[T2:f[0-9]+]], $[[T1]], $f14
319 ; 64R6-NOMADD-DAG: dmtc1 $zero, $[[T2:f[0-9]+]]
320 ; 64R6-NOMADD-DAG: sub.d $f0, $[[T2]], $[[T1]]
322 %mul = fmul double %a, %b
323 %add = fadd double %mul, %c
324 %sub = fsub double 0.000000e+00, %add
328 define double @FOO13double(double %a, double %b, double %c) nounwind readnone {
330 ; ALL-LABEL: FOO13double:
332 ; 32-NOMADD-DAG: ldc1 $[[T0:f[0-9]+]], 16($sp)
333 ; 32-NOMADD-DAG: mul.d $[[T1:f[0-9]+]], $f12, $f14
334 ; 32-NOMADD-DAG: sub.d $[[T2:f[0-9]+]], $[[T1]], $[[T0]]
335 ; 32-NOMADD-DAG: mtc1 $zero, $[[T2:f[0-9]+]]
336 ; 32-NOMADD-DAG: sub.d $f0, $[[T2]], $[[T1]]
338 ; 32R2-NONAN: ldc1 $[[T0:f[0-9]+]], 16($sp)
339 ; 32R2-NONAN: nmsub.d $f0, $[[T0]], $f12, $f14
341 ; 32R2-NAN: ldc1 $[[T0:f[0-9]+]], 16($sp)
342 ; 32R2-NAN: msub.d $[[T1:f[0-9]+]], $[[T0]], $f12, $f14
343 ; 32R2-NAN: mtc1 $zero, $[[T2:f[0-9]+]]
344 ; 32R2-NAN: mthc1 $zero, $[[T2]]
345 ; 32R2-NAN: sub.d $f0, $[[T2]], $[[T1]]
347 ; 32R6-NOMADD-DAG: ldc1 $[[T0:f[0-9]+]], 16($sp)
348 ; 32R6-NOMADD-DAG: mul.d $[[T1:f[0-9]+]], $f12, $f14
349 ; 32R6-NOMADD-DAG: sub.d $[[T2:f[0-9]+]], $[[T1]], $[[T0]]
350 ; 32R6-NOMADD-DAG: mtc1 $zero, $[[T2:f[0-9]+]]
351 ; 32R6-NOMADD-DAG: sub.d $f0, $[[T2]], $[[T1]]
353 ; 64-NONAN: nmsub.d $f0, $f14, $f12, $f13
355 ; 64-NAN: msub.d $[[T0:f[0-9]+]], $f14, $f12, $f13
356 ; 64-NAN: mtc1 $zero, $[[T1:f[0-9]+]]
357 ; 64-NAN: sub.d $f0, $[[T1]], $[[T0]]
359 ; 64R2-NONAN: nmsub.d $f0, $f14, $f12, $f13
361 ; 64R2-NAN: msub.d $[[T0:f[0-9]+]], $f14, $f12, $f13
362 ; 64R2-NAN: mtc1 $zero, $[[T1:f[0-9]+]]
363 ; 64R2-NAN: sub.d $f0, $[[T1]], $[[T0]]
365 ; 64R6-NOMADD-DAG: mul.d $[[T1:f[0-9]+]], $f12, $f13
366 ; 64R6-NOMADD-DAG: sub.d $[[T2:f[0-9]+]], $[[T1]], $f14
367 ; 64R6-NOMADD-DAG: dmtc1 $zero, $[[T2:f[0-9]+]]
368 ; 64R6-NOMADD-DAG: sub.d $f0, $[[T2]], $[[T1]]
370 %mul = fmul double %a, %b
371 %sub = fsub double %mul, %c
372 %sub1 = fsub double 0.000000e+00, %sub