[DAGCombine] GetNegatedExpression - add FMA\FMAD support
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 23 Aug 2019 10:49:46 +0000 (10:49 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 23 Aug 2019 10:49:46 +0000 (10:49 +0000)
commit04906ef1f2f443a2ff31a919dc67576f593ad891
tree203a19c5306e052489b40298ff80da036c3ed5b2
parenteac23862a85f9bb52213afbc02b3b5b2803ce0cb
[DAGCombine] GetNegatedExpression - add FMA\FMAD support

If the accumulator and either of the multiply operands are negatable then we can we negate the entire expression.

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

llvm-svn: 369746
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/X86/fma-fneg-combine-2.ll