[PATCH] D78371: [VectorCombine] transform bitcasted shuffle to wider elements

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 17 08:05:22 PDT 2020


spatel created this revision.
spatel added reviewers: lebedev.ri, RKSimon, efriedma.
Herald added subscribers: hiraditya, mcrosier.
Herald added a reviewer: ctetreau.
spatel updated this revision to Diff 258326.
spatel added a comment.

Patch updated:
Forgot to update the uses of "getNumElements()".


bitcast (shuf V, MaskC) --> shuf (bitcast V), MaskC'

This is the widen shuffle elements enhancement to D76727 <https://reviews.llvm.org/D76727>. It builds on the analysis and simplifications in D77881 <https://reviews.llvm.org/D77881> and rG6a7e958a423e <https://reviews.llvm.org/rG6a7e958a423ed1d33b42cfb10563a46ccc07f44d>.

The phase ordering tests show that we can simplify inverse shuffles across a binop in both directions (widen/narrow or narrow/widen) now.

There's another potential transform visible in some of the remaining TODOs - move a bitcasted operand of a shuffle after the shuffle.


https://reviews.llvm.org/D78371

Files:
  llvm/lib/Transforms/Vectorize/VectorCombine.cpp
  llvm/test/Transforms/PhaseOrdering/X86/shuffle.ll
  llvm/test/Transforms/VectorCombine/X86/shuffle.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78371.258326.patch
Type: text/x-patch
Size: 13034 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200417/3c617447/attachment-0001.bin>


More information about the llvm-commits mailing list