]> granicus.if.org Git - clang/commitdiff
Driver: Implement -cl-denorms-are-zero
authorTom Stellard <thomas.stellard@amd.com>
Thu, 21 Aug 2014 13:58:36 +0000 (13:58 +0000)
committerTom Stellard <thomas.stellard@amd.com>
Thu, 21 Aug 2014 13:58:36 +0000 (13:58 +0000)
This is currently a no-op, which is allowed by the OpenCL specification.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@216179 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Driver/CC1Options.td
test/CodeGenOpenCL/denorms-are-zero.cl [new file with mode: 0644]

index a87d7aae5533850ce61b4d7dc61a7d16b65ae05f..837d5d5cf032fa40640f5989c4d18b6b34b0682a 100644 (file)
@@ -574,6 +574,8 @@ def cl_mad_enable : Flag<["-"], "cl-mad-enable">,
   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
diff --git a/test/CodeGenOpenCL/denorms-are-zero.cl b/test/CodeGenOpenCL/denorms-are-zero.cl
new file mode 100644 (file)
index 0000000..488004f
--- /dev/null
@@ -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.