https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125320
--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-16 branch has been updated by Xi Ruoyao <[email protected]>: https://gcc.gnu.org/g:be6a3d89b0ceca3dd5bb6467352a018510064730 commit r16-8946-gbe6a3d89b0ceca3dd5bb6467352a018510064730 Author: Xi Ruoyao <[email protected]> Date: Fri May 15 11:46:35 2026 +0800 riscv: Fix SSP assembly with xtheadmemidx [PR 125320] The m constraint accepts memory operands suitable for memory load/store instructions in extensions, not only the ld/sd instructions. So we cannot always use ld/sd in the SSP instruction sequences. Call riscv_output_move() for the correct assembly template instead. PR target/125320 gcc/ * config/riscv/riscv.md (stack_protect_test_<mode>): Call riscv_output_move() instead of hard coding <load>. (stack_protect_set_<mode>): Call riscv_output_move() instead of hard coding <load> and <store>. gcc/testsuite/ * gcc.target/riscv/pr125320.c: New test. (cherry picked from commit aac8c3738bb26b72281e55778428af559c9bb032)
