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 | 3ed768868db9f0023f2e4b07e2ccb285d2f821be (patch) | |
tree | 35160c84ac06e815ed7747a33ea7a4d6750019a0 /llvm/utils/TableGen/CodeGenDAGPatterns.cpp | |
parent | a6c75ffd73a72fb9d5e9a5e5ec9344a7d96cdfd3 (diff) | |
download | bcm5719-llvm-3ed768868db9f0023f2e4b07e2ccb285d2f821be.tar.gz bcm5719-llvm-3ed768868db9f0023f2e4b07e2ccb285d2f821be.zip |
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.
llvm-svn: 63494
Diffstat (limited to 'llvm/utils/TableGen/CodeGenDAGPatterns.cpp')
-rw-r--r-- | llvm/utils/TableGen/CodeGenDAGPatterns.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp index e70bdb6f602..f3bdb4fab3f 100644 --- a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp +++ b/llvm/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) { |