public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/92342] [10/11 Regression] a small missed transformation into x?b:0
       [not found] <bug-92342-4@http.gcc.gnu.org/bugzilla/>
@ 2020-05-07 11:56 ` jakub at gcc dot gnu.org
  2020-07-23  6:51 ` rguenth at gcc dot gnu.org
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-05-07 11:56 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.0                        |10.2

--- Comment #18 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 10.1 has been released.

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

* [Bug rtl-optimization/92342] [10/11 Regression] a small missed transformation into x?b:0
       [not found] <bug-92342-4@http.gcc.gnu.org/bugzilla/>
  2020-05-07 11:56 ` [Bug rtl-optimization/92342] [10/11 Regression] a small missed transformation into x?b:0 jakub at gcc dot gnu.org
@ 2020-07-23  6:51 ` rguenth at gcc dot gnu.org
  2021-04-08 12:02 ` rguenth at gcc dot gnu.org
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-07-23  6:51 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.2                        |10.3

--- Comment #19 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10.2 is released, adjusting target milestone.

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

* [Bug rtl-optimization/92342] [10/11 Regression] a small missed transformation into x?b:0
       [not found] <bug-92342-4@http.gcc.gnu.org/bugzilla/>
  2020-05-07 11:56 ` [Bug rtl-optimization/92342] [10/11 Regression] a small missed transformation into x?b:0 jakub at gcc dot gnu.org
  2020-07-23  6:51 ` rguenth at gcc dot gnu.org
@ 2021-04-08 12:02 ` rguenth at gcc dot gnu.org
  2021-04-14  0:54 ` pinskia at gcc dot gnu.org
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-04-08 12:02 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #20 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10.3 is being released, retargeting bugs to GCC 10.4.

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

* [Bug rtl-optimization/92342] [10/11 Regression] a small missed transformation into x?b:0
       [not found] <bug-92342-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2021-04-08 12:02 ` rguenth at gcc dot gnu.org
@ 2021-04-14  0:54 ` pinskia at gcc dot gnu.org
  2021-11-22  0:57 ` [Bug tree-optimization/92342] [10/11/12 " pinskia at gcc dot gnu.org
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-04-14  0:54 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |luc.vanoostenryck at gmail dot com

--- Comment #21 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 100072 has been marked as a duplicate of this bug. ***

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

* [Bug tree-optimization/92342] [10/11/12 Regression] a small missed transformation into x?b:0
       [not found] <bug-92342-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2021-04-14  0:54 ` pinskia at gcc dot gnu.org
@ 2021-11-22  0:57 ` pinskia at gcc dot gnu.org
  2021-11-22  1:59 ` pinskia at gcc dot gnu.org
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-11-22  0:57 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |pinskia at gcc dot gnu.org
             Status|NEW                         |ASSIGNED
          Component|rtl-optimization            |tree-optimization

--- Comment #22 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Mine, we should do this transformation on the gimple level really. Let me do
that.

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

* [Bug tree-optimization/92342] [10/11/12 Regression] a small missed transformation into x?b:0
       [not found] <bug-92342-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2021-11-22  0:57 ` [Bug tree-optimization/92342] [10/11/12 " pinskia at gcc dot gnu.org
@ 2021-11-22  1:59 ` pinskia at gcc dot gnu.org
  2021-11-22  4:13 ` pinskia at gcc dot gnu.org
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-11-22  1:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #23 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Created attachment 51846
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51846&action=edit
Patch which I am testing

Note it is really two patches, one which fixes up the multiply case and then
one which does the same for &- too.

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

* [Bug tree-optimization/92342] [10/11/12 Regression] a small missed transformation into x?b:0
       [not found] <bug-92342-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2021-11-22  1:59 ` pinskia at gcc dot gnu.org
@ 2021-11-22  4:13 ` pinskia at gcc dot gnu.org
  2021-11-22  6:26 ` pinskia at gcc dot gnu.org
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-11-22  4:13 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #24 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Segher Boessenkool from comment #4)
> Btw, try
> 
> int h(int a, int b, int c, int d)
> {
>   return (c & -(a==b)) | (d & -(a!=b));
> }
> 
> to see we have some way to go here.

I filed that as PR 103354 which I will handle after I submit the patches for
this one.

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

* [Bug tree-optimization/92342] [10/11/12 Regression] a small missed transformation into x?b:0
       [not found] <bug-92342-4@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2021-11-22  4:13 ` pinskia at gcc dot gnu.org
@ 2021-11-22  6:26 ` pinskia at gcc dot gnu.org
  2022-06-28 10:38 ` [Bug tree-optimization/92342] [10/11/12/13 " jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-11-22  6:26 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |https://gcc.gnu.org/piperma
                   |                            |il/gcc-patches/2021-Novembe
                   |                            |r/585112.html
           Keywords|                            |patch

--- Comment #25 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Submitted the sequence here:
https://gcc.gnu.org/pipermail/gcc-patches/2021-November/585111.html
https://gcc.gnu.org/pipermail/gcc-patches/2021-November/585112.html

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

* [Bug tree-optimization/92342] [10/11/12/13 Regression] a small missed transformation into x?b:0
       [not found] <bug-92342-4@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2021-11-22  6:26 ` pinskia at gcc dot gnu.org
@ 2022-06-28 10:38 ` jakub at gcc dot gnu.org
  2023-01-07  9:38 ` roger at nextmovesoftware dot com
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-28 10:38 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #26 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] 14+ messages in thread

* [Bug tree-optimization/92342] [10/11/12/13 Regression] a small missed transformation into x?b:0
       [not found] <bug-92342-4@http.gcc.gnu.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2022-06-28 10:38 ` [Bug tree-optimization/92342] [10/11/12/13 " jakub at gcc dot gnu.org
@ 2023-01-07  9:38 ` roger at nextmovesoftware dot com
  2023-01-12 21:49 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 14+ messages in thread
From: roger at nextmovesoftware dot com @ 2023-01-07  9:38 UTC (permalink / raw)
  To: gcc-bugs

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

Roger Sayle <roger at nextmovesoftware dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |roger at nextmovesoftware dot com

--- Comment #27 from Roger Sayle <roger at nextmovesoftware dot com> ---
Revised versions of Andrew's patches from comment #25 were posted here:
https://gcc.gnu.org/pipermail/gcc-patches/2023-January/609349.html

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

* [Bug tree-optimization/92342] [10/11/12/13 Regression] a small missed transformation into x?b:0
       [not found] <bug-92342-4@http.gcc.gnu.org/bugzilla/>
                   ` (9 preceding siblings ...)
  2023-01-07  9:38 ` roger at nextmovesoftware dot com
@ 2023-01-12 21:49 ` cvs-commit at gcc dot gnu.org
  2023-01-14 18:55 ` gabravier at gmail dot com
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-01-12 21:49 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #28 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Roger Sayle <sayle@gcc.gnu.org>:

https://gcc.gnu.org/g:fd1f5373b8647a5da2f7f4b42282e676a4b04d98

commit r13-5128-gfd1f5373b8647a5da2f7f4b42282e676a4b04d98
Author: Roger Sayle <roger@nextmovesoftware.com>
Date:   Thu Jan 12 21:47:40 2023 +0000

    PR tree-optimization/92342: Optimize b & -(a==c) in match.pd

    This patch is an update/tweak of Andrew Pinski's two patches for
    PR tree-optimization/92342, that were originally posted by in November:
    https://gcc.gnu.org/pipermail/gcc-patches/2021-November/585111.html
    https://gcc.gnu.org/pipermail/gcc-patches/2021-November/585112.html

    Technically, the first of those was approved by Richard Biener, though
    never committed, and my first thought was to simply push it for Andrew,
    but the review of the second piece expressed concerns over comparisons
    in non-integral modes, where the result may not be zero-one valued.
    Indeed both transformations misbehave in the presence of vector mode
    comparisons (these transformations are already implemented for
    vec_cond elsewhere in match.pd), so my minor contribution is to limit
    these new transformations to scalars, by testing that both the operands
    and results are INTEGRAL_TYPE_P.

    2023-01-12  Andrew Pinski  <apinski@marvell.com>
                Roger Sayle  <roger@nextmovesoftware.com>

    gcc/ChangeLog:
            PR tree-optimization/92342
            * match.pd ((m1 CMP m2) * d -> (m1 CMP m2) ? d : 0):
            Use tcc_comparison and :c for the multiply.
            (b & -(a CMP c) -> (a CMP c)?b:0): New pattern.

    gcc/testsuite/ChangeLog:
            PR tree-optimization/92342
            * gcc.dg/tree-ssa/andnegcmp-1.c: New test.
            * gcc.dg/tree-ssa/andnegcmp-2.c: New test.
            * gcc.dg/tree-ssa/multcmp-1.c: New test.
            * gcc.dg/tree-ssa/multcmp-2.c: New test.

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

* [Bug tree-optimization/92342] [10/11/12/13 Regression] a small missed transformation into x?b:0
       [not found] <bug-92342-4@http.gcc.gnu.org/bugzilla/>
                   ` (10 preceding siblings ...)
  2023-01-12 21:49 ` cvs-commit at gcc dot gnu.org
@ 2023-01-14 18:55 ` gabravier at gmail dot com
  2023-01-15 19:11 ` [Bug tree-optimization/92342] [10/11/12 " roger at nextmovesoftware dot com
  2023-03-10 19:25 ` pinskia at gcc dot gnu.org
  13 siblings, 0 replies; 14+ messages in thread
From: gabravier at gmail dot com @ 2023-01-14 18:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #29 from Gabriel Ravier <gabravier at gmail dot com> ---
Looks like the patch fixes this bug, unless I'm missing something.

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

* [Bug tree-optimization/92342] [10/11/12 Regression] a small missed transformation into x?b:0
       [not found] <bug-92342-4@http.gcc.gnu.org/bugzilla/>
                   ` (11 preceding siblings ...)
  2023-01-14 18:55 ` gabravier at gmail dot com
@ 2023-01-15 19:11 ` roger at nextmovesoftware dot com
  2023-03-10 19:25 ` pinskia at gcc dot gnu.org
  13 siblings, 0 replies; 14+ messages in thread
From: roger at nextmovesoftware dot com @ 2023-01-15 19:11 UTC (permalink / raw)
  To: gcc-bugs

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

Roger Sayle <roger at nextmovesoftware dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[10/11/12/13 Regression] a  |[10/11/12 Regression] a
                   |small missed transformation |small missed transformation
                   |into x?b:0                  |into x?b:0
      Known to work|                            |13.0

--- Comment #30 from Roger Sayle <roger at nextmovesoftware dot com> ---
This has now been fixed on mainline (for GCC 13).

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

* [Bug tree-optimization/92342] [10/11/12 Regression] a small missed transformation into x?b:0
       [not found] <bug-92342-4@http.gcc.gnu.org/bugzilla/>
                   ` (12 preceding siblings ...)
  2023-01-15 19:11 ` [Bug tree-optimization/92342] [10/11/12 " roger at nextmovesoftware dot com
@ 2023-03-10 19:25 ` pinskia at gcc dot gnu.org
  13 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-03-10 19:25 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
   Target Milestone|10.5                        |13.0
         Resolution|---                         |FIXED

--- Comment #31 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed in GCC 13. I don't mind this not being fixed on other branches.

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

end of thread, other threads:[~2023-03-10 19:25 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-92342-4@http.gcc.gnu.org/bugzilla/>
2020-05-07 11:56 ` [Bug rtl-optimization/92342] [10/11 Regression] a small missed transformation into x?b:0 jakub at gcc dot gnu.org
2020-07-23  6:51 ` rguenth at gcc dot gnu.org
2021-04-08 12:02 ` rguenth at gcc dot gnu.org
2021-04-14  0:54 ` pinskia at gcc dot gnu.org
2021-11-22  0:57 ` [Bug tree-optimization/92342] [10/11/12 " pinskia at gcc dot gnu.org
2021-11-22  1:59 ` pinskia at gcc dot gnu.org
2021-11-22  4:13 ` pinskia at gcc dot gnu.org
2021-11-22  6:26 ` pinskia at gcc dot gnu.org
2022-06-28 10:38 ` [Bug tree-optimization/92342] [10/11/12/13 " jakub at gcc dot gnu.org
2023-01-07  9:38 ` roger at nextmovesoftware dot com
2023-01-12 21:49 ` cvs-commit at gcc dot gnu.org
2023-01-14 18:55 ` gabravier at gmail dot com
2023-01-15 19:11 ` [Bug tree-optimization/92342] [10/11/12 " roger at nextmovesoftware dot com
2023-03-10 19:25 ` pinskia 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).