diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2016-11-30 19:18:33 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2016-11-30 19:51:00 +0800 |
commit | 9a6a5f219b74097c1a11278aad07df1ffd60ff45 (patch) | |
tree | 39f58108b77e01c74ae38690ada92696bc0629d4 /test | |
parent | df4b405f9c1cd3ebfd2787b5f1f6925cabf789d3 (diff) | |
download | dexon-solidity-9a6a5f219b74097c1a11278aad07df1ffd60ff45.tar dexon-solidity-9a6a5f219b74097c1a11278aad07df1ffd60ff45.tar.gz dexon-solidity-9a6a5f219b74097c1a11278aad07df1ffd60ff45.tar.bz2 dexon-solidity-9a6a5f219b74097c1a11278aad07df1ffd60ff45.tar.lz dexon-solidity-9a6a5f219b74097c1a11278aad07df1ffd60ff45.tar.xz dexon-solidity-9a6a5f219b74097c1a11278aad07df1ffd60ff45.tar.zst dexon-solidity-9a6a5f219b74097c1a11278aad07df1ffd60ff45.zip |
Fix sub-0 optimiser test
Diffstat (limited to 'test')
-rw-r--r-- | test/libsolidity/SolidityOptimizer.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/libsolidity/SolidityOptimizer.cpp b/test/libsolidity/SolidityOptimizer.cpp index 00a636fd..89c89adc 100644 --- a/test/libsolidity/SolidityOptimizer.cpp +++ b/test/libsolidity/SolidityOptimizer.cpp @@ -1311,16 +1311,17 @@ BOOST_AUTO_TEST_CASE(cse_sub_zero) Instruction::DUP2, Instruction::SUB }, { - u256(5) + Instruction::DUP1 }); checkCSE({ - Instruction::DUP2, + Instruction::DUP1, u256(0), Instruction::SUB }, { - Instruction::DUP2, u256(0), + Instruction::DUP2, + Instruction::SWAP1, Instruction::SUB }); } |