[PATCH] D24235: [OpenCL] Improve double literal handling

Neil Hickey via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 20 02:18:48 PDT 2016


neil.hickey added inline comments.

================
Comment at: lib/Sema/SemaExpr.cpp:3431
@@ -3410,1 +3430,3 @@
+                        .getSupportedOpenCLOpts()
+                        .cl_khr_fp64) ||
                    getOpenCLOptions().cl_khr_fp64)) {
----------------
yaxunl wrote:
> This check 
>   (getLangOpts().OpenCLVersion >= 120 &&
>                     Context.getTargetInfo()
>                         .getSupportedOpenCLOpts()
>                         .cl_khr_fp64)
> 
> is redundant since for CL 1.2 and above getOpenCLOptions().cl_khr_fp64 is set to be true by default.
This is get**Supported**OpenCLOpts(). Some hardware may not support doubles


https://reviews.llvm.org/D24235





More information about the cfe-commits mailing list