Skip to content

Commit

Permalink
Merge pull request #1980 from wiremod/fix/1975
Browse files Browse the repository at this point in the history
Remove a broken E2 peephole optimization
  • Loading branch information
bigdogmat authored Sep 19, 2019
2 parents 1b4c133 + 8670499 commit e8237d9
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions lua/entities/gmod_wire_expression2/base/optimizer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,6 @@ function peephole.mul(instruction)
end
-- (mul 1 x) → x
if instruction[3][1] == "literal" and instruction[3][3] == 1 then return instruction[4] end
-- (mul 0 x) → 0
if instruction[3][1] == "literal" and instruction[3][3] == 0 then return instruction[3] end
-- (mul -1 x) → (neg x)
if instruction[3][1] == "literal" and instruction[3][3] == -1 then
return {"neg", instruction[2], instruction[4]}
Expand Down

0 comments on commit e8237d9

Please sign in to comment.