@@ -11165,17 +11165,16 @@ ScalarEvolution::getMonotonicPredicateTypeImpl(const SCEVAddRecExpr *LHS,
11165
11165
}
11166
11166
11167
11167
std::optional<ScalarEvolution::LoopInvariantPredicate>
11168
- ScalarEvolution::getLoopInvariantPredicate(ICmpInst::Predicate Pred,
11169
- const SCEV *LHS, const SCEV *RHS,
11170
- const Loop *L,
11168
+ ScalarEvolution::getLoopInvariantPredicate(CmpPredicate Pred, const SCEV *LHS,
11169
+ const SCEV *RHS, const Loop *L,
11171
11170
const Instruction *CtxI) {
11172
11171
// If there is a loop-invariant, force it into the RHS, otherwise bail out.
11173
11172
if (!isLoopInvariant(RHS, L)) {
11174
11173
if (!isLoopInvariant(LHS, L))
11175
11174
return std::nullopt;
11176
11175
11177
11176
std::swap(LHS, RHS);
11178
- Pred = ICmpInst::getSwappedPredicate (Pred);
11177
+ Pred = ICmpInst::getSwappedCmpPredicate (Pred);
11179
11178
}
11180
11179
11181
11180
const SCEVAddRecExpr *ArLHS = dyn_cast<SCEVAddRecExpr>(LHS);
@@ -11203,7 +11202,7 @@ ScalarEvolution::getLoopInvariantPredicate(ICmpInst::Predicate Pred,
11203
11202
// A similar reasoning applies for a monotonically decreasing predicate, by
11204
11203
// replacing true with false and false with true in the above two bullets.
11205
11204
bool Increasing = *MonotonicType == ScalarEvolution::MonotonicallyIncreasing;
11206
- auto P = Increasing ? Pred : ICmpInst::getInversePredicate (Pred);
11205
+ auto P = Increasing ? Pred : ICmpInst::getInverseCmpPredicate (Pred);
11207
11206
11208
11207
if (isLoopBackedgeGuardedByCond(L, P, LHS, RHS))
11209
11208
return ScalarEvolution::LoopInvariantPredicate(Pred, ArLHS->getStart(),
0 commit comments