* g++.dg/other/i386-2.C (dg-options): Add -mavx512pf.
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / recip-vec-sqrtf-avx.c
blob9cf3cc81be5dc38fb968daaf93c43bb505059359
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx -mtune=generic -mfpmath=sse -mrecip" } */
4 float a[32];
5 float b[32];
6 float r[32];
8 extern float sqrtf (float);
10 void t1(void)
12 int i;
14 for (i = 0; i < 32; i++)
15 r[i] = a[i] / sqrtf (b[i]);
18 void t2(void)
20 int i;
22 for (i = 0; i < 32; i++)
23 r[i] = sqrtf (a[i] / b[i]);
26 void t3(void)
28 int i;
30 for (i = 0; i < 32; i++)
31 r[i] = sqrtf (a[i]);
34 /* { dg-final { scan-assembler-times "vrsqrtps\[ \\t\]+\[^\n\]*%ymm" 3 } } */