projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a00b4f6
)
Use modulo operator instead of multiplying result of a divide and subtracting from...
author
Craig Topper
<craig.topper@gmail.com>
Sat, 21 Nov 2015 17:44:42 +0000
(17:44 +0000)
committer
Craig Topper
<craig.topper@gmail.com>
Sat, 21 Nov 2015 17:44:42 +0000
(17:44 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253792
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Scalar/MemCpyOptimizer.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Scalar/MemCpyOptimizer.cpp
b/lib/Transforms/Scalar/MemCpyOptimizer.cpp
index 7594956f8dd94afe10e72b3abb0753bda3faff90..5997464dd0c0801d0269993c4ef977bdb08dbfe5 100644
(file)
--- a/
lib/Transforms/Scalar/MemCpyOptimizer.cpp
+++ b/
lib/Transforms/Scalar/MemCpyOptimizer.cpp
@@
-190,7
+190,7
@@
bool MemsetRange::isProfitableToUseMemset(const DataLayout &DL) const {
unsigned NumPointerStores = Bytes / MaxIntSize;
// Assume the remaining bytes if any are done a byte at a time.
- unsigned NumByteStores = Bytes
- NumPointerStores *
MaxIntSize;
+ unsigned NumByteStores = Bytes
%
MaxIntSize;
// If we will reduce the # stores (according to this heuristic), do the
// transformation. This encourages merging 4 x i8 -> i32 and 2 x i16 -> i32