aboutsummaryrefslogtreecommitdiff
path: root/lib/Support/APInt.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-02-25 01:08:58 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-02-25 01:08:58 +0000
commit438d71eea40b4c69668be891a5d9c5e72c5d8af3 (patch)
tree931d5e6797fdff02f96339b602da202d2e00c4d1 /lib/Support/APInt.cpp
parent8755380fffb185e9959182510dc14e79c8b4a4b8 (diff)
Whoops, last word with bits in large shift left wasn't correct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34565 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/APInt.cpp')
-rw-r--r--lib/Support/APInt.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Support/APInt.cpp b/lib/Support/APInt.cpp
index 2e90502e6c..3725667b8f 100644
--- a/lib/Support/APInt.cpp
+++ b/lib/Support/APInt.cpp
@@ -994,7 +994,7 @@ APInt APInt::shl(uint32_t shiftAmt) const {
for (; i > offset; --i)
val[i] = pVal[i-offset] << wordShift |
pVal[i-offset-1] >> (APINT_BITS_PER_WORD - wordShift);
- val[offset] = pVal[offset-1] << wordShift;
+ val[offset] = pVal[0] << wordShift;
for (i = 0; i < offset; ++i)
val[i] = 0;
val[getNumWords()-1] &= ~uint64_t(0ULL) >> (APINT_BITS_PER_WORD - BitWidth);