[llvm] [AMDGPU] Enable vectorization of i8 values. (PR #134934)
Gheorghe-Teodor Bercea via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 15 08:50:59 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)
----------------
doru1004 wrote:
Fixed
https://github.com/llvm/llvm-project/pull/134934
More information about the llvm-commits
mailing list