Back to PBT run
input.generic.mlir
"builtin.module"() ({
"dataflow.thread"() <{domain = #dataflow.thread_domain<dense>, function_type = (index, memref<?xindex>) -> (), sym_name = "thread_0", sym_visibility = "private"}> ({
^bb0(%arg9: index, %arg10: memref<?xindex>, %arg11: none):
"loom.spatial_region"(%arg9, %arg10) <{graph_name = "g_thread_0", operandSegmentSizes = array<i32: 1, 0, 1, 0>, resultSegmentSizes = array<i32: 0, 0>, source_maps = []}> ({
^bb0(%arg12: index, %arg13: memref<?xindex>):
%9 = "arith.constant"() <{value = 0 : index}> : () -> index
%10 = "arith.constant"() <{value = 1 : index}> : () -> index
%11 = "arith.constant"() <{value = 2 : index}> : () -> index
%12 = "arith.cmpi"(%9, %11) <{predicate = 6 : i64}> : (index, index) -> i1
%13 = "scf.while"(%9) ({
^bb0(%arg17: index):
%21 = "arith.cmpi"(%arg17, %11) <{predicate = 6 : i64}> : (index, index) -> i1
"scf.condition"(%21, %arg17) : (i1, index) -> ()
}, {
^bb0(%arg14: index):
"scf.parallel"(%9, %11, %10) <{operandSegmentSizes = array<i32: 1, 1, 1, 0>}> ({
^bb0(%arg16: index):
%17 = "arith.muli"(%9, %11) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
%18 = "arith.addi"(%17, %arg16) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
%19 = "memref.load"(%arg13, %18) : (memref<?xindex>, index) -> index
%20 = "arith.addi"(%19, %10) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
"memref.store"(%20, %arg13, %18) : (index, memref<?xindex>, index) -> ()
"scf.reduce"() : () -> ()
}) : (index, index, index) -> ()
"scf.parallel"(%9, %11, %10) <{operandSegmentSizes = array<i32: 1, 1, 1, 0>}> ({
^bb0(%arg15: index):
%15 = "arith.muli"(%9, %11) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
%16 = "arith.addi"(%15, %arg15) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
"memref.store"(%10, %arg13, %16) : (index, memref<?xindex>, index) -> ()
"scf.reduce"() : () -> ()
}) : (index, index, index) -> ()
%14 = "arith.addi"(%arg14, %10) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
"scf.yield"(%14) : (index) -> ()
}) : (index) -> index
"loom.spatial_yield"() <{operandSegmentSizes = array<i32: 0, 0>}> : () -> ()
}) : (index, memref<?xindex>) -> ()
"dataflow.thread.yield"() : () -> ()
}) : () -> ()
"dataflow.thread"() <{domain = #dataflow.thread_domain<dense>, function_type = (index, memref<?xindex>) -> (), sym_name = "thread_1", sym_visibility = "private"}> ({
^bb0(%arg0: index, %arg1: memref<?xindex>, %arg2: none):
"loom.spatial_region"(%arg0, %arg1) <{graph_name = "g_thread_1", operandSegmentSizes = array<i32: 1, 0, 1, 0>, resultSegmentSizes = array<i32: 0, 0>, source_maps = []}> ({
^bb0(%arg3: index, %arg4: memref<?xindex>):
%0 = "arith.constant"() <{value = 0 : index}> : () -> index
%1 = "arith.constant"() <{value = 1 : index}> : () -> index
%2 = "arith.constant"() <{value = 2 : index}> : () -> index
%3 = "arith.cmpi"(%0, %2) <{predicate = 6 : i64}> : (index, index) -> i1
"scf.for"(%0, %2, %1) ({
^bb0(%arg5: index):
"scf.for"(%0, %2, %1) ({
^bb0(%arg8: index):
%7 = "memref.load"(%arg4, %0) : (memref<?xindex>, index) -> index
%8 = "arith.addi"(%7, %1) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
"memref.store"(%8, %arg4, %0) : (index, memref<?xindex>, index) -> ()
"scf.yield"() : () -> ()
}) : (index, index, index) -> ()
%4 = "scf.while"(%0) ({
^bb0(%arg7: index):
%6 = "arith.cmpi"(%arg7, %2) <{predicate = 6 : i64}> : (index, index) -> i1
"scf.condition"(%6, %arg7) : (i1, index) -> ()
}, {
^bb0(%arg6: index):
"memref.store"(%1, %arg4, %0) : (index, memref<?xindex>, index) -> ()
%5 = "arith.addi"(%arg6, %1) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
"scf.yield"(%5) : (index) -> ()
}) : (index) -> index
"scf.yield"() : () -> ()
}) : (index, index, index) -> ()
"loom.spatial_yield"() <{operandSegmentSizes = array<i32: 0, 0>}> : () -> ()
}) : (index, memref<?xindex>) -> ()
"dataflow.thread.yield"() : () -> ()
}) : () -> ()
}) : () -> ()