projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Return a std::uinque_ptr. Every caller was already using one.
[oota-llvm.git]
/
lib
/
Analysis
/
ScalarEvolutionExpander.cpp
diff --git
a/lib/Analysis/ScalarEvolutionExpander.cpp
b/lib/Analysis/ScalarEvolutionExpander.cpp
index 8c75b0db70f29f4ea11e2a34c5a22291cf1b1aee..968c619a48ddfae989f5921b06827f5fa7f38eea 100644
(file)
--- a/
lib/Analysis/ScalarEvolutionExpander.cpp
+++ b/
lib/Analysis/ScalarEvolutionExpander.cpp
@@
-1443,8
+1443,12
@@
Value *SCEVExpander::visitAddRecExpr(const SCEVAddRecExpr *S) {
Constant *One = ConstantInt::get(Ty, 1);
for (pred_iterator HPI = HPB; HPI != HPE; ++HPI) {
BasicBlock *HP = *HPI;
Constant *One = ConstantInt::get(Ty, 1);
for (pred_iterator HPI = HPB; HPI != HPE; ++HPI) {
BasicBlock *HP = *HPI;
- if (!PredSeen.insert(HP))
+ if (!PredSeen.insert(HP)) {
+ // There must be an incoming value for each predecessor, even the
+ // duplicates!
+ CanonicalIV->addIncoming(CanonicalIV->getIncomingValueForBlock(HP), HP);
continue;
continue;
+ }
if (L->contains(HP)) {
// Insert a unit add instruction right before the terminator
if (L->contains(HP)) {
// Insert a unit add instruction right before the terminator