Skip to content

Commit 1b0ecd5

Browse files
author
git apple-llvm automerger
committed
Merge commit '0857029011a9' from llvm.org/master into apple/main
2 parents 059e7e4 + 0857029 commit 1b0ecd5

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

llvm/lib/Transforms/Scalar/IndVarSimplify.cpp

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,6 @@ class WidenIV {
743743

744744
bool widenLoopCompare(NarrowIVDefUse DU);
745745
bool widenWithVariantUse(NarrowIVDefUse DU);
746-
void widenWithVariantUseCodegen(NarrowIVDefUse DU);
747746

748747
void pushNarrowIVUsers(Instruction *NarrowDef, Instruction *WideDef);
749748
};
@@ -1147,18 +1146,6 @@ bool WidenIV::widenWithVariantUse(NarrowIVDefUse DU) {
11471146
}
11481147
}
11491148

1150-
return true;
1151-
}
1152-
1153-
/// Special Case for widening with loop variant (see
1154-
/// WidenIV::widenWithVariant). This is the code generation part.
1155-
void WidenIV::widenWithVariantUseCodegen(NarrowIVDefUse DU) {
1156-
Instruction *NarrowUse = DU.NarrowUse;
1157-
Instruction *NarrowDef = DU.NarrowDef;
1158-
Instruction *WideDef = DU.WideDef;
1159-
1160-
ExtendKind ExtKind = getExtendKind(NarrowDef);
1161-
assert(ExtKind != Unknown && "Unknown ExtKind not handled");
11621149
LLVM_DEBUG(dbgs() << "Cloning arithmetic IVUser: " << *NarrowUse << "\n");
11631150

11641151
// Generating a widening use instruction.
@@ -1192,6 +1179,7 @@ void WidenIV::widenWithVariantUseCodegen(NarrowIVDefUse DU) {
11921179
User->replaceAllUsesWith(WideBO);
11931180
DeadInsts.emplace_back(User);
11941181
}
1182+
return true;
11951183
}
11961184

11971185
/// Determine whether an individual user of the narrow IV can be widened. If so,
@@ -1296,10 +1284,8 @@ Instruction *WidenIV::widenIVUse(NarrowIVDefUse DU, SCEVExpander &Rewriter) {
12961284
// in WideAddRec.first does not indicate a polynomial induction expression.
12971285
// In that case, look at the operands of the use instruction to determine
12981286
// if we can still widen the use instead of truncating its operand.
1299-
if (widenWithVariantUse(DU)) {
1300-
widenWithVariantUseCodegen(DU);
1287+
if (widenWithVariantUse(DU))
13011288
return nullptr;
1302-
}
13031289

13041290
// This user does not evaluate to a recurrence after widening, so don't
13051291
// follow it. Instead insert a Trunc to kill off the original use,

0 commit comments

Comments
 (0)