public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "gabravier at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/94913] Failure to optimize not+cmp into overflow check Date: Sat, 02 May 2020 02:18:45 +0000 [thread overview] Message-ID: <bug-94913-4-qn7uUobTre@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-94913-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94913 --- Comment #1 from Gabriel Ravier <gabravier at gmail dot com> --- The same thing happens for this code : bool f(unsigned x, unsigned y) { return (x - y - 1) >= x; } LLVM outputs this : f(unsigned int, unsigned int): cmp esi, edi setae al ret GCC outputs this : f(unsigned int, unsigned int): mov eax, edi sub eax, esi sub eax, 1 cmp eax, edi setnb al ret
next prev parent reply other threads:[~2020-05-02 2:18 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-05-02 2:15 [Bug tree-optimization/94913] New: " gabravier at gmail dot com 2020-05-02 2:18 ` gabravier at gmail dot com [this message] 2020-05-05 20:03 ` [Bug tree-optimization/94913] " ubizjak at gmail dot com 2020-05-05 20:06 ` ubizjak at gmail dot com 2020-05-06 13:23 ` jakub at gcc dot gnu.org 2020-05-06 15:35 ` cvs-commit at gcc dot gnu.org 2020-05-08 7:33 ` cvs-commit at gcc dot gnu.org 2020-05-08 7:51 ` jakub at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-94913-4-qn7uUobTre@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).