nir/algebraic: Apply addition property of equality to the other ordering too
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 2 Feb 2021 18:18:42 +0000 (10:18 -0800)
committerMarge Bot <eric+marge@anholt.net>
Thu, 4 Mar 2021 22:50:53 +0000 (22:50 +0000)
commit2c4fd24c016a405f37e2a01d87c4b4801f54cb79
tree2e516cad9fa79ceac9fb1e6bae8600687d58f4ae
parent33031bdab66988739e2334877ca1e8a2ea41b3b5
nir/algebraic: Apply addition property of equality to the other ordering too

Inequality comparison operations are not commutative, so `foo < bar` and
`bar < foo` both have to be explicitly listed.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
All Intel GPUs had similar results. (Ice Lake shown)
total instructions in shared programs: 20027051 -> 20026899 (<.01%)
instructions in affected programs: 37181 -> 37029 (-0.41%)
helped: 85
HURT: 0
helped stats (abs) min: 1 max: 20 x̄: 1.79 x̃: 1
helped stats (rel) min: 0.05% max: 6.78% x̄: 0.92% x̃: 0.68%
95% mean confidence interval for instructions value: -2.42 -1.15
95% mean confidence interval for instructions %-change: -1.23% -0.61%
Instructions are helped.

total cycles in shared programs: 979762793 -> 979753527 (<.01%)
cycles in affected programs: 2653905 -> 2644639 (-0.35%)
helped: 104
HURT: 50
helped stats (abs) min: 1 max: 1048 x̄: 119.99 x̃: 11
helped stats (rel) min: <.01% max: 9.88% x̄: 0.77% x̃: 0.20%
HURT stats (abs)   min: 1 max: 734 x̄: 64.26 x̃: 8
HURT stats (rel)   min: <.01% max: 3.06% x̄: 0.36% x̃: 0.10%
95% mean confidence interval for cycles value: -98.65 -21.68
95% mean confidence interval for cycles %-change: -0.66% -0.15%
Cycles are helped.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9374>
src/compiler/nir/nir_opt_algebraic.py