[llvm] [NVPTX] Generalize register-or-immediate operands for integer instructions (PR #229920)

Durgadoss R via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 8 03:35:56 PDT 2026


================
@@ -518,6 +518,15 @@ void NVPTXInstPrinter::printHexu32imm(const MCInst *MI, int OpNum,
   O << formatHex(Imm) << "U";
 }
 
+void NVPTXInstPrinter::printRegOrHexImm(const MCInst *MI, int OpNum,
+                                        const MCSubtargetInfo &STI,
+                                        raw_ostream &O) {
+  if (MI->getOperand(OpNum).isImm())
----------------
durga4github wrote:

Hopefully the cost of this check itself is negligible.. (and we gain much faster td->inc because of lesser records now..)

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


More information about the llvm-commits mailing list