]> granicus.if.org Git - llvm/commit
[InstCombine] Use SimplifyFMulInst to simplify multiply in fma.
authorFlorian Hahn <flo@fhahn.com>
Tue, 10 Sep 2019 13:10:28 +0000 (13:10 +0000)
committerFlorian Hahn <flo@fhahn.com>
Tue, 10 Sep 2019 13:10:28 +0000 (13:10 +0000)
commit06cb385e04b8d2fae30353a0ec4474fe43b0a46b
treeb744f99a39bc62ead644f0bf7e618d8464f037e7
parent36f2c034a9b08b2dbd51357f899fd540c2e2ecc0
[InstCombine] Use SimplifyFMulInst to simplify multiply in fma.

This allows us to fold fma's that multiply with 0.0. Also, the
multiply by 1.0 case is handled there as well. The fneg/fabs cases
are not handled by SimplifyFMulInst, so we need to keep them.

Reviewers: spatel, anemet, lebedev.ri

Reviewed By: spatel

Differential Revision: https://reviews.llvm.org/D67351

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371518 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineCalls.cpp
test/Transforms/InstCombine/fma.ll