aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/vect/fast-math-ifcvt-1.c
blob: a8d94440cd95ebc66ed6fca907cdb719f26201ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* PR 47892 */
/* { dg-do compile } */
/* { dg-additional-options "-ffast-math" } */
/* { dg-require-effective-target vect_float } */
/* { dg-require-effective-target vect_condition } */

void
bestseries9 (float * __restrict__ arr, int len)
{
  int i;
  for (i = 0; i < len; ++i)
    {
      float or = arr[i];
      arr[i] = (or > 0.0f) * (2 - or * or);
    }
}

/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" } } */