[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:04:40 PDT 2025


================
@@ -184,6 +184,18 @@ class OneUse2<SDPatternOperator operator>
 class fpimm_pos_inf<ValueType vt>
     : FPImmLeaf<vt, [{ return Imm.isPosInfinity(); }]>;
 
+
+
+// Operands which can hold a Register or an Immediate.
+//
+// Unfortunately, since most register classes can hold multiple types, we must
+// use the 'Any' type for these.
+
+def RI1  : Operand<i1>;
----------------
AlexMaclean wrote:

I plan to add some uses in the future. I think it is nice to add the full set now for completeness. 

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


More information about the llvm-commits mailing list