Skip to content

Commit b802fdb

Browse files
authored
[RISCV] Remove unnecesary override of getVectorTypeBreakdownForCallingConv. NFC (#171155)
There used to be code in here to make i32 legal on RV64, but it was removed. Also remove unnecessary temporary variable from getRegisterTypeForCallingConv.
1 parent 7ecc9ee commit b802fdb

File tree

2 files changed

+1
-18
lines changed

2 files changed

+1
-18
lines changed

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2581,9 +2581,7 @@ MVT RISCVTargetLowering::getRegisterTypeForCallingConv(LLVMContext &Context,
25812581
!Subtarget.hasStdExtZfhminOrZhinxmin())
25822582
return MVT::f32;
25832583

2584-
MVT PartVT = TargetLowering::getRegisterTypeForCallingConv(Context, CC, VT);
2585-
2586-
return PartVT;
2584+
return TargetLowering::getRegisterTypeForCallingConv(Context, CC, VT);
25872585
}
25882586

25892587
unsigned
@@ -2609,15 +2607,6 @@ unsigned RISCVTargetLowering::getNumRegistersForCallingConv(LLVMContext &Context
26092607
return TargetLowering::getNumRegistersForCallingConv(Context, CC, VT);
26102608
}
26112609

2612-
unsigned RISCVTargetLowering::getVectorTypeBreakdownForCallingConv(
2613-
LLVMContext &Context, CallingConv::ID CC, EVT VT, EVT &IntermediateVT,
2614-
unsigned &NumIntermediates, MVT &RegisterVT) const {
2615-
unsigned NumRegs = TargetLowering::getVectorTypeBreakdownForCallingConv(
2616-
Context, CC, VT, IntermediateVT, NumIntermediates, RegisterVT);
2617-
2618-
return NumRegs;
2619-
}
2620-
26212610
// Changes the condition code and swaps operands if necessary, so the SetCC
26222611
// operation matches one of the comparisons supported directly by branches
26232612
// in the RISC-V ISA. May adjust compares to favor compare with 0 over compare

llvm/lib/Target/RISCV/RISCVISelLowering.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,6 @@ class RISCVTargetLowering : public TargetLowering {
9292
CallingConv::ID CC,
9393
EVT VT) const override;
9494

95-
unsigned getVectorTypeBreakdownForCallingConv(LLVMContext &Context,
96-
CallingConv::ID CC, EVT VT,
97-
EVT &IntermediateVT,
98-
unsigned &NumIntermediates,
99-
MVT &RegisterVT) const override;
100-
10195
bool shouldFoldSelectWithIdentityConstant(unsigned BinOpcode, EVT VT,
10296
unsigned SelectOpcode, SDValue X,
10397
SDValue Y) const override;

0 commit comments

Comments
 (0)