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