nir/algebraic: Optimize x2b(xneg(a)) -> a
authorJason Ekstrand <jason.ekstrand@intel.com>
Thu, 6 Dec 2018 19:02:01 +0000 (13:02 -0600)
committerJason Ekstrand <jason@jlekstrand.net>
Sun, 16 Dec 2018 21:03:02 +0000 (21:03 +0000)
commit4bb1a34727f52ecd4a8f00725d740ae2047cb1dc
tree9d18de5762d84dc7eed5b5c2bdc4b96ced0d2bb1
parent3595a0abf43be3ce27d88f5939b257a74e90035b
nir/algebraic: Optimize x2b(xneg(a)) -> a

Shader-db results on Kaby Lake:

    total instructions in shared programs: 15072525 -> 15072525 (0.00%)
    instructions in affected programs: 0 -> 0
    helped: 0
    HURT: 0

This helps prevent regressions in later commits.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tested-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/compiler/nir/nir_opt_algebraic.py