ac/nir: micro-optimize boolean expression
authorRhys Perry <pendingchaos02@gmail.com>
Tue, 18 Oct 2022 18:52:15 +0000 (19:52 +0100)
committerMarge Bot <emma+marge@anholt.net>
Thu, 27 Oct 2022 13:31:40 +0000 (13:31 +0000)
commit21a319851aa92dfdd012807d8fedc05bb63684f5
treecc68ac461a1dc8e56e9facfaff2a3c9fb6809fca
parent03a6eb25477f235e0e9957ee454e33d7365220f4
ac/nir: micro-optimize boolean expression

Ignoring SCC spilling, the old version is probably faster because this
mixes uniform and divergent booleans.

fossil-db (navi21):
Totals from 61167 (45.10% of 135636) affected shaders:
Instrs: 29961899 -> 29932551 (-0.10%)
CodeSize: 157407028 -> 157289636 (-0.07%)
Latency: 139671953 -> 139625186 (-0.03%); split: -0.03%, +0.00%
InvThroughput: 21221097 -> 21220756 (-0.00%)
SClause: 750438 -> 750439 (+0.00%)
Copies: 2672846 -> 2582332 (-3.39%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19340>
src/amd/common/ac_nir_lower_ngg.c