[llvm] [RISCV] Remove unnecesary override of getVectorTypeBreakdownForCallingConv. NFC (PR #171155)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 8 08:45:03 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-risc-v
Author: Craig Topper (topperc)
<details>
<summary>Changes</summary>
There used to be code in here to make i32 legal on RV64, but it was removed.
Also remove unnecessary temporary variable from getRegisterTypeForCallingConv.
---
Full diff: https://github.com/llvm/llvm-project/pull/171155.diff
2 Files Affected:
- (modified) llvm/lib/Target/RISCV/RISCVISelLowering.cpp (+1-12)
- (modified) llvm/lib/Target/RISCV/RISCVISelLowering.h (-6)
``````````diff
diff --git a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
index 36416f9199f71..eaf908886740c 100644
--- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -2581,9 +2581,7 @@ MVT RISCVTargetLowering::getRegisterTypeForCallingConv(LLVMContext &Context,
!Subtarget.hasStdExtZfhminOrZhinxmin())
return MVT::f32;
- MVT PartVT = TargetLowering::getRegisterTypeForCallingConv(Context, CC, VT);
-
- return PartVT;
+ return TargetLowering::getRegisterTypeForCallingConv(Context, CC, VT);
}
unsigned
@@ -2609,15 +2607,6 @@ unsigned RISCVTargetLowering::getNumRegistersForCallingConv(LLVMContext &Context
return TargetLowering::getNumRegistersForCallingConv(Context, CC, VT);
}
-unsigned RISCVTargetLowering::getVectorTypeBreakdownForCallingConv(
- LLVMContext &Context, CallingConv::ID CC, EVT VT, EVT &IntermediateVT,
- unsigned &NumIntermediates, MVT &RegisterVT) const {
- unsigned NumRegs = TargetLowering::getVectorTypeBreakdownForCallingConv(
- Context, CC, VT, IntermediateVT, NumIntermediates, RegisterVT);
-
- return NumRegs;
-}
-
// Changes the condition code and swaps operands if necessary, so the SetCC
// operation matches one of the comparisons supported directly by branches
// in the RISC-V ISA. May adjust compares to favor compare with 0 over compare
diff --git a/llvm/lib/Target/RISCV/RISCVISelLowering.h b/llvm/lib/Target/RISCV/RISCVISelLowering.h
index 8a55a5634452c..46a420032b852 100644
--- a/llvm/lib/Target/RISCV/RISCVISelLowering.h
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.h
@@ -92,12 +92,6 @@ class RISCVTargetLowering : public TargetLowering {
CallingConv::ID CC,
EVT VT) const override;
- unsigned getVectorTypeBreakdownForCallingConv(LLVMContext &Context,
- CallingConv::ID CC, EVT VT,
- EVT &IntermediateVT,
- unsigned &NumIntermediates,
- MVT &RegisterVT) const override;
-
bool shouldFoldSelectWithIdentityConstant(unsigned BinOpcode, EVT VT,
unsigned SelectOpcode, SDValue X,
SDValue Y) const override;
``````````
</details>
https://github.com/llvm/llvm-project/pull/171155
More information about the llvm-commits
mailing list