Skip to content

Commit b7059eb

Browse files
authored
[LSR] Strip dead code (NFC) (#146109)
Nested AddRec is already rejected by the handling in pushSCEV().
1 parent 0a656d8 commit b7059eb

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6468,10 +6468,6 @@ struct SCEVDbgValueBuilder {
64686468
/// Chain (non-affine) SCEVs are not supported.
64696469
bool SCEVToValueExpr(const llvm::SCEVAddRecExpr &SAR, ScalarEvolution &SE) {
64706470
assert(SAR.isAffine() && "Expected affine SCEV");
6471-
// TODO: Is this check needed?
6472-
if (isa<SCEVAddRecExpr>(SAR.getStart()))
6473-
return false;
6474-
64756471
const SCEV *Start = SAR.getStart();
64766472
const SCEV *Stride = SAR.getStepRecurrence(SE);
64776473

@@ -6539,11 +6535,6 @@ struct SCEVDbgValueBuilder {
65396535
bool SCEVToIterCountExpr(const llvm::SCEVAddRecExpr &SAR,
65406536
ScalarEvolution &SE) {
65416537
assert(SAR.isAffine() && "Expected affine SCEV");
6542-
if (isa<SCEVAddRecExpr>(SAR.getStart())) {
6543-
LLVM_DEBUG(dbgs() << "scev-salvage: IV SCEV. Unsupported nested AddRec: "
6544-
<< SAR << '\n');
6545-
return false;
6546-
}
65476538
const SCEV *Start = SAR.getStart();
65486539
const SCEV *Stride = SAR.getStepRecurrence(SE);
65496540

0 commit comments

Comments
 (0)