OSDN Git Service

Add NIOS2 support. Code from SourceyG++.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.target / i386 / recip-vec-sqrtf.c
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -ffast-math -ftree-vectorize -msse -mfpmath=sse -mrecip" } */
3
4 float a[16];
5 float b[16];
6 float r[16];
7
8 extern float sqrtf (float);
9
10 void t1(void)
11 {
12  int i;
13
14  for (i = 0; i < 16; i++)
15    r[i] = a[i] / sqrtf (b[i]);
16 }
17
18 void t2(void)
19 {
20  int i;
21
22  for (i = 0; i < 16; i++)
23    r[i] = sqrtf (a[i] / b[i]);
24 }
25
26 void t3(void)
27 {
28  int i;
29
30  for (i = 0; i < 16; i++)
31    r[i] = sqrtf (a[i]);
32 }
33
34 /* { dg-final { scan-assembler-times "rsqrtps" 3 } } */