mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Optimize double ISZERO.
This commit is contained in:
parent
187f5de2dd
commit
a20b23a7a8
@ -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