[all-commits] [llvm/llvm-project] bd7096: [PowerPC] fma chain break to expose more ILP

Chen Zheng via All-commits all-commits at lists.llvm.org
Sun Jun 14 21:11:02 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: bd7096b977e11293b5a7406c4846ac805197fca5
      https://github.com/llvm/llvm-project/commit/bd7096b977e11293b5a7406c4846ac805197fca5
  Author: Chen Zheng <czhengsz at cn.ibm.com>
  Date:   2020-06-15 (Mon, 15 Jun 2020)

  Changed paths:
    M llvm/include/llvm/CodeGen/MachineCombinerPattern.h
    M llvm/lib/CodeGen/MachineCombiner.cpp
    M llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
    M llvm/lib/Target/PowerPC/PPCInstrInfo.h
    M llvm/test/CodeGen/PowerPC/machine-combiner.ll

  Log Message:
  -----------
  [PowerPC] fma chain break to expose more ILP

This patch tries to reassociate two patterns related to FMA to expose
more ILP on PowerPC.

// Pattern 1:
//   A =  FADD X,  Y          (Leaf)
//   B =  FMA  A,  M21,  M22  (Prev)
//   C =  FMA  B,  M31,  M32  (Root)
// -->
//   A =  FMA  X,  M21,  M22
//   B =  FMA  Y,  M31,  M32
//   C =  FADD A,  B

// Pattern 2:
//   A =  FMA  X,  M11,  M12  (Leaf)
//   B =  FMA  A,  M21,  M22  (Prev)
//   C =  FMA  B,  M31,  M32  (Root)
// -->
//   A =  FMUL M11,  M12
//   B =  FMA  X,  M21,  M22
//   D =  FMA  A,  M31,  M32
//   C =  FADD B,  D

Reviewed By: jsji

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




More information about the All-commits mailing list