[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)
Jonas Paulsson via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 17 11:16:19 PST 2025
================
@@ -179,20 +179,31 @@ bool SystemZABIInfo::isVectorArgumentType(QualType Ty) const {
getContext().getTypeSize(Ty) <= 128);
}
-bool SystemZABIInfo::isFPArgumentType(QualType Ty) const {
+// The Size argument will in case of af an overaligned single element struct
+// reflect the overalignment value. In such a case the argument will be
+// passed using the type matching Size.
+llvm::Type *SystemZABIInfo::getFPArgumentType(QualType Ty,
+ uint64_t Size) const {
if (IsSoftFloatABI)
- return false;
+ return nullptr;
if (const BuiltinType *BT = Ty->getAs<BuiltinType>())
switch (BT->getKind()) {
+ case BuiltinType::Float16:
+ if (Size == 16)
----------------
JonPsson1 wrote:
As I wrote earlier, in cases of a single element struct containing e.g. a _Float16 aligned to 8 bytes, the argument will be passed as a Double. At this point, the Size reflects this situation. I guess that's why the code looked like it did before.
https://github.com/llvm/llvm-project/pull/109164
More information about the llvm-commits
mailing list