[CostModel][X86] SK_ExtractSubvector costs must only be tested for vector types (PR39615)

llvm-svn: 346589
This commit is contained in:
Simon Pilgrim 2018-11-10 17:37:52 +00:00
parent 9b8c102675
commit d3ca710ec9
1 changed files with 1 additions and 1 deletions

View File

@ -874,7 +874,7 @@ int X86TTIImpl::getShuffleCost(TTI::ShuffleKind Kind, Type *Tp, int Index,
// Subvector extractions are free if they start at beginning of the
// vector.
if (Kind == TTI::SK_ExtractSubvector &&
if (Kind == TTI::SK_ExtractSubvector && LT.second.isVector() &&
((Index % LT.second.getVectorNumElements()) == 0))
return 0;