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 +} _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits