aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/vect/nodump-forwprop-22.c
blob: 526e70b1b8804823c796d76e5f7097c1b95abba6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* { dg-do compile } */
/* { dg-require-effective-target vect_double } */
/* { dg-require-effective-target vect_perm } */
/* { dg-additional-options "-fdump-tree-copyprop1" } */

typedef double vec __attribute__((vector_size (2 * sizeof (double))));
void f (vec *px, vec *y, vec *z)
{
  vec x = *px;
  vec t1 = { x[1], x[0] };
  vec t2 = { x[0], x[1] };
  *y = t1;
  *z = t2;
}

/* Optimization in forwprop1, cleanup in copyprop1.  */

/* { dg-final { scan-tree-dump-times "VEC_PERM_EXPR" 1 "copyprop1" } } */
/* { dg-final { scan-tree-dump-not "BIT_FIELD_REF" "copyprop1" } } */
/* { dg-final { cleanup-tree-dump "copyprop1" } } */