This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/55814] Missed optimization with short-circuit evaluation of always evaluated comparisons/loads


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]