[Mlir-commits] [mlir] [mlir][affine] Use value bound inference to determine minimum/maximum trip counts in loop analysis (PR #128113)
Krzysztof Drewniak
llvmlistbot at llvm.org
Tue Mar 18 00:08:11 PDT 2025
================
@@ -117,7 +117,8 @@ static void replaceIterArgsAndYieldResults(AffineForOp forOp) {
/// was known to have a single iteration.
LogicalResult mlir::affine::promoteIfSingleIteration(AffineForOp forOp) {
std::optional<uint64_t> tripCount = getConstantTripCount(forOp);
- if (!tripCount || *tripCount != 1)
+ std::optional<uint64_t> maxTripCount = getUpperBoundOnTripCount(forOp);
+ if (!tripCount || *tripCount != 1 || !maxTripCount || *maxTripCount != 1)
return failure();
----------------
krzysz00 wrote:
Yeah, the emails on my GitHub work
https://github.com/llvm/llvm-project/pull/128113
More information about the Mlir-commits
mailing list