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

--- Comment #12 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-16 branch has been updated by Soumya AR <[email protected]>:

https://gcc.gnu.org/g:72010b551750e4846e67203e314866b1a63b8e4c

commit r16-8963-g72010b551750e4846e67203e314866b1a63b8e4c
Author: Soumya AR <[email protected]>
Date:   Wed May 6 05:39:55 2026 +0000

    aarch64: Move pass_narrow_gp_writes above pass_free_cfg

    The narrow_gp_writes pass uses RTL-SSA and updates DF state via
    df_insn_rescan / df_insn_delete.  Both routines look up the insn's bb via
    BLOCK_FOR_INSN to mark it dirty after a change, but pass_free_cfg has
already
    cleared those per-insn pointers by the time narrow_gp_writes runs. When
    BLOCK_FOR_INSN returns NULL, the dirty-marking step is silently skipped,
    leaving the DF stale.

    Move the pass to run before pass_free_cfg.

    Bootstrapped and regtested on aarch64-linux-gnu.
    SPEC CPU 2017 shows no codegen differences (compared to previous
placement).
    OK for trunk?

    Signed-off-by: Soumya AR <[email protected]>

            PR target/124895

    gcc/ChangeLog:

            * config/aarch64/aarch64-passes.def (pass_narrow_gp_writes): Move
pass
            before pass_free_cfg.

    gcc/testsuite/ChangeLog:

            * gcc.target/aarch64/narrow-gp-writes-8.c: New test.

    (cherry picked from commit cefcc09723c363f61e65f9a2774f82258fc43474)

Reply via email to