Skip to content

Commit

Permalink
[Clang][LoongArch] Do not pass vector arguments via vector registers (l…
Browse files Browse the repository at this point in the history
…lvm#74990)

psABI v2.30 clarifies that vector arguments are passed according to the
base ABI by default.
  • Loading branch information
yjijd authored Jan 2, 2024
1 parent d8db273 commit 0e01c72
Show file tree
Hide file tree
Showing 5 changed files with 13,485 additions and 5,764 deletions.
7 changes: 0 additions & 7 deletions clang/lib/CodeGen/Targets/LoongArch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,13 +324,6 @@ ABIArgInfo LoongArchABIInfo::classifyArgumentType(QualType Ty, bool IsFixed,
return ABIArgInfo::getDirect();
}

// Pass 128-bit/256-bit vector values via vector registers directly.
if (Ty->isVectorType() && (((getContext().getTypeSize(Ty) == 128) &&
(getTarget().hasFeature("lsx"))) ||
((getContext().getTypeSize(Ty) == 256) &&
getTarget().hasFeature("lasx"))))
return ABIArgInfo::getDirect();

// Complex types for the *f or *d ABI must be passed directly rather than
// using CoerceAndExpand.
if (IsFixed && Ty->isComplexType() && FRLen && FARsLeft >= 2) {
Expand Down
Loading

0 comments on commit 0e01c72

Please sign in to comment.