@@ -11165,17 +11165,16 @@ ScalarEvolution::getMonotonicPredicateTypeImpl(const SCEVAddRecExpr *LHS,
1116511165}
1116611166
1116711167std::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,
1117111170 const Instruction *CtxI) {
1117211171 // If there is a loop-invariant, force it into the RHS, otherwise bail out.
1117311172 if (!isLoopInvariant(RHS, L)) {
1117411173 if (!isLoopInvariant(LHS, L))
1117511174 return std::nullopt;
1117611175
1117711176 std::swap(LHS, RHS);
11178- Pred = ICmpInst::getSwappedPredicate (Pred);
11177+ Pred = ICmpInst::getSwappedCmpPredicate (Pred);
1117911178 }
1118011179
1118111180 const SCEVAddRecExpr *ArLHS = dyn_cast<SCEVAddRecExpr>(LHS);
@@ -11203,7 +11202,7 @@ ScalarEvolution::getLoopInvariantPredicate(ICmpInst::Predicate Pred,
1120311202 // A similar reasoning applies for a monotonically decreasing predicate, by
1120411203 // replacing true with false and false with true in the above two bullets.
1120511204 bool Increasing = *MonotonicType == ScalarEvolution::MonotonicallyIncreasing;
11206- auto P = Increasing ? Pred : ICmpInst::getInversePredicate (Pred);
11205+ auto P = Increasing ? Pred : ICmpInst::getInverseCmpPredicate (Pred);
1120711206
1120811207 if (isLoopBackedgeGuardedByCond(L, P, LHS, RHS))
1120911208 return ScalarEvolution::LoopInvariantPredicate(Pred, ArLHS->getStart(),
0 commit comments