From 2d7427fbfa54d54639722da547f060f6ff3f701d Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Tue, 19 Aug 2014 10:14:45 -0700 Subject: [PATCH] Driver: Implement -cl-denorms-are-zero This is currently a no-op, which is allowed by the OpenCL specification. --- include/clang/Driver/CC1Options.td | 2 ++ test/CodeGenOpenCL/denorms-are-zero.cl | 5 +++++ 2 files changed, 7 insertions(+) create mode 100644 test/CodeGenOpenCL/denorms-are-zero.cl diff --git a/include/clang/Driver/CC1Options.td b/include/clang/Driver/CC1Options.td index 6e0c7b2..1747888 100644 --- a/include/clang/Driver/CC1Options.td +++ b/include/clang/Driver/CC1Options.td @@ -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 index 0000000..488004f --- /dev/null +++ b/test/CodeGenOpenCL/denorms-are-zero.cl @@ -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. -- 1.8.3.1