public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/108273] New: Inconsistent dfa state between debug and non-debug
@ 2023-01-03 10:25 linkw at gcc dot gnu.org
  2023-01-03 10:26 ` [Bug rtl-optimization/108273] " linkw at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: linkw at gcc dot gnu.org @ 2023-01-03 10:25 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 108273
           Summary: Inconsistent dfa state between debug and non-debug
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: linkw at gcc dot gnu.org
  Target Milestone: ---

Test case gcc.target/powerpc/pr105586.c fails with -fcompare-debug failure on
Power10 (P10 specific) if I applied one patch to fix the current inaccurate
power10 tuning setting (which would be pushed soon).

By looking into it, I found the dfa state changes even if one basic block have
only one debug insn, but the difference on dfa states might not necessarily
cause the different choice on ready insns, it heavily depends on the context,
different cpu types result in different insns, fusion can reorder some insns
first, so this test case is fine on Power8 while not on Power10.

On Power10, at non-debug mode,

  saving state for edge 2->3
    // power4iu_automaton_state:8492
    // power4misc_automaton_state:3

  block 3 meets no_real_insns_p

  saving state for edge 3->4
    // power4iu_automaton_state:8492
    // power4misc_automaton_state:3

at debug mode:

  saving state for edge 2->3
    // power4iu_automaton_state:8492
    // power4misc_automaton_state:3

  block 3 have only one insn which is one debug insn.

  before advance_one_cycle for block 3:
    // power4iu_automaton_state:8492
    // power4misc_automaton_state:3
  after advance_one_cycle for block 3:
    // power4iu_automaton_state:8501
    // power4misc_automaton_state:0

So when starting to schedule for bb 4, they have different states.

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

* [Bug rtl-optimization/108273] Inconsistent dfa state between debug and non-debug
  2023-01-03 10:25 [Bug rtl-optimization/108273] New: Inconsistent dfa state between debug and non-debug linkw at gcc dot gnu.org
@ 2023-01-03 10:26 ` linkw at gcc dot gnu.org
  2023-01-10 16:40 ` bergner at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: linkw at gcc dot gnu.org @ 2023-01-03 10:26 UTC (permalink / raw)
  To: gcc-bugs

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

Kewen Lin <linkw at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bergner at gcc dot gnu.org,
                   |                            |segher at gcc dot gnu.org
           Keywords|                            |compare-debug-failure
             Target|                            |powerpc*-linux-gnu
   Target Milestone|---                         |13.0

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

* [Bug rtl-optimization/108273] Inconsistent dfa state between debug and non-debug
  2023-01-03 10:25 [Bug rtl-optimization/108273] New: Inconsistent dfa state between debug and non-debug linkw at gcc dot gnu.org
  2023-01-03 10:26 ` [Bug rtl-optimization/108273] " linkw at gcc dot gnu.org
@ 2023-01-10 16:40 ` bergner at gcc dot gnu.org
  2023-02-23  6:58 ` linkw at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: bergner at gcc dot gnu.org @ 2023-01-10 16:40 UTC (permalink / raw)
  To: gcc-bugs

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

Peter Bergner <bergner at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jskumari at gcc dot gnu.org

--- Comment #1 from Peter Bergner <bergner at gcc dot gnu.org> ---
Add Surya to the CC list for her input, since she has worked on similar issues.

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

* [Bug rtl-optimization/108273] Inconsistent dfa state between debug and non-debug
  2023-01-03 10:25 [Bug rtl-optimization/108273] New: Inconsistent dfa state between debug and non-debug linkw at gcc dot gnu.org
  2023-01-03 10:26 ` [Bug rtl-optimization/108273] " linkw at gcc dot gnu.org
  2023-01-10 16:40 ` bergner at gcc dot gnu.org
@ 2023-02-23  6:58 ` linkw at gcc dot gnu.org
  2023-02-23  7:00 ` linkw at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: linkw at gcc dot gnu.org @ 2023-02-23  6:58 UTC (permalink / raw)
  To: gcc-bugs

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

Kewen Lin <linkw at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2023-02-23
           Assignee|unassigned at gcc dot gnu.org      |linkw at gcc dot gnu.org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever confirmed|0                           |1

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

* [Bug rtl-optimization/108273] Inconsistent dfa state between debug and non-debug
  2023-01-03 10:25 [Bug rtl-optimization/108273] New: Inconsistent dfa state between debug and non-debug linkw at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2023-02-23  6:58 ` linkw at gcc dot gnu.org
@ 2023-02-23  7:00 ` linkw at gcc dot gnu.org
  2023-02-23  7:03 ` linkw at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: linkw at gcc dot gnu.org @ 2023-02-23  7:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Kewen Lin <linkw at gcc dot gnu.org> ---
Created attachment 54512
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54512&action=edit
Consider debug insn in no_real_insns_p

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

* [Bug rtl-optimization/108273] Inconsistent dfa state between debug and non-debug
  2023-01-03 10:25 [Bug rtl-optimization/108273] New: Inconsistent dfa state between debug and non-debug linkw at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2023-02-23  7:00 ` linkw at gcc dot gnu.org
@ 2023-02-23  7:03 ` linkw at gcc dot gnu.org
  2023-02-23  9:08 ` linkw at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: linkw at gcc dot gnu.org @ 2023-02-23  7:03 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Kewen Lin <linkw at gcc dot gnu.org> ---
The attached patch can be bootstrapped and regress-tested and solve the
reported issue right after r13-5107-g6224db0e4d6d3b, but I can not reproduce
the failure with the latest trunk, interesting... I suspected that something
changed the insn sequence and made the issue concealed, bisecting ...

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

* [Bug rtl-optimization/108273] Inconsistent dfa state between debug and non-debug
  2023-01-03 10:25 [Bug rtl-optimization/108273] New: Inconsistent dfa state between debug and non-debug linkw at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2023-02-23  7:03 ` linkw at gcc dot gnu.org
@ 2023-02-23  9:08 ` linkw at gcc dot gnu.org
  2023-02-23  9:12 ` linkw at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: linkw at gcc dot gnu.org @ 2023-02-23  9:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Kewen Lin <linkw at gcc dot gnu.org> ---
Starting from r13-5154-g733a1b777f16cd, this failure is gone on Power10 LE (or
with explicit -mcpu=power10), but it shows up on Power8 LE. By checking
r13-5154, this behavior change is expected, the priorities of some insns change
due to that commit, it further affects the scheduling decision on which insn is
scheduled ahead.

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

* [Bug rtl-optimization/108273] Inconsistent dfa state between debug and non-debug
  2023-01-03 10:25 [Bug rtl-optimization/108273] New: Inconsistent dfa state between debug and non-debug linkw at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2023-02-23  9:08 ` linkw at gcc dot gnu.org
@ 2023-02-23  9:12 ` linkw 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
  8 siblings, 0 replies; 10+ messages in thread
From: linkw at gcc dot gnu.org @ 2023-02-23  9:12 UTC (permalink / raw)
  To: gcc-bugs

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

Kewen Lin <linkw at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |seurer at gcc dot gnu.org

--- Comment #5 from Kewen Lin <linkw at gcc dot gnu.org> ---
*** Bug 108519 has been marked as a duplicate of this bug. ***

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

* [Bug rtl-optimization/108273] Inconsistent dfa state between debug and non-debug
  2023-01-03 10:25 [Bug rtl-optimization/108273] New: Inconsistent dfa state between debug and non-debug linkw at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2023-02-23  9:12 ` linkw 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
  8 siblings, 0 replies; 10+ 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=108273

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

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

--- Comment #6 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] 10+ messages in thread

* [Bug rtl-optimization/108273] Inconsistent dfa state between debug and non-debug
  2023-01-03 10:25 [Bug rtl-optimization/108273] New: Inconsistent dfa state between debug and non-debug linkw at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2023-04-26  6:57 ` rguenth at gcc dot gnu.org
@ 2023-07-27  9:24 ` rguenth at gcc dot gnu.org
  8 siblings, 0 replies; 10+ 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=108273

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

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

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

end of thread, other threads:[~2023-07-27  9:24 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-03 10:25 [Bug rtl-optimization/108273] New: Inconsistent dfa state between debug and non-debug linkw at gcc dot gnu.org
2023-01-03 10:26 ` [Bug rtl-optimization/108273] " linkw at gcc dot gnu.org
2023-01-10 16:40 ` bergner at gcc dot gnu.org
2023-02-23  6:58 ` linkw at gcc dot gnu.org
2023-02-23  7:00 ` linkw at gcc dot gnu.org
2023-02-23  7:03 ` linkw at gcc dot gnu.org
2023-02-23  9:08 ` linkw at gcc dot gnu.org
2023-02-23  9:12 ` linkw 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

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).