This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/24989] New: boolvar != 1 is not converted to !boolvar
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Nov 2005 19:40:49 -0000
- Subject: [Bug middle-end/24989] New: boolvar != 1 is not converted to !boolvar
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following two function should be the same:
_Bool f(_Bool a)
{
return a!=1;
}
_Bool f1(_Bool a)
{
_Bool b = !a;
return b;
}
Right now f1 is the most optimal.
--
Summary: boolvar != 1 is not converted to !boolvar
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: enhancement
Priority: P3
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
OtherBugsDependingO 18908,19987
nThis:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24989