diff options
author | Dan Gohman <gohman@apple.com> | 2008-04-28 20:25:15 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-04-28 20:25:15 +0000 |
commit | 86e124e0df65e04b5148ac1aba142e5f47e9716f (patch) | |
tree | befc8ee5a44402629f91dc16d686a442f109088b /lib/Support | |
parent | 4c268c6241471b095206ae4d4f8211954a2ddd22 (diff) | |
download | external_llvm-86e124e0df65e04b5148ac1aba142e5f47e9716f.zip external_llvm-86e124e0df65e04b5148ac1aba142e5f47e9716f.tar.gz external_llvm-86e124e0df65e04b5148ac1aba142e5f47e9716f.tar.bz2 |
Fix a pointer-arithmetic bug that caused 64-bit host pointer values to
be truncated to 32 bits. This fixes the recent Benchmarks/McCat/09-vor
regression on x86-64, among other things.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50372 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support')
-rw-r--r-- | lib/Support/Allocator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Support/Allocator.cpp b/lib/Support/Allocator.cpp index 8ccd390..4b6f9ff 100644 --- a/lib/Support/Allocator.cpp +++ b/lib/Support/Allocator.cpp @@ -48,7 +48,7 @@ public: void *Allocate(unsigned AllocSize, unsigned Alignment, MemRegion **RegPtr) { char* Result = (char*) (((uintptr_t) (NextPtr+Alignment-1)) - & ~(Alignment-1)); + & ~((uintptr_t) Alignment-1)); // Speculate the new value of NextPtr. char* NextPtrTmp = Result + AllocSize; |