summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver/clang_f_opts.c
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2012-07-06 00:59:19 +0000
committerLang Hames <lhames@gmail.com>2012-07-06 00:59:19 +0000
commitaa53b936ec70f2b1adeb7ac9a698fa99ff9622bc (patch)
tree013a18364576a887f4310f6e554750e400900db2 /clang/test/Driver/clang_f_opts.c
parentc7ac1bb94cb7530e5087a6272d8aa3fcb6a5faf3 (diff)
downloadbcm5719-llvm-aa53b936ec70f2b1adeb7ac9a698fa99ff9622bc.tar.gz
bcm5719-llvm-aa53b936ec70f2b1adeb7ac9a698fa99ff9622bc.zip
Add -ffp-contract = { fast | on | off } command line option support.
This flag sets the 'fp-contract' mode, which controls the formation of fused floating point operations. Available modes are: - Fast: Form fused operations anywhere. - On: Form fused operations where allowed by FP_CONTRACT. This is the default mode. - Off: Don't form fused operations (in future this may be relaxed to forming fused operations where it can be proved that the result won't be affected). Currently clang doesn't support the FP_CONTRACT pragma, so the 'On' and 'Off' modes are equivalent. llvm-svn: 159794
Diffstat (limited to 'clang/test/Driver/clang_f_opts.c')
-rw-r--r--clang/test/Driver/clang_f_opts.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/Driver/clang_f_opts.c b/clang/test/Driver/clang_f_opts.c
index 4eed4aa06f3..b74b2855014 100644
--- a/clang/test/Driver/clang_f_opts.c
+++ b/clang/test/Driver/clang_f_opts.c
@@ -29,3 +29,9 @@
// RUN: %clang -### -c -Wdeprecated %s 2>&1 | FileCheck -check-prefix=DEPRECATED-OFF-CHECK %s
// DEPRECATED-ON-CHECK: -fdeprecated-macro
// DEPRECATED-OFF-CHECK-NOT: -fdeprecated-macro
+
+// RUN: %clang -### -S -ffp-contract=fast %s 2>&1 | FileCheck -check-prefix=FP-CONTRACT-FAST-CHECK %s
+// RUN: %clang -### -S -ffast-math %s 2>&1 | FileCheck -check-prefix=FP-CONTRACT-FAST-CHECK %s
+// RUN: %clang -### -S -ffp-contract=off %s 2>&1 | FileCheck -check-prefix=FP-CONTRACT-OFF-CHECK %s
+// FP-CONTRACT-FAST-CHECK: -ffp-contract=fast
+// FP-CONTRACT-OFF-CHECK: -ffp-contract=off
OpenPOWER on IntegriCloud