Skip to content

Commit 4b53050

Browse files
committed
!fixup add comment
1 parent 72b71ca commit 4b53050

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1240,6 +1240,10 @@ Value *SCEVExpander::tryToReuseLCSSAPhi(const SCEVAddRecExpr *S) {
12401240
ExitSCEV = SE.getPtrToIntExpr(ExitSCEV, STy);
12411241
else if (S->getType() != PN.getType())
12421242
continue;
1243+
1244+
// Check if we can re-use the existing PN, by adjusting it with an expanded
1245+
// offset, if the offset is simpler (for now just checks if it is
1246+
// AddRec-free).
12431247
const SCEV *Diff = SE.getMinusSCEV(S, ExitSCEV);
12441248
if (isa<SCEVCouldNotCompute>(Diff) ||
12451249
SCEVExprContains(Diff,

0 commit comments

Comments
 (0)