[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)
commit18a1f0818b659cee13865b4fad2648d85984a4ed
tree95f558a6c7cf821acdd94f31dc5c0220ef1f8700
parent8886d0134eac27d9f4116bc39c7c4696321b9007
[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

llvm-svn: 371518
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
llvm/test/Transforms/InstCombine/fma.ll