[clang] [Clang][AArch64] Add fp8 variants for untyped NEON intrinsics (PR #128019)
Momchil Velikov via cfe-commits
cfe-commits at lists.llvm.org
Thu May 8 02:15:43 PDT 2025
================
@@ -5464,6 +5464,15 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo,
Builder.CreateStore(errorValue, swiftErrorTemp);
}
+ // Mfloat8 type is loaded as scalar type, but is treated as single
+ // vector type for other operations. We need to bitcast it to the vector
+ // type here.
+ if (auto *EltTy =
----------------
momchil-velikov wrote:
> Does the ABI say this?
It doesn't. Unfortunately this discussion was split and I didn't replicate all my comments here.
> Momchil Velikov 15 Apr at 16:11
> The ABI spec (naturally) does not say anything about <1 x i8> . It says (in a somewhat obscure way) that the value > is passed in a FPR.
> And then clang/llvm decide to implement the ABI by mapping to <1 x T>.
I consider the "natural" mapping of `__mfp8` to LLVM types to be `i8` and `<1 x i8>` to be merely a hack coming from the peculiar way of implementing ABIs in clang/llvm (by implicit contracts and "mutual understading"). As such `<1 x i8>` out to be applicable only for values that are arguments passed in registers.
https://github.com/llvm/llvm-project/pull/128019
More information about the cfe-commits
mailing list