From 0458c1db71067be9ee545d9a51d4330576609747 Mon Sep 17 00:00:00 2001 From: Zhou Sheng Date: Wed, 21 Mar 2007 04:34:37 +0000 Subject: Fix a bug in getAllOnesValue() which broke some test cases for bitwidth > 64. llvm-svn: 35232 --- llvm/lib/Support/APInt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Support') 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(); -- cgit v1.2.3