Back to PBT run

input.generic.mlir

"builtin.module"() ({
  "dataflow.graph"() <{function_type = (i64, i64, i64, i64, memref<?xi64>) -> (), input_segments = array<i32: 4, 0, 1>, result_segments = array<i32: 0, 0, 0>, sym_name = "rw_0", sym_visibility = "private"}> ({
  ^bb0(%arg15: none, %arg16: i64, %arg17: i64, %arg18: i64, %arg19: i64, %arg20: memref<?xi64>):
    "scf.for"(%arg16, %arg17, %arg18) ({
    ^bb0(%arg21: i64):
      %5 = "arith.muli"(%arg21, %arg18) <{overflowFlags = #arith.overflow<none>}> : (i64, i64) -> i64
      %6 = "arith.index_cast"(%5) : (i64) -> index
      %7 = "memref.load"(%arg20, %6) : (memref<?xi64>, index) -> i64
      %8 = "arith.addi"(%7, %arg19) <{overflowFlags = #arith.overflow<none>}> : (i64, i64) -> i64
      "memref.store"(%8, %arg20, %6) : (i64, memref<?xi64>, index) -> ()
      "scf.yield"() : () -> ()
    }) : (i64, i64, i64) -> ()
    "dataflow.graph.return"(%arg15) <{operandSegmentSizes = array<i32: 0, 0, 0, 1>}> : (none) -> ()
  }) : () -> ()
  "dataflow.graph"() <{function_type = (i64, i64, i64, i64, i32, memref<16xi32>) -> (), input_segments = array<i32: 5, 0, 1>, result_segments = array<i32: 0, 0, 0>, sym_name = "guard_1", sym_visibility = "private"}> ({
  ^bb0(%arg7: none, %arg8: i64, %arg9: i64, %arg10: i64, %arg11: i64, %arg12: i32, %arg13: memref<16xi32>):
    "scf.for"(%arg8, %arg9, %arg10) ({
    ^bb0(%arg14: i64):
      %2 = "arith.muli"(%arg14, %arg10) <{overflowFlags = #arith.overflow<none>}> : (i64, i64) -> i64
      %3 = "arith.index_cast"(%2) : (i64) -> index
      %4 = "arith.cmpi"(%arg14, %arg11) <{predicate = 2 : i64}> : (i64, i64) -> i1
      "scf.if"(%4) ({
        "memref.store"(%arg12, %arg13, %3) : (i32, memref<16xi32>, index) -> ()
        "scf.yield"() : () -> ()
      }, {
      }) : (i1) -> ()
      "scf.yield"() : () -> ()
    }) : (i64, i64, i64) -> ()
    "dataflow.graph.return"(%arg7) <{operandSegmentSizes = array<i32: 0, 0, 0, 1>}> : (none) -> ()
  }) : () -> ()
  "dataflow.graph"() <{function_type = (i64, i64, i64, memref<?xi32>, memref<?xi32>) -> (), input_segments = array<i32: 3, 0, 2>, result_segments = array<i32: 0, 0, 0>, sym_name = "pair_2", sym_visibility = "private"}> ({
  ^bb0(%arg0: none, %arg1: i64, %arg2: i64, %arg3: i64, %arg4: memref<?xi32>, %arg5: memref<?xi32>):
    "scf.for"(%arg1, %arg2, %arg3) ({
    ^bb0(%arg6: i64):
      %0 = "arith.index_cast"(%arg6) : (i64) -> index
      %1 = "memref.load"(%arg5, %0) : (memref<?xi32>, index) -> i32
      "memref.store"(%1, %arg4, %0) : (i32, memref<?xi32>, index) -> ()
      "scf.yield"() : () -> ()
    }) : (i64, i64, i64) -> ()
    "dataflow.graph.return"(%arg0) <{operandSegmentSizes = array<i32: 0, 0, 0, 1>}> : (none) -> ()
  }) : () -> ()
}) : () -> ()