[llvm] [AMDGPU] Add folding ISD::SELECT from vXiY into vZi32 with X * Y = Z * 32 (PR #173328)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 25 07:27:23 PDT 2026
================
@@ -59,6 +59,28 @@ EVT EVT::getExtendedVectorVT(LLVMContext &Context, EVT VT, ElementCount EC) {
return ResultVT;
}
+EVT EVT::getIntegerVectorWithElementWidth(LLVMContext &Context,
+ unsigned NewEltWidth) const {
+ if (!isVector() || !isInteger() || isScalableVector())
+ return EVT();
+
+ unsigned TotalBits = getVectorMinNumElements() * getScalarSizeInBits();
+ if (TotalBits % NewEltWidth != 0 || NewEltWidth > TotalBits)
----------------
arsenm wrote:
Keep this in terms of the TypeSize operations instead of converting to unsigned
https://github.com/llvm/llvm-project/pull/173328
More information about the llvm-commits
mailing list