1 /* { dg-do compile } */
2 /* { dg-options "-fno-fast-math -ffinite-math-only -mmadd4 isa=4 -mhard-float" } */
3 /* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
4 /* { dg-final { scan-assembler "\tnmadd.s\t" } } */
5 /* { dg-final { scan-assembler "\tnmadd.d\t" } } */
6 /* { dg-final { scan-assembler "\tnmsub.s\t" } } */
7 /* { dg-final { scan-assembler "\tnmsub.d\t" } } */
10 sub1 (float f
, float g
, float h
)
12 return -((f
* g
) + h
);
16 sub2 (double f
, double g
, double h
)
18 return -((f
* g
) + h
);
22 sub3 (float f
, float g
, float h
)
24 return -((f
* g
) - h
);
28 sub4 (double f
, double g
, double h
)
30 return -((f
* g
) - h
);