diff options
author | Duncan Sands <baldrick@free.fr> | 2009-02-01 18:06:53 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2009-02-01 18:06:53 +0000 |
commit | b0d5cdd52e8448f769cd71aaee6a4b8592dc08b1 (patch) | |
tree | 7a0189db8f4dd16bcf86da71718afa2515dd3e19 /utils/TableGen | |
parent | fc4b677cd526f1f6a3d6487782557af99fbf6c32 (diff) | |
download | external_llvm-b0d5cdd52e8448f769cd71aaee6a4b8592dc08b1.zip external_llvm-b0d5cdd52e8448f769cd71aaee6a4b8592dc08b1.tar.gz external_llvm-b0d5cdd52e8448f769cd71aaee6a4b8592dc08b1.tar.bz2 |
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/TableGen')
-rw-r--r-- | utils/TableGen/CodeGenDAGPatterns.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/TableGen/CodeGenDAGPatterns.cpp b/utils/TableGen/CodeGenDAGPatterns.cpp index e70bdb6..f3bdb4f 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) { |