public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/107704] New: [13 Regression] Testsuite regression after recent DCE changes
@ 2022-11-15 16:45 law at gcc dot gnu.org
  2022-11-15 16:46 ` [Bug target/107704] " law at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: law at gcc dot gnu.org @ 2022-11-15 16:45 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 107704
           Summary: [13 Regression] Testsuite regression after recent DCE
                    changes
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: law at gcc dot gnu.org
  Target Milestone: ---

This change:

commit be2c74fdcd0e8d66c3667008ba2561ab5dcc379b
Author: Richard Biener <rguenther@suse.de>
Date:   Thu Nov 10 15:04:10 2022 +0100

    Make last DCE remove empty loops

    The following makes the last DCE pass CD-DCE and in turn the
    last CD-DCE pass a DCE one.  That ensues we remove empty loops
    that become empty between the two.  I've also moved the tail-call
    pass after DCE since DCE can only improve things here.

    The two testcases were the only ones scanning cddce3 so I've
    changed them to scan the dce7 pass that's now in this place.
    The testcases scanning dce7 also work when that's in the earlier
    position.

            PR tree-optimization/84646
            * tree-ssa-dce.cc (pass_dce::set_pass_param): Add param
            wheter to run update-address-taken.
            (pass_dce::execute): Honor it.
            * passes.def: Exchange last DCE and CD-DCE invocations.
            Swap pass_tail_calls and the last DCE.

            * g++.dg/tree-ssa/pr106922.C: Continue to scan earlier DCE dump.
            * gcc.dg/tree-ssa/20030808-1.c: Likewise.


Is causing minor regressions on the sh targets.  On sh3-linux-gnu for example:

Tests that now fail, but worked before (1 tests):

gcc.target/sh/pr51244-19.c scan-assembler-not movt


AFAICT this looks like a target issue -- the RTL looks suitable for avoiding
the movt, but it doesn't happen for some reason.  I didn't consider it
important enough to chase down further given the other things on my plate.

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

* [Bug target/107704] [13 Regression] Testsuite regression after recent DCE changes
  2022-11-15 16:45 [Bug target/107704] New: [13 Regression] Testsuite regression after recent DCE changes law at gcc dot gnu.org
@ 2022-11-15 16:46 ` law at gcc dot gnu.org
  2022-11-16 12:37 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: law at gcc dot gnu.org @ 2022-11-15 16:46 UTC (permalink / raw)
  To: gcc-bugs

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

Jeffrey A. Law <law at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P4
             Target|                            |sh
                 CC|                            |rguenth at gcc dot gnu.org

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

* [Bug target/107704] [13 Regression] Testsuite regression after recent DCE changes
  2022-11-15 16:45 [Bug target/107704] New: [13 Regression] Testsuite regression after recent DCE changes law at gcc dot gnu.org
  2022-11-15 16:46 ` [Bug target/107704] " law at gcc dot gnu.org
@ 2022-11-16 12:37 ` rguenth at gcc dot gnu.org
  2022-11-17  1:55 ` law at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-11-16 12:37 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |missed-optimization,
                   |                            |testsuite-fail
     Ever confirmed|0                           |1
   Target Milestone|---                         |13.0
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2022-11-16

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
So the only change is

   if (_11 == 0)
-    goto <bb 6>; [50.00%]
-  else
     goto <bb 9>; [50.00%]
-;;    succ:       6
-;;                9
+  else
+    goto <bb 6>; [50.00%]

;;   basic block 6, loop depth 0
;;    pred:       5
  goto <bb 9>; [100.00%]

that's which edge has the forwarder.  We are not good in preserving a
canonical form here and (repeated) CFG cleanup call yield either result
depending on which forwarder is removed first.

IIRC we've seen these kind of differences before.

An improvement here would be to enforce some processing order when
removing forwarders, like process EDGE_TRUE before EDGE_FALSE.  But even
that will inevitably cause issues like this bug.  A similar thing would
be enforcing that EDGE_TRUE is the first outgoing edge and EDGE_FALSE
the second.  But then this is more about visitation order and this part
of CFG cleanup just walks over all blocks in block order.

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

* [Bug target/107704] [13 Regression] Testsuite regression after recent DCE changes
  2022-11-15 16:45 [Bug target/107704] New: [13 Regression] Testsuite regression after recent DCE changes law at gcc dot gnu.org
  2022-11-15 16:46 ` [Bug target/107704] " law at gcc dot gnu.org
  2022-11-16 12:37 ` rguenth at gcc dot gnu.org
@ 2022-11-17  1:55 ` law at gcc dot gnu.org
  2023-04-26  6:57 ` [Bug target/107704] [13/14 " rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: law at gcc dot gnu.org @ 2022-11-17  1:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jeffrey A. Law <law at gcc dot gnu.org> ---
ACK.  And as I mentioned, the RTL form looks like it ought to be caught by the
SH specific code to optimize T reg handling.  I don't care enough about the SH
to try and debug a missed optimization though.

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

* [Bug target/107704] [13/14 Regression] Testsuite regression after recent DCE changes
  2022-11-15 16:45 [Bug target/107704] New: [13 Regression] Testsuite regression after recent DCE changes law at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2022-11-17  1:55 ` law at gcc dot gnu.org
@ 2023-04-26  6:57 ` rguenth at gcc dot gnu.org
  2023-07-27  9:24 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-04-26  6:57 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|13.0                        |13.2

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 13.1 is being released, retargeting bugs to GCC 13.2.

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

* [Bug target/107704] [13/14 Regression] Testsuite regression after recent DCE changes
  2022-11-15 16:45 [Bug target/107704] New: [13 Regression] Testsuite regression after recent DCE changes law at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2023-04-26  6:57 ` [Bug target/107704] [13/14 " rguenth at gcc dot gnu.org
@ 2023-07-27  9:24 ` rguenth at gcc dot gnu.org
  2023-10-13  0:59 ` olegendo at gcc dot gnu.org
  2024-05-21  9:12 ` [Bug target/107704] [13/14/15 " jakub at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-27  9:24 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|13.2                        |13.3

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 13.2 is being released, retargeting bugs to GCC 13.3.

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

* [Bug target/107704] [13/14 Regression] Testsuite regression after recent DCE changes
  2022-11-15 16:45 [Bug target/107704] New: [13 Regression] Testsuite regression after recent DCE changes law at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2023-07-27  9:24 ` rguenth at gcc dot gnu.org
@ 2023-10-13  0:59 ` olegendo at gcc dot gnu.org
  2024-05-21  9:12 ` [Bug target/107704] [13/14/15 " jakub at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: olegendo at gcc dot gnu.org @ 2023-10-13  0:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Oleg Endo <olegendo at gcc dot gnu.org> ---
(In reply to Jeffrey A. Law from comment #2)
> ACK.  And as I mentioned, the RTL form looks like it ought to be caught by
> the SH specific code to optimize T reg handling.  I don't care enough about
> the SH to try and debug a missed optimization though.

Haven't seen this one.  Will try to have a look at it, since I wrote those
parts.

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

* [Bug target/107704] [13/14/15 Regression] Testsuite regression after recent DCE changes
  2022-11-15 16:45 [Bug target/107704] New: [13 Regression] Testsuite regression after recent DCE changes law at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2023-10-13  0:59 ` olegendo at gcc dot gnu.org
@ 2024-05-21  9:12 ` jakub at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2024-05-21  9:12 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|13.3                        |13.4

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 13.3 is being released, retargeting bugs to GCC 13.4.

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

end of thread, other threads:[~2024-05-21  9:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-15 16:45 [Bug target/107704] New: [13 Regression] Testsuite regression after recent DCE changes law at gcc dot gnu.org
2022-11-15 16:46 ` [Bug target/107704] " law at gcc dot gnu.org
2022-11-16 12:37 ` rguenth at gcc dot gnu.org
2022-11-17  1:55 ` law at gcc dot gnu.org
2023-04-26  6:57 ` [Bug target/107704] [13/14 " rguenth at gcc dot gnu.org
2023-07-27  9:24 ` rguenth at gcc dot gnu.org
2023-10-13  0:59 ` olegendo at gcc dot gnu.org
2024-05-21  9:12 ` [Bug target/107704] [13/14/15 " jakub 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).