@@ -743,7 +743,6 @@ class WidenIV {
743
743
744
744
bool widenLoopCompare (NarrowIVDefUse DU);
745
745
bool widenWithVariantUse (NarrowIVDefUse DU);
746
- void widenWithVariantUseCodegen (NarrowIVDefUse DU);
747
746
748
747
void pushNarrowIVUsers (Instruction *NarrowDef, Instruction *WideDef);
749
748
};
@@ -1147,18 +1146,6 @@ bool WidenIV::widenWithVariantUse(NarrowIVDefUse DU) {
1147
1146
}
1148
1147
}
1149
1148
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" );
1162
1149
LLVM_DEBUG (dbgs () << " Cloning arithmetic IVUser: " << *NarrowUse << " \n " );
1163
1150
1164
1151
// Generating a widening use instruction.
@@ -1192,6 +1179,7 @@ void WidenIV::widenWithVariantUseCodegen(NarrowIVDefUse DU) {
1192
1179
User->replaceAllUsesWith (WideBO);
1193
1180
DeadInsts.emplace_back (User);
1194
1181
}
1182
+ return true ;
1195
1183
}
1196
1184
1197
1185
// / 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) {
1296
1284
// in WideAddRec.first does not indicate a polynomial induction expression.
1297
1285
// In that case, look at the operands of the use instruction to determine
1298
1286
// if we can still widen the use instead of truncating its operand.
1299
- if (widenWithVariantUse (DU)) {
1300
- widenWithVariantUseCodegen (DU);
1287
+ if (widenWithVariantUse (DU))
1301
1288
return nullptr ;
1302
- }
1303
1289
1304
1290
// This user does not evaluate to a recurrence after widening, so don't
1305
1291
// follow it. Instead insert a Trunc to kill off the original use,
0 commit comments