Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
charles-cooper committed May 7, 2022
1 parent 8eb84fe commit a338657
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/compiler/ir/test_optimize_ir.py
Expand Up @@ -74,8 +74,8 @@
(["mod", "x", 128], ["and", "x", 127]),
(["sdiv", "x", 64], ["sdiv", "x", 64]), # no-op
(["smod", "x", 64], ["smod", "x", 64]), # no-op
(["exp", 3, 5], [3**5]),
(["exp", 3, 256], [(3**256) % (2**256)]),
(["exp", 3, 5], [3 ** 5]),
(["exp", 3, 256], [(3 ** 256) % (2 ** 256)]),
(["exp", 2, 257], [0]),
(["exp", "x", 0], ["iszero", "x"]),
(["exp", "x", 1], ["x"]),
Expand Down
2 changes: 1 addition & 1 deletion vyper/codegen/arithmetic.py
Expand Up @@ -228,7 +228,7 @@ def safe_mul(x: IRnode, y: IRnode):
bounds_check = ["ne", x, ["not", 0]]
else:
# trigger optimizer rule: -1 & x == x
bounds_check = 2**256 - 1
bounds_check = 2 ** 256 - 1

ok = ["and", bounds_check, ok]

Expand Down
1 change: 0 additions & 1 deletion vyper/codegen/core.py
Expand Up @@ -950,7 +950,6 @@ def clamp_basetype(ir_node):
return IRnode.from_list(ret, typ=ir_node.typ)



def int_clamp(ir_node, bits, signed=False):
"""Generalized clamper for integer types. Takes the number of bits,
whether it's signed, and returns an IR node which checks it is
Expand Down

0 comments on commit a338657

Please sign in to comment.