[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


================
@@ -5812,6 +5854,13 @@ static void ReplaceLoadVector(SDNode *N, SelectionDAG &DAG,
         DAG.getVTList({LoadEltVT, LoadEltVT, LoadEltVT, LoadEltVT, MVT::Other});
     break;
   }
+  case 8: {
+    Opcode = NVPTXISD::LoadV8;
+    EVT ListVTs[] = {LoadEltVT, LoadEltVT, LoadEltVT, LoadEltVT, LoadEltVT,
+                     LoadEltVT, LoadEltVT, LoadEltVT, MVT::Other};
+    LdResVTs = DAG.getVTList(ListVTs);
----------------
AlexMaclean wrote:

Instead of constructing the LdResVTs in the switch. Could we use a SmallVector with the constructor that takes an element and a number of times to add it to the vector?

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


More information about the llvm-commits mailing list