summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
diff options
context:
space:
mode:
authorZhou Sheng <zhousheng00@gmail.com>2007-03-21 04:34:37 +0000
committerZhou Sheng <zhousheng00@gmail.com>2007-03-21 04:34:37 +0000
commit0458c1db71067be9ee545d9a51d4330576609747 (patch)
treeec8e0201da6ad575d801a7ce3fa808db898d95ed /llvm/lib/Support
parent61eee86487fa7368140f3e56c1a6eb9d2f529bca (diff)
downloadbcm5719-llvm-0458c1db71067be9ee545d9a51d4330576609747.tar.gz
bcm5719-llvm-0458c1db71067be9ee545d9a51d4330576609747.zip
Fix a bug in getAllOnesValue() which broke
some test cases for bitwidth > 64. llvm-svn: 35232
Diffstat (limited to 'llvm/lib/Support')
-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 0bfc95bde3f..27d4741321c 100644
--- a/llvm/lib/Support/APInt.cpp
+++ b/llvm/lib/Support/APInt.cpp
@@ -605,7 +605,7 @@ APInt& APInt::set() {
}
// Set all the bits in all the words.
- for (uint32_t i = 0; i < getNumWords() - 1; ++i)
+ for (uint32_t i = 0; i < getNumWords(); ++i)
pVal[i] = -1ULL;
// Clear the unused ones
return clearUnusedBits();
OpenPOWER on IntegriCloud