[all-commits] [llvm/llvm-project] d57719: [DAGCombine] Respect the uses when combine FMA for...

QingShan Zhang via All-commits all-commits at lists.llvm.org
Tue Mar 17 20:36:23 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: d577193c0f74104d322e4268279750bb6efccf8e
      https://github.com/llvm/llvm-project/commit/d577193c0f74104d322e4268279750bb6efccf8e
  Author: QingShan Zhang <qshanz at cn.ibm.com>
  Date:   2020-03-18 (Wed, 18 Mar 2020)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    M llvm/test/CodeGen/PowerPC/fma-precision.ll
    M llvm/test/CodeGen/PowerPC/recipest.ll

  Log Message:
  -----------
  [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




More information about the All-commits mailing list