From 7635379dc723852e6a64a3a284ff27020d9513f7 Mon Sep 17 00:00:00 2001 From: Emma Anholt Date: Tue, 30 Nov 2021 14:17:10 -0800 Subject: [PATCH] nir/algebraic: Remove array-of-cond code You can't have an array of them after removing many-comm-expr, there's no space in the struct. Reviewed-by: Adam Jackson Part-of: --- src/compiler/nir/nir_algebraic.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compiler/nir/nir_algebraic.py b/src/compiler/nir/nir_algebraic.py index 95af2471dff..92114482bc8 100644 --- a/src/compiler/nir/nir_algebraic.py +++ b/src/compiler/nir/nir_algebraic.py @@ -351,8 +351,9 @@ class Expression(Value): # "many-comm-expr". If there is anything left, put it back together. c = self.cond[1:-1].split(",") c.remove("many-comm-expr") + assert(len(c) <= 1) - self.cond = "({})".format(",".join(c)) if c else None + self.cond = c[0] if c else None self.many_commutative_expressions = True self.sources = [ Value.create(src, "{0}_{1}".format(name_base, i), varset)