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
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ 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] 11+ messages in thread

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

Thread overview: 11+ 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
2024-05-21  9:13 ` 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).