nir: Separate a weird compare with zero to two compares with zero
authorIan Romanick <ian.d.romanick@intel.com>
Thu, 11 Jan 2018 22:14:25 +0000 (14:14 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Tue, 30 Jan 2018 23:40:14 +0000 (15:40 -0800)
commit821e7a4d329f8460d0d27683580a703d9ed8431c
treeb37fddbe6a5e14eacf3abba9c704eec6439f9824
parent68420d8322c2b304a0b15f94b43dec19f082dfae
nir: Separate a weird compare with zero to two compares with zero

min(a+b, c+d) >= 0 becomes (a+b >= 0 && c+d >= 0).

No shader-db changes, but it does prevent 6 to 12 instruction
regressions in the next patch on all measured Intel platforms.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Elie Tournier <elie.tournier@collabora.com>
src/compiler/nir/nir_opt_algebraic.py