Module: Mesa Branch: master Commit: e105b0ca306eb826c7b5cbc8a965e9f774d0d5b7 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e105b0ca306eb826c7b5cbc8a965e9f774d0d5b7
Author: Timothy Arceri <[email protected]> Date: Mon Jul 16 15:19:29 2018 +1000 nir: add a couple of ior opts to nir_opt_algebraic One of these was seen in a Deus Ex shader. Reviewed-by: Jason Ekstrand <[email protected]> --- src/compiler/nir/nir_opt_algebraic.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py index 5e07d662b0..f49b43f321 100644 --- a/src/compiler/nir/nir_opt_algebraic.py +++ b/src/compiler/nir/nir_opt_algebraic.py @@ -285,6 +285,9 @@ optimizations = [ (('iand', ('uge(is_used_once)', a, b), ('uge', a, c)), ('uge', a, ('umax', b, c))), (('iand', ('uge(is_used_once)', a, c), ('uge', b, c)), ('uge', ('umin', a, b), c)), + (('ior', 'a@bool', ('ieq', a, False)), True), + (('ior', 'a@bool', ('inot', a)), True), + (('iand', ('ieq', 'a@32', 0), ('ieq', 'b@32', 0)), ('ieq', ('ior', 'a@32', 'b@32'), 0)), # These patterns can result when (a < b || a < c) => (a < min(b, c)) _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
