Back to PBT run

input.generic.mlir

"builtin.module"() ({
  "dataflow.thread"() <{domain = #dataflow.thread_domain<dense>, function_type = (index, memref<?xindex>) -> (), sym_name = "thread_0", sym_visibility = "private"}> ({
  ^bb0(%arg8: index, %arg9: memref<?xindex>, %arg10: none):
    "loom.spatial_region"(%arg8, %arg9) <{graph_name = "g_thread_0", operandSegmentSizes = array<i32: 1, 0, 1, 0>, resultSegmentSizes = array<i32: 0, 0>, source_maps = []}> ({
    ^bb0(%arg11: index, %arg12: memref<?xindex>):
      %8 = "arith.constant"() <{value = 0 : index}> : () -> index
      %9 = "arith.constant"() <{value = 1 : index}> : () -> index
      %10 = "arith.constant"() <{value = 2 : index}> : () -> index
      %11 = "arith.cmpi"(%8, %10) <{predicate = 6 : i64}> : (index, index) -> i1
      "scf.for"(%8, %10, %9) ({
      ^bb0(%arg13: index):
        "scf.forall"() <{operandSegmentSizes = array<i32: 0, 0, 0, 0>, staticLowerBound = array<i64: 0>, staticStep = array<i64: 1>, staticUpperBound = array<i64: 2>}> ({
        ^bb0(%arg14: index):
          %14 = "arith.muli"(%8, %10) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
          %15 = "arith.addi"(%14, %arg14) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
          %16 = "memref.load"(%arg12, %15) : (memref<?xindex>, index) -> index
          %17 = "arith.addi"(%16, %9) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
          "memref.store"(%17, %arg12, %15) : (index, memref<?xindex>, index) -> ()
          "scf.forall.in_parallel"() ({
          ^bb0:
          }) : () -> ()
        }) : () -> ()
        %12 = "memref.load"(%arg12, %8) : (memref<?xindex>, index) -> index
        %13 = "arith.addi"(%12, %9) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
        "memref.store"(%13, %arg12, %8) : (index, memref<?xindex>, index) -> ()
        "scf.yield"() : () -> ()
      }) : (index, index, index) -> ()
      "loom.spatial_yield"() <{operandSegmentSizes = array<i32: 0, 0>}> : () -> ()
    }) : (index, memref<?xindex>) -> ()
    "dataflow.thread.yield"() : () -> ()
  }) : () -> ()
  "dataflow.thread"() <{domain = #dataflow.thread_domain<dense>, function_type = (index, memref<?xindex>) -> (), sym_name = "thread_1", sym_visibility = "private"}> ({
  ^bb0(%arg0: index, %arg1: memref<?xindex>, %arg2: none):
    "loom.spatial_region"(%arg0, %arg1) <{graph_name = "g_thread_1", operandSegmentSizes = array<i32: 1, 0, 1, 0>, resultSegmentSizes = array<i32: 0, 0>, source_maps = []}> ({
    ^bb0(%arg3: index, %arg4: memref<?xindex>):
      %0 = "arith.constant"() <{value = 0 : index}> : () -> index
      %1 = "arith.constant"() <{value = 1 : index}> : () -> index
      %2 = "arith.constant"() <{value = 2 : index}> : () -> index
      %3 = "arith.cmpi"(%0, %2) <{predicate = 6 : i64}> : (index, index) -> i1
      "scf.if"(%3) ({
        "scf.for"(%0, %2, %1) ({
        ^bb0(%arg7: index):
          %6 = "memref.load"(%arg4, %0) : (memref<?xindex>, index) -> index
          %7 = "arith.addi"(%6, %1) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
          "memref.store"(%7, %arg4, %0) : (index, memref<?xindex>, index) -> ()
          "scf.yield"() : () -> ()
        }) : (index, index, index) -> ()
        "scf.yield"() : () -> ()
      }, {
        "scf.for"(%0, %2, %1) ({
        ^bb0(%arg6: index):
          "memref.store"(%1, %arg4, %0) : (index, memref<?xindex>, index) -> ()
          "scf.yield"() : () -> ()
        }) : (index, index, index) -> ()
        "scf.yield"() : () -> ()
      }) : (i1) -> ()
      "scf.for"(%0, %2, %1) ({
      ^bb0(%arg5: index):
        "memref.store"(%1, %arg4, %0) : (index, memref<?xindex>, index) -> ()
        %4 = "memref.load"(%arg4, %0) : (memref<?xindex>, index) -> index
        %5 = "arith.addi"(%4, %1) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
        "memref.store"(%5, %arg4, %0) : (index, memref<?xindex>, index) -> ()
        "scf.yield"() : () -> ()
      }) : (index, index, index) -> ()
      "loom.spatial_yield"() <{operandSegmentSizes = array<i32: 0, 0>}> : () -> ()
    }) : (index, memref<?xindex>) -> ()
    "dataflow.thread.yield"() : () -> ()
  }) : () -> ()
}) : () -> ()