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

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

https://gcc.gnu.org/g:55e9aef65b2d3705089c2de601867aa6e7cc261d

commit r17-4404-g55e9aef65b2d3705089c2de601867aa6e7cc261d
Author: Yongqiang Tian <[email protected]>
Date:   Wed Sep 16 22:17:21 2026 +1000

    combine: Ignore debug insns in volatile checks [PR127422]

    A DEBUG_INSN can retain a volatile MEM after the corresponding ordinary
    instruction has been deleted.  Do not treat that non-executing payload as
an
    intervening volatile access in can_combine_p.

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

            PR rtl-optimization/127422

    gcc/ChangeLog:

            * combine.cc (can_combine_p): Ignore debug instructions when
scanning
            for intervening volatile references.

    gcc/testsuite/ChangeLog:

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

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

Reply via email to