aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/i386/vect-rebuild.c
blob: 570967f6b5c8b8c2fe4609a815d46652e1f64ee4 (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
33
/* { dg-do compile } */
/* { dg-options "-O -mavx -fno-tree-forwprop" } */

typedef double v2df __attribute__ ((__vector_size__ (16)));
typedef double v4df __attribute__ ((__vector_size__ (32)));

v2df f1 (v2df x)
{
  v2df xx = { x[0], x[1] };
  return xx;
}

v4df f2 (v4df x)
{
  v4df xx = { x[0], x[1], x[2], x[3] };
  return xx;
}

v2df g (v2df x)
{
  v2df xx = { x[1], x[0] };
  return xx;
}

v2df h (v4df x)
{
  v2df xx = { x[2], x[3] };
  return xx;
}

/* { dg-final { scan-assembler-not "unpck" } } */
/* { dg-final { scan-assembler-times "\tv?permilpd\[ \t\]" 1 } } */
/* { dg-final { scan-assembler-times "\tv?extractf128\[ \t\]" 1 } } */