]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-43.c
Fix profile update in tree_transform_and_unroll_loop
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / ssa-fre-43.c
1 /* PR tree-optimization/64193 */
2 /* { dg-do compile } */
3 /* { dg-options "-O -fdump-tree-fre1" } */
4
5 double T,T2,E1[5];
6 int J;
7
8 void
9 PA(double E[])
10 {
11 J = 0;
12
13 L10:
14 E[1] = ( E[1] + E[2] + E[3] - E[4]) * T;
15 E[2] = ( E[1] + E[2] - E[3] + E[4]) * T;
16 E[3] = ( E[1] - E[2] + E[3] + E[4]) * T;
17 E[4] = (-E[1] + E[2] + E[3] + E[4]) / T2;
18 J += 1;
19
20 if (J < 6)
21 goto L10;
22 }
23
24 /* We should remove 15 dead loads and some related stmts, fully propagating
25 their replacements with exactly 4 loads and 4 stores from/to E remaining. */
26
27 /* { dg-final { scan-tree-dump-times "MEM" 8 "fre1" } } */