================
@@ -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
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to