diff --git a/artiq/compiler/transforms/artiq_ir_generator.py b/artiq/compiler/transforms/artiq_ir_generator.py index 332cb2a4a..1d45d690c 100644 --- a/artiq/compiler/transforms/artiq_ir_generator.py +++ b/artiq/compiler/transforms/artiq_ir_generator.py @@ -1426,7 +1426,7 @@ class ARTIQIRGenerator(algorithm.Visitor): for index in range(len(lhs.type.elts)): lhs_elt = self.append(ir.GetAttr(lhs, index)) rhs_elt = self.append(ir.GetAttr(rhs, index)) - elt_result = self.append(ir.Compare(op, lhs_elt, rhs_elt)) + elt_result = self.polymorphic_compare_pair(op, lhs_elt, rhs_elt) if result is None: result = elt_result else: diff --git a/artiq/test/lit/integration/tuple.py b/artiq/test/lit/integration/tuple.py index 5d6c153dd..44564c151 100644 --- a/artiq/test/lit/integration/tuple.py +++ b/artiq/test/lit/integration/tuple.py @@ -5,3 +5,9 @@ x, y = 2, 1 x, y = y, x assert x == 1 and y == 2 assert (1, 2) + (3.0,) == (1, 2, 3.0) + +assert (0,) == (0,) +assert (0,) != (1,) + +assert ([0],) == ([0],) +assert ([0],) != ([1],)