1 /* { dg-do compile } */
2 /* { dg-require-effective-target vect_float } */
3 
4 #include <stdlib.h>
5 #include "../../tree-vect.h"
6 
7 __attribute__ ((noinline)) void
ggSpectrum_Set8(float * data,float d)8 ggSpectrum_Set8(float * data, float d)
9 {
10    int i;
11 
12    /* PR92127, disable unroll to avoid unexpected profit calculation.  */
13    #pragma GCC unroll 0
14    for (i = 0; i < 8; i++)
15       data[i] = d;
16 }
17 
18 __attribute__ ((noinline)) void
ggSpectrum_Set20(float * data,float d)19 ggSpectrum_Set20(float * data, float d)
20 {
21    int i;
22 
23    for (i = 0; i < 20; i++)
24       data[i] = d;
25 }
26 
27 /* { dg-final { scan-tree-dump-times "vectorization not profitable" 1 "vect" { target { ! vect_hw_misalign } } } } */
28 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { ! vect_hw_misalign } } } } */
29 
30