================
@@ -127,13 +145,59 @@ ArgInfo AArch64TargetInfo::classifyArgumentType(
   }
 
   reportNYI("Aggregate argument type handling");
-  return ArgInfo::getDirect();
+  return ArgInfo::getIgnore();
 }
 
 bool AArch64TargetInfo::passAsAggregateType(const Type *Ty) const {
   // TODO: Handle SVE types. For now, they don't get through the type mapper.
   return isAggregateTypeForABI(Ty);
 }
 
+bool AArch64TargetInfo::isHomogeneousAggregateBaseType(const Type *Ty) const {
+  // Soft-float ABI: no types are homogeneous aggregates.
+  if (isSoftFloat())
+    return false;
+
+  // Homogeneous aggregates for AAPCS64 must have base types of a floating
+  // point type or a short-vector type.
+  if (Ty->isFloat())
+    return true;
+
+  if (const auto *VT = dyn_cast<VectorType>(Ty)) {
+    if (VT->isScalable())
----------------
madhur13490 wrote:

Should this check the vector flavor rather than only scalability?
Fixed-length `arm_sve_vector_bits` vectors have `VectorKind::SVEData` or
`VectorKind::SVEPredicate`, but a fixed `ElementCount`, so
`VT->isScalable()` is false. Clang explicitly rejects these kinds as
homogeneous-aggregate base types at
`clang/lib/CodeGen/Targets/AArch64.cpp:691-694`.

Although fixed-length SVE is opt-in, this path is reachable with SVE and
`-fexperimental-abi-lowering`, where it disagrees with Clang's parity
check. Could this reject the SVE vector kinds and add a parity test?

https://github.com/llvm/llvm-project/pull/218799
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to