aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr98287.c
blob: 031442850c6cdd4b78ef6ec5568edd574fb29878 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* PR tree-optimization/98287 */
/* { dg-do compile } */
/* { dg-options "-O2 -fno-tree-ccp -fno-tree-forwprop -Wno-psabi -w" } */

typedef unsigned long __attribute__((__vector_size__ (8))) V;
V v;

static __attribute__((noinline, noclone)) V
bar (unsigned short s)
{
  return v >> s << s | v >> s >> 63;
}

unsigned long
foo (void)
{
  V x = bar (1);
  return x[0];
}