Skip to content

Commit 0e01c72

Browse files
authored
[Clang][LoongArch] Do not pass vector arguments via vector registers (#74990)
psABI v2.30 clarifies that vector arguments are passed according to the base ABI by default.
1 parent d8db273 commit 0e01c72

File tree

5 files changed

+13485
-5764
lines changed

5 files changed

+13485
-5764
lines changed

clang/lib/CodeGen/Targets/LoongArch.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -324,13 +324,6 @@ ABIArgInfo LoongArchABIInfo::classifyArgumentType(QualType Ty, bool IsFixed,
324324
return ABIArgInfo::getDirect();
325325
}
326326

327-
// Pass 128-bit/256-bit vector values via vector registers directly.
328-
if (Ty->isVectorType() && (((getContext().getTypeSize(Ty) == 128) &&
329-
(getTarget().hasFeature("lsx"))) ||
330-
((getContext().getTypeSize(Ty) == 256) &&
331-
getTarget().hasFeature("lasx"))))
332-
return ABIArgInfo::getDirect();
333-
334327
// Complex types for the *f or *d ABI must be passed directly rather than
335328
// using CoerceAndExpand.
336329
if (IsFixed && Ty->isComplexType() && FRLen && FARsLeft >= 2) {

0 commit comments

Comments
 (0)