[llvm] [InstCombine] Div ceil optimizations (PR #190175)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 13 09:07:48 PDT 2026
================
@@ -1523,6 +1523,49 @@ static Instruction *foldBoxMultiply(BinaryOperator &I) {
return nullptr;
}
+/// Return true if X + (Y-1) is provably non-wrapping in X's type
+static bool checkDivCeilNUW(Value *X, Value *Y, BinaryOperator &I,
+ AssumptionCache &AC, DominatorTree &DT) {
+ ConstantRange CRX = computeConstantRange(X, /*ForSigned=*/false,
----------------
dtcxzyw wrote:
This API is about to change in https://github.com/llvm/llvm-project/pull/191726.
https://github.com/llvm/llvm-project/pull/190175
More information about the llvm-commits
mailing list