[Mlir-commits] [mlir] Adding to execute_region_op some missing support (PR #164159)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Oct 21 01:08:25 PDT 2025


================
@@ -1604,6 +1604,145 @@ func.func @func_execute_region_inline_multi_yield() {
 
 // -----
 
+// Test case with single scf.yield op inside execute_region and its operand is defined outside the execute_region op.
+// Make scf.execute_region not to return anything.
+
+// CHECK:           scf.execute_region no_inline {
+// CHECK:             scf.yield
+// CHECK:           }
+
+module {
+func.func private @foo()->()
+func.func private @execute_region_yeilding_external_value() -> memref<1x60xui8> {
+  %alloc = memref.alloc() {alignment = 64 : i64} : memref<1x60xui8>  
+  %1 = scf.execute_region -> memref<1x60xui8> no_inline {    
+    func.call @foo():()->()
+    scf.yield %alloc: memref<1x60xui8>
+  }  
+  return %1 : memref<1x60xui8>
+}
+}
+
+// -----
+
+// Test case with scf.yield op inside execute_region with multiple operands.
+// One of operands is defined outside the execute_region op.
+// In this case scf.execute_region doesn't change.
----------------
ddubov100 wrote:

done

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


More information about the Mlir-commits mailing list