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(%arg5: index, %arg6: memref<?xindex>, %arg7: none):
    "loom.spatial_region"(%arg5, %arg6) <{graph_name = "g_thread_0", operandSegmentSizes = array<i32: 1, 0, 1, 0>, resultSegmentSizes = array<i32: 0, 0>, source_maps = []}> ({
    ^bb0(%arg8: index, %arg9: memref<?xindex>):
      %4 = "arith.constant"() <{value = 0 : index}> : () -> index
      %5 = "arith.constant"() <{value = 1 : index}> : () -> index
      %6 = "arith.constant"() <{value = 2 : index}> : () -> index
      %7 = "arith.cmpi"(%4, %6) <{predicate = 6 : i64}> : (index, index) -> i1
      "scf.parallel"(%4, %6, %5) <{operandSegmentSizes = array<i32: 1, 1, 1, 0>}> ({
      ^bb0(%arg13: index):
        %13 = "arith.muli"(%4, %6) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
        %14 = "arith.addi"(%13, %arg13) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
        %15 = "scf.while"(%4) ({
        ^bb0(%arg17: index):
          %22 = "arith.cmpi"(%arg17, %6) <{predicate = 6 : i64}> : (index, index) -> i1
          "scf.condition"(%22, %arg17) : (i1, index) -> ()
        }, {
        ^bb0(%arg16: index):
          "memref.store"(%5, %arg9, %14) : (index, memref<?xindex>, index) -> ()
          %21 = "arith.addi"(%arg16, %5) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
          "scf.yield"(%21) : (index) -> ()
        }) : (index) -> index
        %16 = "scf.while"(%4) ({
        ^bb0(%arg15: index):
          %20 = "arith.cmpi"(%arg15, %6) <{predicate = 6 : i64}> : (index, index) -> i1
          "scf.condition"(%20, %arg15) : (i1, index) -> ()
        }, {
        ^bb0(%arg14: index):
          %17 = "memref.load"(%arg9, %14) : (memref<?xindex>, index) -> index
          %18 = "arith.addi"(%17, %5) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
          "memref.store"(%18, %arg9, %14) : (index, memref<?xindex>, index) -> ()
          %19 = "arith.addi"(%arg14, %5) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
          "scf.yield"(%19) : (index) -> ()
        }) : (index) -> index
        "scf.reduce"() : () -> ()
      }) : (index, index, index) -> ()
      "scf.if"(%7) ({
        "scf.for"(%4, %6, %5) ({
        ^bb0(%arg12: index):
          "memref.store"(%5, %arg9, %4) : (index, memref<?xindex>, index) -> ()
          "scf.yield"() : () -> ()
        }) : (index, index, index) -> ()
        %11 = "memref.load"(%arg9, %4) : (memref<?xindex>, index) -> index
        %12 = "arith.addi"(%11, %5) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
        "memref.store"(%12, %arg9, %4) : (index, memref<?xindex>, index) -> ()
        "scf.yield"() : () -> ()
      }, {
        %8 = "scf.while"(%4) ({
        ^bb0(%arg11: index):
          %10 = "arith.cmpi"(%arg11, %6) <{predicate = 6 : i64}> : (index, index) -> i1
          "scf.condition"(%10, %arg11) : (i1, index) -> ()
        }, {
        ^bb0(%arg10: index):
          "memref.store"(%5, %arg9, %4) : (index, memref<?xindex>, index) -> ()
          %9 = "arith.addi"(%arg10, %5) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
          "scf.yield"(%9) : (index) -> ()
        }) : (index) -> index
        "scf.yield"() : () -> ()
      }) : (i1) -> ()
      "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
      "memref.store"(%1, %arg4, %0) : (index, memref<?xindex>, index) -> ()
      "loom.spatial_yield"() <{operandSegmentSizes = array<i32: 0, 0>}> : () -> ()
    }) : (index, memref<?xindex>) -> ()
    "dataflow.thread.yield"() : () -> ()
  }) : () -> ()
}) : () -> ()