Skip to content

Commit e36eaa5

Browse files
committed
need unsigned comparison when checking shift widths for overflow in functional backend
1 parent d283a3f commit e36eaa5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/graphtools.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class CellSimplifier {
4040
} else {
4141
reduced_b_width = new_width;
4242
T lower_b = factory.slice(b, b_width, 0, new_width);
43-
T overflow = factory.gt(b, factory.constant(RTLIL::Const(y_width, b_width)), b_width);
43+
T overflow = factory.ugt(b, factory.constant(RTLIL::Const(y_width, b_width)), b_width);
4444
return factory.mux(lower_b, factory.constant(RTLIL::Const(y_width, new_width)), overflow, new_width);
4545
}
4646
}

0 commit comments

Comments
 (0)