[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:44 PDT 2026
================
@@ -318,7 +359,36 @@ const llvm::abi::Type *QualTypeMapper::convertVectorType(const VectorType *VT) {
llvm::ElementCount NumElements = llvm::ElementCount::getFixed(NElems);
llvm::Align VectorAlign = getTypeAlign(VectorQualType);
- return Builder.getVectorType(ElementType, NumElements, VectorAlign);
+ return Builder.getVectorType(ElementType, NumElements, VectorAlign,
+ getABIVectorKind(VT->getVectorKind()));
----------------
madhur13490 wrote:
Worth a comment: a sizeless predicate ends up with an i1 element (line 385 path), but a fixed-length SveFixedLengthPredicate keeps its unsigned char (i8) element here — and both get tagged SVEPredicate. It matches the AST, but anyone keying off the kind will be surprised by the two element types. The FixedLengthSVEVectors test doesn't assert the predicate element, so it's not pinned either
https://github.com/llvm/llvm-project/pull/221375
More information about the cfe-commits
mailing list