diff --git a/mlir/lib/Interfaces/ValueBoundsOpInterface.cpp b/mlir/lib/Interfaces/ValueBoundsOpInterface.cpp index b2b33b7441c37..77465d4e00c68 100644 --- a/mlir/lib/Interfaces/ValueBoundsOpInterface.cpp +++ b/mlir/lib/Interfaces/ValueBoundsOpInterface.cpp @@ -820,9 +820,7 @@ bool ValueBoundsConstraintSet::compare(const Variable &lhs, return cstr.comparePos(lhsPos, cmp, rhsPos); }; ValueBoundsConstraintSet cstr(lhs.getContext(), stopCondition); - lhsPos = cstr.populateConstraints(lhs.map, lhs.mapOperands); - rhsPos = cstr.populateConstraints(rhs.map, rhs.mapOperands); - return cstr.comparePos(lhsPos, cmp, rhsPos); + return cstr.populateAndCompare(lhs, cmp, rhs); } FailureOr ValueBoundsConstraintSet::strongCompare(const Variable &lhs,