[llvm] r284535 - [GVN] Consistently use division instead of shift. NFCI.
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 18 14:02:28 PDT 2016
Author: davide
Date: Tue Oct 18 16:02:27 2016
New Revision: 284535
URL: http://llvm.org/viewvc/llvm-project?rev=284535&view=rev
Log:
[GVN] Consistently use division instead of shift. NFCI.
This is in line with other places of GVN (e.g. load coercion
logic).
Modified:
llvm/trunk/lib/Transforms/Scalar/GVN.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/GVN.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/GVN.cpp?rev=284535&r1=284534&r2=284535&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/GVN.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/GVN.cpp Tue Oct 18 16:02:27 2016
@@ -864,8 +864,8 @@ static int AnalyzeLoadFromClobberingWrit
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;
More information about the llvm-commits
mailing list