Add a new node
[oota-llvm.git] / include / llvm / CodeGen / SelectionDAGNodes.h
index cd8597baed7a82dc22be0d724ab7a4824e335c6e..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,
 
@@ -114,7 +118,7 @@ namespace ISD {
     // SHL_PARTS/SRA_PARTS/SRL_PARTS - These operators are used for expanded
     // integer shift operations, just like ADD/SUB_PARTS.  The operation
     // ordering is:
-    //       [Lo,Hi] = op [LoLHS,HiLHS], [LoRHS,HiRHS]
+    //       [Lo,Hi] = op [LoLHS,HiLHS], Amt
     SHL_PARTS, SRA_PARTS, SRL_PARTS,
 
     // Conversion operators.  These are all single input single output
@@ -164,6 +168,10 @@ namespace ISD {
     // FP_EXTEND - Extend a smaller FP type into a larger FP type.
     FP_EXTEND,
 
+    // FNEG, FABS - Perform unary floating point negation and absolute value
+    // operations.
+    FNEG, FABS,
+
     // Other operators.  LOAD and STORE have token chains as their first
     // operand, then the same operands as an LLVM load/store instruction.
     LOAD, STORE,
@@ -208,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.
@@ -597,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; }