------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-08 
23:34 -------
Confirmed, here is the full testcase by the way:
int f(int i, int j)
{
  if (i!=j)
    return i - j;
  return 0;
}

Note I did not say the patch is useless but I just wantted to say that it would 
be useful if gcc did this for 
us instead of changing the code.  Anyways this can be done with PHI-OPT, I will 
try to look into this 
doing this for 4.1.  Your patch should be still considered.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
           Severity|normal                      |enhancement
             Status|UNCONFIRMED                 |NEW
          Component|c                           |tree-optimization
     Ever Confirmed|                            |1
           Keywords|                            |missed-optimization
   Last reconfirmed|0000-00-00 00:00:00         |2005-02-08 23:34:07
               date|                            |
            Summary|Missed optimisation         |don't remove an if when we
                   |                            |know the value is the same
                   |                            |as with the if (subtraction)


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

Reply via email to