Ready for trunk (or gcc-17 since it's stage4 for gcc-16 now)? ------------------------------------------------------------------ From:钟居哲 <[email protected]> Send Time:Thu, Jan 8, 2026, 10:51 To:Bohan Lei<[email protected]> CC:"gcc-patches"<[email protected]>; "pan2.li"<[email protected]>; Bohan Lei<[email protected]> Subject:Re: [PATCH] RISC-V: Remove redundant CALL_P check
LGTM From: "Bohan Lei"<[email protected]> Date: Thu, Jan 8, 2026, 10:49 Subject: [PATCH] RISC-V: Remove redundant CALL_P check To: <[email protected]> Cc: <[email protected]>, <[email protected]>, "Bohan Lei"<[email protected]> Since we are using `reg_set_p` to check VXRM definition, the `CALL_P` check has become redundant. VXRM is marked as call-used in riscv.h, and `reg_set_p` in `vxrm_unknown_p` should always return true when a call is encountered. gcc/ChangeLog: * config/riscv/riscv.cc (vxrm_unknown_p): Remove `CALL_P` check --- gcc/config/riscv/riscv.cc | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc index 669a9a0935c..5767cbb0bcd 100644 --- a/gcc/config/riscv/riscv.cc +++ b/gcc/config/riscv/riscv.cc @@ -13941,15 +13941,10 @@ asm_insn_p (rtx_insn *insn) static bool vxrm_unknown_p (rtx_insn *insn) { - /* Return true if there is a definition of VXRM. */ + /* Return true if VXRM is set or clobbered. */ if (reg_set_p (gen_rtx_REG (SImode, VXRM_REGNUM), insn)) return true; - /* A CALL function may contain an instruction that modifies the VXRM, - return true in this situation. */ - if (CALL_P (insn)) - return true; - /* Return true for all assembly since users may hardcode a assembly like this: asm volatile ("csrwi vxrm, 0"). */ if (asm_insn_p (insn)) -- 2.46.0
