mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-18 12:29:21 +00:00
allow -1 strides to reuse "1" strides.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35607 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
19e970542d
commit
1d31290634
@ -929,7 +929,8 @@ unsigned LoopStrengthReduce::CheckForIVReuse(const SCEVHandle &Stride,
|
||||
for (std::map<SCEVHandle, IVsOfOneStride>::iterator SI= IVsByStride.begin(),
|
||||
SE = IVsByStride.end(); SI != SE; ++SI) {
|
||||
int64_t SSInt = cast<SCEVConstant>(SI->first)->getValue()->getSExtValue();
|
||||
if (unsigned(abs(SInt)) < SSInt || (SInt % SSInt) != 0)
|
||||
if (SInt != -SSInt &&
|
||||
(unsigned(abs(SInt)) < SSInt || (SInt % SSInt) != 0))
|
||||
continue;
|
||||
int64_t Scale = SInt / SSInt;
|
||||
// Check that this stride is valid for all the types used for loads and
|
||||
|
Loading…
Reference in New Issue
Block a user