nir/algebraic: add scmp algebraic optimizations
authorJonathan Marek <jonathan@marek.ca>
Wed, 24 Jul 2019 17:33:17 +0000 (13:33 -0400)
committerJonathan Marek <jonathan@marek.ca>
Wed, 24 Jul 2019 21:36:21 +0000 (17:36 -0400)
commit97c8314c5fee925cc25daf9ac9ba225f86562805
tree6bddd9ceb1ffc6555980f8b3e01fcedf6c629c41
parent9be902097c72466f60d3178cc6ecaa578fb45d86
nir/algebraic: add scmp algebraic optimizations

When 'x' is the result of a scmp op:

x != 0.0 or x == 1.0: passthrough
x == 0.0 or x != 1.0: invert

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/compiler/nir/nir_opt_algebraic.py