[Mlir-commits] [mlir] [mlir][affine] Add Check for 'affine.for' Bound Map Results (PR #127105)

Uday Bondhugula llvmlistbot at llvm.org
Tue Feb 18 02:04:56 PST 2025


================
@@ -1902,6 +1902,10 @@ LogicalResult AffineForOp::verifyRegions() {
     if (failed(verifyDimAndSymbolIdentifiers(*this, getUpperBoundOperands(),
                                              getUpperBoundMap().getNumDims())))
       return failure();
+  if (getLowerBoundMap().getNumResults() < 1)
+    return emitOpError("expected lower bound map to have at least one result");
+  if (getUpperBoundMap().getNumResults() < 1)
+    return emitOpError("expected upper bound map to have at least one result");
----------------
bondhugula wrote:

`affine.parallel` op's verifier needs this same fix. Fine to merge this one first.

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


More information about the Mlir-commits mailing list