[Mlir-commits] [mlir] [mlir][scf] Clamp normalized loop sizes where they are combined (PR #223256)
Aviad Cohen
llvmlistbot at llvm.org
Sat Oct 3 21:18:00 PDT 2026
================
@@ -363,7 +374,8 @@ module attributes {transform.with_named_sequence} {
// CHECK-SAME: , %[[ARG1:.+]]: index)
// CHECK-DAG: %[[C0:.+]] = arith.constant 0 : index
// CHECK-DAG: %[[C1:.+]] = arith.constant 1 : index
-// CHECK: scf.for %[[IV:.+]] = %[[C0]] to %[[ARG1]] step %[[C1]]
+// CHECK: %[[CL:.+]] = arith.maxsi %[[ARG1]], %[[C0]]
----------------
AviadCo wrote:
for this case:
1. We don't really need the "max" since all UB but `arg1` are possitive.
2. If one of the lb was `-1` instead of zero and `arg1` was `-2` - I think we are expected to have no iteration before the coalesce - but due to the max and we will have 1 iteration, isn't it?
https://github.com/llvm/llvm-project/pull/223256
More information about the Mlir-commits
mailing list