// 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,
// 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.
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; }