diff options
author | Matt Turner <[email protected]> | 2015-05-05 22:54:59 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2015-05-07 10:51:05 -0700 |
commit | 8e029105c2e6959390a68116ac6d1d277815519f (patch) | |
tree | 0c8934f70a3c6fd8490553a8d297cc3bf3e98016 /src/glsl | |
parent | f5cf74d8ba8ce30b9d53b2198e5122ed72f1dcff (diff) |
nir: Allow feq/fne/ieq/ine to be optimized with inot.
instructions in affected programs: 380 -> 376 (-1.05%)
helped: 2
Reviewed-by: Jordan Justen <[email protected]>
Reviewed-by: Glenn Kennard <[email protected]>
Diffstat (limited to 'src/glsl')
-rw-r--r-- | src/glsl/nir/nir_opt_algebraic.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/glsl/nir/nir_opt_algebraic.py b/src/glsl/nir/nir_opt_algebraic.py index b0a1f243852..400d60e3581 100644 --- a/src/glsl/nir/nir_opt_algebraic.py +++ b/src/glsl/nir/nir_opt_algebraic.py @@ -83,8 +83,12 @@ optimizations = [ # Comparison simplifications (('inot', ('flt', a, b)), ('fge', a, b)), (('inot', ('fge', a, b)), ('flt', a, b)), + (('inot', ('feq', a, b)), ('fne', a, b)), + (('inot', ('fne', a, b)), ('feq', a, b)), (('inot', ('ilt', a, b)), ('ige', a, b)), (('inot', ('ige', a, b)), ('ilt', a, b)), + (('inot', ('ieq', a, b)), ('ine', a, b)), + (('inot', ('ine', a, b)), ('ieq', a, b)), (('fge', ('fneg', ('fabs', a)), 0.0), ('feq', a, 0.0)), (('bcsel', ('flt', a, b), a, b), ('fmin', a, b)), (('bcsel', ('flt', a, b), b, a), ('fmax', a, b)), |