[Bug middle-end/23673] New: fold does not fold (a^b) != 0 to a != b
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Thu Sep 1 02:31:00 GMT 2005
These two functions should be the same on the tree level but are not:
int f(int a, int b)
{
return (a^b) != 0;
}
int f1(int a, int b)
{
return a != b;
}
They do result in the same asm though.
Another one from LLVM.
--
Summary: fold does not fold (a^b) != 0 to a != b
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Keywords: missed-optimization, TREE
Severity: enhancement
Priority: P2
Component: middle-end
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
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23673
More information about the Gcc-bugs
mailing list