[llvm] [NVPTX] Allow directly storing immediates to improve readability (PR #145552)

Alex MacLean via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 24 11:05:00 PDT 2025


================
@@ -1364,20 +1364,18 @@ bool NVPTXDAGToDAGISel::tryStore(SDNode *N) {
   SDValue Offset, Base;
   SelectADDR(ST->getBasePtr(), Base, Offset);
 
-  SDValue Ops[] = {Value,
+  SDValue Ops[] = {selectPossiblyImm(Value),
                    getI32Imm(Ordering, DL),
                    getI32Imm(Scope, DL),
                    getI32Imm(CodeAddrSpace, DL),
-                   getI32Imm(NVPTX::PTXLdStInstCode::Untyped, DL),
----------------
AlexMaclean wrote:

It's unrelated. Just doing a bit of cleanup while I'm here.

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


More information about the llvm-commits mailing list