[llvm] [AMDGPU] Vectorize i8 Shuffles (PR #95840)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 22 06:43:58 PDT 2024


================
@@ -1134,14 +1153,15 @@ InstructionCost GCNTTIImpl::getShuffleCost(TTI::ShuffleKind Kind,
 
   Kind = improveShuffleKindFromMask(Kind, Mask, VT, Index, SubTp);
 
-  // Larger vector widths may require additional instructions, but are
-  // typically cheaper than scalarized versions.
-  unsigned NumVectorElts = cast<FixedVectorType>(VT)->getNumElements();
+  unsigned ScalarSize = DL.getTypeSizeInBits(VT->getElementType());
----------------
arsenm wrote:

Is it possible to handle these cases separately? They're more straightforward than the type legalization cost 

https://github.com/llvm/llvm-project/pull/95840


More information about the llvm-commits mailing list