mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-09 20:13:35 +00:00
fix this method for 64-bit constants
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21158 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f3f2d6d378
commit
2bffad3eeb
@ -605,7 +605,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; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user