aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/fold-minus-1.c
blob: c0fb89a01ae1dedc7192d26bb9ccf229f127b498 (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-options "-O -fdump-tree-gimple" } */

typedef int vec __attribute__((vector_size(2*sizeof(int))));

void f(vec*x,vec*y){
  *x -= *x / *y * *y;
}
void g(vec*x,vec*y,vec*z){
  *x = -1 - *x;
  *y = -*y - 1;
  *z = -*z - 13;
}

/* { dg-final { scan-tree-dump-times "%" 1 "gimple"} } */
/* { dg-final { scan-tree-dump-times "~" 2 "gimple"} } */
/* { dg-final { scan-tree-dump-not "/" "gimple"} } */
/* { dg-final { scan-tree-dump-not "\\\+" "gimple"} } */
/* { dg-final { scan-tree-dump "{ -13, -13 }" "gimple"} } */
/* { dg-final { cleanup-tree-dump "gimple" } } */