aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/SolidityOptimizer.cpp
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2016-11-30 19:18:33 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2016-11-30 19:51:00 +0800
commit9a6a5f219b74097c1a11278aad07df1ffd60ff45 (patch)
tree39f58108b77e01c74ae38690ada92696bc0629d4 /test/libsolidity/SolidityOptimizer.cpp
parentdf4b405f9c1cd3ebfd2787b5f1f6925cabf789d3 (diff)
downloaddexon-solidity-9a6a5f219b74097c1a11278aad07df1ffd60ff45.tar.gz
dexon-solidity-9a6a5f219b74097c1a11278aad07df1ffd60ff45.tar.zst
dexon-solidity-9a6a5f219b74097c1a11278aad07df1ffd60ff45.zip
Fix sub-0 optimiser test
Diffstat (limited to 'test/libsolidity/SolidityOptimizer.cpp')
-rw-r--r--test/libsolidity/SolidityOptimizer.cpp7
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
});
}