[llvm] [AMDGPU][True16] extractEltcheap check 16bit in true16 mode (PR #171762)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 12 09:05:40 PST 2025


================
@@ -2232,10 +2232,9 @@ bool SITargetLowering::isExtractSubvectorCheap(EVT ResVT, EVT SrcVT,
 }
 
 bool SITargetLowering::isExtractVecEltCheap(EVT VT, unsigned Index) const {
-  // TODO: This should be more aggressive, particular for 16-bit element
-  // vectors. However there are some mixed improvements and regressions.
   EVT EltTy = VT.getVectorElementType();
-  return EltTy.getSizeInBits() % 32 == 0;
+  unsigned MinAlign = Subtarget->useRealTrue16Insts() ? 16 : 32;
----------------
arsenm wrote:

The comment still holds, we probably want this for some 16-bits without true16 too 

https://github.com/llvm/llvm-project/pull/171762


More information about the llvm-commits mailing list