[PATCH] D51496: [InstCombine] narrow vector select with padded condition and extracted result (PR38691)
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 30 10:16:09 PDT 2018
spatel created this revision.
spatel added reviewers: lebedev.ri, craig.topper, efriedma, RKSimon.
Herald added a subscriber: mcrosier.
shuf (sel (shuf NarrowCond, undef, WideMask), X, Y), undef, NarrowMask) -->
sel NarrowCond, (shuf X, undef, NarrowMask), (shuf Y, undef, NarrowMask)
The motivating case from:
https://bugs.llvm.org/show_bug.cgi?id=38691
...is the last regression test. In that case, we're just left with the narrow select.
Note that if we do create new shuffles, they use the existing extraction identity mask, so there's no danger that this transform creates arbitrary shuffles.
This patch is based on trunk, so it doesn't include the potential improvement from the demanded elements change in https://reviews.llvm.org/D51433. If that is reviewed/committed, I can rebase this.
https://reviews.llvm.org/D51496
Files:
lib/Transforms/InstCombine/InstCombineVectorOps.cpp
test/Transforms/InstCombine/shuffle-select-narrow.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51496.163352.patch
Type: text/x-patch
Size: 9380 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180830/a0876f04/attachment.bin>
More information about the llvm-commits
mailing list