Fixed proc_mux performance bug
authorClifford Wolf <clifford@clifford.at>
Mon, 25 Apr 2016 08:43:04 +0000 (10:43 +0200)
committerClifford Wolf <clifford@clifford.at>
Mon, 25 Apr 2016 08:43:04 +0000 (10:43 +0200)
passes/proc/proc_mux.cc

index dcfa212b574609afb5f8f98a06d2b597870b5c55..e52c5556e01fdaaa1b5070640f4270ff91bda572 100644 (file)
@@ -250,6 +250,9 @@ void append_pmux(RTLIL::Module *mod, const RTLIL::SigSpec &signal, const std::ve
        log_assert(last_mux_cell != NULL);
        log_assert(when_signal.size() == last_mux_cell->getPort("\\A").size());
 
+       if (when_signal == last_mux_cell->getPort("\\A"))
+               return;
+
        RTLIL::SigSpec ctrl_sig = gen_cmp(mod, signal, compare, sw);
        log_assert(ctrl_sig.size() == 1);
        last_mux_cell->type = "$pmux";