This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug optimization/14797] [tree-ssa] propagate constants back to PHI


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-03-31 12:44 -------
Really this should not propagate constants back to the PHI but change this code to, as this removes BB's 
and such, I know this example was to show what to do with PHI's but we can do better with this one 
(this part is a dup of a bug which I filed, bug 14466):
int
foo (int a)
{
  int b;
  b = a != 0;
  return b + 1;
}


Anyways here is a better example as there is no way to convert the comparsion into the PHI:
int
foo (int a)
{
  int b;

  if (a == 0)
    b = 700;
  else
    b = 200;

  return b + 1;
}
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-03-31 12:44:32
               date|                            |
   Target Milestone|---                         |tree-ssa


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]