1 /* { dg-additional-options "-fno-math-errno -fdisable-tree-sincos" } */
2 /* { dg-require-effective-target vect_float } */
4 void __attribute__ ((noipa
))
8 a
[1] = __builtin_powf (a
[1], 2);
10 a
[3] = __builtin_powf (a
[3], 2);
13 float a
[4] = { 1, 2, 3, 4 };
20 for (int i
= 0; i
< 4; ++i
)
22 if (a
[i
] != (i
+ 1) * (i
+ 1))
24 asm volatile ("" ::: "memory");
29 /* On older powerpc hardware (POWER7 and earlier), the default flag
30 -mno-allow-movmisalign prevents vectorization. On POWER8 and later,
31 when vect_hw_misalign is true, vectorization occurs. */
33 /* { dg-final { scan-tree-dump-times "optimized: basic block" 1 "slp2" { target {{ ! powerpc*-*-* } || { powerpc*-*-* && vect_hw_misalign }} } } } */