public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/98955] New: Failure to optimize shift+compare to single shift
@ 2021-02-03 15:57 gabravier at gmail dot com
  2021-07-28 21:26 ` [Bug tree-optimization/98955] " pinskia at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: gabravier at gmail dot com @ 2021-02-03 15:57 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98955

            Bug ID: 98955
           Summary: Failure to optimize shift+compare to single shift
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gabravier at gmail dot com
  Target Milestone: ---

bool f(uint8_t m)
{
    return m << 1 > 0xff;
}

This can be optimized to `return m >> 7;`. This transformation is done by LLVM,
but not by GCC.

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

* [Bug tree-optimization/98955] Failure to optimize shift+compare to single shift
  2021-02-03 15:57 [Bug tree-optimization/98955] New: Failure to optimize shift+compare to single shift gabravier at gmail dot com
@ 2021-07-28 21:26 ` pinskia at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-07-28 21:26 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98955

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement
   Last reconfirmed|                            |2021-07-28
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.

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

end of thread, other threads:[~2021-07-28 21:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-03 15:57 [Bug tree-optimization/98955] New: Failure to optimize shift+compare to single shift gabravier at gmail dot com
2021-07-28 21:26 ` [Bug tree-optimization/98955] " 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).