Back to PBT run
input.mlir
module {
dataflow.graph private @graph_0(
%start: none, %i: index, %c: i1, %m: vector<4xi1>,
%av: vector<4xindex>, %val: i32,
%a: memref<16xi32>, %b: memref<16xi32>) -> ()
attributes {input_segments = array<i32: 5, 0, 2>,
result_segments = array<i32: 0, 0, 0>} {
%pad = arith.constant 0 : i32
%lb0 = arith.constant 0 : index
%ub0 = arith.constant 4 : index
%sp0 = arith.constant 1 : index
scf.for %k0 = %lb0 to %ub0 step %sp0 {
%v1 = vector.transfer_read %b[%i], %pad, %m {in_bounds = [true]} : memref<16xi32>, vector<4xi32>
vector.transfer_write %v1, %a[%i], %m {in_bounds = [true]} : vector<4xi32>, memref<16xi32>
}
scf.if %c {
%v2 = vector.transfer_read %b[%i], %pad {in_bounds = [true]} : memref<16xi32>, vector<4xi32>
vector.transfer_write %v2, %b[%i] {in_bounds = [true]} : vector<4xi32>, memref<16xi32>
}
dataflow.graph.return %start : none
}
dataflow.graph private @graph_1(
%start: none, %i: index, %c: i1, %m: vector<4xi1>,
%av: vector<4xindex>, %val: i32,
%a: memref<16xi32>, %b: memref<16xi32>) -> ()
attributes {input_segments = array<i32: 5, 0, 2>,
result_segments = array<i32: 0, 0, 0>} {
%pad = arith.constant 0 : i32
scf.if %c {
%v0 = vector.transfer_read %a[%i], %pad {in_bounds = [true]} : memref<16xi32>, vector<4xi32>
vector.transfer_write %v0, %a[%i] {in_bounds = [true]} : vector<4xi32>, memref<16xi32>
}
memref.store %val, %a[%i] : memref<16xi32>
%s1 = memref.load %a[%i] : memref<16xi32>
%g2, %gd2 = dataflow.load %a[%av] %start mask %m : memref<16xi32>, vector<4xindex>, vector<4xi32>
%sc2 = dataflow.store %b[%av] %g2 %start mask %m : memref<16xi32>, vector<4xindex>, vector<4xi32>
%v3 = vector.transfer_read %b[%i], %pad {in_bounds = [true]} : memref<16xi32>, vector<4xi32>
vector.transfer_write %v3, %b[%i] {in_bounds = [true]} : vector<4xi32>, memref<16xi32>
memref.store %val, %a[%i] : memref<16xi32>
%s4 = memref.load %a[%i] : memref<16xi32>
dataflow.graph.return %start : none
}
}