mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-23 00:55:32 +00:00
Merge pull request #1309 from whitequark/proc_clean-fix-1268
proc_clean: fix order of switch insertion
This commit is contained in:
commit
749ff864aa
6 changed files with 37 additions and 2 deletions
|
@ -69,8 +69,7 @@ void proc_clean_switch(RTLIL::SwitchRule *sw, RTLIL::CaseRule *parent, bool &did
|
|||
did_something = true;
|
||||
for (auto &action : sw->cases[0]->actions)
|
||||
parent->actions.push_back(action);
|
||||
for (auto sw2 : sw->cases[0]->switches)
|
||||
parent->switches.push_back(sw2);
|
||||
parent->switches.insert(parent->switches.begin(), sw->cases[0]->switches.begin(), sw->cases[0]->switches.end());
|
||||
sw->cases[0]->switches.clear();
|
||||
delete sw->cases[0];
|
||||
sw->cases.clear();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue