[llvm] [AMDGPU] Enable vectorization of i8 values. (PR #134934)
Jeffrey Byrnes via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 23 17:06:30 PDT 2025
================
@@ -1423,3 +1424,32 @@ void GCNTTIImpl::collectKernelLaunchBounds(
LB.push_back({"amdgpu-waves-per-eu[0]", WavesPerEU.first});
LB.push_back({"amdgpu-waves-per-eu[1]", WavesPerEU.second});
}
+
+InstructionCost GCNTTIImpl::getMemoryOpCost(unsigned Opcode, Type *Src,
+ Align Alignment,
+ unsigned AddressSpace,
+ TTI::TargetCostKind CostKind,
+ TTI::OperandValueInfo OpInfo,
+ const Instruction *I) {
+ if (VectorType *VecTy = dyn_cast<VectorType>(Src))
----------------
jrbyrnes wrote:
I think the cost should be the same for any illegal type -- so instead of checking for i8 vectors can check for illegal types.
```
TargetLoweringBase::LegalizeKind LK = TLI->getTypeConversion(Src->getContext(), EVT::getEVT(Src->getScalarType(), false));
if (LK.first != TargetLoweringBase::TypeLegal) { }
```
https://github.com/llvm/llvm-project/pull/134934
More information about the llvm-commits
mailing list