soft-fp64/fneg: Don't treat NaN specially
__fabs64 doesn't do anything special, and the value is still NaN regardless of the value of the MSB. In a strict sense, it's possible that both functions should set the "signal" bit. lts 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: 844558 -> 843005 (-0.18%) instructions in affected programs: 725975 -> 724422 (-0.21%) helped: 53 HURT: 4 helped stats (abs) min: 1 max: 313 x̄: 29.87 x̃: 21 helped stats (rel) min: 0.01% max: 0.94% x̄: 0.30% x̃: 0.22% HURT stats (abs) min: 4 max: 11 x̄: 7.50 x̃: 7 HURT stats (rel) min: 0.03% max: 0.09% x̄: 0.05% x̃: 0.04% 95% mean confidence interval for instructions value: -39.02 -15.47 95% mean confidence interval for instructions %-change: -0.34% -0.21% Instructions are helped. total cycles in shared programs: 6962024 -> 6944998 (-0.24%) cycles in affected programs: 6185470 -> 6168444 (-0.28%) helped: 59 HURT: 0 helped stats (abs) min: 64 max: 2863 x̄: 288.58 x̃: 208 helped stats (rel) min: 0.11% max: 0.87% x̄: 0.33% x̃: 0.27% 95% mean confidence interval for cycles value: -387.15 -190.00 95% mean confidence interval for cycles %-change: -0.38% -0.28% Cycles are helped. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Matt Turner <mattst88@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4142>
This commit is contained in:
@@ -88,10 +88,7 @@ uint64_t
|
||||
__fneg64(uint64_t __a)
|
||||
{
|
||||
uvec2 a = unpackUint2x32(__a);
|
||||
uint t = a.y;
|
||||
|
||||
t ^= (1u << 31);
|
||||
a.y = mix(t, a.y, __is_nan(__a));
|
||||
a.y ^= (1u << 31);
|
||||
return packUint2x32(a);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user