i915g: Handle constants composed exclusively of 0 or ±1 specially
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 1 Mar 2022 23:48:51 +0000 (15:48 -0800)
committerMarge Bot <emma+marge@anholt.net>
Thu, 3 Mar 2022 00:07:58 +0000 (00:07 +0000)
commit374da6fc41e955c261b7888a2809b7025fdf0f97
treedf6225b117d63a50b2da2875cd2295716a9724e0
parent06eb9fb12599cf792f9bec36f5c5149258fde1dc
i915g: Handle constants composed exclusively of 0 or ±1 specially

This can avoid some cases where a constant has to be loaded into a
temporary register.

v2: Update i915-g33-fails.txt.

total instructions in shared programs: 788625 -> 782376 (-0.79%)
instructions in affected programs: 166269 -> 160020 (-3.76%)
helped: 1578
HURT: 0
helped stats (abs) min: 3 max: 21 x̄: 3.96 x̃: 3
helped stats (rel) min: 1.56% max: 33.33% x̄: 4.82% x̃: 3.45%
95% mean confidence interval for instructions value: -4.06 -3.86
95% mean confidence interval for instructions %-change: -5.00% -4.64%
Instructions are helped.

LOST:   0
GAINED: 35

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15210>
src/gallium/drivers/i915/ci/i915-g33-fails.txt
src/gallium/drivers/i915/i915_fpc_translate.c