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

Simon Pilgrim llvm-dev at redking.me.uk
Wed Feb 18 14:17:04 PST 2015


I agree that adding multiple shuffle pattern matches for the same instruction is a waste.

If we take the shuffle <-1, 0, 5, 1> as an example (2 V1, 1 V2) - lowerVectorShuffle won't to commute this as there are already more V1 inputs than V2, and won't commute to ensure V1 elements are earlier in the shuffle than V2 either, and it is this that is necessary to ensure that the unpcks correctly match.

Altering isShuffleMaskEquivalent to support commutation looks relatively straightforward (as would supporting duplicate inputs - but that is probably unecessary) - would you like me to prepare a patch?


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D7564

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list