diff options
author | Owen Anderson <resistor@mac.com> | 2013-05-09 22:27:13 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2013-05-09 22:27:13 +0000 |
commit | 58dcd200b7f0ea01160b6159e0363cc96b1b83d9 (patch) | |
tree | 00da3ebfab570918388b978ff1163604411376d7 /test | |
parent | 2c694171a597a90c1b7c95b8704ff0d010f9ce3c (diff) | |
download | external_llvm-58dcd200b7f0ea01160b6159e0363cc96b1b83d9.zip external_llvm-58dcd200b7f0ea01160b6159e0363cc96b1b83d9.tar.gz external_llvm-58dcd200b7f0ea01160b6159e0363cc96b1b83d9.tar.bz2 |
Teach SelectionDAG to constant fold all-constant FMA nodes the same way that it constant folds FADD, FMUL, etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181555 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGen/X86/fma.ll | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/CodeGen/X86/fma.ll b/test/CodeGen/X86/fma.ll index bd3514c..917eac0 100644 --- a/test/CodeGen/X86/fma.ll +++ b/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 |