[llvm] [AMDGPU] Enable vectorization of i8 values. (PR #134934)
Shilei Tian via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 15 09:15:07 PDT 2025
================
@@ -537,6 +538,12 @@ InstructionCost GCNTTIImpl::getArithmeticInstrCost(
MVT::SimpleValueType SLT = LT.second.getScalarType().SimpleTy;
+ VectorType *VecTy = dyn_cast<VectorType>(Ty);
+ InstructionCost LTTypeCost = LT.first;
+ if (VecTy &&
+ VecTy->getElementType() == IntegerType::getInt8Ty(VecTy->getContext()))
+ LTTypeCost = (((LT.first - 1) / 4) + 1);
----------------
shiltian wrote:
Can you put a comment on the logic behind this?
https://github.com/llvm/llvm-project/pull/134934
More information about the llvm-commits
mailing list