diff options
author | Matt Turner <[email protected]> | 2016-02-01 16:34:46 -0800 |
---|---|---|
committer | Matt Turner <[email protected]> | 2016-02-08 20:38:17 -0800 |
commit | 9f02e3ab03da91162fc0c64b91a2e5ff213dff9b (patch) | |
tree | d0ea942b44856bfb480e5f87a7452882da4c623a /src/compiler/nir/nir_opt_algebraic.py | |
parent | 3fd42807593eb68d83a36215fc5fc49b3adc7724 (diff) |
nir: Add opt_algebraic rules for xor with zero.
instructions in affected programs: 668 -> 664 (-0.60%)
helped: 4
Reviewed-by: Eduardo Lima Mitev <[email protected]>
Reviewed-by: Jason Ekstrand <[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, 2 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py index e7765faa146..60df69fadbd 100644 --- a/src/compiler/nir/nir_opt_algebraic.py +++ b/src/compiler/nir/nir_opt_algebraic.py @@ -149,6 +149,8 @@ optimizations = [ (('ior', a, 0), a), (('fxor', a, a), 0.0), (('ixor', a, a), 0), + (('fxor', a, 0.0), a), + (('ixor', a, 0), a), (('inot', ('inot', a)), a), # DeMorgan's Laws (('iand', ('inot', a), ('inot', b)), ('inot', ('ior', a, b))), |