[Bug rtl-optimization/33512] New: Simple bitwise simplification missed
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Thu Sep 20 22:32:00 GMT 2007
These two functions should produce the same code:
int f(int y, int x)
{
return x & ((~x) | y);
}
int g(int y, int x)
{
return y & x;
}
x & ((~x) | y) is the same as (x & ~x) | (x & y) using distribution and that
becomes (x & y) because (x & ~x) is always 0 and 0 | x is x.
This should be done at both the tree level and the RTL level.
--
Summary: Simple bitwise simplification missed
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: rtl-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33512
More information about the Gcc-bugs
mailing list