summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2012-04-16 17:24:31 +0000
committerDuncan Sands <baldrick@free.fr>2012-04-16 17:24:31 +0000
commit10e675d4824710426ab894336cfb659742c94d08 (patch)
tree933a61b2bc5ea2101169d630f48aa95cdd94b36f /test
parent7ac715fd3118362f14574c312b044d22e3afeee9 (diff)
Generate fpmath metadata when -ffast-math. Note that no optimizations are hooked
up to this yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154835 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/2012-04-16-FastMath.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/CodeGen/2012-04-16-FastMath.c b/test/CodeGen/2012-04-16-FastMath.c
new file mode 100644
index 0000000000..d7c3d9a2d6
--- /dev/null
+++ b/test/CodeGen/2012-04-16-FastMath.c
@@ -0,0 +1,8 @@
+// RUN: %clang_cc1 %s -ffast-math -emit-llvm -o - | FileCheck %s
+
+double add(double x, double y) {
+// CHECK: @add
+ return x + y;
+// CHECK: fadd double %{{.}}, %{{.}}, !fpmath !0
+}
+// CHECK: !0 = metadata !{metadata !"fast"}