diff options
author | Owen Anderson <resistor@mac.com> | 2012-11-01 02:00:53 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2012-11-01 02:00:53 +0000 |
commit | b351c8d692cd0722d112d568c8f8a47647ac145d (patch) | |
tree | a86f5f398fffd9d0ed0e48c894eb254b82865bd9 /llvm/test/CodeGen/X86/fp-fast.ll | |
parent | 1e5eac6dfee1281d7ba59a073fee1e60792081f8 (diff) | |
download | bcm5719-llvm-b351c8d692cd0722d112d568c8f8a47647ac145d.tar.gz bcm5719-llvm-b351c8d692cd0722d112d568c8f8a47647ac145d.zip |
Add a few more simple fast-math constant propagations and cancellations.
llvm-svn: 167200
Diffstat (limited to 'llvm/test/CodeGen/X86/fp-fast.ll')
-rw-r--r-- | llvm/test/CodeGen/X86/fp-fast.ll | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/fp-fast.ll b/llvm/test/CodeGen/X86/fp-fast.ll index 091f0de9308..192a1273580 100644 --- a/llvm/test/CodeGen/X86/fp-fast.ll +++ b/llvm/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 +} |