r216179 - Driver: Implement -cl-denorms-are-zero
Tom Stellard
thomas.stellard at amd.com
Thu Aug 21 06:58:36 PDT 2014
Author: tstellar
Date: Thu Aug 21 08:58:36 2014
New Revision: 216179
URL: http://llvm.org/viewvc/llvm-project?rev=216179&view=rev
Log:
Driver: Implement -cl-denorms-are-zero
This is currently a no-op, which is allowed by the OpenCL specification.
Added:
cfe/trunk/test/CodeGenOpenCL/denorms-are-zero.cl
Modified:
cfe/trunk/include/clang/Driver/CC1Options.td
Modified: cfe/trunk/include/clang/Driver/CC1Options.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/CC1Options.td?rev=216179&r1=216178&r2=216179&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/CC1Options.td (original)
+++ cfe/trunk/include/clang/Driver/CC1Options.td Thu Aug 21 08:58:36 2014
@@ -574,6 +574,8 @@ def cl_mad_enable : Flag<["-"], "cl-mad-
HelpText<"OpenCL only. Enable less precise MAD instructions to be generated.">;
def cl_std_EQ : Joined<["-"], "cl-std=">,
HelpText<"OpenCL language standard to compile for">;
+def cl_denorms_are_zero : Flag<["-"], "cl-denorms-are-zero">,
+ HelpText<"OpenCL only. Allow denormals to be flushed to zero">;
//===----------------------------------------------------------------------===//
// CUDA Options
Added: cfe/trunk/test/CodeGenOpenCL/denorms-are-zero.cl
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenOpenCL/denorms-are-zero.cl?rev=216179&view=auto
==============================================================================
--- cfe/trunk/test/CodeGenOpenCL/denorms-are-zero.cl (added)
+++ cfe/trunk/test/CodeGenOpenCL/denorms-are-zero.cl Thu Aug 21 08:58:36 2014
@@ -0,0 +1,5 @@
+// RUN: %clang_cc1 -S -cl-denorms-are-zero -o - %s 2>&1
+
+// This test just checks that the -cl-denorms-are-zero argument is accepted
+// by clang. This option is currently a no-op, which is allowed by the
+// OpenCL specification.
More information about the cfe-commits
mailing list