nir/algebraic: Add optimizations for "a == a && a CMP b"
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 20 Dec 2016 05:29:51 +0000 (21:29 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 23 Dec 2016 00:27:19 +0000 (16:27 -0800)
commitd55835b8bdf031ef3c254a9b7ec1776ad348582b
tree9a9c37683a2f87d7dfa3e3fe03dec931670c29b3
parent8962cc96ec2bc1eb561a438512adc5042e2c8d34
nir/algebraic: Add optimizations for "a == a && a CMP b"

This sequence shows up The Talos Principal, at least under Vulkan,
and prevents loop analysis from properly computing trip counts in a
few loops.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/compiler/nir/nir_opt_algebraic.py