[PATCH] [X86][SSE] Generalised unpackl/unpckh shuffle matching

Simon Pilgrim llvm-dev at redking.me.uk
Wed Feb 11 14:20:43 PST 2015


> On 11 Feb 2015, at 21:24, Chandler Carruth <chandlerc at gmail.com> wrote:
> 
> The existing unpck instruction lowering was based on matching explicit shuffle patterns, and missed many alternative shuffle masks (notably commuted masks and duplicate inputs).
> 
> So, the commuted masks really shouldn't happen because we should be canonicalizing the the operand order to ensure we can just check one. We may be missing some tie-break cases in the canonicalization, but I'd much rather attack that than test ever more permutations for unpck patterns.
> 
> For duplicate inputs, we should canonicalize those to single-input shuffles because we usually have better shuffles than unpck for those. Where we don't, I'm fine adding the patterns for the unpck variants directly because it should be very obvious that there is a cost tradeoff here. Using an unpck to lower a single-input shuffle precludes folding a load with the shuffle.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150211/41db9f5a/attachment.html>


More information about the llvm-commits mailing list