More fold_negate in match.pd
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / ssa-fre-46.c
blobd6e63518e9f6e9f86fd26686e1503d62bc83c858
1 /* { dg-do compile } */
2 /* { dg-options "-O -fdump-tree-fre1-details" } */
4 int x[1024];
5 int foo (int a, int s, unsigned int k)
7 int i = a, j = a;
8 int sum = 0;
9 do
11 sum += x[i];
12 sum += x[j];
13 i += s;
14 j += s;
16 while (k--);
17 return sum;
20 /* We want to remove the redundant induction variable and thus its PHI node. */
21 /* { dg-final { scan-tree-dump "Removing dead stmt \[^\r\n\]*PHI" "fre1" } } */