re PR tree-optimization/20470 (Branching sequence generated for ABS(x-y))

2005-03-25  Pat Haugen  <pthaugen@us.ibm.com>

        PR tree-optimization/20470
        * gcc.dg/tree-ssa/pr20470.c: New test.

From-SVN: r97063
This commit is contained in:
Pat Haugen 2005-03-25 20:10:38 +00:00 committed by David Edelsohn
parent a10d70babd
commit 90faeb2812
2 changed files with 19 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2005-03-25 Pat Haugen <pthaugen@us.ibm.com>
PR tree-optimization/20470
* gcc.dg/tree-ssa/pr20470.c: New test.
2005-03-25 Geoffrey Keating <geoffk@apple.com>
* gcc.dg/ppc-stfiwx.c: New.

View File

@ -0,0 +1,14 @@
/* { dg-do compile } */
/* { dg-options "-fdump-tree-generic" } */
/* PR tree-optimization/20470:
Missing fold to abs(x) when x == MINUS_EXPR. */
#define abs(x) ((x) >= 0 ? (x) : -(x))
int i,j,k;
void f1()
{
i = abs(j-k);
}
/* { dg-final { scan-tree-dump-times "ABS_EXPR" 1 "generic" } } */