From d3f0059cab5f08e727047def5800acd0c466a38c Mon Sep 17 00:00:00 2001 From: whitequark Date: Tue, 24 Nov 2015 00:46:55 +0800 Subject: [PATCH] compiler.iodelay: correctly fold max(0, [0, ]...). --- artiq/compiler/iodelay.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/artiq/compiler/iodelay.py b/artiq/compiler/iodelay.py index 3a3283199..6cab8588c 100644 --- a/artiq/compiler/iodelay.py +++ b/artiq/compiler/iodelay.py @@ -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]