aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/pr44214-1.c
blob: 28194e48fc4bf09f20dce214218586100f9d0b91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* { dg-do compile } */
/* { dg-options "-O2 -freciprocal-math -fdump-tree-ccp1" } */

typedef double v2df __attribute__ ((vector_size (2 * sizeof (double))));

void do_div (v2df *a, v2df *b)
{
  *a = *b / (v2df) { 2.0, 3.0 };
}

/* Constant folding should multiply *b by the reciprocals of the
   vector elements.  The fold does not take place for generic
   vectors until the first CCP pass.  The string " * " occurs 3
   times:  one multiply and two indirect parameters.  */

/* { dg-final { scan-tree-dump-times " \\\* " 3 "ccp1" } } */
/* { dg-final { scan-tree-dump-times " / " 0 "ccp1" } } */
/* { dg-final { cleanup-tree-dump "ccp1" } } */