[llvm] r346534 - [TTI] Flip vector types in getShuffleCost SK_ExtractSubvector call

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 9 10:30:59 PST 2018


Author: rksimon
Date: Fri Nov  9 10:30:59 2018
New Revision: 346534

URL: http://llvm.org/viewvc/llvm-project?rev=346534&view=rev
Log:
[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

Modified:
    llvm/trunk/lib/Analysis/TargetTransformInfo.cpp

Modified: llvm/trunk/lib/Analysis/TargetTransformInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/TargetTransformInfo.cpp?rev=346534&r1=346533&r2=346534&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/TargetTransformInfo.cpp (original)
+++ llvm/trunk/lib/Analysis/TargetTransformInfo.cpp Fri Nov  9 10:30:59 2018
@@ -1114,7 +1114,7 @@ int TargetTransformInfo::getInstructionT
     // 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;




More information about the llvm-commits mailing list