Add a new node
[oota-llvm.git] / include / llvm / CodeGen / SelectionDAGNodes.h
index 568f66c9f633970e2f355df815e3847b6dfd7223..2011eb87710917ecffb984e7330242d5d89e71e8 100644 (file)
@@ -92,6 +92,10 @@ namespace ISD {
     // Simple binary arithmetic operators.
     ADD, SUB, MUL, SDIV, UDIV, SREM, UREM,
 
+    // MULHU/MULHS - Multiply high - Multiply two integers of type iN, producing
+    // an unsigned/signed value of type i[2*n], then return the top part.
+    MULHU, MULHS,
+
     // Bitwise operators.
     AND, OR, XOR, SHL, SRA, SRL,
 
@@ -212,6 +216,13 @@ namespace ISD {
     // to if the condition is true.
     BRCOND,
 
+    // BRCONDTWOWAY - Two-way conditional branch.  The first operand is the
+    // chain, the second is the condition, the third is the block to branch to
+    // if true, and the forth is the block to branch to if false.  Targets
+    // usually do not implement this, preferring to have legalize demote the
+    // operation to BRCOND/BR pairs when necessary.
+    BRCONDTWOWAY,
+
     // RET - Return from function.  The first operand is the chain,
     // and any subsequent operands are the return values for the
     // function.  This operation can have variable number of operands.
@@ -601,7 +612,9 @@ public:
 
   bool isNullValue() const { return Value == 0; }
   bool isAllOnesValue() const {
-    return Value == (1ULL << MVT::getSizeInBits(getValueType(0)))-1;
+    int NumBits = MVT::getSizeInBits(getValueType(0));
+    if (NumBits == 64) return Value+1 == 0;
+    return Value == (1ULL << NumBits)-1;
   }
 
   static bool classof(const ConstantSDNode *) { return true; }