HomePhabricator

[DAGCombine] Respect the uses when combine FMA for a*b+/-c*d

Authored by steven.zhang on Tue, Mar 17, 8:34 PM.

Description

[DAGCombine] Respect the uses when combine FMA for a*b+/-c*d

If it is a*b-c*d, it could be also folded into fma(a, b, -c*d) or fma(-c, d, a*b).
This patch is trying to respect the uses of a*b and c*d to make the best choice.

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