public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/56719] New: missed optimization: i > 0xffff || i*4 > 0xffff
@ 2013-03-25 11:27 felix-gcc at fefe dot de
  2013-03-25 11:41 ` [Bug rtl-optimization/56719] " ktietz at gcc dot gnu.org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: felix-gcc at fefe dot de @ 2013-03-25 11:27 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 56719
           Summary: missed optimization: i > 0xffff || i*4 > 0xffff
    Classification: Unclassified
           Product: gcc
           Version: 4.7.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: felix-gcc@fefe.de


This is the test code:

int foo(unsigned int i) {
  if (i > 0xffff || i*4 > 0xffff)
    baz();
}

gcc -O2 generates a cmp, a shift, and another cmp.

Why does this not generate a single cmp with 0x3fff?


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

end of thread, other threads:[~2021-08-01 18:12 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-25 11:27 [Bug rtl-optimization/56719] New: missed optimization: i > 0xffff || i*4 > 0xffff felix-gcc at fefe dot de
2013-03-25 11:41 ` [Bug rtl-optimization/56719] " ktietz at gcc dot gnu.org
2013-03-25 12:21 ` [Bug middle-end/56719] " rguenth at gcc dot gnu.org
2013-03-25 14:41 ` felix-gcc at fefe dot de
2013-03-25 14:55 ` rguenth at gcc dot gnu.org
2013-03-25 15:06 ` felix-gcc at fefe dot de
2013-03-25 15:26 ` jakub at gcc dot gnu.org
2013-03-25 16:01 ` felix-gcc at fefe dot de
2020-12-25 12:23 ` vanyacpp at gmail dot com
2020-12-29 12:05 ` jakub at gcc dot gnu.org
2020-12-31  9:19 ` cvs-commit at gcc dot gnu.org
2020-12-31 23:04 ` cvs-commit at gcc dot gnu.org
2021-08-01 18:10 ` pinskia at gcc dot gnu.org
2021-08-01 18:12 ` pinskia at gcc dot gnu.org
2021-08-01 18:12 ` [Bug tree-optimization/56719] " pinskia 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).