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
This commit is contained in:
Dan Gohman 2008-04-28 20:25:15 +00:00
parent 8cb19d967f
commit f06226f506
1 changed files with 1 additions and 1 deletions

View File

@ -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;