[PATCH] D70042: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (4)

Joan LLuch via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 9 02:47:54 PST 2019


joanlluch created this revision.
joanlluch added reviewers: asl, spatel.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.

Replaces

  unsigned getShiftAmountThreshold(EVT VT)

by

  bool shouldAvoidTransformToShift(EVT VT, unsigned amount)

thus giving more flexibility for targets to decide whether particular shift amounts must be considered expensive or not.

Updates the MSP430 target with a custom implementation.

This continues  D69116 <https://reviews.llvm.org/D69116>, D69120 <https://reviews.llvm.org/D69120>, D69326 <https://reviews.llvm.org/D69326> and updates them, so all of them must be committed before this.

The same tests apply, so no additional ones are proposed here.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D70042

Files:
  llvm/include/llvm/CodeGen/TargetLowering.h
  llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
  llvm/lib/Target/MSP430/MSP430ISelLowering.cpp
  llvm/lib/Target/MSP430/MSP430ISelLowering.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70042.228566.patch
Type: text/x-patch
Size: 6629 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191109/b5f0f24b/attachment.bin>


More information about the llvm-commits mailing list