From: Simon Pilgrim Date: Fri, 9 Nov 2018 18:30:59 +0000 (+0000) Subject: [TTI] Flip vector types in getShuffleCost SK_ExtractSubvector call X-Git-Tag: llvmorg-8.0.0-rc1~4604 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=26e1c887f58efc8e37e7e7b256582719250b668d;p=platform%2Fupstream%2Fllvm.git [TTI] Flip vector types in getShuffleCost SK_ExtractSubvector call For SK_ExtractSubvector, the default 'Ty' type is the source operand type and 'SubTy' is the destination subvector type I got this the wrong way around when I added rL346510 llvm-svn: 346534 --- diff --git a/llvm/lib/Analysis/TargetTransformInfo.cpp b/llvm/lib/Analysis/TargetTransformInfo.cpp index a6a1a872b658..eecc898fb5fd 100644 --- a/llvm/lib/Analysis/TargetTransformInfo.cpp +++ b/llvm/lib/Analysis/TargetTransformInfo.cpp @@ -1114,7 +1114,7 @@ int TargetTransformInfo::getInstructionThroughput(const Instruction *I) const { // TODO: Identify and add costs for insert subvector, etc. int SubIndex; if (Shuffle->isExtractSubvectorMask(SubIndex)) - return TTIImpl->getShuffleCost(SK_ExtractSubvector, Ty, SubIndex, SrcTy); + return TTIImpl->getShuffleCost(SK_ExtractSubvector, SrcTy, SubIndex, Ty); if (Shuffle->changesLength()) return -1;