Revert "Handle __fp16 natively if HalfArgsAndReturns langopt is set"
This reverts commit ba8a5652592440418dad2c5be62710b994c7fe11.
(cherry picked from commit 65ebe08e20e1e45557f00c6382743b3ea4792529)
Change-Id: Id793081c984af69c6b671ab30c94c3d11a55f684
diff --git a/lib/CodeGen/TargetInfo.cpp b/lib/CodeGen/TargetInfo.cpp
index 9457b68..86adde4 100644
--- a/lib/CodeGen/TargetInfo.cpp
+++ b/lib/CodeGen/TargetInfo.cpp
@@ -5001,7 +5001,7 @@
// __fp16 gets 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->isHalfType() && !getContext().getLangOpts().HalfArgsAndReturns) {
+ if (Ty->isHalfType() && !getContext().getLangOpts().OpenCL) {
llvm::Type *ResType = IsEffectivelyAAPCS_VFP ?
llvm::Type::getFloatTy(getVMContext()) :
llvm::Type::getInt32Ty(getVMContext());
@@ -5197,7 +5197,7 @@
// __fp16 gets 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->isHalfType() && !getContext().getLangOpts().HalfArgsAndReturns) {
+ if (RetTy->isHalfType() && !getContext().getLangOpts().OpenCL) {
llvm::Type *ResType = IsEffectivelyAAPCS_VFP ?
llvm::Type::getFloatTy(getVMContext()) :
llvm::Type::getInt32Ty(getVMContext());