Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Commit acd225a

Browse files
committed
[CostModel][X86] SK_ExtractSubvector costs must only be tested for vector types (PR39615)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346589 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 2f9bd23 commit acd225a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Target/X86/X86TargetTransformInfo.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,7 @@ int X86TTIImpl::getShuffleCost(TTI::ShuffleKind Kind, Type *Tp, int Index,
874874

875875
// Subvector extractions are free if they start at beginning of the
876876
// vector.
877-
if (Kind == TTI::SK_ExtractSubvector &&
877+
if (Kind == TTI::SK_ExtractSubvector && LT.second.isVector() &&
878878
((Index % LT.second.getVectorNumElements()) == 0))
879879
return 0;
880880

0 commit comments

Comments
 (0)