mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #2102 from chriseth/sol_iszeroiszero
Optimize double ISZERO.
This commit is contained in:
commit
523fd10c54
@ -440,6 +440,16 @@ BOOST_AUTO_TEST_CASE(cse_double_negation)
|
|||||||
checkCSE({Instruction::DUP5, Instruction::NOT, Instruction::NOT}, {Instruction::DUP5});
|
checkCSE({Instruction::DUP5, Instruction::NOT, Instruction::NOT}, {Instruction::DUP5});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BOOST_AUTO_TEST_CASE(cse_double_iszero)
|
||||||
|
{
|
||||||
|
checkCSE({Instruction::GT, Instruction::ISZERO, Instruction::ISZERO}, {Instruction::GT});
|
||||||
|
checkCSE({Instruction::GT, Instruction::ISZERO}, {Instruction::GT, Instruction::ISZERO});
|
||||||
|
checkCSE(
|
||||||
|
{Instruction::ISZERO, Instruction::ISZERO, Instruction::ISZERO},
|
||||||
|
{Instruction::ISZERO}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(cse_associativity)
|
BOOST_AUTO_TEST_CASE(cse_associativity)
|
||||||
{
|
{
|
||||||
AssemblyItems input{
|
AssemblyItems input{
|
||||||
|
Loading…
Reference in New Issue
Block a user