[clang] [llvm] [LLVMABI] Add support for SVE types in the LLVM ABI library (PR #221375)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 9 10:57:35 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);
+
+ case BuiltinType::SveCount:
+ return Builder.getSVECountType(getTypeAlign(QT));
+
+ // TODO: __mfp8 has no floating-point semantics of its own, so representing
+ // it needs a decision about how the ABI library should model opaque
+ // floating-point data. As an mfloat8 vector element it is treated as an
+ // 8-bit integer, but that is not right for the scalar type, which is passed
+ // in a floating-point register.
+ case BuiltinType::MFloat8:
----------------
andykaylor wrote:
This just isn't implemented yet. I don't intend to implement everything right now. This patch is only intended to map the SVE types so that I can properly flag them as not handled in https://github.com/llvm/llvm-project/pull/218799
https://github.com/llvm/llvm-project/pull/221375
More information about the cfe-commits
mailing list