summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/recip-sqrtf.c
blob: c387077aae26a7005c7a0bb03a313916bf2bf479 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
/* { dg-options "-O2 -ffast-math -msse2 -mfpmath=sse -mrecip" } */

extern float sqrtf (float);

float t1(float a, float b)
{
  return a/sqrtf(b);
}

float t2(float x, float a, float b)
{
  return sqrtf(a/b);
}

float t3(float a)
{
  return sqrtf(a);
}

/* { dg-final { scan-assembler-times "rsqrtss" 3 } } */