tree-optimization/66502 - add testcase
This adds the second testcase which we now also handle eliminating a redundant PHI node. 2022-01-03 Richard Biener <rguenther@suse.de> PR tree-optimization/66502 * gcc.dg/tree-ssa/ssa-fre-98.c: New testcase.
This commit is contained in:
parent
7adcbafe45
commit
cd83fd98a7
|
@ -0,0 +1,18 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -fdump-tree-fre1-details" } */
|
||||
|
||||
int foo (int a, int s, unsigned int k)
|
||||
{
|
||||
int i = a, j = a;
|
||||
do
|
||||
{
|
||||
i += s;
|
||||
j += j;
|
||||
j -= a;
|
||||
}
|
||||
while (k--);
|
||||
return j+i;
|
||||
}
|
||||
|
||||
/* We want the redundant PHI for j to disappear. */
|
||||
/* { dg-final { scan-tree-dump "Replaced redundant PHI node defining j" "fre1" } } */
|
Loading…
Reference in New Issue