aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2020-03-04 12:05:06 -0800
committerMarge Bot <[email protected]>2020-03-18 20:36:29 +0000
commit9496a67eece5717417b3b44ad1552c57b70b2897 (patch)
tree77588fe2bf5ebe469916bf5f726f731d55c64dd4
parent7078105592bf332e1080fbd7049c3a8dd9cde0cc (diff)
soft-fp64/fadd: Delete a redundant condition check
Previous condition checks already guaranteen that expDiff != 0 and !(expDiff > 0), so expDiff < 0 is the only option left. The main purpose of this commit is to prepare for "soft-fp64/fadd: Move common code out of both branches of an if-statement". 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: 815491 -> 812590 (-0.36%) instructions in affected programs: 753668 -> 750767 (-0.38%) helped: 74 HURT: 0 helped stats (abs) min: 3 max: 281 x̄: 39.20 x̃: 25 helped stats (rel) min: 0.29% max: 0.73% x̄: 0.42% x̃: 0.40% 95% mean confidence interval for instructions value: -48.50 -29.91 95% mean confidence interval for instructions %-change: -0.45% -0.40% Instructions are helped. total cycles in shared programs: 6813681 -> 6798039 (-0.23%) cycles in affected programs: 6381699 -> 6366057 (-0.25%) helped: 74 HURT: 0 helped stats (abs) min: 24 max: 1488 x̄: 211.38 x̃: 149 helped stats (rel) min: 0.20% max: 0.44% x̄: 0.26% x̃: 0.25% 95% mean confidence interval for cycles value: -261.68 -161.08 95% mean confidence interval for cycles %-change: -0.28% -0.25% Cycles are helped. Reviewed-by: Matt Turner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4142>
-rw-r--r--src/compiler/glsl/float64.glsl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/glsl/float64.glsl b/src/compiler/glsl/float64.glsl
index ea33cb1f992..68f79c4c563 100644
--- a/src/compiler/glsl/float64.glsl
+++ b/src/compiler/glsl/float64.glsl
@@ -708,7 +708,7 @@ __fadd64(uint64_t a, uint64_t b)
__shift64ExtraRightJamming(
bFracHi, bFracLo, 0u, expDiff, bFracHi, bFracLo, zFrac2);
zExp = aExp;
- } else if (expDiff < 0) {
+ } else {
if (bExp == 0x7FF) {
bool propagate = (bFracHi | bFracLo) != 0u;
return mix(__packFloat64(aSign, 0x7ff, 0u, 0u), __propagateFloat64NaN(a, b), propagate);