public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "law at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/82666] [11/12/13/14 regression]: sum += (x>128 ? x : 0) puts the cmov on the critical path (at -O2) Date: Fri, 04 Aug 2023 04:18:53 +0000 [thread overview] Message-ID: <bug-82666-4-QycyhoEPpx@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-82666-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82666 Jeffrey A. Law <law at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |law at gcc dot gnu.org --- Comment #14 from Jeffrey A. Law <law at gcc dot gnu.org> --- A better approach might be to to try and create COND_EXPRs for the conditional move in the gimple code. The biggest problem I see with that is the gimple->rtl converters aren't great at creating efficient code on targets without conditional moves. Meaning that we could well end up improving x86, but making several other targets worse. I know this because I was recently poking at a similar problem. We expressed a conditional move of 0, C as a multiply of a boolean by C in gimple. It really should just have been a COND_EXPR, but when we generate that form targets without good conditional move expanders will end up recreating branchy code :(
prev parent reply other threads:[~2023-08-04 4:18 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-82666-4@http.gcc.gnu.org/bugzilla/> 2021-05-14 9:49 ` [Bug target/82666] [9/10/11/12 regression]: sum += (x>128/9/10/11/12 " jakub at gcc dot gnu.org 2021-06-01 8:09 ` rguenth at gcc dot gnu.org 2022-05-27 9:37 ` [Bug target/82666] [10/11/12/13 regression]: sum += (x>128 " rguenth at gcc dot gnu.org 2022-06-28 10:33 ` jakub at gcc dot gnu.org 2023-07-07 10:32 ` [Bug target/82666] [11/12/13/14 " rguenth at gcc dot gnu.org 2023-08-04 0:40 ` pinskia at gcc dot gnu.org 2023-08-04 4:18 ` law at gcc dot gnu.org [this message]
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-82666-4-QycyhoEPpx@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).