gcc/testsuite/gcc.target/sh/pr63260.c
raw| 1 | /* Check that there is no FPSCR precision mode change generated for fneg and |
| 2 | fabs instructions. */ |
| 3 | /* { dg-do compile } */ |
| 4 | /* { dg-options "-O1" } */ |
| 5 | /* { dg-final { scan-assembler-not "fpscr|fpchg" } } */ |
| 6 | |
| 7 | float |
| 8 | test_0 (float x) |
| 9 | { |
| 10 | return -x; |
| 11 | } |
| 12 | |
| 13 | double |
| 14 | test_1 (double x) |
| 15 | { |
| 16 | return -x; |
| 17 | } |
| 18 | |
| 19 | float |
| 20 | test_2 (float x) |
| 21 | { |
| 22 | return __builtin_fabs (x); |
| 23 | } |
| 24 | |
| 25 | double |
| 26 | test_3 (double x) |
| 27 | { |
| 28 | return __builtin_fabs (x); |
| 29 | } |