[llvm] [AMDGPU] Enable vectorization of i8 values. (PR #134934)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 9 07:36:26 PDT 2025
================
@@ -20927,7 +20934,11 @@ bool SLPVectorizerPass::tryToVectorizeList(ArrayRef<Value *> VL, BoUpSLP &R,
// provided vectorization factor (i.e. the scalar type is used for vector
// code during codegen).
auto *VecTy = getWidenedType(ScalarTy, VF);
- if (TTI->getNumberOfParts(VecTy) == VF)
+ unsigned NumParts = TTI->getNumberOfParts(VecTy);
+ if (TTI->canVectorizei8s() &&
+ VecTy->getElementType() == IntegerType::getInt8Ty(VecTy->getContext()))
+ NumParts = 1;
+ if (NumParts == VF)
----------------
alexey-bataev wrote:
Same here, it should not be in SLP vectorizer, it should be the part of getNumberOfParts logic in GCNTTIImpl
https://github.com/llvm/llvm-project/pull/134934
More information about the llvm-commits
mailing list