Back to PBT run

input.generic.mlir

"builtin.module"() ({
  "dataflow.graph"() <{function_type = (i32, memref<?xi32>, memref<?xi32>) -> (), input_segments = array<i32: 1, 0, 2>, result_segments = array<i32: 0, 0, 0>, sym_name = "while_case0", sym_visibility = "private"}> ({
  ^bb0(%arg0: none, %arg1: i32, %arg2: memref<?xi32>, %arg3: memref<?xi32>):
    %0 = "arith.constant"() <{value = 0 : i32}> : () -> i32
    %1 = "arith.constant"() <{value = 1 : i32}> : () -> i32
    %2 = "arith.constant"() <{value = 2 : i32}> : () -> i32
    %3:3 = "scf.while"(%0, %0, %1) ({
    ^bb0(%arg7: i32, %arg8: i32, %arg9: i32):
      %8 = "arith.index_cast"(%arg7) : (i32) -> index
      %9 = "memref.load"(%arg2, %8) : (memref<?xi32>, index) -> i32
      %10 = "arith.addi"(%arg7, %1) <{overflowFlags = #arith.overflow<none>}> : (i32, i32) -> i32
      %11 = "arith.addi"(%arg8, %9) <{overflowFlags = #arith.overflow<none>}> : (i32, i32) -> i32
      %12 = "arith.addi"(%arg9, %10) <{overflowFlags = #arith.overflow<none>}> : (i32, i32) -> i32
      %13 = "arith.cmpi"(%10, %arg1) <{predicate = 2 : i64}> : (i32, i32) -> i1
      "scf.condition"(%13, %10, %11, %12) : (i1, i32, i32, i32) -> ()
    }, {
    ^bb0(%arg4: i32, %arg5: i32, %arg6: i32):
      "scf.yield"(%arg4, %arg5, %arg6) : (i32, i32, i32) -> ()
    }) : (i32, i32, i32) -> (i32, i32, i32)
    %4 = "arith.index_cast"(%0) : (i32) -> index
    "memref.store"(%3#0, %arg3, %4) : (i32, memref<?xi32>, index) -> ()
    %5 = "arith.index_cast"(%1) : (i32) -> index
    "memref.store"(%3#1, %arg3, %5) : (i32, memref<?xi32>, index) -> ()
    %6 = "arith.constant"() <{value = 2 : i32}> : () -> i32
    %7 = "arith.index_cast"(%6) : (i32) -> index
    "memref.store"(%3#2, %arg3, %7) : (i32, memref<?xi32>, index) -> ()
    "dataflow.graph.return"(%arg0) <{operandSegmentSizes = array<i32: 0, 0, 0, 1>}> : (none) -> ()
  }) : () -> ()
}) : () -> ()