[llvm] [RISCV] Support Zdinx registers in -fzero-call-used-regs (PR #206323)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 4 09:22:50 PDT 2026


================
@@ -1285,6 +1285,13 @@ class LLVM_ABI TargetRegisterInfo : public MCRegisterInfo {
   // Whether this register should be ignored when generating CodeView debug
   // info, because it's a known there is no mapping available.
   virtual bool isIgnoredCVReg(MCRegister LLVMReg) const { return false; }
+
+  // Return all physical registers occupied by Reg.
+  virtual BitVector getUnderlyingRegisters(MCRegister Reg) const {
+    BitVector BackingRegisters(getNumRegs());
+    BackingRegisters.set(Reg.id());
----------------
topperc wrote:

Maybe we should be checking for register overlap with the liveins rather than just exact match?

https://github.com/llvm/llvm-project/pull/206323


More information about the llvm-commits mailing list