forked from M-Labs/artiq
compiler.iodelay: fold Max further.
This commit is contained in:
parent
7d2fca291d
commit
956d2afcb2
|
@ -213,7 +213,7 @@ class Max(Expr):
|
||||||
operand = operand.fold(vars)
|
operand = operand.fold(vars)
|
||||||
if isinstance(operand, Const):
|
if isinstance(operand, Const):
|
||||||
consts.append(operand.value)
|
consts.append(operand.value)
|
||||||
else:
|
elif operand not in exprs:
|
||||||
exprs.append(operand)
|
exprs.append(operand)
|
||||||
if any(consts):
|
if any(consts):
|
||||||
exprs.append(Const(max(consts)))
|
exprs.append(Const(max(consts)))
|
||||||
|
|
Loading…
Reference in New Issue