[Mlir-commits] [mlir] [mlir][emitc] Fix the emitc::ExpressionOp (PR #143894)

Vlad Lazar llvmlistbot at llvm.org
Mon Jun 16 06:09:05 PDT 2025


================
@@ -406,6 +404,14 @@ LogicalResult ExpressionOp::verify() {
   if (!yieldResult)
     return emitOpError("must yield a value at termination");
 
+  Operation *rootOp = yieldResult.getDefiningOp();
+
+  if (!rootOp)
+    return emitOpError("yielded value has no defining op");
+
+  if (!isa<emitc::ExpressionOp>(rootOp->getParentOp()))
----------------
Vladislave0-0 wrote:

Assuming that a nested ExpressionOps may appear in the future, this option is more than appropriate. Thanks, I'll fix it now.

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


More information about the Mlir-commits mailing list