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

Alex Bradbury via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 2 05:16:29 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;
----------------
asb wrote:

Yes, I'm definitely inheriting that confusion. Would getAsZExtVal be better?

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


More information about the llvm-commits mailing list