aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/negative-sin.ll
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2007-07-02 15:43:20 +0000
committerDan Gohman <gohman@apple.com>2007-07-02 15:43:20 +0000
commit03de31acaea8f549e9a957a0b5231bcbc719df0a (patch)
tree3ac50897266cd3dbe472f64460a2c4a5828b3543 /test/CodeGen/X86/negative-sin.ll
parentff8b732feb4475d376ebb2344ed3445bbc6a1659 (diff)
New test case. DAGCombiner should be able to fold -sin(-x)
in -enable-unsafe-fp-math mode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37841 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/negative-sin.ll')
-rw-r--r--test/CodeGen/X86/negative-sin.ll12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CodeGen/X86/negative-sin.ll b/test/CodeGen/X86/negative-sin.ll
new file mode 100644
index 0000000000..39c62973de
--- /dev/null
+++ b/test/CodeGen/X86/negative-sin.ll
@@ -0,0 +1,12 @@
+; RUN: llvm-as < %s | llc -enable-unsafe-fp-math -march=x86-64 | \
+; RUN: not egrep {addsd|subsd|xor}
+
+declare double @sin(double %f)
+
+define double @foo(double %e)
+{
+ %f = sub double 0.0, %e
+ %g = call double @sin(double %f)
+ %h = sub double 0.0, %g
+ ret double %h
+}