[Mlir-commits] [mlir] [mlir][scf] Identify single iteration due to equal ub and step (PR #177194)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Jan 21 23:50:19 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)
----------------
zbenzion wrote:

Right thanks 🤦 
Closed PR.

https://github.com/llvm/llvm-project/pull/177194


More information about the Mlir-commits mailing list