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 | f06226f506893aaced97c19a38a667324e8fa1f2 (patch) | |
tree | 7ba6a53b70034695d9d2ae8ce7a1f64a9f74330d /llvm/lib/Support/Allocator.cpp | |
parent | 8cb19d967f00f5a9466e6f0a8411b3dc6c0f304e (diff) | |
download | bcm5719-llvm-f06226f506893aaced97c19a38a667324e8fa1f2.tar.gz bcm5719-llvm-f06226f506893aaced97c19a38a667324e8fa1f2.zip |
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.
llvm-svn: 50372
Diffstat (limited to 'llvm/lib/Support/Allocator.cpp')
-rw-r--r-- | llvm/lib/Support/Allocator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Support/Allocator.cpp b/llvm/lib/Support/Allocator.cpp index 8ccd3908446..4b6f9ff7b13 100644 --- a/llvm/lib/Support/Allocator.cpp +++ b/llvm/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; |