summaryrefslogtreecommitdiff
path: root/passes
diff options
context:
space:
mode:
Diffstat (limited to 'passes')
-rw-r--r--passes/opt/opt_reduce.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/passes/opt/opt_reduce.cc b/passes/opt/opt_reduce.cc
index fee8fb71..dfe21441 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;
}
}