[llvm] [NVPTX] Vectorize and lower 256-bit global loads/stores for sm_100+/ptx88+ (PR #139292)

Alex MacLean via llvm-commits llvm-commits at lists.llvm.org
Fri May 9 10:24:31 PDT 2025


================
@@ -5775,7 +5812,12 @@ static void ReplaceLoadVector(SDNode *N, SelectionDAG &DAG,
   if (ResVT != MemVT)
     return;
 
-  const auto NumEltsAndEltVT = getVectorLoweringShape(ResVT);
+  // 256-bit vectors are only allowed iff the address is global
+  // and the target supports 256-bit loads/stores
+  unsigned AddrSpace = cast<MemSDNode>(N)->getAddressSpace();
----------------
AlexMaclean wrote:

Use `LD` here instead of `cast<MemSDNode>(N)`

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


More information about the llvm-commits mailing list