mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-18 16:03:17 +00:00
Use modulo operator instead of multiplying result of a divide and subtracting from the original dividend. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253792 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a00b4f6e5d
commit
9ea618ed34
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user