Improve handling of floating point literals in OpenCL to only use double...
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
Showing
- lib/Sema/SemaChecking.cpp 4 additions, 3 deletionslib/Sema/SemaChecking.cpp
- lib/Sema/SemaExpr.cpp 16 additions, 5 deletionslib/Sema/SemaExpr.cpp
- lib/Sema/SemaType.cpp 1 addition, 2 deletionslib/Sema/SemaType.cpp
- test/CodeGenOpenCL/fpmath.cl 15 additions, 1 deletiontest/CodeGenOpenCL/fpmath.cl
- test/SemaOpenCL/extensions.cl 11 additions, 1 deletiontest/SemaOpenCL/extensions.cl
Loading
Please register or sign in to comment