[llvm-commits] [llvm] r37841 - /llvm/trunk/test/CodeGen/X86/negative-sin.ll

Dan Gohman djg at cray.com
Mon Jul 2 08:43:21 PDT 2007


Author: djg
Date: Mon Jul  2 10:43:20 2007
New Revision: 37841

URL: http://llvm.org/viewvc/llvm-project?rev=37841&view=rev
Log:
New test case. DAGCombiner should be able to fold -sin(-x)
in -enable-unsafe-fp-math mode.

Added:
    llvm/trunk/test/CodeGen/X86/negative-sin.ll

Added: llvm/trunk/test/CodeGen/X86/negative-sin.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/negative-sin.ll?rev=37841&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/X86/negative-sin.ll (added)
+++ llvm/trunk/test/CodeGen/X86/negative-sin.ll Mon Jul  2 10:43:20 2007
@@ -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
+}





More information about the llvm-commits mailing list