This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/55814] Missed optimization with short-circuit evaluation of always evaluated comparisons/loads
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 26 Dec 2012 21:46:40 +0000
- Subject: [Bug middle-end/55814] Missed optimization with short-circuit evaluation of always evaluated comparisons/loads
- Auto-submitted: auto-generated
- References: <bug-55814-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55814
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |missed-optimization
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-12-26
Summary|Missed optimization with |Missed optimization with
|short-circuit evaluation |short-circuit evaluation of
| |always evaluated
| |comparisons/loads
Ever Confirmed|0 |1
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-12-26 21:46:40 UTC ---
This is a sinking issue. Sinking of loads.
If the code was written as:
_Bool foo(int *a, int *b)
{
return (a[0] > b[0]) || (a[1] > b[1]) || (a[2] > b[2]) || (a[3] > b[3]);
}
Instead then it would short-circuit correctly.