mirror of https://github.com/YosysHQ/yosys.git
need unsigned comparison when checking shift widths for overflow in functional backend
This commit is contained in:
parent
3552a8a2b2
commit
dbf2bc3b1d
|
@ -40,7 +40,7 @@ class CellSimplifier {
|
|||
} else {
|
||||
reduced_b_width = new_width;
|
||||
T lower_b = factory.slice(b, b_width, 0, new_width);
|
||||
T overflow = factory.gt(b, factory.constant(RTLIL::Const(y_width, b_width)), b_width);
|
||||
T overflow = factory.ugt(b, factory.constant(RTLIL::Const(y_width, b_width)), b_width);
|
||||
return factory.mux(lower_b, factory.constant(RTLIL::Const(y_width, new_width)), overflow, new_width);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue