PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / forwprop-27.c
blob9775a4c636748effaabd46d74e311cdf3c687bb8
1 /* { dg-do compile } */
2 /* { dg-options "-O -fdump-tree-forwprop1" } */
4 typedef int V __attribute__((vector_size(2*sizeof(int))));
5 typedef __complex__ int C;
7 void f (V *v1, V *v2){
8 V w1 = *v1;
9 V x1 = ~w1;
10 *v1 = x1 + 1;
11 V w2 = *v2;
12 V x2 = ~w2;
13 *v2 = x2 + w2;
16 void g (V *v1, V *v2){
17 V c1 = { 5, -10 };
18 V c2 = { 32, 13 };
19 *v1 = (*v1|c1)&c2;
20 *v2 = (*v2^c1)^c2;
23 void h (C *v1, C *v2){
24 C w = *v2;
25 C x = *v1 - w;
26 *v1 = x + w;
29 void i (V *v1, V *v2){
30 V c1 = { 5, -10 };
31 V c2 = { 32, 13 };
32 *v1 = (*v1-c1)+c2;
33 *v2 = (c1-*v2)+c2;
36 /* { dg-final { scan-tree-dump-not "\\\+" "forwprop1"} } */
37 /* { dg-final { scan-tree-dump "{ 0, 4 }" "forwprop1"} } */
38 /* { dg-final { scan-tree-dump "{ 37, -5 }" "forwprop1"} } */