diff --git a/passes/opt/opt_reduce.cc b/passes/opt/opt_reduce.cc index fee8fb71b..dfe214416 100644 --- a/passes/opt/opt_reduce.cc +++ b/passes/opt/opt_reduce.cc @@ -73,7 +73,10 @@ struct OptReduceWorker for (auto child_cell : drivers.find(chunk)) { if (child_cell->type == cell->type) { opt_reduce(cells, drivers, child_cell); - new_sig_a.append(child_cell->connections["\\A"]); + if (child_cell->connections["\\Y"].extract(0, 1) == chunk) + new_sig_a.append(child_cell->connections["\\A"]); + else + new_sig_a.append(RTLIL::State::S0); imported_children = true; } }