forked from M-Labs/artiq
compiler.iodelay: correctly fold max(0, [0, ]...).
This commit is contained in:
parent
9bc62fa3d2
commit
d3f0059cab
@ -231,7 +231,7 @@ class Max(Expr):
|
||||
consts.append(operand.value)
|
||||
elif operand not in exprs:
|
||||
exprs.append(operand)
|
||||
if any(consts):
|
||||
if len(consts) > 0:
|
||||
exprs.append(Const(max(consts)))
|
||||
if len(exprs) == 1:
|
||||
return exprs[0]
|
||||
|
Loading…
Reference in New Issue
Block a user