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

--- Comment #1 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jeff Law <[email protected]>:

https://gcc.gnu.org/g:484a3f0c5f56accdc7a9c2dca3f1835d5439d5ff

commit r17-5028-g484a3f0c5f56accdc7a9c2dca3f1835d5439d5ff
Author: Yongqiang Tian <[email protected]>
Date:   Fri Oct 9 08:48:22 2026 -0600

    [PATCH] reorg: Ignore debug insns in neighboring-insn lookups [PR127725]

    The delay-slot reorganization pass uses note-skipping neighboring-insn
    lookups in three places where a DEBUG_INSN is not an executable boundary.
    As a result, debug information can change skip optimization, label reuse,
    and register-copy recognition.

    Use the nondebug lookup helpers and add focused SPARC -fcompare-debug
    tests for all three paths.

    Assisted-by: OpenAI Codex 5.6 Sol, co-reviewed by Claude and Yongqiang
Tian.

            PR rtl-optimization/127725

    gcc/ChangeLog:

            * reorg.cc (optimize_skip): Use next_nonnote_nondebug_insn.
            (get_label_before): Use prev_nonnote_nondebug_insn.
            (fill_slots_from_thread): Use next_nonnote_nondebug_insn.

    gcc/testsuite/ChangeLog:

            * gcc.target/sparc/reorg-fill-slots-regcopy-debug.c: New test.
            * gcc.target/sparc/reorg-get-label-before-debug.c: New test.
            * gcc.target/sparc/reorg-optimize-skip-debug.c: New test.

    Signed-off-by: Yongqiang Tian <[email protected]>

Reply via email to