On Sun, Jul 15, 2018 at 7:26 PM, Timothy Arceri <tarc...@itsqueeze.com> wrote: > Noticed in a unigine shader. > --- > src/compiler/nir/nir_opt_algebraic.py | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/src/compiler/nir/nir_opt_algebraic.py > b/src/compiler/nir/nir_opt_algebraic.py > index 5e07d662b07..0986dde6851 100644 > --- a/src/compiler/nir/nir_opt_algebraic.py > +++ b/src/compiler/nir/nir_opt_algebraic.py > @@ -223,6 +223,7 @@ optimizations = [ > (('bcsel', ('inot', a), b, c), ('bcsel', a, c, b)), > (('bcsel', a, ('bcsel', a, b, c), d), ('bcsel', a, b, d)), > (('bcsel', a, True, 'b@bool'), ('ior', a, b)), > + (('inot', ('bcsel', a, ('inot', b), c)), ('bcsel', a, b, ('inot', c))),
Shouldn't we have an equivalent rule for the other argument, like + (('inot', ('bcsel', a, b, ('inot', c))), ('bcsel', a, ('inot', b), c)), I assume we would not benefit from a general rule that simply propagates inot inside to both b and c unconditionally. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev