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 = 6 : i32}> : () -> i32
%3:2 = "scf.while"(%0, %0) ({
^bb0(%arg6: i32, %arg7: i32):
%7 = "arith.index_cast"(%arg6) : (i32) -> index
%8 = "memref.load"(%arg2, %7) : (memref<?xi32>, index) -> i32
%9 = "arith.addi"(%arg6, %1) <{overflowFlags = #arith.overflow<none>}> : (i32, i32) -> i32
%10 = "arith.addi"(%arg7, %8) <{overflowFlags = #arith.overflow<none>}> : (i32, i32) -> i32
%11 = "arith.cmpi"(%9, %arg1) <{predicate = 2 : i64}> : (i32, i32) -> i1
"scf.condition"(%11, %9, %10) : (i1, i32, i32) -> ()
}, {
^bb0(%arg4: i32, %arg5: i32):
%6 = "arith.index_cast"(%arg4) : (i32) -> index
"memref.store"(%arg5, %arg3, %6) : (i32, memref<?xi32>, index) -> ()
"scf.yield"(%arg4, %arg5) : (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) -> ()
"dataflow.graph.return"(%arg0) <{operandSegmentSizes = array<i32: 0, 0, 0, 1>}> : (none) -> ()
}) : () -> ()
}) : () -> ()