aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/pr79901.c
blob: 6fdcf767362889f375d2101c9a7f0bf5affedfa3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* PR rtl-optimization/79901 */
/* { dg-do compile } */
/* { dg-options "-O3 -mavx512f -fno-ssa-phiopt" } */

unsigned int
foo (const unsigned long long x)
{
  if (x < 0)
    return 0;
  else if ( x > ~0U)
    return ~0U;
  else
    return (unsigned int) x;
}

void
bar (unsigned x, unsigned int *y, unsigned int z)
{
  unsigned i;
  for (i = 0; i < x; i++)
    y[i] = foo (y[i] * (unsigned long long) z);
}