Skip to content

Commit

Permalink
Fix sub-0 optimiser test
Browse files Browse the repository at this point in the history
  • Loading branch information
axic committed Nov 30, 2016
1 parent df4b405 commit 9a6a5f2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/libsolidity/SolidityOptimizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
});
}
Expand Down

0 comments on commit 9a6a5f2

Please sign in to comment.