mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-06-14 23:51:06 +00:00
llvm-context: fix off-by-one in SDIV overflow semantics (#398)
- Fix the wrong predicate (the negative side in 2s complement has one more bit) - Increase test coverage Signed-off-by: xermicus <cyrill@parity.io>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"Baseline": 914,
|
||||
"Computation": 2295,
|
||||
"DivisionArithmetics": 14510,
|
||||
"DivisionArithmetics": 14496,
|
||||
"ERC20": 17482,
|
||||
"Events": 1674,
|
||||
"FibonacciIterative": 1490,
|
||||
|
||||
@@ -169,6 +169,8 @@ fn signed_division() {
|
||||
(minus_five, two),
|
||||
(I256::MINUS_ONE, I256::MIN),
|
||||
(one, I256::ZERO),
|
||||
(I256::MIN, I256::MINUS_ONE),
|
||||
(I256::MIN + I256::ONE, I256::MINUS_ONE),
|
||||
] {
|
||||
actions.push(Call {
|
||||
origin: TestAddress::Alice,
|
||||
|
||||
Reference in New Issue
Block a user