================
@@ -83,6 +83,13 @@ ABIArgInfo SparcV8ABIInfo::classifyArgumentType(QualType Ty)
const {
if (const auto *CT = Ty->getAs<ComplexType>())
return classifyComplexType(CT, /*IsRet=*/false);
+ // Pass floating-point vectors and vectors larger than 64 bits by reference.
+ if (const auto *VT = Ty->getAs<VectorType>()) {
+ uint64_t SizeInBits = getContext().getTypeSize(Ty);
+ if (VT->getElementType()->isRealFloatingType() || SizeInBits > 64)
+ return getNaturalAlignIndirect(Ty, getDataLayout().getAllocaAddrSpace());
+ }
+
----------------
folkertdev wrote:
This matches (my understanding of) the GCC code exactly
https://github.com/gcc-mirror/gcc/blob/549ec717abb79c26186af06e01c937b4613c79ba/gcc/config/sparc/sparc.cc#L6755-L6765
https://github.com/llvm/llvm-project/pull/222254
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits