gcc/testsuite/gcc.target/i386/fnabs.c
raw| 1 | /* PR target/62055 */ |
| 2 | /* { dg-do compile } */ |
| 3 | /* { dg-options "-O2 -msse2 -mfpmath=sse" } */ |
| 4 | |
| 5 | float testf (float a) |
| 6 | { |
| 7 | return -__builtin_fabsf (a); |
| 8 | } |
| 9 | |
| 10 | double test (double a) |
| 11 | { |
| 12 | return -__builtin_fabs (a); |
| 13 | } |
| 14 | |
| 15 | __float128 testq (__float128 a) |
| 16 | { |
| 17 | return -__builtin_fabsq (a); |
| 18 | } |
| 19 | |
| 20 | /* { dg-final { scan-assembler-times "\tv?orp\[sd\]\[ \t\]" 2 } } */ |
| 21 | /* { dg-final { scan-assembler-times "\tv?por\[ \t\]" 1 } } */ |