]> granicus.if.org Git - clang/commit
AMDGPU: Fix target options fp32/64-denormals
authorYaxun Liu <Yaxun.Liu@amd.com>
Tue, 13 Sep 2016 17:37:09 +0000 (17:37 +0000)
committerYaxun Liu <Yaxun.Liu@amd.com>
Tue, 13 Sep 2016 17:37:09 +0000 (17:37 +0000)
commit3c62e64cb2fb5295fabfde89e73e2b689d899732
tree66da7e7bd0712af9b0192b924afc6c8cf796d13e
parent4155a0a223e293b572457c367e1b9ce4c3a35e15
AMDGPU: Fix target options fp32/64-denormals

Fix target options for fp32/64-denormals so that

+fp64-denormals is set if fp64 is supported
-fp32-denormals if fp32 denormals is not supported, or -cl-denorms-are-zero is set
+fp32-denormals if fp32 denormals is supported and -cl-denorms-are-zero is not set

If target feature fp32/64-denormals is explicitly set, they will override default options and options deduced from -cl-denorms-are-zero.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281357 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Basic/Targets.cpp
test/CodeGenOpenCL/denorms-are-zero.cl