[llvm] r259298 - [BasicAA] Update on r259290 - added missing cast

Gerolf Hoflehner via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 29 21:35:09 PST 2016


Author: ghoflehner
Date: Fri Jan 29 23:35:09 2016
New Revision: 259298

URL: http://llvm.org/viewvc/llvm-project?rev=259298&view=rev
Log:
[BasicAA] Update on r259290 - added missing cast

Modified:
    llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp

Modified: llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp?rev=259298&r1=259297&r2=259298&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp (original)
+++ llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp Fri Jan 29 23:35:09 2016
@@ -327,7 +327,7 @@ static bool isObjectSize(const Value *V,
 static int64_t adjustToPointerSize(int64_t Offset, unsigned PointerSize) {
   assert(PointerSize <= 64 && "Invalid PointerSize!");
   unsigned ShiftBits = 64 - PointerSize;
-  return (uint64_t)Offset << ShiftBits >> ShiftBits;
+  return (int64_t)((uint64_t)Offset << ShiftBits) >> ShiftBits;
 }
 
 /// If V is a symbolic pointer expression, decompose it into a base pointer




More information about the llvm-commits mailing list