summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-04-02 02:28:52 +0000
committerChris Lattner <sabre@nondot.org>2006-04-02 02:28:52 +0000
commit6e3b55792b029b4aa636ba50ba648eca8d237e3c (patch)
tree7cd4261bc8824ca9d119dee8b1f17e1fdd1773c5
parent7a29cf3c7f37172604d714553e4ef2c7ccc23795 (diff)
downloadbcm5719-llvm-6e3b55792b029b4aa636ba50ba648eca8d237e3c.tar.gz
bcm5719-llvm-6e3b55792b029b4aa636ba50ba648eca8d237e3c.zip
simplify this method
llvm-svn: 27338
-rw-r--r--llvm/include/llvm/CodeGen/SelectionDAGNodes.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/include/llvm/CodeGen/SelectionDAGNodes.h b/llvm/include/llvm/CodeGen/SelectionDAGNodes.h
index cf5955d6314..0076a637b2a 100644
--- a/llvm/include/llvm/CodeGen/SelectionDAGNodes.h
+++ b/llvm/include/llvm/CodeGen/SelectionDAGNodes.h
@@ -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; }
OpenPOWER on IntegriCloud