[PATCH] D78271: [TLI][PowerPC] Introduce TLI query to check if MULH is cheaper than MUL + SHIFT

Amy Kwan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 5 18:22:15 PDT 2020


amyk marked an inline comment as done.
amyk added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/TargetLowering.h:1662
+  /// a multiply followed by a shift. This is false by default.
+  virtual bool isMulhCheaperThanMulShift(EVT Type) const { return false; }
+
----------------
RKSimon wrote:
> If we add X86/SSE support we might need a IsSigned flag but unless PPC have a use case right now I don't think this needs to be added yet.
Thanks for having a look.  The current use case is that the transformation in https://reviews.llvm.org/D78272 actually relies on this patch.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78271/new/

https://reviews.llvm.org/D78271





More information about the llvm-commits mailing list