]> granicus.if.org Git - clang/commit
Improve handling of floating point literals in OpenCL to only use double precision...
authorNeil Hickey <neil.hickey@arm.com>
Tue, 13 Dec 2016 16:22:50 +0000 (16:22 +0000)
committerNeil Hickey <neil.hickey@arm.com>
Tue, 13 Dec 2016 16:22:50 +0000 (16:22 +0000)
commiteedac07b8aabca1549b3ffdc8aabb3930da2c22c
tree75664c0152f99aed56a2afefabfee514785b15cd
parent3924dfd7cf94e9d57f9bbb64b1ca34d0fafeac1a
Improve handling of floating point literals in OpenCL to only use double precision if the target supports fp64.

This change makes sure single-precision floating point types are used if the
cl_fp64 extension is not supported by the target.

Also removed the check to see whether the OpenCL version is >= 1.2, as this has
been incorporated into the extension setting code.

Differential Revision: https://reviews.llvm.org/D24235

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289544 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaChecking.cpp
lib/Sema/SemaExpr.cpp
lib/Sema/SemaType.cpp
test/CodeGenOpenCL/fpmath.cl
test/SemaOpenCL/extensions.cl