summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2013-05-09 22:27:13 +0000
committerOwen Anderson <resistor@mac.com>2013-05-09 22:27:13 +0000
commit32baf99b1d46570b6e34b2c1092e43abd845ef7a (patch)
treec29bd6dc1fa49373ff7f60c6bc2014cc5fe79425 /llvm/test/CodeGen/X86
parent37f25ae3cf7e1bd2fc131b303b2342e67384003b (diff)
downloadbcm5719-llvm-32baf99b1d46570b6e34b2c1092e43abd845ef7a.tar.gz
bcm5719-llvm-32baf99b1d46570b6e34b2c1092e43abd845ef7a.zip
Teach SelectionDAG to constant fold all-constant FMA nodes the same way that it constant folds FADD, FMUL, etc.
llvm-svn: 181555
Diffstat (limited to 'llvm/test/CodeGen/X86')
-rw-r--r--llvm/test/CodeGen/X86/fma.ll8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/fma.ll b/llvm/test/CodeGen/X86/fma.ll
index bd3514cc3f7..917eac0ca32 100644
--- a/llvm/test/CodeGen/X86/fma.ll
+++ b/llvm/test/CodeGen/X86/fma.ll
@@ -34,6 +34,14 @@ entry:
ret x86_fp80 %call
}
+; CHECK: test_f32_cst
+; CHECK-NOT: fma
+define float @test_f32_cst() nounwind readnone ssp {
+entry:
+ %call = tail call float @llvm.fma.f32(float 3.0, float 3.0, float 3.0) nounwind readnone
+ ret float %call
+}
+
declare float @llvm.fma.f32(float, float, float) nounwind readnone
declare double @llvm.fma.f64(double, double, double) nounwind readnone
declare x86_fp80 @llvm.fma.f80(x86_fp80, x86_fp80, x86_fp80) nounwind readnone
OpenPOWER on IntegriCloud