[llvm] [TRI][RISCV] Add methods to get common register class of two registers (PR #118435)

Pengcheng Wang via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 9 00:14:59 PST 2024


================
@@ -222,6 +222,25 @@ TargetRegisterInfo::getMinimalPhysRegClass(MCRegister reg, MVT VT) const {
   return BestRC;
 }
 
+const TargetRegisterClass *TargetRegisterInfo::getCommonMinimalPhysRegClass(
----------------
wangpc-pp wrote:

Done. I used type traits to decide the value, please have a look.

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


More information about the llvm-commits mailing list