summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/vectorize4.c
blob: 557d0a26ef1ead781fd05b4cfb7d58bc1b667120 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* { dg-do compile } */
/* { dg-require-effective-target ilp32 } */
/* { dg-options "-O2 -ffast-math -ftree-vectorize -msse2 -mtune=generic --param ggc-min-expand=0 --param ggc-min-heapsize=0" } */
/* This test, tests two thing, we vectorize square root and also we don't crash due to a GC issue.  */


extern double sqrt (double __x);
calc_freq (int *dest)
{
  float tmp_out[257];
  int i;
  for (i = 0; i < 256; i++)
    dest[i] = sqrt (tmp_out[i]);
}

/* { dg-final { scan-assembler "sqrtpd" } } */