diff --git a/passes/proc/proc_clean.cc b/passes/proc/proc_clean.cc index 6ce2f8cb031..95cb0e88ca9 100644 --- a/passes/proc/proc_clean.cc +++ b/passes/proc/proc_clean.cc @@ -31,7 +31,7 @@ PRIVATE_NAMESPACE_BEGIN void proc_clean_switch(RTLIL::SwitchRule *sw, RTLIL::CaseRule *parent, bool &did_something, int &count, int max_depth) { - if (sw->signal.size() > 0 && sw->signal.is_fully_const()) + if (sw->signal.size() > 0 && sw->signal.is_fully_def()) { int found_matching_case_idx = -1; for (int i = 0; i < int(sw->cases.size()) && found_matching_case_idx < 0; i++) diff --git a/tests/proc/clean_undef_case.ys b/tests/proc/clean_undef_case.ys index 3c29c93bcab..c874b08c017 100644 --- a/tests/proc/clean_undef_case.ys +++ b/tests/proc/clean_undef_case.ys @@ -1,6 +1,6 @@ read_rtlil <