Skip to content

Commit

Permalink
need unsigned comparison when checking shift widths for overflow in f…
Browse files Browse the repository at this point in the history
…unctional backend
  • Loading branch information
aiju committed Jun 12, 2024
1 parent d283a3f commit e36eaa5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/graphtools.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit e36eaa5

Please sign in to comment.