Back to PBT run

input.mlir

dataflow.thread private @thread_0 domain(#dataflow.thread_domain<dense>)(
    %limit: index, %memory: memref<?xindex>) ctrl (%ctrl: none) {
  "loom.spatial_region"(%limit, %memory)
      <{operandSegmentSizes = array<i32: 1, 0, 1, 0>,
        resultSegmentSizes = array<i32: 0, 0>}> ({
    ^bb0(%lim: index, %target: memref<?xindex>):
      %zero = arith.constant 0 : index
      %one = arith.constant 1 : index
      %two = arith.constant 2 : index
      %flag = arith.cmpi ult, %zero, %two : index
      scf.if %flag {
      scf.forall (%iv1) in (2) {
        %mx1 = arith.muli %zero, %two : index
        %ix1 = arith.addi %mx1, %iv1 : index
      memref.store %one, %target[%ix1] : memref<?xindex>
      }
      memref.store %one, %target[%zero] : memref<?xindex>
      }
      "loom.spatial_yield"()
          <{operandSegmentSizes = array<i32: 0, 0>}> : () -> ()
  }) {graph_name = "g_thread_0", source_maps = []} :
      (index, memref<?xindex>) -> ()
  dataflow.thread.yield
}
dataflow.thread private @thread_1 domain(#dataflow.thread_domain<dense>)(
    %limit: index, %memory: memref<?xindex>) ctrl (%ctrl: none) {
  "loom.spatial_region"(%limit, %memory)
      <{operandSegmentSizes = array<i32: 1, 0, 1, 0>,
        resultSegmentSizes = array<i32: 0, 0>}> ({
    ^bb0(%lim: index, %target: memref<?xindex>):
      %zero = arith.constant 0 : index
      %one = arith.constant 1 : index
      %two = arith.constant 2 : index
      %flag = arith.cmpi ult, %zero, %two : index
      scf.parallel (%iv4) = (%zero) to (%two) step (%one) {
        %mx4 = arith.muli %zero, %two : index
        %ix4 = arith.addi %mx4, %iv4 : index
      memref.store %one, %target[%ix4] : memref<?xindex>
      %ld6 = memref.load %target[%ix4] : memref<?xindex>
      %ad6 = arith.addi %ld6, %one : index
      memref.store %ad6, %target[%ix4] : memref<?xindex>
        scf.reduce
      }
      "loom.spatial_yield"()
          <{operandSegmentSizes = array<i32: 0, 0>}> : () -> ()
  }) {graph_name = "g_thread_1", source_maps = []} :
      (index, memref<?xindex>) -> ()
  dataflow.thread.yield
}