https://gcc.gnu.org/bugzilla/show_bug.cgi?id=129060
--- Comment #1 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Ma Jin <[email protected]>: https://gcc.gnu.org/g:c399c57d4552ba5d93d344a945e750974240db31 commit r17-6834-gc399c57d4552ba5d93d344a945e750974240db31 Author: Jin Ma <[email protected]> Date: Thu Nov 26 18:58:14 2026 +0800 RISC-V: Model the memory written by cbo.zero [PR129060] An address operand alone leaves loads from the same cache block available for reuse after cbo.zero. This can make a load following an inlined memset return the value from before the clear. Clobber memory in the instruction pattern. The builtin accepts an address anywhere in the block and Zicboz does not specify its size. Assisted-by: qwenwork PR target/129060 gcc/ChangeLog: * config/riscv/riscv.md (riscv_zero_<mode>): Clobber memory. * doc/sourcebuild.texi (Effective-Target Keywords): Document riscv_zicboz_64b_ok. gcc/testsuite/ChangeLog: * gcc.target/riscv/cmo-zicboz-alias.c: New compile test. * gcc.target/riscv/cmo-zicboz-alias-run.c: New execution test. * lib/target-supports.exp (check_effective_target_riscv_zicboz_64b_ok): New procedure. Signed-off-by: Jin Ma <[email protected]>
