2018-03-08 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / mips / neg-abs-2.c
blob59e797def1a18591f9c3af910ccc7726415f7b51
1 /* Make sure that we avoid abs.fmt and neg.fmt when the signs of NaNs
2 matter. */
3 /* { dg-do compile } */
4 /* { dg-options "isa_rev<=5 -mhard-float -fno-finite-math-only -mabs=legacy" } */
5 /* { dg-final { scan-assembler-not "\tneg.s\t" } } */
6 /* { dg-final { scan-assembler-not "\tneg.d\t" } } */
7 /* { dg-final { scan-assembler-not "\tabs.s\t" } } */
8 /* { dg-final { scan-assembler-not "\tabs.d\t" } } */
10 float f1 (float f) { return -f; }
11 float f2 (float f) { return __builtin_fabsf (f); }
12 double d1 (double d) { return -d; }
13 double d2 (double d) { return __builtin_fabs (d); }