summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2012-11-01 02:00:53 +0000
committerOwen Anderson <resistor@mac.com>2012-11-01 02:00:53 +0000
commit607ebde651f18d68e45724c6e3b3544d4786879f (patch)
tree7ab6e55edc0f913be008ea829f7507b2fe8aacf6 /test
parent21caa9ef03e3f2d4e860c8fc3cd53015c42934bf (diff)
downloadllvm-607ebde651f18d68e45724c6e3b3544d4786879f.tar.gz
llvm-607ebde651f18d68e45724c6e3b3544d4786879f.tar.bz2
llvm-607ebde651f18d68e45724c6e3b3544d4786879f.tar.xz
Add a few more simple fast-math constant propagations and cancellations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167200 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/X86/fp-fast.ll20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/CodeGen/X86/fp-fast.ll b/test/CodeGen/X86/fp-fast.ll
index 091f0de930..192a127358 100644
--- a/test/CodeGen/X86/fp-fast.ll
+++ b/test/CodeGen/X86/fp-fast.ll
@@ -35,3 +35,23 @@ define float @test3(float %a) {
ret float %r
}
+; CHECK: test4
+define float @test4(float %a) {
+; CHECK-NOT: fma
+; CHECK-NOT mul
+; CHECK-NOT: add
+; CHECK: ret
+ %t1 = fmul float %a, 0.0
+ %t2 = fadd float %a, %t1
+ ret float %t2
+}
+
+; CHECK: test5
+define float @test5(float %a) {
+; CHECK-NOT: add
+; CHECK: vxorps
+; CHECK: ret
+ %t1 = fsub float -0.0, %a
+ %t2 = fadd float %a, %t1
+ ret float %t2
+}