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