gcc/testsuite/gcc.target/sh/sh4a-fsrra.c
raw| 1 | /* Verify that we generate single-precision square root reciprocal |
| 2 | approximate (fsrra) in fast math mode on SH4A with FPU. */ |
| 3 | /* { dg-do compile { target { has_fsrra } } } */ |
| 4 | /* { dg-options "-O -ffast-math" } */ |
| 5 | /* { dg-final { scan-assembler "fsrra" } } */ |
| 6 | |
| 7 | #include <math.h> |
| 8 | |
| 9 | float |
| 10 | test (float f) |
| 11 | { |
| 12 | return 1 / sqrtf (f); |
| 13 | } |