Expose isXxxConstant() functions from SelectionDAGNodes.h (NFC)
[oota-llvm.git] / include / llvm / CodeGen / SelectionDAGNodes.h
index 66f488203f95f011f0967dba1a55c5fc5fa4a061..66ed5703fe116971e5225a2caf59eea8606f2e8b 100644 (file)
@@ -135,7 +135,7 @@ public:
     return SDValue(Node, R);
   }
 
-  // Return true if this node is an operand of N.
+  /// Return true if this node is an operand of N.
   bool isOperandOf(const SDNode *N) const;
 
   /// Return the ValueType of the referenced return value.
@@ -1494,6 +1494,15 @@ public:
   }
 };
 
+/// Returns true if \p V is a constant integer zero.
+bool isNullConstant(SDValue V);
+/// Returns true if \p V is an FP constant with a value of positive zero.
+bool isNullFPConstant(SDValue V);
+/// Returns true if \p V is an integer constant with all bits set.
+bool isAllOnesConstant(SDValue V);
+/// Returns true if \p V is a constant integer one.
+bool isOneConstant(SDValue V);
+
 class GlobalAddressSDNode : public SDNode {
   const GlobalValue *TheGlobal;
   int64_t Offset;