Back to PBT run

test.mlir

// RUN: loom-raise-opt --loom-lower-scf-to-dfg --mlir-print-op-generic %s | FileCheck %s

llvm.func @imported_kernel(i64)

dataflow.thread private @t0 domain(#dataflow.thread_domain<dense>)(
    %scratch: memref<8xindex>, %memory: memref<8xindex>, %grid: memref<4x4xindex>,
    %n: index) ctrl (%ctrl: none) {
  %rzero = arith.constant 0 : index
  %rval = arith.constant 3 : index
  memref.store %rval, %scratch[%rzero] : memref<8xindex>
  "loom.spatial_region"(%n, %memory, %grid)
      <{operandSegmentSizes = array<i32: 1, 0, 2, 0>,
        resultSegmentSizes = array<i32: 0, 0>}> ({
    ^bb0(%limit: index, %target: memref<8xindex>, %tile: memref<4x4xindex>):
      %c0 = arith.constant 0 : index
      %c1 = arith.constant 1 : index
      %cw = arith.constant 4 : index
      %kv = arith.constant 7 : index
        scf.parallel (%pi) = (%c0) to (%cw) step (%c1) {
          scf.parallel (%pj) = (%c0) to (%cw) step (%c1) {
            memref.store %kv, %tile[%pi, %pj] : memref<4x4xindex>
            scf.reduce
          }
          scf.reduce
        }
      "loom.spatial_yield"()
          <{operandSegmentSizes = array<i32: 0, 0>}> : () -> ()
  }) {graph_name = "g_t0_0", source_maps = []} :
      (index, memref<8xindex>, memref<4x4xindex>) -> ()
  dataflow.thread.yield
}

dataflow.thread private @t1 domain(#dataflow.thread_domain<dense>)(
    %scratch: memref<8xindex>, %memory: memref<8xindex>, %grid: memref<4x4xindex>,
    %n: index) ctrl (%ctrl: none) {
  "loom.spatial_region"(%n, %memory, %grid)
      <{operandSegmentSizes = array<i32: 1, 0, 2, 0>,
        resultSegmentSizes = array<i32: 0, 0>}> ({
    ^bb0(%limit: index, %target: memref<8xindex>, %tile: memref<4x4xindex>):
      %c0 = arith.constant 0 : index
      %c1 = arith.constant 1 : index
      %cw = arith.constant 4 : index
      %kv = arith.constant 7 : index
      scf.for %oi = %c0 to %limit step %c1 {
        scf.parallel (%lane) = (%c0) to (%cw) step (%c1) {
          %bcond = arith.cmpi slt, %lane, %cw : index
          scf.if %bcond {
            memref.store %kv, %target[%lane] : memref<8xindex>
          }
          scf.reduce
        }
      }
      "loom.spatial_yield"()
          <{operandSegmentSizes = array<i32: 0, 0>}> : () -> ()
  }) {graph_name = "g_t1_0", source_maps = []} :
      (index, memref<8xindex>, memref<4x4xindex>) -> ()
  dataflow.thread.yield
}


// CHECK: "builtin.module"() ({
// CHECK-NEXT:   "llvm.func"() <{CConv = #llvm.cconv<ccc>, function_type = !llvm.func<void (i64)>, linkage = #llvm.linkage<external>, sym_name = "imported_kernel", unnamed_addr = 0 : i64, visibility_ = 0 : i64}> ({
// CHECK-NEXT:   }) : () -> ()
// CHECK-NEXT:   "dataflow.thread"() <{domain = #dataflow.thread_domain<dense>, function_type = (memref<8xindex>, memref<8xindex>, memref<4x4xindex>, index) -> (), sym_name = "t0", sym_visibility = "private"}> ({
// CHECK-NEXT:   ^bb0(%arg13: memref<8xindex>, %arg14: memref<8xindex>, %arg15: memref<4x4xindex>, %arg16: index, %arg17: none):
// CHECK-NEXT:     %158 = "arith.constant"() <{value = 0 : index}> : () -> index
// CHECK-NEXT:     %159 = "arith.constant"() <{value = 3 : index}> : () -> index
// CHECK-NEXT:     "memref.store"(%159, %arg13, %158) : (index, memref<8xindex>, index) -> ()
// CHECK-NEXT:     %160 = "dataflow.graph.launch"(%arg17, %arg16, %arg14, %arg15) <{callee = @g_t0_0, operandSegmentSizes = array<i32: 1, 1, 0, 2, 0>, resultSegmentSizes = array<i32: 0, 0, 1>, source_maps = []}> : (none, index, memref<8xindex>, memref<4x4xindex>) -> none
// CHECK-NEXT:     "dataflow.thread.yield"(%160) : (none) -> ()
// CHECK-NEXT:   }) : () -> ()
// CHECK-NEXT:   "dataflow.thread"() <{domain = #dataflow.thread_domain<dense>, function_type = (memref<8xindex>, memref<8xindex>, memref<4x4xindex>, index) -> (), sym_name = "t1", sym_visibility = "private"}> ({
// CHECK-NEXT:   ^bb0(%arg8: memref<8xindex>, %arg9: memref<8xindex>, %arg10: memref<4x4xindex>, %arg11: index, %arg12: none):
// CHECK-NEXT:     %157 = "dataflow.graph.launch"(%arg12, %arg11, %arg9, %arg10) <{callee = @g_t1_0, operandSegmentSizes = array<i32: 1, 1, 0, 2, 0>, resultSegmentSizes = array<i32: 0, 0, 1>, source_maps = []}> : (none, index, memref<8xindex>, memref<4x4xindex>) -> none
// CHECK-NEXT:     "dataflow.thread.yield"(%157) : (none) -> ()
// CHECK-NEXT:   }) : () -> ()
// CHECK-NEXT:   "dataflow.graph"() <{function_type = (index, memref<8xindex>, memref<4x4xindex>) -> (), input_segments = array<i32: 1, 0, 2>, result_segments = array<i32: 0, 0, 0>, sym_name = "g_t0_0", sym_visibility = "private"}> ({
// CHECK-NEXT:   ^bb0(%arg4: none, %arg5: index, %arg6: memref<8xindex>, %arg7: memref<4x4xindex>):
// CHECK-NEXT:     %73 = "dataflow.constant"(%arg4) <{const_value = 7 : index}> : (none) -> index
// CHECK-NEXT:     %74 = "dataflow.constant"(%arg4) <{const_value = 0 : index}> : (none) -> index
// CHECK-NEXT:     %75 = "dataflow.constant"(%arg4) <{const_value = 1 : index}> : (none) -> index
// CHECK-NEXT:     %76 = "dataflow.constant"(%arg4) <{const_value = 2 : index}> : (none) -> index
// CHECK-NEXT:     %77 = "dataflow.constant"(%arg4) <{const_value = 3 : index}> : (none) -> index
// CHECK-NEXT:     %78 = "dataflow.constant"(%arg4) <{const_value = 4 : index}> : (none) -> index
// CHECK-NEXT:     %79 = "arith.muli"(%74, %78) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
// CHECK-NEXT:     %80 = "arith.addi"(%79, %74) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
// CHECK-NEXT:     %81 = "dataflow.store"(%arg7, %80, %73, %arg4) : (memref<4x4xindex>, index, index, none) -> none
// CHECK-NEXT:     %82 = "dataflow.constant"(%arg4) <{const_value = 4 : index}> : (none) -> index
// CHECK-NEXT:     %83 = "arith.muli"(%74, %82) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
// CHECK-NEXT:     %84 = "arith.addi"(%83, %75) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
// CHECK-NEXT:     %85 = "dataflow.store"(%arg7, %84, %73, %arg4) : (memref<4x4xindex>, index, index, none) -> none
// CHECK-NEXT:     %86 = "dataflow.constant"(%arg4) <{const_value = 4 : index}> : (none) -> index
// CHECK-NEXT:     %87 = "arith.muli"(%74, %86) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
// CHECK-NEXT:     %88 = "arith.addi"(%87, %76) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
// CHECK-NEXT:     %89 = "dataflow.store"(%arg7, %88, %73, %arg4) : (memref<4x4xindex>, index, index, none) -> none
// CHECK-NEXT:     %90 = "dataflow.constant"(%arg4) <{const_value = 4 : index}> : (none) -> index
// CHECK-NEXT:     %91 = "arith.muli"(%74, %90) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
// CHECK-NEXT:     %92 = "arith.addi"(%91, %77) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
// CHECK-NEXT:     %93 = "dataflow.store"(%arg7, %92, %73, %arg4) : (memref<4x4xindex>, index, index, none) -> none
// CHECK-NEXT:     %94 = "dataflow.constant"(%arg4) <{const_value = 4 : index}> : (none) -> index
// CHECK-NEXT:     %95 = "arith.muli"(%75, %94) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
// CHECK-NEXT:     %96 = "arith.addi"(%95, %74) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
// CHECK-NEXT:     %97 = "dataflow.store"(%arg7, %96, %73, %arg4) : (memref<4x4xindex>, index, index, none) -> none
// CHECK-NEXT:     %98 = "dataflow.constant"(%arg4) <{const_value = 4 : index}> : (none) -> index
// CHECK-NEXT:     %99 = "arith.muli"(%75, %98) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
// CHECK-NEXT:     %100 = "arith.addi"(%99, %75) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
// CHECK-NEXT:     %101 = "dataflow.store"(%arg7, %100, %73, %arg4) : (memref<4x4xindex>, index, index, none) -> none
// CHECK-NEXT:     %102 = "dataflow.constant"(%arg4) <{const_value = 4 : index}> : (none) -> index
// CHECK-NEXT:     %103 = "arith.muli"(%75, %102) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
// CHECK-NEXT:     %104 = "arith.addi"(%103, %76) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
// CHECK-NEXT:     %105 = "dataflow.store"(%arg7, %104, %73, %arg4) : (memref<4x4xindex>, index, index, none) -> none
// CHECK-NEXT:     %106 = "dataflow.constant"(%arg4) <{const_value = 4 : index}> : (none) -> index
// CHECK-NEXT:     %107 = "arith.muli"(%75, %106) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
// CHECK-NEXT:     %108 = "arith.addi"(%107, %77) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
// CHECK-NEXT:     %109 = "dataflow.store"(%arg7, %108, %73, %arg4) : (memref<4x4xindex>, index, index, none) -> none
// CHECK-NEXT:     %110 = "dataflow.constant"(%arg4) <{const_value = 4 : index}> : (none) -> index
// CHECK-NEXT:     %111 = "arith.muli"(%76, %110) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
// CHECK-NEXT:     %112 = "arith.addi"(%111, %74) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
// CHECK-NEXT:     %113 = "dataflow.store"(%arg7, %112, %73, %arg4) : (memref<4x4xindex>, index, index, none) -> none
// CHECK-NEXT:     %114 = "dataflow.constant"(%arg4) <{const_value = 4 : index}> : (none) -> index
// CHECK-NEXT:     %115 = "arith.muli"(%76, %114) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
// CHECK-NEXT:     %116 = "arith.addi"(%115, %75) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
// CHECK-NEXT:     %117 = "dataflow.store"(%arg7, %116, %73, %arg4) : (memref<4x4xindex>, index, index, none) -> none
// CHECK-NEXT:     %118 = "dataflow.constant"(%arg4) <{const_value = 4 : index}> : (none) -> index
// CHECK-NEXT:     %119 = "arith.muli"(%76, %118) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
// CHECK-NEXT:     %120 = "arith.addi"(%119, %76) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
// CHECK-NEXT:     %121 = "dataflow.store"(%arg7, %120, %73, %arg4) : (memref<4x4xindex>, index, index, none) -> none
// CHECK-NEXT:     %122 = "dataflow.constant"(%arg4) <{const_value = 4 : index}> : (none) -> index
// CHECK-NEXT:     %123 = "arith.muli"(%76, %122) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
// CHECK-NEXT:     %124 = "arith.addi"(%123, %77) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
// CHECK-NEXT:     %125 = "dataflow.store"(%arg7, %124, %73, %arg4) : (memref<4x4xindex>, index, index, none) -> none
// CHECK-NEXT:     %126 = "dataflow.constant"(%arg4) <{const_value = 4 : index}> : (none) -> index
// CHECK-NEXT:     %127 = "arith.muli"(%77, %126) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
// CHECK-NEXT:     %128 = "arith.addi"(%127, %74) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
// CHECK-NEXT:     %129 = "dataflow.store"(%arg7, %128, %73, %arg4) : (memref<4x4xindex>, index, index, none) -> none
// CHECK-NEXT:     %130 = "dataflow.constant"(%arg4) <{const_value = 4 : index}> : (none) -> index
// CHECK-NEXT:     %131 = "arith.muli"(%77, %130) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
// CHECK-NEXT:     %132 = "arith.addi"(%131, %75) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
// CHECK-NEXT:     %133 = "dataflow.store"(%arg7, %132, %73, %arg4) : (memref<4x4xindex>, index, index, none) -> none
// CHECK-NEXT:     %134 = "dataflow.constant"(%arg4) <{const_value = 4 : index}> : (none) -> index
// CHECK-NEXT:     %135 = "arith.muli"(%77, %134) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
// CHECK-NEXT:     %136 = "arith.addi"(%135, %76) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
// CHECK-NEXT:     %137 = "dataflow.store"(%arg7, %136, %73, %arg4) : (memref<4x4xindex>, index, index, none) -> none
// CHECK-NEXT:     %138 = "dataflow.constant"(%arg4) <{const_value = 4 : index}> : (none) -> index
// CHECK-NEXT:     %139 = "arith.muli"(%77, %138) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
// CHECK-NEXT:     %140 = "arith.addi"(%139, %77) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
// CHECK-NEXT:     %141 = "dataflow.store"(%arg7, %140, %73, %arg4) : (memref<4x4xindex>, index, index, none) -> none
// CHECK-NEXT:     %142:2 = "dataflow.sync"(%81, %85) : (none, none) -> (none, none)
// CHECK-NEXT:     %143:2 = "dataflow.sync"(%89, %93) : (none, none) -> (none, none)
// CHECK-NEXT:     %144:2 = "dataflow.sync"(%142#0, %143#0) : (none, none) -> (none, none)
// CHECK-NEXT:     %145:2 = "dataflow.sync"(%97, %101) : (none, none) -> (none, none)
// CHECK-NEXT:     %146:2 = "dataflow.sync"(%105, %109) : (none, none) -> (none, none)
// CHECK-NEXT:     %147:2 = "dataflow.sync"(%145#0, %146#0) : (none, none) -> (none, none)
// CHECK-NEXT:     %148:2 = "dataflow.sync"(%144#0, %147#0) : (none, none) -> (none, none)
// CHECK-NEXT:     %149:2 = "dataflow.sync"(%113, %117) : (none, none) -> (none, none)
// CHECK-NEXT:     %150:2 = "dataflow.sync"(%121, %125) : (none, none) -> (none, none)
// CHECK-NEXT:     %151:2 = "dataflow.sync"(%149#0, %150#0) : (none, none) -> (none, none)
// CHECK-NEXT:     %152:2 = "dataflow.sync"(%129, %133) : (none, none) -> (none, none)
// CHECK-NEXT:     %153:2 = "dataflow.sync"(%137, %141) : (none, none) -> (none, none)
// CHECK-NEXT:     %154:2 = "dataflow.sync"(%152#0, %153#0) : (none, none) -> (none, none)
// CHECK-NEXT:     %155:2 = "dataflow.sync"(%151#0, %154#0) : (none, none) -> (none, none)
// CHECK-NEXT:     %156:2 = "dataflow.sync"(%148#0, %155#0) : (none, none) -> (none, none)
// CHECK-NEXT:     "dataflow.graph.return"(%156#0) <{operandSegmentSizes = array<i32: 0, 0, 0, 1>}> : (none) -> ()
// CHECK-NEXT:   }) : () -> ()
// CHECK-NEXT:   "dataflow.graph"() <{function_type = (index, memref<8xindex>, memref<4x4xindex>) -> (), input_segments = array<i32: 1, 0, 2>, result_segments = array<i32: 0, 0, 0>, sym_name = "g_t1_0", sym_visibility = "private"}> ({
// CHECK-NEXT:   ^bb0(%arg0: none, %arg1: index, %arg2: memref<8xindex>, %arg3: memref<4x4xindex>):
// CHECK-NEXT:     %0 = "dataflow.constant"(%arg0) <{const_value = 0 : index}> : (none) -> index
// CHECK-NEXT:     %1 = "dataflow.constant"(%arg0) <{const_value = 1 : index}> : (none) -> index
// CHECK-NEXT:     %2 = "dataflow.constant"(%arg0) <{const_value = 4 : index}> : (none) -> index
// CHECK-NEXT:     %3 = "dataflow.constant"(%arg0) <{const_value = 7 : index}> : (none) -> index
// CHECK-NEXT:     %4 = "arith.index_cast"(%0) : (index) -> i32
// CHECK-NEXT:     %5 = "arith.index_cast"(%arg1) : (index) -> i32
// CHECK-NEXT:     %6 = "arith.index_cast"(%1) : (index) -> i32
// CHECK-NEXT:     %7:2 = "dataflow.stream"(%4, %5, %6) <{predicate = 2 : i64, step_kind = 0 : i32}> : (i32, i32, i32) -> (i32, i1)
// CHECK-NEXT:     %8 = "dataflow.carry"(%7#1, %arg0, %64#0) : (i1, none, none) -> none
// CHECK-NEXT:     %9:2 = "dataflow.demux"(%7#1, %8) : (i1, none) -> (none, none)
// CHECK-NEXT:     %10 = "dataflow.invariant"(%7#1, %2) : (i1, index) -> index
// CHECK-NEXT:     %11:2 = "dataflow.gate"(%7#1, %10) : (i1, index) -> (i1, index)
// CHECK-NEXT:     %12:2 = "dataflow.demux"(%11#0, %11#1) : (i1, index) -> (index, index)
// CHECK-NEXT:     %13 = "dataflow.invariant"(%7#1, %3) : (i1, index) -> index
// CHECK-NEXT:     %14:2 = "dataflow.gate"(%7#1, %13) : (i1, index) -> (i1, index)
// CHECK-NEXT:     %15:2 = "dataflow.demux"(%14#0, %14#1) : (i1, index) -> (index, index)
// CHECK-NEXT:     %16 = "dataflow.invariant"(%7#1, %0) : (i1, index) -> index
// CHECK-NEXT:     %17:2 = "dataflow.gate"(%7#1, %16) : (i1, index) -> (i1, index)
// CHECK-NEXT:     %18:2 = "dataflow.demux"(%17#0, %17#1) : (i1, index) -> (index, index)
// CHECK-NEXT:     %19 = "dataflow.invariant"(%7#1, %1) : (i1, index) -> index
// CHECK-NEXT:     %20:2 = "dataflow.gate"(%7#1, %19) : (i1, index) -> (i1, index)
// CHECK-NEXT:     %21:2 = "dataflow.demux"(%20#0, %20#1) : (i1, index) -> (index, index)
// CHECK-NEXT:     %22 = "dataflow.carry"(%7#1, %arg0, %65#0) : (i1, none, none) -> none
// CHECK-NEXT:     %23:2 = "dataflow.demux"(%7#1, %22) : (i1, none) -> (none, none)
// CHECK-NEXT:     %24 = "dataflow.constant"(%9#1) <{const_value = 0 : index}> : (none) -> index
// CHECK-NEXT:     %25 = "arith.cmpi"(%24, %11#1) <{predicate = 2 : i64}> : (index, index) -> i1
// CHECK-NEXT:     %26:2 = "dataflow.demux"(%25, %9#1) : (i1, none) -> (none, none)
// CHECK-NEXT:     %27:2 = "dataflow.demux"(%25, %23#1) : (i1, none) -> (none, none)
// CHECK-NEXT:     %28:2 = "dataflow.demux"(%25, %14#1) : (i1, index) -> (index, index)
// CHECK-NEXT:     %29:2 = "dataflow.demux"(%25, %24) : (i1, index) -> (index, index)
// CHECK-NEXT:     %30:2 = "dataflow.sync"(%26#1, %27#1) : (none, none) -> (none, none)
// CHECK-NEXT:     %31 = "dataflow.store"(%arg2, %29#1, %28#1, %30#0) : (memref<8xindex>, index, index, none) -> none
// CHECK-NEXT:     %32 = "dataflow.mux"(%25, %27#0, %31) : (i1, none, none) -> none
// CHECK-NEXT:     %33 = "dataflow.mux"(%25, %26#0, %26#1) : (i1, none, none) -> none
// CHECK-NEXT:     %34 = "dataflow.constant"(%9#1) <{const_value = 1 : index}> : (none) -> index
// CHECK-NEXT:     %35 = "arith.cmpi"(%34, %11#1) <{predicate = 2 : i64}> : (index, index) -> i1
// CHECK-NEXT:     %36:2 = "dataflow.demux"(%35, %9#1) : (i1, none) -> (none, none)
// CHECK-NEXT:     %37:2 = "dataflow.demux"(%35, %23#1) : (i1, none) -> (none, none)
// CHECK-NEXT:     %38:2 = "dataflow.demux"(%35, %14#1) : (i1, index) -> (index, index)
// CHECK-NEXT:     %39:2 = "dataflow.demux"(%35, %34) : (i1, index) -> (index, index)
// CHECK-NEXT:     %40:2 = "dataflow.sync"(%36#1, %37#1) : (none, none) -> (none, none)
// CHECK-NEXT:     %41 = "dataflow.store"(%arg2, %39#1, %38#1, %40#0) : (memref<8xindex>, index, index, none) -> none
// CHECK-NEXT:     %42 = "dataflow.mux"(%35, %37#0, %41) : (i1, none, none) -> none
// CHECK-NEXT:     %43 = "dataflow.mux"(%35, %36#0, %36#1) : (i1, none, none) -> none
// CHECK-NEXT:     %44 = "dataflow.constant"(%9#1) <{const_value = 2 : index}> : (none) -> index
// CHECK-NEXT:     %45 = "arith.cmpi"(%44, %11#1) <{predicate = 2 : i64}> : (index, index) -> i1
// CHECK-NEXT:     %46:2 = "dataflow.demux"(%45, %9#1) : (i1, none) -> (none, none)
// CHECK-NEXT:     %47:2 = "dataflow.demux"(%45, %23#1) : (i1, none) -> (none, none)
// CHECK-NEXT:     %48:2 = "dataflow.demux"(%45, %14#1) : (i1, index) -> (index, index)
// CHECK-NEXT:     %49:2 = "dataflow.demux"(%45, %44) : (i1, index) -> (index, index)
// CHECK-NEXT:     %50:2 = "dataflow.sync"(%46#1, %47#1) : (none, none) -> (none, none)
// CHECK-NEXT:     %51 = "dataflow.store"(%arg2, %49#1, %48#1, %50#0) : (memref<8xindex>, index, index, none) -> none
// CHECK-NEXT:     %52 = "dataflow.mux"(%45, %47#0, %51) : (i1, none, none) -> none
// CHECK-NEXT:     %53 = "dataflow.mux"(%45, %46#0, %46#1) : (i1, none, none) -> none
// CHECK-NEXT:     %54 = "dataflow.constant"(%9#1) <{const_value = 3 : index}> : (none) -> index
// CHECK-NEXT:     %55 = "arith.cmpi"(%54, %11#1) <{predicate = 2 : i64}> : (index, index) -> i1
// CHECK-NEXT:     %56:2 = "dataflow.demux"(%55, %9#1) : (i1, none) -> (none, none)
// CHECK-NEXT:     %57:2 = "dataflow.demux"(%55, %23#1) : (i1, none) -> (none, none)
// CHECK-NEXT:     %58:2 = "dataflow.demux"(%55, %14#1) : (i1, index) -> (index, index)
// CHECK-NEXT:     %59:2 = "dataflow.demux"(%55, %54) : (i1, index) -> (index, index)
// CHECK-NEXT:     %60:2 = "dataflow.sync"(%56#1, %57#1) : (none, none) -> (none, none)
// CHECK-NEXT:     %61 = "dataflow.store"(%arg2, %59#1, %58#1, %60#0) : (memref<8xindex>, index, index, none) -> none
// CHECK-NEXT:     %62 = "dataflow.mux"(%55, %57#0, %61) : (i1, none, none) -> none
// CHECK-NEXT:     %63 = "dataflow.mux"(%55, %56#0, %56#1) : (i1, none, none) -> none
// CHECK-NEXT:     %64:4 = "dataflow.sync"(%33, %43, %53, %63) : (none, none, none, none) -> (none, none, none, none)
// CHECK-NEXT:     %65:4 = "dataflow.sync"(%32, %42, %52, %62) : (none, none, none, none) -> (none, none, none, none)
// CHECK-NEXT:     %66 = "arith.cmpi"(%4, %5) <{predicate = 2 : i64}> : (i32, i32) -> i1
// CHECK-NEXT:     %67:2 = "dataflow.demux"(%66, %9#0) : (i1, none) -> (none, none)
// CHECK-NEXT:     %68:2 = "dataflow.sync"(%67#1, %12#0) : (none, index) -> (none, index)
// CHECK-NEXT:     %69:2 = "dataflow.sync"(%68#0, %15#0) : (none, index) -> (none, index)
// CHECK-NEXT:     %70:2 = "dataflow.sync"(%18#0, %21#0) : (index, index) -> (index, index)
// CHECK-NEXT:     %71:2 = "dataflow.sync"(%69#0, %70#0) : (none, index) -> (none, index)
// CHECK-NEXT:     %72 = "dataflow.mux"(%66, %67#0, %71#0) : (i1, none, none) -> none
// CHECK-NEXT:     "dataflow.graph.return"(%72, %23#0) <{operandSegmentSizes = array<i32: 0, 0, 0, 2>}> : (none, none) -> ()
// CHECK-NEXT:   }) : () -> ()
// CHECK-NEXT: }) : () -> ()
// CHECK-EMPTY: