diff options
author | Jason Ekstrand <[email protected]> | 2018-10-19 12:43:43 -0500 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2018-10-22 16:00:18 -0500 |
commit | 6068be543b6ed67847a463b805b7ffeefcf549ee (patch) | |
tree | ed05d143efa56fe92e85d5683c6fa438b6fb42b0 /src/compiler/nir/nir_opt_algebraic.py | |
parent | 69618a867858cceeaa59eca732eb76c7677e73a8 (diff) |
nir/algebraic: Generalize an optimization
There's nothing boolean about (a | ~a) ~> -1
Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_opt_algebraic.py')
-rw-r--r-- | src/compiler/nir/nir_opt_algebraic.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py index cc747250ba5..8b24daddfdc 100644 --- a/src/compiler/nir/nir_opt_algebraic.py +++ b/src/compiler/nir/nir_opt_algebraic.py @@ -373,7 +373,7 @@ optimizations = [ (('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), + (('ior', a, ('inot', a)), -1), (('iand', ('ieq', 'a@32', 0), ('ieq', 'b@32', 0)), ('ieq', ('ior', 'a@32', 'b@32'), 0)), |