gnu/gcc/be7393903c28328a6d2dfd5bbd6347fcbf767bec reorg: Do not charge debug insns against search budget [PR127421]
Skip DEBUG_INSNs before decrementing the bounded redundant_insn search
budget. Debug instructions do not execute and should not hide an otherwise
reachable ordinary redundancy witness.
Assisted-by: OpenAI Codex 5.6 Sol, co-reviewed by Claude and Yongqiang Tian.
PR rtl-optimization/127421
gcc/ChangeLog:
* reorg.cc (redundant_insn): Use NONDEBUG_INSN_P in both bounded
backward walks. Remove redundant debug-instruction checks.
gcc/testsuite/ChangeLog:
* gcc.target/sparc/pr127421.c: New test.
Signed-off-by: Yongqiang Tian <yqtian668@gmail.com>
2 files changed