aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/vect/pr71854.c
blob: 6dc2c53a8bc957c8a5e00e0f1230364d71408a0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* PR tree-optimization/71854 */
/* { dg-do compile } */
/* { dg-additional-options "-O3 -ftree-loop-if-convert" } */

char a, f = 1;
int b, c, e[8];
short d;

short
foo (short x)
{
  return x >= 2 || x >> c ? x : x << c;
}

int
main ()
{
  while (f)
    for (d = 0; d <= 7; d++)
      {
	f = 7 >> b ? a : a << b;
	e[d] = foo (f);
      }
  return 0;
}