public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/94899] New: Failure to optimize out add before compare
@ 2020-05-01  0:17 gabravier at gmail dot com
  2020-05-01  1:30 ` [Bug tree-optimization/94899] Failure to optimize out add before compare with INT_MIN pinskia at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: gabravier at gmail dot com @ 2020-05-01  0:17 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 94899
           Summary: Failure to optimize out add before compare
           Product: gcc
           Version: 10.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: ---

int f(int x, int y)
{
    return x + 0x80000000 < y + 0x80000000;
}

This can be optimized to `return x < y`. LLVM does this transformation, but GCC
does not.

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

end of thread, other threads:[~2023-05-17 21:32 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-01  0:17 [Bug tree-optimization/94899] New: Failure to optimize out add before compare gabravier at gmail dot com
2020-05-01  1:30 ` [Bug tree-optimization/94899] Failure to optimize out add before compare with INT_MIN pinskia at gcc dot gnu.org
2020-05-01  1:37 ` pinskia at gcc dot gnu.org
2020-05-01  1:38 ` pinskia at gcc dot gnu.org
2020-05-01  8:47 ` rsandifo at gcc dot gnu.org
2022-06-21 10:22 ` cvs-commit at gcc dot gnu.org
2022-06-22 22:37 ` gabravier at gmail dot com
2023-02-17 20:46 ` gabravier at gmail dot com
2023-02-17 20:50 ` pinskia at gcc dot gnu.org
2023-05-17 21:31 ` 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).