[PATCH] D75114: [DAG] MatchRotate - Add funnel shift by immediate support

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 25 06:29:59 PST 2020


RKSimon created this revision.
RKSimon added reviewers: spatel, craig.topper, lebedev.ri, kparzysz.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.

This patch reuses the existing MatchRotate ROTL/ROTR rotation pattern code to also recognize the more general FSHL/FSHR funnel shift patterns when we have constant shift amounts.

We are still missing a couple of funnel shift combines which are causing a couple of regressions (I think shift-combine.ll can be handled by ReduceLoadWidth for instance).

@kparzysz This has exposed what I think is a typo in a hexagon low/high combine pattern, please can you confirm?


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D75114

Files:
  llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  llvm/lib/Target/Hexagon/HexagonPatterns.td
  llvm/test/CodeGen/Hexagon/isel-combine-half.ll
  llvm/test/CodeGen/X86/avg.ll
  llvm/test/CodeGen/X86/avx512vbmi2-funnel-shifts.ll
  llvm/test/CodeGen/X86/avx512vbmi2vl-funnel-shifts.ll
  llvm/test/CodeGen/X86/bitreverse.ll
  llvm/test/CodeGen/X86/const-shift-of-constmasked.ll
  llvm/test/CodeGen/X86/fshr.ll
  llvm/test/CodeGen/X86/known-bits.ll
  llvm/test/CodeGen/X86/pr43820.ll
  llvm/test/CodeGen/X86/sdiv_fix.ll
  llvm/test/CodeGen/X86/sdiv_fix_sat.ll
  llvm/test/CodeGen/X86/shift-combine.ll
  llvm/test/CodeGen/X86/udiv_fix_sat.ll
  llvm/test/CodeGen/X86/x86-64-double-precision-shift-left.ll
  llvm/test/CodeGen/X86/x86-64-double-shifts-Oz-Os-O2.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75114.246436.patch
Type: text/x-patch
Size: 156963 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200225/c8c14daf/attachment-0001.bin>


More information about the llvm-commits mailing list