2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-25 03:08:27 +08:00

compiler.iodelay: fold Max further.

This commit is contained in:
whitequark 2015-11-17 03:06:07 +03:00
parent 7d2fca291d
commit 956d2afcb2

View File

@ -213,7 +213,7 @@ class Max(Expr):
operand = operand.fold(vars)
if isinstance(operand, Const):
consts.append(operand.value)
else:
elif operand not in exprs:
exprs.append(operand)
if any(consts):
exprs.append(Const(max(consts)))