view gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-pr37194.c @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
line wrap: on
line source

/* { dg-do compile } */
/* { dg-require-effective-target vect_float } */

#include <stdlib.h>
#include "../../tree-vect.h"

__attribute__ ((noinline)) void 
ggSpectrum_Set8(float * data, float d) 
{
   int i;

   /* PR92127, disable unroll to avoid unexpected profit calculation.  */
   #pragma GCC unroll 0
   for (i = 0; i < 8; i++)
      data[i] = d;
}

__attribute__ ((noinline)) void 
ggSpectrum_Set20(float * data, float d) 
{
   int i;

   for (i = 0; i < 20; i++)
      data[i] = d;
}

/* { dg-final { scan-tree-dump-times "vectorization not profitable" 1 "vect" { target { ! vect_hw_misalign } } } } */
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { ! vect_hw_misalign } } } } */