aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/CodeGen
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
commit885a87ef8512a184a58a0ebe39705ccb221749ef (patch)
tree87cfa1ca194eb0c5c8bdb1bc6294e019e905edaf /include/llvm/CodeGen
parent5295122b0d5053ebb4bc08d4c0ebd5aa071c43c3 (diff)
downloadexternal_llvm-885a87ef8512a184a58a0ebe39705ccb221749ef.zip
external_llvm-885a87ef8512a184a58a0ebe39705ccb221749ef.tar.gz
external_llvm-885a87ef8512a184a58a0ebe39705ccb221749ef.tar.bz2
simplify this method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27338 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r--include/llvm/CodeGen/SelectionDAGNodes.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h
index cf5955d..0076a63 100644
--- a/include/llvm/CodeGen/SelectionDAGNodes.h
+++ b/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; }