diff --git a/kernel/celledges.cc b/kernel/celledges.cc index fc381f35cdd..581baf0fe54 100644 --- a/kernel/celledges.cc +++ b/kernel/celledges.cc @@ -190,6 +190,9 @@ void shift_op(AbstractCellEdgesDatabase *db, RTLIL::Cell *cell) if (cell->type.in(ID($shr), ID($sshr))) for (int k = i; k < a_width; k++) db->add_edge(cell, ID::A, k, ID::Y, i, -1); + + if (cell->type == ID($sshr) && i >= a_width) + db->add_edge(cell, ID::A, a_width - 1, ID::Y, i, -1); if (cell->type.in(ID($shift), ID($shiftx))) for (int k = 0; k < a_width; k++)