Skip to content

Commit

Permalink
[LoongArch64] don't clear float-regs when passed by integer-regs. (do…
Browse files Browse the repository at this point in the history
  • Loading branch information
shushanhf authored and Ruihan-Yin committed May 30, 2024
1 parent a5f8085 commit e0a1260
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/coreclr/jit/targetloongarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ ABIPassingInformation LoongArch64Classifier::Classify(Compiler* comp,

if (!canPassArgInRegisters)
{
m_floatRegs.Clear();
slots = (passedSize + TARGET_POINTER_SIZE - 1) / TARGET_POINTER_SIZE;
// On LoongArch64, if there aren't any remaining floating-point registers to pass the argument,
// integer registers (if any) are used instead.
Expand Down Expand Up @@ -161,8 +160,7 @@ ABIPassingInformation LoongArch64Classifier::Classify(Compiler* comp,
canPassArgInRegisters = m_floatRegs.Count() > 0;
if (!canPassArgInRegisters)
{
type = TYP_I_IMPL;
m_floatRegs.Clear();
type = TYP_I_IMPL;
canPassArgInRegisters = m_intRegs.Count() > 0;
}
}
Expand Down

0 comments on commit e0a1260

Please sign in to comment.