[PATCH] D87452: [InstCombine] matchRotate - support (uniform) constant rotation amounts (PR46895)

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 10 06:45:19 PDT 2020


RKSimon created this revision.
RKSimon added reviewers: lebedev.ri, nikic, spatel.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.
RKSimon requested review of this revision.

This patch adds handling of rotation patterns with constant shift amounts.

It required an extension of the bswap/bitreverse collectBitParts helper to peek through calls to funnel shift intrinsics - this may be additionally useful in the future if we discover the need to merge other calls (inner bswap/bitreverse?).

This fixes the easy half of PR46895 - the next bit will be how we want to support non-uniform constant vectors - does PatternMatch have any equivalent of ISD::matchBinaryPredicate ?


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D87452

Files:
  llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
  llvm/lib/Transforms/Utils/Local.cpp
  llvm/test/Transforms/InstCombine/bswap.ll
  llvm/test/Transforms/InstCombine/fsh.ll
  llvm/test/Transforms/InstCombine/or-concat.ll
  llvm/test/Transforms/InstCombine/rotate.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87452.290959.patch
Type: text/x-patch
Size: 12420 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200910/da074ff1/attachment.bin>


More information about the llvm-commits mailing list