soft-fp64: Pick a single idiom for treating sign value as a Boolean
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 3 Mar 2020 00:33:16 +0000 (16:33 -0800)
committerMarge Bot <eric+marge@anholt.net>
Wed, 18 Mar 2020 20:36:29 +0000 (20:36 +0000)
commit598e2fc6a1834ba8b1e0ee82ecf6c016f6ed7c3e
treeb91035a4ead259e0a7346b010691a4ef1d271210
parent325a21f5ebca90ccac9a7c3c571ed0513c4ec3d2
soft-fp64: Pick a single idiom for treating sign value as a Boolean

Replace all of the bool(qSign) with qSign != 0u.  Remove unnecessary
parenthesis from around most of the existing qSign != 0u.

This dramatically simplifies the next commit.

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: 848109 -> 848106 (<.01%)
instructions in affected programs: 53 -> 50 (-5.66%)
helped: 1
HURT: 0

total cycles in shared programs: 6969145 -> 6969125 (<.01%)
cycles in affected programs: 396 -> 376 (-5.05%)
helped: 1
HURT: 0

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>
src/compiler/glsl/float64.glsl