Skip to content

Commit 647010a

Browse files
committed
[RISCV] Remove unnecessary check for RVE from determineCalleeSaves. NFCI
The SavedRegs BitVector is checks against the CSR list later. We have a separate CSR list for RVE that excludes X16-31 so we don't need to filter here. If it was needed, it would be needed for the next block of code too which didn't have an RVE check.
1 parent 2e4d276 commit 647010a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

llvm/lib/Target/RISCV/RISCVFrameLowering.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,9 +1003,7 @@ void RISCVFrameLowering::determineCalleeSaves(MachineFunction &MF,
10031003
};
10041004

10051005
for (auto Reg : CSRegs)
1006-
// Only save x0-x15 for RVE.
1007-
if (Reg < RISCV::X16 || !Subtarget.isRVE())
1008-
SavedRegs.set(Reg);
1006+
SavedRegs.set(Reg);
10091007

10101008
// According to psABI, if ilp32e/lp64e ABIs are used with an ISA that
10111009
// has any of the registers x16-x31 and f0-f31, then these registers are

0 commit comments

Comments
 (0)