[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:36:17 PST 2024
================
@@ -650,6 +655,8 @@ llvm::Type *CodeGenTypes::ConvertType(QualType T) {
// An ext_vector_type of Bool is really a vector of bits.
llvm::Type *IRElemTy = VT->isExtVectorBoolType()
? llvm::Type::getInt1Ty(getLLVMContext())
+ : VT->getElementType()->isMFloat8Type()
----------------
momchil-velikov wrote:
Yeah, might be worth adding a comment, if it's not obvious.
We need to have a special case for `__mf8` mapping to `<1 x i8>` in these two places (among others), in other words, we're have to break the abstraction a bit _anyway_, thus instead of first constructing a `<1 x i8>` and then extracting the element type, we can simply use `i8` directly.
https://github.com/llvm/llvm-project/pull/118969
More information about the cfe-commits
mailing list