On Sun, May 26, 2019 at 01:52:44AM +0000, Alyssa Rosenzweig wrote: > I noticed this pattern in glmark's jellyfish scene. > > v2: Add inexact qualifier to avoid changing NaN behaviour > > I would appreciate if someone did a shader-db run. > > Signed-off-by: Alyssa Rosenzweig <aly...@rosenzweig.io> Reviewed-by: Elie Tournier <tournier.e...@gmail.com>
For the shader-db, I got: total instructions in shared programs: 12839341 -> 12839254 (<.01%) instructions in affected programs: 5885 -> 5798 (-1.48%) helped: 41 HURT: 0 total cycles in shared programs: 302490031 -> 302487788 (<.01%) cycles in affected programs: 485428 -> 483185 (-0.46%) helped: 20 HURT: 1 > Cc: Ilia Mirkin <imir...@alum.mit.edu> > Cc: Ian Romanick <i...@freedesktop.org> > Cc: Elie Tournier <tournier.e...@gmail.com> > --- > 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 89d07aa1261..e607e5b6fe2 100644 > --- a/src/compiler/nir/nir_opt_algebraic.py > +++ b/src/compiler/nir/nir_opt_algebraic.py > @@ -397,6 +397,7 @@ optimizations = [ > (('imax', a, ('iabs', a)), ('iabs', a)), > (('fmax', a, ('fneg', a)), ('fabs', a)), > (('imax', a, ('ineg', a)), ('iabs', a)), > + (('~fmax', ('fabs', a), 0.0), ('fabs', a)), > (('~fmin', ('fmax', a, 0.0), 1.0), ('fsat', a), '!options->lower_fsat'), > (('~fmax', ('fmin', a, 1.0), 0.0), ('fsat', a), '!options->lower_fsat'), > (('~fmin', ('fmax', a, -1.0), 0.0), ('fneg', ('fsat', ('fneg', a))), > '!options->lower_negate && !options->lower_fsat'), > -- > 2.20.1 > _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev