Back to PBT run

input.mlir

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 2 : index
      %kv = arith.constant 7 : index
      %ocond = arith.cmpi slt, %c0, %limit : index
      scf.if %ocond {
        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_t0_0", source_maps = []} :
      (index, memref<8xindex>, memref<4x4xindex>) -> ()
  dataflow.thread.yield
}