aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/TargetInfo.cpp
diff options
context:
space:
mode:
authorLucas Prates <lucas.prates@arm.com>2020-06-09 09:52:01 +0100
committerLucas Prates <lucas.prates@arm.com>2020-06-18 13:17:07 +0100
commitada4c9dc4a63160b6b3cfd5965884c6cce2a405c (patch)
tree7bdfa509850df96804dab0f2b05cab5158260046 /clang/lib/CodeGen/TargetInfo.cpp
parent92ad6d57c21824ddb4bca2d01734c5d2c391b5b5 (diff)
downloadllvm-ada4c9dc4a63160b6b3cfd5965884c6cce2a405c.zip
llvm-ada4c9dc4a63160b6b3cfd5965884c6cce2a405c.tar.gz
llvm-ada4c9dc4a63160b6b3cfd5965884c6cce2a405c.tar.bz2
[ARM][Clang] Removing lowering of half-precision FP arguments and returns from Clang's CodeGen
Summary: On the process of moving the argument lowering handling for half-precision floating point arguments and returns to the backend, this patch removes the code that was responsible for handling the coercion of those arguments in Clang's Codegen. Reviewers: rjmccall, chill, ostannard, dnsampaio Reviewed By: ostannard Subscribers: stuij, kristof.beyls, dmgreen, danielkiss, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D81451
Diffstat (limited to 'clang/lib/CodeGen/TargetInfo.cpp')
-rw-r--r--clang/lib/CodeGen/TargetInfo.cpp22
1 files changed, 0 insertions, 22 deletions
diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp
index 564eb09..44be42aa 100644
--- a/clang/lib/CodeGen/TargetInfo.cpp
+++ b/clang/lib/CodeGen/TargetInfo.cpp
@@ -6265,17 +6265,6 @@ ABIArgInfo ARMABIInfo::classifyArgumentType(QualType Ty, bool isVariadic,
if (isIllegalVectorType(Ty))
return coerceIllegalVector(Ty);
- // _Float16 and __fp16 get passed as if it were an int or float, but
- // with the top 16 bits unspecified. This is not done for OpenCL as it handles
- // the half type natively, and does not need to interwork with AAPCS code.
- if ((Ty->isFloat16Type() || Ty->isHalfType()) &&
- !getContext().getLangOpts().NativeHalfArgsAndReturns) {
- llvm::Type *ResType = IsAAPCS_VFP ?
- llvm::Type::getFloatTy(getVMContext()) :
- llvm::Type::getInt32Ty(getVMContext());
- return ABIArgInfo::getDirect(ResType);
- }
-
// __bf16 gets passed using the bfloat IR type, or using i32 but
// with the top 16 bits unspecified.
if (Ty->isBFloat16Type() && IsFloatABISoftFP) {
@@ -6486,17 +6475,6 @@ ABIArgInfo ARMABIInfo::classifyReturnType(QualType RetTy, bool isVariadic,
return coerceIllegalVector(RetTy);
}
- // _Float16 and __fp16 get returned as if it were an int or float, but with
- // the top 16 bits unspecified. This is not done for OpenCL as it handles the
- // half type natively, and does not need to interwork with AAPCS code.
- if ((RetTy->isFloat16Type() || RetTy->isHalfType()) &&
- !getContext().getLangOpts().NativeHalfArgsAndReturns) {
- llvm::Type *ResType = IsAAPCS_VFP ?
- llvm::Type::getFloatTy(getVMContext()) :
- llvm::Type::getInt32Ty(getVMContext());
- return ABIArgInfo::getDirect(ResType);
- }
-
// if we're using the softfp float abi, __bf16 get returned as if it were an
// int but with the top 16 bits unspecified.
if (RetTy->isBFloat16Type()) {