1 /* { dg-do compile } */
2 /* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx -mtune=generic -mfpmath=sse -mrecip --param max-completely-peel-times=1" } */
3
4 float a[32];
5 float b[32];
6 float r[32];
7
8 extern float sqrtf (float);
9
t1(void)10 void t1(void)
11 {
12 int i;
13
14 for (i = 0; i < 32; i++)
15 r[i] = a[i] / sqrtf (b[i]);
16 }
17
t2(void)18 void t2(void)
19 {
20 int i;
21
22 for (i = 0; i < 32; i++)
23 r[i] = sqrtf (a[i] / b[i]);
24 }
25
t3(void)26 void t3(void)
27 {
28 int i;
29
30 for (i = 0; i < 32; i++)
31 r[i] = sqrtf (a[i]);
32 }
33
34 /* { dg-final { scan-assembler-times "vrsqrtps\[ \\t\]+\[^\n\]*%ymm" 3 } } */
35