summaryrefslogtreecommitdiffstats
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
commit61b6f04ae964d77277d11119f5b86f30dd23b69a (patch)
treeb3cb9e1fc2fd8c1debae3a0626e05a2f223b3128
parent705d3c18e8b044acbb9896e427f15f05c4611840 (diff)
downloadbcm5719-llvm-61b6f04ae964d77277d11119f5b86f30dd23b69a.tar.gz
bcm5719-llvm-61b6f04ae964d77277d11119f5b86f30dd23b69a.zip
fix this method for 64-bit constants
llvm-svn: 21158
-rw-r--r--llvm/include/llvm/CodeGen/SelectionDAGNodes.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/include/llvm/CodeGen/SelectionDAGNodes.h b/llvm/include/llvm/CodeGen/SelectionDAGNodes.h
index 6d5d26223f0..adb85f0e963 100644
--- a/llvm/include/llvm/CodeGen/SelectionDAGNodes.h
+++ b/llvm/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; }
OpenPOWER on IntegriCloud