[PATCH] D76844: [InstCombine] try to reduce shuffle with bitcasted operand

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 26 07:01:01 PDT 2020


spatel created this revision.
spatel added reviewers: lebedev.ri, nlopes, regehr, RKSimon.
Herald added subscribers: hiraditya, mcrosier.

shuf (bitcast X), undef, Mask --> bitcast X'

The 'inverse shuffles' test (shuf_bitcast_operand) is a pattern that would emerge in the motivating examples from PR35454:
https://bugs.llvm.org/show_bug.cgi?id=35454
(if we proceed with D76727 <https://reviews.llvm.org/D76727>)

We can deal with this class of patterns in generic instcombine because we are not creating any new shuffles, just a bitcast.

This provides an opportunity to exercise Alive2's vector support:
http://volta.cs.utah.edu:8080/z/mwDUZf


https://reviews.llvm.org/D76844

Files:
  llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
  llvm/test/Transforms/InstCombine/shufflevec-bitcast.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76844.252824.patch
Type: text/x-patch
Size: 6511 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200326/35b239d8/attachment.bin>


More information about the llvm-commits mailing list