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