diff --git a/passes/sat/freduce.cc b/passes/sat/freduce.cc index 893fe5167..23ab8a04a 100644 --- a/passes/sat/freduce.cc +++ b/passes/sat/freduce.cc @@ -441,8 +441,6 @@ struct FreduceWorker int bits_count = 0; std::map, std::vector> buckets; - buckets[std::vector()].push_back(RTLIL::SigBit(RTLIL::State::S0)); - buckets[std::vector()].push_back(RTLIL::SigBit(RTLIL::State::S1)); for (auto &batch : batches) { for (auto &bit : batch) @@ -464,6 +462,11 @@ struct FreduceWorker } log(" Sorted %d signal bits into %d buckets.\n", bits_count, int(buckets.size())); + if (buckets.count(std::vector()) != 0) { + buckets[std::vector()].push_back(RTLIL::SigBit(RTLIL::State::S0)); + buckets[std::vector()].push_back(RTLIL::SigBit(RTLIL::State::S1)); + } + std::vector> equiv; for (auto &bucket : buckets) {