@@ -11167,17 +11167,16 @@ ScalarEvolution::getMonotonicPredicateTypeImpl(const SCEVAddRecExpr *LHS,
1116711167}
1116811168
1116911169std::optional<ScalarEvolution::LoopInvariantPredicate>
11170- ScalarEvolution::getLoopInvariantPredicate(ICmpInst::Predicate Pred,
11171- const SCEV *LHS, const SCEV *RHS,
11172- const Loop *L,
11170+ ScalarEvolution::getLoopInvariantPredicate(CmpPredicate Pred, const SCEV *LHS,
11171+ const SCEV *RHS, const Loop *L,
1117311172 const Instruction *CtxI) {
1117411173 // If there is a loop-invariant, force it into the RHS, otherwise bail out.
1117511174 if (!isLoopInvariant(RHS, L)) {
1117611175 if (!isLoopInvariant(LHS, L))
1117711176 return std::nullopt;
1117811177
1117911178 std::swap(LHS, RHS);
11180- Pred = ICmpInst::getSwappedPredicate (Pred);
11179+ Pred = ICmpInst::getSwappedCmpPredicate (Pred);
1118111180 }
1118211181
1118311182 const SCEVAddRecExpr *ArLHS = dyn_cast<SCEVAddRecExpr>(LHS);
@@ -11205,7 +11204,7 @@ ScalarEvolution::getLoopInvariantPredicate(ICmpInst::Predicate Pred,
1120511204 // A similar reasoning applies for a monotonically decreasing predicate, by
1120611205 // replacing true with false and false with true in the above two bullets.
1120711206 bool Increasing = *MonotonicType == ScalarEvolution::MonotonicallyIncreasing;
11208- auto P = Increasing ? Pred : ICmpInst::getInversePredicate (Pred);
11207+ auto P = Increasing ? Pred : ICmpInst::getInverseCmpPredicate (Pred);
1120911208
1121011209 if (isLoopBackedgeGuardedByCond(L, P, LHS, RHS))
1121111210 return ScalarEvolution::LoopInvariantPredicate(Pred, ArLHS->getStart(),
0 commit comments