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.for %iv1 = %zero to %two step %one {
      memref.store %one, %target[%zero] : memref<?xindex>
      memref.store %one, %target[%zero] : memref<?xindex>
      }
      } else {
      %wr4 = scf.while (%wa4 = %zero) : (index) -> index {
        %wc4 = arith.cmpi ult, %wa4, %two : index
        scf.condition(%wc4) %wa4 : index
      } do {
      ^bb0(%wb4: index):
      memref.store %one, %target[%zero] : memref<?xindex>
      memref.store %one, %target[%zero] : memref<?xindex>
        %wn4 = arith.addi %wb4, %one : index
        scf.yield %wn4 : index
      }
      }
      scf.forall (%iv7) in (2) {
        %mx7 = arith.muli %zero, %two : index
        %ix7 = arith.addi %mx7, %iv7 : index
      %wr8 = scf.while (%wa8 = %zero) : (index) -> index {
        %wc8 = arith.cmpi ult, %wa8, %two : index
        scf.condition(%wc8) %wa8 : index
      } do {
      ^bb0(%wb8: index):
      memref.store %one, %target[%ix7] : memref<?xindex>
        %wn8 = arith.addi %wb8, %one : index
        scf.yield %wn8 : index
      }
      }
      "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.forall (%iv10) in (2) {
        %mx10 = arith.muli %zero, %two : index
        %ix10 = arith.addi %mx10, %iv10 : index
      scf.for %iv11 = %zero to %two step %one {
      memref.store %one, %target[%ix10] : memref<?xindex>
      }
      memref.store %one, %target[%ix10] : memref<?xindex>
      }
      %wr14 = scf.while (%wa14 = %zero) : (index) -> index {
        %wc14 = arith.cmpi ult, %wa14, %two : index
        scf.condition(%wc14) %wa14 : index
      } do {
      ^bb0(%wb14: index):
      memref.store %one, %target[%zero] : memref<?xindex>
        %wn14 = arith.addi %wb14, %one : index
        scf.yield %wn14 : index
      }
      "loom.spatial_yield"()
          <{operandSegmentSizes = array<i32: 0, 0>}> : () -> ()
  }) {graph_name = "g_thread_1", source_maps = []} :
      (index, memref<?xindex>) -> ()
  dataflow.thread.yield
}