summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2009-02-01 18:06:53 +0000
committerDuncan Sands <baldrick@free.fr>2009-02-01 18:06:53 +0000
commitb0d5cdd52e8448f769cd71aaee6a4b8592dc08b1 (patch)
tree7a0189db8f4dd16bcf86da71718afa2515dd3e19 /utils
parentfc4b677cd526f1f6a3d6487782557af99fbf6c32 (diff)
downloadllvm-b0d5cdd52e8448f769cd71aaee6a4b8592dc08b1.tar.gz
llvm-b0d5cdd52e8448f769cd71aaee6a4b8592dc08b1.tar.bz2
llvm-b0d5cdd52e8448f769cd71aaee6a4b8592dc08b1.tar.xz
Fix PR3453 and probably a bunch of other potential
crashes or wrong code with codegen of large integers: eliminate the legacy getIntegerVTBitMask and getIntegerVTSignBit methods, which returned their value as a uint64_t, so couldn't handle huge types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63494 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/TableGen/CodeGenDAGPatterns.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/TableGen/CodeGenDAGPatterns.cpp b/utils/TableGen/CodeGenDAGPatterns.cpp
index e70bdb6f60..f3bdb4fab3 100644
--- a/utils/TableGen/CodeGenDAGPatterns.cpp
+++ b/utils/TableGen/CodeGenDAGPatterns.cpp
@@ -842,7 +842,7 @@ bool TreePatternNode::ApplyTypeConstraints(TreePattern &TP, bool NotRegisters) {
// If sign-extended doesn't fit, does it fit as unsigned?
unsigned ValueMask;
unsigned UnsignedVal;
- ValueMask = unsigned(MVT(VT).getIntegerVTBitMask());
+ ValueMask = unsigned(~uint32_t(0UL) >> (32-Size));
UnsignedVal = unsigned(II->getValue());
if ((ValueMask & UnsignedVal) != UnsignedVal) {