[PATCH] D17041: [X86] Don't assume that a shuffle operand is #0: it isn't for VPERMV.

Ahmed Bougacha via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 3 08:58:42 PST 2016


ab marked an inline comment as done.
ab added a comment.

So, I don't think the VPERMV3 case is currently reachable (and boy did I try):

- VPERMV3 is only formed during lowering
- one getTargetShuffleMask caller is XFormVExtractWithShuffleIntoLoad, which operates on extractelt nodes, which are lowered into extractelt (extract_subvector) earlier.
- extract_subvector prevents the BLENDI and INSERTPS combines as well
- 512-bit shuffles are only lowered into VPERMV, VPERMV3, and UNPCK, none of which is unary, so combineX86ShufflesRecursively doesn't fire either
- getShuffleScalarElt and combineShuffles can't be called for VPERMV3, as it's only called for a select few shuffle opcodes.

I might have missed something though, so ideas welcome!

This does expose a couple problems:

- should we delete the VPERMV3 code, and add it back once it can actually fire?
- should we try to run combineShuffle for all of the opcodes?


http://reviews.llvm.org/D17041





More information about the llvm-commits mailing list