[llvm] [SelectionDAG] Introducing a new ISD::POISON SDNode to represent the poison value in the IR. (PR #135056)

Jakub Kuderski via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 10 07:05:50 PDT 2025


================
@@ -692,8 +692,10 @@ END_TWO_BYTE_PACK()
   /// \<target\>ISD namespace).
   bool isTargetOpcode() const { return NodeType >= ISD::BUILTIN_OP_END; }
 
-  /// Return true if the type of the node type undefined.
-  bool isUndef() const { return NodeType == ISD::UNDEF; }
+  /// Returns true if the node type is UNDEF or POISON.
+  bool isUndef() const {
----------------
kuhar wrote:

IMO it would be better to rename this to `isUndefOrPoison`, since the two are not the same...

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


More information about the llvm-commits mailing list