mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add test for SUB with 0 optimisation
This commit is contained in:
parent
3fdef92911
commit
8d0b80f944
@ -1304,6 +1304,28 @@ BOOST_AUTO_TEST_CASE(invalid_state_at_control_flow_join)
|
||||
compareVersions("test()");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(cse_sub_zero)
|
||||
{
|
||||
checkCSE({
|
||||
u256(0),
|
||||
u256(5),
|
||||
Instruction::SUB
|
||||
}, {
|
||||
u256(5)
|
||||
});
|
||||
|
||||
checkCSE({
|
||||
u256(5),
|
||||
u256(0),
|
||||
Instruction::SUB
|
||||
}, {
|
||||
u256(5),
|
||||
u256(0),
|
||||
Instruction::SUB
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user