soft-fp64: Store sign value as 0 or 0x80000000

Graphics / Mesa 3D Graphics Library / Mesa - Ian Romanick [intel.com] - 18 March 2020 20:36 EDT

...instead of 0 or 1. Many places the sign bit is extracted, then later put back in the same position. This saves some left-shift operations.

Results on the 308 shaders extracted from the fp64 portion of the OpenGL CTS:

Tiger Lake and Ice Lake had similar results. (Tiger Lake shown) total instructions in shared programs: 848106 -> 844558 (-0.42%) instructions in affected programs: 833480 -> 829932 (-0.43%) helped: 106 HURT: 1 helped stats (abs) min: 1 max: 995 x̄: 33.48 x̃: 12 helped stats (rel) min: 0.15% max: 2.20% x̄: 0.60% x̃: 0.35% HURT stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1 HURT stats (rel) min: <.01% max: <.01% x̄: <.01% x̃: <.01% 95% mean confidence interval for instructions value: -51.88 -14.43 95% mean confidence interval for instructions %-change: -0.71% -0.47% Instructions are helped.

total cycles in shared programs: 6969125 -> 6962024 (-0.10%) cycles in affected programs: 6717689 -> 6710588 (-0.11%) helped: 78 HURT: 7 helped stats (abs) min: 2 max: 2083 x̄: 110.27 x̃: 56 helped stats (rel) min: <.01% max: 0.30% x̄: 0.11% x̃: 0.11% HURT stats (abs) min: 2 max: 1340 x̄: 214.29 x̃: 4 HURT stats (rel) min: 0.01% max: 0.71% x̄: 0.13% x̃: 0.02% 95% mean confidence interval for cycles value: -144.02 -23.06 95% mean confidence interval for cycles %-change: -0.12% -0.07% Cycles are helped.

total spills in shared programs: 814 -> 759 (-6.76%) spills in affected programs: 814 -> 759 (-6.76%) helped: 2 HURT: 1

total fills in shared programs: 2488 -> 2412 (-3.05%) fills in affected programs: 2488 -> 2412 (-3.05%) helped: 2 HURT: 1

de4acd8816c soft-fp64: Store sign value as 0 or 0x80000000
src/compiler/glsl/float64.glsl | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)

Upstream: cgit.freedesktop.org


  • Share