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(%arg0: index, %arg1: memref<?xindex>, %arg2: none):
    "loom.spatial_region"(%arg0, %arg1) <{graph_name = "g_thread_0", 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
      %4 = "scf.while"(%0) ({
      ^bb0(%arg11: index):
        %18 = "arith.cmpi"(%arg11, %2) <{predicate = 6 : i64}> : (index, index) -> i1
        "scf.condition"(%18, %arg11) : (i1, index) -> ()
      }, {
      ^bb0(%arg6: index):
        %9 = "scf.while"(%0) ({
        ^bb0(%arg10: index):
          %17 = "arith.cmpi"(%arg10, %2) <{predicate = 6 : i64}> : (index, index) -> i1
          "scf.condition"(%17, %arg10) : (i1, index) -> ()
        }, {
        ^bb0(%arg9: index):
          "memref.store"(%1, %arg4, %0) : (index, memref<?xindex>, index) -> ()
          %16 = "arith.addi"(%arg9, %1) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
          "scf.yield"(%16) : (index) -> ()
        }) : (index) -> index
        %10 = "scf.while"(%0) ({
        ^bb0(%arg8: index):
          %15 = "arith.cmpi"(%arg8, %2) <{predicate = 6 : i64}> : (index, index) -> i1
          "scf.condition"(%15, %arg8) : (i1, index) -> ()
        }, {
        ^bb0(%arg7: 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) -> ()
          %14 = "arith.addi"(%arg7, %1) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
          "scf.yield"(%14) : (index) -> ()
        }) : (index) -> index
        %11 = "arith.addi"(%arg6, %1) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
        "scf.yield"(%11) : (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(%arg5: index):
        %5 = "arith.muli"(%0, %2) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
        %6 = "arith.addi"(%5, %arg5) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
        %7 = "memref.load"(%arg4, %6) : (memref<?xindex>, index) -> index
        %8 = "arith.addi"(%7, %1) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
        "memref.store"(%8, %arg4, %6) : (index, memref<?xindex>, index) -> ()
        "memref.store"(%1, %arg4, %6) : (index, memref<?xindex>, index) -> ()
        "scf.forall.in_parallel"() ({
        ^bb0:
        }) : () -> ()
      }) : () -> ()
      "loom.spatial_yield"() <{operandSegmentSizes = array<i32: 0, 0>}> : () -> ()
    }) : (index, memref<?xindex>) -> ()
    "dataflow.thread.yield"() : () -> ()
  }) : () -> ()
}) : () -> ()