From 956d2afcb2da7cb7f2de0bdc9d341f14edf95e63 Mon Sep 17 00:00:00 2001 From: whitequark Date: Tue, 17 Nov 2015 03:06:07 +0300 Subject: [PATCH] compiler.iodelay: fold Max further. --- 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 3941ea22e..ec9a73729 100644 --- a/artiq/compiler/iodelay.py +++ b/artiq/compiler/iodelay.py @@ -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)))