[Mlir-commits] [mlir] [mlir][affine] Reject affine.for with step <= 0 in parser and verifier (PR #184158)

Mehdi Amini llvmlistbot at llvm.org
Thu Mar 5 03:34:39 PST 2026


================
@@ -168,6 +168,10 @@ void mlir::affine::getTripCountMapAndOperands(
     SmallVectorImpl<Value> *tripCountOperands) {
   MLIRContext *context = forOp.getContext();
   int64_t step = forOp.getStepAsInt();
+  if (step <= 0) {
----------------
joker-eph wrote:

I should like remove it from getTrivialConstantTripCount() instead right? 

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


More information about the Mlir-commits mailing list