aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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
});
}