[llvm] [NVPTX] support immediate values in st.param instructions (PR #91523)

Artem Belevich via llvm-commits llvm-commits at lists.llvm.org
Wed May 8 14:59:49 PDT 2024


================
@@ -2249,27 +2349,22 @@ bool NVPTXDAGToDAGISel::tryStoreParam(SDNode *N) {
         }
       }
       break;
+    }
     case 2:
-      Opcode = pickOpcodeForVT(Mem->getMemoryVT().getSimpleVT().SimpleTy,
-                               NVPTX::StoreParamV2I8, NVPTX::StoreParamV2I16,
-                               NVPTX::StoreParamV2I32, NVPTX::StoreParamV2I64,
-                               NVPTX::StoreParamV2F32, NVPTX::StoreParamV2F64);
-      break;
-    case 4:
-      Opcode = pickOpcodeForVT(Mem->getMemoryVT().getSimpleVT().SimpleTy,
-                               NVPTX::StoreParamV4I8, NVPTX::StoreParamV4I16,
-                               NVPTX::StoreParamV4I32, std::nullopt,
-                               NVPTX::StoreParamV4F32, std::nullopt);
+    case 4: {
+      MVT::SimpleValueType MemTy = Mem->getMemoryVT().getSimpleVT().SimpleTy;
+      Opcode = pickOpcodeForVectorStParam(Ops, NumElts, MemTy, CurDAG, DL);
       break;
     }
+    }
----------------
Artem-B wrote:

closing brace indentation seems to be off.

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


More information about the llvm-commits mailing list