[Mlir-commits] [mlir] [mlir][python] Yield results of `scf.for_` (PR #93610)

Guray Ozen llvmlistbot at llvm.org
Tue May 28 13:58:35 PDT 2024


================
@@ -132,8 +132,8 @@ def for_(
     iter_args = tuple(for_op.inner_iter_args)
     with InsertionPoint(for_op.body):
         if len(iter_args) > 1:
-            yield iv, iter_args
+            yield iv, iter_args, for_op.results
         elif len(iter_args) == 1:
-            yield iv, iter_args[0]
+            yield iv, iter_args[0], for_op.results
----------------
grypp wrote:

I thought I was returning `results[0]`, thanks for the catch. But the test actually worked without that :) 

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


More information about the Mlir-commits mailing list