[clang] [Clang][AArch64] Add fp8 variants for untyped NEON intrinsics (PR #128019)
Paul Walker via cfe-commits
cfe-commits at lists.llvm.org
Wed May 7 05:04:41 PDT 2025
================
@@ -4179,9 +4183,21 @@ Value *CodeGenFunction::EmitSVEMaskedLoad(const CallExpr *E,
unsigned IntrinsicID,
bool IsZExtReturn) {
QualType LangPTy = E->getArg(1)->getType();
- llvm::Type *MemEltTy = CGM.getTypes().ConvertTypeForMem(
+ llvm::Type *MemEltTy = CGM.getTypes().ConvertType(
LangPTy->castAs<PointerType>()->getPointeeType());
+ // Mfloat8 types is stored as a vector, so extra work
+ // to extract sclar element type is necessary.
+ if (MemEltTy->isVectorTy()) {
+ #ifndef NDEBUG
+ auto *VecTy = cast<llvm::VectorType>(MemEltTy);
+ ElementCount EC = VecTy->getElementCount();
+ assert(EC.isScalar() && VecTy->getElementType() == Int8Ty &&
+ "Only <1 x i8> expected");
+ #endif
----------------
paulwalker-arm wrote:
I think `assert(MemEltTy == FixedVectorType::get(Int8Ty, 1) && ....` should work here?
https://github.com/llvm/llvm-project/pull/128019
More information about the cfe-commits
mailing list