summaryrefslogtreecommitdiffstats
path: root/llvm/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
commitab0e08ae2f8b93f1088e031f420c7a0fee20c003 (patch)
tree260ff9a71b1666c6b5c14d4df4756be47d6fdc44 /llvm/lib/Support/APInt.cpp
parenta5c84d95fad2952f28f12700121c893fce056002 (diff)
downloadbcm5719-llvm-ab0e08ae2f8b93f1088e031f420c7a0fee20c003.tar.gz
bcm5719-llvm-ab0e08ae2f8b93f1088e031f420c7a0fee20c003.zip
Whoops, last word with bits in large shift left wasn't correct.
llvm-svn: 34565
Diffstat (limited to 'llvm/lib/Support/APInt.cpp')
-rw-r--r--llvm/lib/Support/APInt.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Support/APInt.cpp b/llvm/lib/Support/APInt.cpp
index 2e90502e6ce..3725667b8fe 100644
--- a/llvm/lib/Support/APInt.cpp
+++ b/llvm/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);
OpenPOWER on IntegriCloud