------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-20 14:35
-------
If I make the x variable a paramater and y a variable (return y so that y is still
used) then it works on the
tree level so this is an aliasing causing missed optimization.
Aka this works:
int
foo (int x)
{
int y =-1;
if ((x & 0x00000001) || (x & 0x00004000))
y = 0;
if ((x & 0x00000001) || (x & 0x00004000))
y = 1;
if ((x & 0x00000001) || (x & 0x00004000))
y = 2;
if ((x & 0x00000001) || (x & 0x00004000))
y = 3;
if ((x & 0x00000001) || (x & 0x00004000))
y = 4;
return y;
}
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |alias
Last reconfirmed|0000-00-00 00:00:00 |2004-10-20 14:35:09
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18076