diff --git a/passes/opt/opt_demorgan.cc b/passes/opt/opt_demorgan.cc index 4db3a810105..d2d082ea0b6 100644 --- a/passes/opt/opt_demorgan.cc +++ b/passes/opt/opt_demorgan.cc @@ -39,6 +39,10 @@ void demorgan_worker( return; auto insig = sigmap(cell->getPort(ID::A)); + + if (GetSize(insig) < 1) + return; + log("Inspecting %s cell %s (%d inputs)\n", log_id(cell->type), log_id(cell->name), GetSize(insig)); int num_inverted = 0; for(int i=0; igetPort(ID::A); } + + log("aaa"); + //Cosmetic fixup: If our input is just a scrambled version of one bus, rearrange it //Reductions are all commutative, so there's no point in having them in a weird order bool same_signal = true;