[GVN] Consistently use division instead of shift. NFCI.
authorDavide Italiano <davide@freebsd.org>
Tue, 18 Oct 2016 21:02:27 +0000 (21:02 +0000)
committerDavide Italiano <davide@freebsd.org>
Tue, 18 Oct 2016 21:02:27 +0000 (21:02 +0000)
This is in line with other places of GVN (e.g. load coercion
logic).

llvm-svn: 284535

llvm/lib/Transforms/Scalar/GVN.cpp

index c48dd51..d9bb63a 100644 (file)
@@ -864,8 +864,8 @@ static int AnalyzeLoadFromClobberingWrite(Type *LoadTy, Value *LoadPtr,
 
   if ((WriteSizeInBits & 7) | (LoadSize & 7))
     return -1;
-  uint64_t StoreSize = WriteSizeInBits >> 3;  // Convert to bytes.
-  LoadSize >>= 3;
+  uint64_t StoreSize = WriteSizeInBits / 8;  // Convert to bytes.
+  LoadSize /= 8;
 
 
   bool isAAFailure = false;