https://gcc.gnu.org/g:08ccc67ef44b4ddea72ea50d465d38b87414ecce
commit r16-6490-g08ccc67ef44b4ddea72ea50d465d38b87414ecce Author: Jeff Law <[email protected]> Date: Sun Jan 4 12:12:21 2026 -0700 Partially revert patch that made VXRM a global register on RISC-V This is something that fell through the cracks in gcc-15. VXRM isn't heavily used, so errors in this space could easily be going unnoticed right now. Essentially we made VXRM a global register a while back, it was done somewhat speculatively as we didn't have a case where it really mattered. Richard S. then argued the patch was wrong and I agreed with him, but never got around to reverting the hunk in question. So that's what I'm finally doing here. Note that I kept the tests from the patch which made VXRM a global. Those should continue to work. Bootstrapped and regression tested on a BPI & Pioneer system and checked on riscv{32,64}-elf as well. gcc/ * config/riscv/riscv.cc (riscv_conditional_register_usage): Revert patch that made VXRM a global register. Diff: --- gcc/config/riscv/riscv.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc index 8ee7861ad584..40705e079c75 100644 --- a/gcc/config/riscv/riscv.cc +++ b/gcc/config/riscv/riscv.cc @@ -12582,9 +12582,7 @@ riscv_conditional_register_usage (void) call_used_regs[regno] = 1; } - if (TARGET_VECTOR) - global_regs[VXRM_REGNUM] = 1; - else + if (!TARGET_VECTOR) { for (int regno = V_REG_FIRST; regno <= V_REG_LAST; regno++) fixed_regs[regno] = call_used_regs[regno] = 1;
