nir: Recognize (a < c || b < c) as min(a, b) < c.
authorMatt Turner <mattst88@gmail.com>
Wed, 6 May 2015 03:25:07 +0000 (20:25 -0700)
committerMatt Turner <mattst88@gmail.com>
Thu, 7 May 2015 17:51:05 +0000 (10:51 -0700)
commitf5cf74d8ba8ce30b9d53b2198e5122ed72f1dcff
tree84ea1307828e6847adb71a24b66c879fe2879692
parentceb8b739ce37ee041b903643656d9d16c371ff95
nir: Recognize (a < c || b < c) as min(a, b) < c.

... and (a >= c) || (b >= c) as max(a, b) >= c.

Similar to commit 97e6c1b9.

total instructions in shared programs: 6182276 -> 6182180 (-0.00%)
instructions in affected programs:     6400 -> 6304 (-1.50%)
helped:                                68
HURT:                                  4

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Glenn Kennard <glenn.kennard@gmail.com>
src/glsl/nir/nir_opt_algebraic.py