================ @@ -217,6 +217,8 @@ loopScheduling(scf::ForOp forOp, return 1; }; + auto ubConstant = getConstantIntValue(forOp.getUpperBound()); ---------------- fotiskoun wrote: Thanks, I changed `auto` to `std::optional<int64_t>` https://github.com/llvm/llvm-project/pull/90872