]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/tree-ssa/forwprop-27.c
Fix profile update in tree_transform_and_unroll_loop
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / forwprop-27.c
1 /* { dg-do compile } */
2 /* { dg-options "-O -fdump-tree-forwprop1" } */
3
4 typedef int V __attribute__((vector_size(2*sizeof(int))));
5 typedef __complex__ int C;
6
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;
14 }
15
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;
21 }
22
23 void h (C *v1, C *v2){
24 C w = *v2;
25 C x = *v1 - w;
26 *v1 = x + w;
27 }
28
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;
34 }
35
36 /* { dg-final { scan-tree-dump-times "\\\+" 1 "forwprop1"} } */
37 /* { dg-final { scan-tree-dump "{ 0, 4 }" "forwprop1"} } */
38 /* { dg-final { scan-tree-dump "{ 37, -5 }" "forwprop1"} } */
39 /* { dg-final { scan-tree-dump "{ 27, 23 }" "forwprop1"} } */
40 /* { dg-final { scan-tree-dump "{ 37, 3 }" "forwprop1"} } */
41