[Mlir-commits] [mlir] [mlir][scf] Identify single iteration due to equal ub and step (PR #177194)
Mehdi Amini
llvmlistbot at llvm.org
Wed Jan 21 09:58:43 PST 2026
================
@@ -346,10 +346,13 @@ std::optional<APInt> constantTripCount(
std::optional<std::pair<APInt, bool>> maybeLbCst = getConstantAPIntValue(lb);
std::optional<std::pair<APInt, bool>> maybeUbCst = getConstantAPIntValue(ub);
if (maybeLbCst) {
+ APSInt lbCst(maybeLbCst->first, /*isUnsigned=*/!isSigned);
+ if (lbCst.isZero() && step == ub)
----------------
joker-eph wrote:
What if ub would be zero?
https://github.com/llvm/llvm-project/pull/177194
More information about the Mlir-commits
mailing list