aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/pr103404.c
blob: 3e970ef496632edd94e2e99884677ff042f00f00 (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
30
31
32
/* { dg-do compile } */
/* { dg-additional-options "-Og -fcse-follow-jumps -fno-dce -fno-early-inlining -fgcse -fharden-conditional-branches -frerun-cse-after-loop -fno-tree-ccp -mavx512f -std=c99 -w" } */

typedef unsigned __attribute__((__vector_size__ (4))) U;
typedef unsigned __attribute__((__vector_size__ (16))) V;
typedef unsigned __attribute__((__vector_size__ (64))) W;

int x, y;

V v;
W w;

inline
int bar (U a)
{
  a |= x;
  W k =
    __builtin_shufflevector (v, 5 / a,
			     2, 4, 0, 2, 4, 1, 0, 1,
			     1, 2, 1, 3, 0, 4, 4, 0);
  w = k;
  y = 0;
}

int
foo ()
{
  bar ((U){0xffffffff});
  for (unsigned i; i < sizeof (foo);)
    ;
}