Back to PBT run

input.generic.mlir

"builtin.module"() ({
  "dataflow.thread"() <{domain = #dataflow.thread_domain<dense>, function_type = (memref<8xindex>, memref<8xindex>, memref<4x4xindex>, index) -> (), sym_name = "t0", sym_visibility = "private"}> ({
  ^bb0(%arg11: memref<8xindex>, %arg12: memref<8xindex>, %arg13: memref<4x4xindex>, %arg14: index, %arg15: none):
    %7 = "arith.constant"() <{value = 0 : index}> : () -> index
    %8 = "arith.constant"() <{value = 3 : index}> : () -> index
    "memref.store"(%8, %arg11, %7) : (index, memref<8xindex>, index) -> ()
    "loom.spatial_region"(%arg14, %arg12, %arg13) <{graph_name = "g_t0_0", operandSegmentSizes = array<i32: 1, 0, 2, 0>, resultSegmentSizes = array<i32: 0, 0>, source_maps = []}> ({
    ^bb0(%arg16: index, %arg17: memref<8xindex>, %arg18: memref<4x4xindex>):
      %9 = "arith.constant"() <{value = 0 : index}> : () -> index
      %10 = "arith.constant"() <{value = 1 : index}> : () -> index
      %11 = "arith.constant"() <{value = 4 : index}> : () -> index
      %12 = "arith.constant"() <{value = 7 : index}> : () -> index
      %13 = "arith.cmpi"(%9, %arg16) <{predicate = 2 : i64}> : (index, index) -> i1
      "scf.if"(%13) ({
        "scf.parallel"(%9, %11, %10) <{operandSegmentSizes = array<i32: 1, 1, 1, 0>}> ({
        ^bb0(%arg19: index):
          %14 = "scf.for"(%9, %arg16, %10, %arg19) ({
          ^bb0(%arg20: index, %arg21: index):
            %15 = "arith.addi"(%arg21, %10) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
            "scf.yield"(%15) : (index) -> ()
          }) : (index, index, index, index) -> index
          "memref.store"(%14, %arg17, %arg19) : (index, memref<8xindex>, index) -> ()
          "scf.reduce"() : () -> ()
        }) : (index, index, index) -> ()
        "scf.yield"() : () -> ()
      }, {
      }) : (i1) -> ()
      "loom.spatial_yield"() <{operandSegmentSizes = array<i32: 0, 0>}> : () -> ()
    }) : (index, memref<8xindex>, memref<4x4xindex>) -> ()
    "dataflow.thread.yield"() : () -> ()
  }) : () -> ()
  "dataflow.thread"() <{domain = #dataflow.thread_domain<dense>, function_type = (memref<8xindex>, memref<8xindex>, memref<4x4xindex>, index) -> (), sym_name = "t1", sym_visibility = "private"}> ({
  ^bb0(%arg0: memref<8xindex>, %arg1: memref<8xindex>, %arg2: memref<4x4xindex>, %arg3: index, %arg4: none):
    "loom.spatial_region"(%arg3, %arg1, %arg2) <{graph_name = "g_t1_0", operandSegmentSizes = array<i32: 1, 0, 2, 0>, resultSegmentSizes = array<i32: 0, 0>, source_maps = []}> ({
    ^bb0(%arg5: index, %arg6: memref<8xindex>, %arg7: memref<4x4xindex>):
      %0 = "arith.constant"() <{value = 0 : index}> : () -> index
      %1 = "arith.constant"() <{value = 1 : index}> : () -> index
      %2 = "arith.constant"() <{value = 1 : index}> : () -> index
      %3 = "arith.constant"() <{value = 7 : index}> : () -> index
      "scf.parallel"(%0, %2, %1) <{operandSegmentSizes = array<i32: 1, 1, 1, 0>}> ({
      ^bb0(%arg8: index):
        %4 = "scf.while"(%0) ({
        ^bb0(%arg10: index):
          %6 = "arith.cmpi"(%arg10, %arg5) <{predicate = 2 : i64}> : (index, index) -> i1
          "scf.condition"(%6, %arg10) : (i1, index) -> ()
        }, {
        ^bb0(%arg9: index):
          %5 = "arith.addi"(%arg9, %1) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
          "scf.yield"(%5) : (index) -> ()
        }) : (index) -> index
        "memref.store"(%4, %arg6, %arg8) : (index, memref<8xindex>, index) -> ()
        "scf.reduce"() : () -> ()
      }) : (index, index, index) -> ()
      "loom.spatial_yield"() <{operandSegmentSizes = array<i32: 0, 0>}> : () -> ()
    }) : (index, memref<8xindex>, memref<4x4xindex>) -> ()
    "dataflow.thread.yield"() : () -> ()
  }) : () -> ()
}) : () -> ()