aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/TargetInfo.cpp
diff options
context:
space:
mode:
authorTies Stuij <ties.stuij@arm.com>2020-06-16 17:45:57 +0100
committerTies Stuij <ties.stuij@arm.com>2020-06-18 18:26:01 +0100
commit035795659b604246b873f659f8feed8084898247 (patch)
treeb418f26e1590e0574d5023fbc667ce8404bfb52c /clang/lib/CodeGen/TargetInfo.cpp
parent437cbad3b35c7cf0f49d2bcea05555a521651113 (diff)
downloadllvm-035795659b604246b873f659f8feed8084898247.zip
llvm-035795659b604246b873f659f8feed8084898247.tar.gz
llvm-035795659b604246b873f659f8feed8084898247.tar.bz2
[ARM][bfloat] Do not coerce bfloat arguments and returns to integers
Summary: As part of moving the argument lowering handling for bfloat 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. Subscribers: kristof.beyls, danielkiss, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D81837
Diffstat (limited to 'clang/lib/CodeGen/TargetInfo.cpp')
-rw-r--r--clang/lib/CodeGen/TargetInfo.cpp16
1 files changed, 0 insertions, 16 deletions
diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp
index 44be42aa..9710e67 100644
--- a/clang/lib/CodeGen/TargetInfo.cpp
+++ b/clang/lib/CodeGen/TargetInfo.cpp
@@ -6265,13 +6265,6 @@ ABIArgInfo ARMABIInfo::classifyArgumentType(QualType Ty, bool isVariadic,
if (isIllegalVectorType(Ty))
return coerceIllegalVector(Ty);
- // __bf16 gets passed using the bfloat IR type, or using i32 but
- // with the top 16 bits unspecified.
- if (Ty->isBFloat16Type() && IsFloatABISoftFP) {
- llvm::Type *ResType = llvm::Type::getInt32Ty(getVMContext());
- return ABIArgInfo::getDirect(ResType);
- }
-
if (!isAggregateTypeForABI(Ty)) {
// Treat an enum type as its underlying type.
if (const EnumType *EnumTy = Ty->getAs<EnumType>()) {
@@ -6475,15 +6468,6 @@ ABIArgInfo ARMABIInfo::classifyReturnType(QualType RetTy, bool isVariadic,
return coerceIllegalVector(RetTy);
}
- // 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()) {
- llvm::Type *ResType = IsAAPCS_VFP ?
- llvm::Type::getBFloatTy(getVMContext()) :
- llvm::Type::getInt32Ty(getVMContext());
- return ABIArgInfo::getDirect(ResType);
- }
-
if (!isAggregateTypeForABI(RetTy)) {
// Treat an enum type as its underlying type.
if (const EnumType *EnumTy = RetTy->getAs<EnumType>())