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:
19e9705
)
allow -1 strides to reuse "1" strides.
author
Chris Lattner
<sabre@nondot.org>
Mon, 2 Apr 2007 22:51:58 +0000
(22:51 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Mon, 2 Apr 2007 22:51:58 +0000
(22:51 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35607
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Scalar/LoopStrengthReduce.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Scalar/LoopStrengthReduce.cpp
b/lib/Transforms/Scalar/LoopStrengthReduce.cpp
index 744e0548bad0480870bdf9b6890d7684bd957532..db8ab485e394c428ae1b60e83ab27864e3f17893 100644
(file)
--- a/
lib/Transforms/Scalar/LoopStrengthReduce.cpp
+++ b/
lib/Transforms/Scalar/LoopStrengthReduce.cpp
@@
-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