simplify this method

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27338 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2006-04-02 02:28:52 +00:00
parent 5295122b0d
commit 885a87ef85

View File

@ -1076,9 +1076,7 @@ public:
bool isNullValue() const { return Value == 0; }
bool isAllOnesValue() const {
int NumBits = MVT::getSizeInBits(getValueType(0));
if (NumBits == 64) return Value+1 == 0;
return Value == (1ULL << NumBits)-1;
return Value == MVT::getIntVTBitMask(getValueType(0));
}
static bool classof(const ConstantSDNode *) { return true; }