[PATCH] D48485: [InstCombine] allow shl+mul combos with shuffle (select) fold (PR37806)

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 27 10:21:39 PDT 2018


spatel updated this revision to Diff 153116.
spatel marked an inline comment as done.
spatel added a comment.

Patch updated:
This is just the readability improvement suggested by Roman - make it clear that the opcodes are the same when we do the transform.

The implementation could be substantially different to handle other opcodes. For example, we'll need to call value tracking to determine when 'or' can become 'add'.

Not sure how far we'll go in that direction, but I'll post a proposal that includes the add/or case as a separate patch, and we can decide if we want to build it up in pieces or add the generalization to allow more folds first.


https://reviews.llvm.org/D48485

Files:
  lib/Transforms/InstCombine/InstCombineVectorOps.cpp
  test/Transforms/InstCombine/shuffle_select.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48485.153116.patch
Type: text/x-patch
Size: 5141 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180627/8d23cd9d/attachment.bin>


More information about the llvm-commits mailing list