[llvm] [RFC][SelectionDAG] Add and use SDNode::getAsConstantVal() helper (PR #76710)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 2 04:41:55 PST 2024


================
@@ -923,6 +923,7 @@ END_TWO_BYTE_PACK()
 
   /// Helper method returns the integer value of a ConstantSDNode operand.
   inline uint64_t getConstantOperandVal(unsigned Num) const;
+  inline uint64_t getAsConstantVal() const;
----------------
arsenm wrote:

Potentially confusing if you need a signed immediate, but that's already an issue with the existing helper 

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


More information about the llvm-commits mailing list