[PATCH] D18138: Add -fnative-half-arguments-and-returns

Pirama Arumuga Nainar via cfe-commits cfe-commits at lists.llvm.org
Fri May 20 13:09:30 PDT 2016

pirama added inline comments.

Comment at: cfe/trunk/lib/CodeGen/TargetInfo.cpp:5109
@@ -5108,3 +5108,3 @@
   // natively, and does not need to interwork with AAPCS code.
-  if (Ty->isHalfType() && !getContext().getLangOpts().OpenCL) {
+  if (Ty->isHalfType() && !getContext().getLangOpts().NativeHalfArgsAndReturns) {
     llvm::Type *ResType = IsEffectivelyAAPCS_VFP ?
Anastasia wrote:
> Even though this change seems to be fine for OpenCL, I don't understand the reason for it entirely.
This commit adds a generic option to skip the promotion of half types to float or int32.  RenderScript also handles half natively.  A new option makes this skip more general than langugage-specific.



More information about the cfe-commits mailing list