public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/82666] [9/10/11/12 regression]: sum += (x>128/9/10/11/12 ? x : 0) puts the cmov on the critical path (at -O2)
       [not found] <bug-82666-4@http.gcc.gnu.org/bugzilla/>
@ 2021-05-14  9:49 ` jakub at gcc dot gnu.org
  2021-06-01  8:09 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-05-14  9:49 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|8.5                         |9.4

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 8 branch is being closed.

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

* [Bug target/82666] [9/10/11/12 regression]: sum += (x>128/9/10/11/12 ? x : 0) puts the cmov on the critical path (at -O2)
       [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 ? x : 0) puts the cmov on the critical path (at -O2) 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
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-01  8:09 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|9.4                         |9.5

--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9.4 is being released, retargeting bugs to GCC 9.5.

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

* [Bug target/82666] [10/11/12/13 regression]: sum += (x>128 ? x : 0) puts the cmov on the critical path (at -O2)
       [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 ? x : 0) puts the cmov on the critical path (at -O2) jakub at gcc dot gnu.org
  2021-06-01  8:09 ` rguenth at gcc dot gnu.org
@ 2022-05-27  9:37 ` rguenth at gcc dot gnu.org
  2022-06-28 10:33 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-05-27  9:37 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|9.5                         |10.4

--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9 branch is being closed

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

* [Bug target/82666] [10/11/12/13 regression]: sum += (x>128 ? x : 0) puts the cmov on the critical path (at -O2)
       [not found] <bug-82666-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  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
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-28 10:33 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.4                        |10.5

--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 10.4 is being released, retargeting bugs to GCC 10.5.

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

* [Bug target/82666] [11/12/13/14 regression]: sum += (x>128 ? x : 0) puts the cmov on the critical path (at -O2)
       [not found] <bug-82666-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2022-06-28 10:33 ` jakub at gcc dot gnu.org
@ 2023-07-07 10:32 ` 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
  6 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07 10:32 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.5                        |11.5

--- Comment #12 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10 branch is being closed.

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

* [Bug target/82666] [11/12/13/14 regression]: sum += (x>128 ? x : 0) puts the cmov on the critical path (at -O2)
       [not found] <bug-82666-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  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
  6 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-08-04  0:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I don't know if this could help here but combine does produce:
Trying 37, 34 -> 38:
   37: flags:CCGC=cmp(r82:SI,0x7f)
      REG_DEAD r82:SI
   34: {r92:DI=r87:DI+r89:DI;clobber flags:CC;}
      REG_DEAD r89:DI
      REG_UNUSED flags:CC
   38: r87:DI={(flags:CCGC>0)?r92:DI:r87:DI}
      REG_DEAD r92:DI
      REG_DEAD flags:CCGC
Failed to match this instruction:
(set (reg/v:DI 87 [ <retval> ])
    (plus:DI (mult:DI (gt:DI (reg:SI 82 [ _4 ])
                (const_int 127 [0x7f]))
            (reg:DI 89 [ _4 ]))
        (reg/v:DI 87 [ <retval> ])))

I don't know if we could catch this in the backend and split this into 3
instructions if that would do the right thing ...

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

* [Bug target/82666] [11/12/13/14 regression]: sum += (x>128 ? x : 0) puts the cmov on the critical path (at -O2)
       [not found] <bug-82666-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2023-08-04  0:40 ` pinskia at gcc dot gnu.org
@ 2023-08-04  4:18 ` law at gcc dot gnu.org
  6 siblings, 0 replies; 7+ messages in thread
From: law at gcc dot gnu.org @ 2023-08-04  4:18 UTC (permalink / raw)
  To: gcc-bugs

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 :(

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

end of thread, other threads:[~2023-08-04  4:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [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 ? x : 0) puts the cmov on the critical path (at -O2) 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 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).