gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-98.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2 -fdump-tree-fre1-details" } */ |
| 3 | |
| 4 | int foo (int a, int s, unsigned int k) |
| 5 | { |
| 6 | int i = a, j = a; |
| 7 | do |
| 8 | { |
| 9 | i += s; |
| 10 | j += j; |
| 11 | j -= a; |
| 12 | } |
| 13 | while (k--); |
| 14 | return j+i; |
| 15 | } |
| 16 | |
| 17 | /* We want the redundant PHI for j to disappear. */ |
| 18 | /* { dg-final { scan-tree-dump "Replaced redundant PHI node defining j" "fre1" } } */ |