aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr91181.c
blob: 63e33626a9bb9f93fadfa95d1b5846de7d9160c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* { dg-do compile } */
/* { dg-options "-Ofast" } */
/* { dg-additional-options "-mavx" { target x86_64-*-* i?86-*-* } } */

enum { a, b, c };
float *d, *e;
int f, g, h, i;
int j()
{
  float a;
  for (; h; h++)
    {
      i = h * 4;
      a = d[i + b];
      if (a) {
	  e[i + b] = g < d[i + b] * f * a ? g : d[i + b] * f * a;
	  e[i + c] = g < d[i + c] * f * a ? g : d[i + c] * f * a;
      }
      e[i + b] = e[i + c];
    }
}