nir: Recognize sat(add(b2f(a), b2f(b))) as a logical OR.
authorMatt Turner <mattst88@gmail.com>
Wed, 18 Mar 2015 06:30:43 +0000 (23:30 -0700)
committerMatt Turner <mattst88@gmail.com>
Tue, 24 Mar 2015 21:43:37 +0000 (14:43 -0700)
commit3fb56805f0dbfe929cd733e15566197bc0733290
treeb28924ffffba6c87fb4fd0b3c181b134cd59767c
parentc31158d2cb06a864cf44d6d4f2c539e359990d3d
nir: Recognize sat(add(b2f(a), b2f(b))) as a logical OR.

Transform this into b2f(or(a, b)).

instructions in affected programs:     432 -> 430 (-0.46%)
helped:                                2

Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
src/glsl/nir/nir_opt_algebraic.py