Skip to content

Commit

Permalink
[RISCV] Inogre CallingConv::RISCV_VectorCall in getCalleeSavedRegs if…
Browse files Browse the repository at this point in the history
… V/Zve is not enabled.

We can't save vector registers without V/Zve.
  • Loading branch information
topperc committed May 13, 2024
1 parent 5b6f151 commit 4357712
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion llvm/lib/Target/RISCV/RISCVRegisterInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ RISCVRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const {
}

bool HasVectorCSR =
MF->getFunction().getCallingConv() == CallingConv::RISCV_VectorCall;
MF->getFunction().getCallingConv() == CallingConv::RISCV_VectorCall &&
Subtarget.hasVInstructions();

switch (Subtarget.getTargetABI()) {
default:
Expand Down

0 comments on commit 4357712

Please sign in to comment.