[PATCH] D113192: [DAG] MatchRotate - support rotate-by-constant of illegal types (WIP)

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 4 08:09:26 PDT 2021


RKSimon created this revision.
RKSimon added reviewers: craig.topper, spatel, dmgreen, efriedma.
Herald added subscribers: frasercrmck, ecnelises, luismarques, apazos, sameer.abuasal, pengfei, s.egerton, Jim, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, hiraditya, nemanjai.
RKSimon requested review of this revision.
Herald added a subscriber: MaskRay.
Herald added a project: LLVM.

This is a WIP patch to fix some of the regressions in D77804 <https://reviews.llvm.org/D77804>.

By folding to rotate/funnel-shift by constant amounts for illegal types, we prevent SimplifyDemandedBits from destroying the patterns prematurely, allowing us to use the rotate/funnel-shift legalization that was added in D112443 <https://reviews.llvm.org/D112443>.

The regressions are pretty obvious, and tend to be due to missed generalizations in target shift lowering - I'm currently working on them one-by-one.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D113192

Files:
  llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  llvm/test/CodeGen/ARM/rotate.ll
  llvm/test/CodeGen/PowerPC/vector-rotates.ll
  llvm/test/CodeGen/RISCV/rv32zbp.ll
  llvm/test/CodeGen/RISCV/rv64zbp.ll
  llvm/test/CodeGen/RISCV/srem-seteq-illegal-types.ll
  llvm/test/CodeGen/X86/rotate-extract-vector.ll
  llvm/test/CodeGen/X86/rotate-extract.ll
  llvm/test/CodeGen/X86/rotate.ll
  llvm/test/CodeGen/X86/rotate2.ll
  llvm/test/CodeGen/X86/vector-rotate-128.ll
  llvm/test/CodeGen/X86/vector-rotate-256.ll
  llvm/test/CodeGen/X86/vector-rotate-512.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113192.384757.patch
Type: text/x-patch
Size: 63378 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211104/3967aba4/attachment.bin>


More information about the llvm-commits mailing list