[llvm] [Xtensa] Implement vararg support. (PR #117126)
Andrei Safronov via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 4 14:08:21 PST 2024
================
@@ -338,16 +329,13 @@ SDValue XtensaTargetLowering::LowerFormalArguments(
// Arguments stored on registers
if (VA.isRegLoc()) {
EVT RegVT = VA.getLocVT();
- const TargetRegisterClass *RC;
- if (RegVT == MVT::i32)
- RC = &Xtensa::ARRegClass;
- else
+ if (RegVT != MVT::i32)
report_fatal_error("RegVT not supported by FormalArguments Lowering");
// Transform the arguments stored on
// physical registers into virtual ones
- unsigned Register = MF.addLiveIn(VA.getLocReg(), RC);
+ unsigned Register = MF.addLiveIn(VA.getLocReg(), &Xtensa::ARRegClass);
----------------
andreisfr wrote:
Thank you very much for comments. Fixed.
https://github.com/llvm/llvm-project/pull/117126
More information about the llvm-commits
mailing list