aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-04-08 21:31:29 +0000
committerChris Lattner <sabre@nondot.org>2005-04-08 21:31:29 +0000
commit2bffad3eebff7997599d12c17248ae580ba17cb8 (patch)
tree1c33ae6046b55bc20606e986ace265a8a04d4c32 /include/llvm/CodeGen
parentf3f2d6d378b209eead702579d46f8a6dfa2f281f (diff)
downloadexternal_llvm-2bffad3eebff7997599d12c17248ae580ba17cb8.zip
external_llvm-2bffad3eebff7997599d12c17248ae580ba17cb8.tar.gz
external_llvm-2bffad3eebff7997599d12c17248ae580ba17cb8.tar.bz2
fix this method for 64-bit constants
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21158 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r--include/llvm/CodeGen/SelectionDAGNodes.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h
index 6d5d262..adb85f0 100644
--- a/include/llvm/CodeGen/SelectionDAGNodes.h
+++ b/include/llvm/CodeGen/SelectionDAGNodes.h
@@ -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; }