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

--- Comment #5 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:9e3a7b8d9de20e2c4fce3cdadf85dce468e7b107

commit r17-3932-g9e3a7b8d9de20e2c4fce3cdadf85dce468e7b107
Author: Yongqiang Tian <[email protected]>
Date:   Fri Sep 4 10:57:06 2026 -0600

    [PATCH] ira: Ignore debug insns in simple-LRA threshold [PR108784]

    The simple-LRA decision uses get_max_uid() as an approximation of the
    number of instructions.  Debug instructions consume UIDs, so enabling
    debug information can cross the threshold and change register allocation
    and generated code.

    Use get_max_insn_count(), which excludes debug instructions, so the
    decision depends only on ordinary instructions.  Add an -fcompare-debug
    regression test.

    Bootstrapped and regression tested on x86_64-pc-linux-gnu.

            PR debug/108784

    gcc/ChangeLog:

            * ira.cc (ira): Use get_max_insn_count instead of get_max_uid when
            selecting simple LRA.

    gcc/testsuite/ChangeLog:

            * gcc.dg/pr108784.c: New test.

            Assisted-by: OpenAI Codex 5.6 Sol
            Assisted-by: Claude
            Signed-off-by: Yongqiang Tian <[email protected]>
  • [Bug debug/108784] '-fcompare-d... cvs-commit at gcc dot gnu.org via Gcc-bugs

Reply via email to