public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/55814] New: Missed optimization with short-circuit evaluation
@ 2012-12-26 17:45 tkoenig at gcc dot gnu.org
  2012-12-26 21:46 ` [Bug middle-end/55814] Missed optimization with short-circuit evaluation of always evaluated comparisons/loads pinskia at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2012-12-26 17:45 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55814

             Bug #: 55814
           Summary: Missed optimization with short-circuit evaluation
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: tkoenig@gcc.gnu.org


See PR 55806.

The Fortran front end generates code for intrinsics like ANY and ALL
which looks like (after loop unrolling)

_Bool foo(int *a, int *b)
{
  _Bool f0, f1, f2, f3;

  f0 = a[0] > b[0];
  f1 = a[1] > b[1];
  f2 = a[2] > b[2];
  f3 = a[2] > b[2];

  return f0 || f1 || f2 || f3;
}

There should be no need to perform the second comparison if the
first one is true.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-12-31 16:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-26 17:45 [Bug middle-end/55814] New: Missed optimization with short-circuit evaluation tkoenig at gcc dot gnu.org
2012-12-26 21:46 ` [Bug middle-end/55814] Missed optimization with short-circuit evaluation of always evaluated comparisons/loads pinskia at gcc dot gnu.org
2012-12-27 17:24 ` tkoenig at gcc dot gnu.org
2012-12-31 16:26 ` rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).