diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/recip-sqrtf.c')
-rw-r--r-- | gcc/testsuite/gcc.target/i386/recip-sqrtf.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/recip-sqrtf.c b/gcc/testsuite/gcc.target/i386/recip-sqrtf.c new file mode 100644 index 000000000..859d2180a --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/recip-sqrtf.c @@ -0,0 +1,21 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -ffast-math -msse -mfpmath=sse -mrecip" } */ + +extern float sqrtf (float); + +float t1(float a, float b) +{ + return a/sqrtf(b); +} + +float t2(float a, float b) +{ + return sqrtf(a/b); +} + +float t3(float a) +{ + return sqrtf(a); +} + +/* { dg-final { scan-assembler-times "rsqrtss" 3 } } */ |