Skip to content

Commit

Permalink
Let the optimizer optimize
Browse files Browse the repository at this point in the history
Following a comment #1091 (comment)
  • Loading branch information
pirapira committed Oct 5, 2016
1 parent 06270fd commit bd86274
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions libsolidity/codegen/ExpressionCompiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1341,8 +1341,7 @@ void ExpressionCompiler::appendArithmeticOperatorCode(Token::Value _operator, Ty
if (c_isSigned && _operator == Token::Div)
{
m_context << Instruction::DUP1 // x
<< u256(255) << u256(2) << Instruction::EXP // 2 ** 255
<< Instruction::EQ;
<< (u256(1) << 255) << Instruction::EQ;
// y, x, (x == 2 ** 255)
m_context << Instruction::DUP3 << Instruction::NOT //y
<< Instruction::ISZERO;
Expand Down

0 comments on commit bd86274

Please sign in to comment.