[Bug optimization/14674] New: [tree-ssa] DOM misses ABS to negative translation

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sun Mar 21 22:51:00 GMT 2004


/* { dg-do compile } */
/* { dg-options "-O1 -fdump-tree-dom3" } */
int
foo2 (distance, i, j)
     int distance;
     int i, j;
{
 int t = distance;
 if (t <= 0)
   t = ((t) >= 0 ? (t)  : -(t));
 return t;
}

/* There should be no ABS_EXPR.  */
/* { dg-final { scan-tree-dump-times "ABS_EXPR " 0 "dom3"} } */

Noticed while looking to why a test fail (gcc.dg/tree-ssa/20030807-6.c) on the lno branch 
after applying my patch to find ABS in phiopt.

-- 
           Summary: [tree-ssa] DOM misses ABS to negative translation
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Keywords: pessimizes-code
          Severity: enhancement
          Priority: P2
         Component: optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org,law at gcc dot gnu dot
                    org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14674



More information about the Gcc-bugs mailing list