[Mlir-commits] [mlir] [mlir][spirv] Allow yielding values from selection regions (PR #133702)

Igor Wodiany llvmlistbot at llvm.org
Wed Apr 2 03:24:50 PDT 2025


================
@@ -352,22 +352,30 @@ def SPIRV_LoopOp : SPIRV_Op<"mlir.loop", [InFunctionScope]> {
 // -----
 
 def SPIRV_MergeOp : SPIRV_Op<"mlir.merge", [
-    Pure, Terminator, ParentOneOf<["SelectionOp", "LoopOp"]>]> {
+    Pure, Terminator, ParentOneOf<["SelectionOp", "LoopOp"]>, ReturnLike]> {
   let summary = "A special terminator for merging a structured selection/loop.";
 
   let description = [{
     We use `spirv.mlir.selection`/`spirv.mlir.loop` for modelling structured selection/loop.
----------------
IgWod-IMG wrote:

I updated docs and also expanded descriptions in `mlir/include/mlir/Dialect/SPIRV/IR/SPIRVControlFlowOps.td`, so hopefully the website should cover all that's needed now, but please let me know if any more explanation is needed.

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


More information about the Mlir-commits mailing list