aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/vect/pr110838.c
blob: 00ad6ffbd22244e41d9693cac00f59e295d75dac (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
26
27
28
29
#include "tree-vect.h"

short a[32], b[32];

void __attribute__((noipa)) foo ()
{
  for (int i = 0; i < 32; ++i)
    a[i] = b[i] >> 16;
}

void __attribute__((noipa)) bar (int n)
{
  int np = n & 31;
  for (int i = 0; i < 32; ++i)
    a[i] = b[i] >> np;
}

int main ()
{
  check_vect ();
  b[0] = -8;
  foo ();
  if (a[0] != -1)
    abort ();
  bar (16);
  if (a[0] != -1)
    abort ();
  return 0;
}