[llvm-dev] ShuffleKind SK_ExtractSubvector

Jonas Paulsson via llvm-dev llvm-dev at lists.llvm.org
Wed Feb 8 06:35:57 PST 2017


I am a little unsure about the semantics of the ShuffleKind 
SK_ExtractSubvector. It seems a subvector is to be extracted, starting 
from a given index of a given subtype.

First of all, if index 0 is passed, I suppose this would mean a noop?

But what about calls like the one made of LoopVectorizer for 
Instruction::PHI in getInstructionCost():

return TTI.getShuffleCost(TargetTransformInfo::SK_ExtractSubvector,
                          VectorTy, VF - 1, VectorTy);

Here the highest index is passed, which doesn't make sense to me. Nor 
does it make sense to pass the the same VectorTy in both parameters.

In BBVectorize, start index 0 is passed in one place, but then in 
another place start index of 'VF' is passed, which should even be 
outside possible indexes, or?

I guess this is confusing since there are those extra parameters and 
everything, but in the end it seems to me there is no code anywhere 
checking this particular ShuffleKind, or?


More information about the llvm-dev mailing list