[llvm] [InstSimplify] Generalize simplification of icmps with monotonic operands (PR #69471)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 18 08:59:32 PDT 2023
================
@@ -3103,6 +3103,54 @@ static Value *simplifyICmpWithConstant(CmpInst::Predicate Pred, Value *LHS,
return nullptr;
}
+/// Get values V_i such that V uge V_i (Greater) or V ule V_i (!Greater).
+static void getUnsignedMonotonicValues(SmallPtrSetImpl<Value *> &Res, Value *V,
----------------
goldsteinn wrote:
On that note, however, do you actually need to collect the values? Based on the usage of just simplifying booleans, can't you just pass a query (greater, greater_eq, less_eq, less) and return a bool if its provable?
https://github.com/llvm/llvm-project/pull/69471
More information about the llvm-commits
mailing list