diff options
| author | Dan Gohman <gohman@apple.com> | 2007-07-02 15:43:20 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2007-07-02 15:43:20 +0000 |
| commit | 11a4008a5923a37428daffd9412694d6f17fc5f0 (patch) | |
| tree | 7e1a95a42f05694648b8b894eb354856d7512273 /llvm | |
| parent | 32c3c19bedb531a037f1f19a449ed9fa928fd49c (diff) | |
| download | bcm5719-llvm-11a4008a5923a37428daffd9412694d6f17fc5f0.tar.gz bcm5719-llvm-11a4008a5923a37428daffd9412694d6f17fc5f0.zip | |
New test case. DAGCombiner should be able to fold -sin(-x)
in -enable-unsafe-fp-math mode.
llvm-svn: 37841
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/test/CodeGen/X86/negative-sin.ll | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/negative-sin.ll b/llvm/test/CodeGen/X86/negative-sin.ll new file mode 100644 index 00000000000..39c62973def --- /dev/null +++ b/llvm/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 +} |

