[clang] [llvm] [LLVMABI] Add support for SVE types in the LLVM ABI library (PR #221375)
Madhur Amilkanthwar via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 9 00:28:45 PDT 2026
================
@@ -242,11 +267,27 @@ QualTypeMapper::convertBuiltinType(const BuiltinType *BT) {
case BuiltinType::ObjCSel:
return createPointerTypeForPointee(QT);
- // Target-specific vector/matrix types — not yet implemented.
-#define SVE_TYPE(Name, Id, SingletonId) case BuiltinType::Id:
+ // AArch64 SVE data and predicate types, including the x2/x3/x4 tuples.
+#define SVE_VECTOR_TYPE(Name, MangledName, Id, SingletonId) \
+ case BuiltinType::Id:
+#define SVE_PREDICATE_TYPE(Name, MangledName, Id, SingletonId) \
+ case BuiltinType::Id:
#include "clang/Basic/AArch64ACLETypes.def"
+ return convertSVEBuiltinType(BT);
----------------
madhur13490 wrote:
This is where my main concern enters, not with the mapping but with what it enables. Before this, any SVE type hard-errored right here, so computeABIInfoUsingLib never got further. Now the type maps cleanly and flows into the AArch64 target's vector path, which is still reportNYI + getDirect() — and since that's only a warning, the wrong classification is used. For SVE tuples under register exhaustion that means we return Direct where AAPCS64 C.8 / the classic path return Indirect, and the debug oracle in CGCall.cpp aborts (repro in the top-level comment). Can we gate SVE out of shouldUseLLVMABILowering, or implement the indirect path, before enabling the mapping
https://github.com/llvm/llvm-project/pull/221375
More information about the cfe-commits
mailing list