public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "denis.campredon at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/107991] New: Extra mov instructions with ternary on x86 Date: Tue, 06 Dec 2022 12:17:09 +0000 [thread overview] Message-ID: <bug-107991-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107991 Bug ID: 107991 Summary: Extra mov instructions with ternary on x86 Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: denis.campredon at gmail dot com Target Milestone: --- Compiled with -O2 on x86, gcc trunk produces 3 mov instructions for each of the following functions: int foo(bool b, int i, int j) { return b ? i - j : i; } int bar(bool b, int i, int j) { return i + (b ? -j : 0); } int baz(bool b, int i, int j) { return i - (b ? j : 0); } ------------- Whearas with gcc 7.5, only 1 mov was produced for foo and bar, and two for baz
next reply other threads:[~2022-12-06 12:17 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-12-06 12:17 denis.campredon at gmail dot com [this message] 2022-12-06 16:32 ` [Bug rtl-optimization/107991] [10/11/12/13 Regression] " rguenth at gcc dot gnu.org 2022-12-06 16:43 ` [Bug middle-end/107991] " pinskia at gcc dot gnu.org 2022-12-08 17:54 ` jakub at gcc dot gnu.org 2022-12-21 11:21 ` rguenth at gcc dot gnu.org 2022-12-21 13:15 ` rsandifo at gcc dot gnu.org 2023-01-09 16:41 ` roger at nextmovesoftware dot com 2023-07-07 10:44 ` [Bug middle-end/107991] [11/12/13/14 " rguenth 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-107991-4@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).