public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "wwwhhhyyy333 at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/105034] [10/11/12 regression]Suboptimal codegen for min/max with -Os Date: Mon, 28 Mar 2022 02:49:26 +0000 [thread overview] Message-ID: <bug-105034-4-kG65kRR8w3@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-105034-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105034 --- Comment #2 from Hongyu Wang <wwwhhhyyy333 at gmail dot com> --- For -O2 stv doesn't do such transform Computing gain for chain #1... Instruction gain 8 for 7: {r84:SI=smax(r85:SI,0);clobber flags:CC;} REG_DEAD r85:SI REG_UNUSED flags:CC Instruction conversion gain: 8 Registers conversion cost: 12 Total gain: -4 Since sse->integer reg move cost is 6 for generic cost. Buf for -Os the cost is 3 so it is consider to be profitable. Computing gain for chain #1... Instruction gain 8 for 7: {r84:SI=smax(r85:SI,0);clobber flags:CC;} REG_DEAD r85:SI REG_UNUSED flags:CC Instruction conversion gain: 8 Registers conversion cost: 6 Total gain: 2 FWIW, the solution would be either adjust the ix86_size cost, or blocks out optimize_size in the stv gate.
next prev parent reply other threads:[~2022-03-28 2:49 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-03-23 6:50 [Bug target/105034] New: " crazylht at gmail dot com 2022-03-23 11:01 ` [Bug target/105034] " rguenth at gcc dot gnu.org 2022-03-28 2:49 ` wwwhhhyyy333 at gmail dot com [this message] 2022-04-14 8:38 ` roger at nextmovesoftware dot com 2022-04-14 9:00 ` rguenth at gcc dot gnu.org 2022-04-14 9:20 ` roger at nextmovesoftware dot com 2022-06-28 10:48 ` [Bug target/105034] [10/11/12/13 " jakub at gcc dot gnu.org 2023-07-07 10:42 ` [Bug target/105034] [11/12/13/14 " rguenth at gcc dot gnu.org 2023-11-01 3:54 ` crazylht at gmail dot com
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-105034-4-kG65kRR8w3@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).