[Mlir-commits] [mlir] [mlir][emitc] Add 'emitc.while' and 'emitc.do' ops to the dialect (PR #143008)

Gil Rapaport llvmlistbot at llvm.org
Sun Sep 7 01:49:41 PDT 2025


================
@@ -974,10 +974,10 @@ LogicalResult emitc::YieldOp::verify() {
   Value result = getResult();
   Operation *containingOp = getOperation()->getParentOp();
 
-  if (result && containingOp->getNumResults() != 1)
+  if (result && containingOp->getNumResults() != 1 && !isa<DoOp>(containingOp))
----------------
aniragil wrote:

More accurately can only be the condition region, right? (also below)
Better to first check concretely for `DoOp` and else make the generic check?

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


More information about the Mlir-commits mailing list