[clang] [llvm] [AArch64] Refactor implementation of FP8 types (NFC) (PR #118969)
Momchil Velikov via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 6 10:27:29 PST 2024
================
@@ -12153,8 +12166,15 @@ static QualType DecodeTypeFromStr(const char *&Str, const ASTContext &Context,
RequiresICE, false);
assert(!RequiresICE && "Can't require vector ICE");
- // TODO: No way to make AltiVec vectors in builtins yet.
- Type = Context.getVectorType(ElementType, NumElements, VectorKind::Generic);
+ if (ElementType == Context.MFloat8Ty) {
+ assert((NumElements == 8 || NumElements == 16) &&
+ "Invalid number of elements");
+ Type = NumElements == 8 ? Context.MFloat8x8Ty : Context.MFloat8x16Ty;
----------------
momchil-velikov wrote:
I don't think it'll work because it creates a `VectorType` https://github.com/llvm/llvm-project/blob/4a44e4b192db0bb38d3eb7ff20c767e2c747d745/clang/lib/AST/ASTContext.cpp#L4503
and our FP8 vectors aren't `VectorType`s
https://github.com/llvm/llvm-project/pull/118969
More information about the cfe-commits
mailing list