mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 11:30:21 +01:00
nir/algebraic: optimize u2u32(a >> 32)
fossil-db (navi21): Totals from 352 (0.44% of 79330) affected shaders: Instrs: 271816 -> 271240 (-0.21%); split: -0.28%, +0.07% CodeSize: 1546520 -> 1544448 (-0.13%); split: -0.23%, +0.09% SpillVGPRs: 832 -> 827 (-0.60%); split: -1.08%, +0.48% Latency: 4037120 -> 4021748 (-0.38%); split: -0.41%, +0.03% InvThroughput: 1369540 -> 1362066 (-0.55%); split: -0.59%, +0.04% VClause: 6476 -> 6471 (-0.08%); split: -0.12%, +0.05% SClause: 6798 -> 6794 (-0.06%) Copies: 44828 -> 44630 (-0.44%); split: -0.89%, +0.45% Branches: 8845 -> 8844 (-0.01%); split: -0.05%, +0.03% PreSGPRs: 14684 -> 14659 (-0.17%) Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25409>
This commit is contained in:
parent
bcdac65ca3
commit
65afc8bebf
1 changed files with 3 additions and 0 deletions
|
|
@ -1702,6 +1702,9 @@ optimizations.extend([
|
|||
(('unpack_32_2x16_split_x', a), ('u2u16', a), 'options->lower_unpack_32_2x16_split || options->lower_pack_split'),
|
||||
(('unpack_32_2x16_split_y', a), ('u2u16', ('ushr', a, 16)), 'options->lower_unpack_32_2x16_split || options->lower_pack_split'),
|
||||
|
||||
(('unpack_64_2x32_split_x', ('ushr', a, 32)), ('unpack_64_2x32_split_y', a), '!options->lower_unpack_64_2x32_split'),
|
||||
(('u2u32', ('ushr', 'a@64', 32)), ('unpack_64_2x32_split_y', a), '!options->lower_unpack_64_2x32_split'),
|
||||
|
||||
# Useless masking before unpacking
|
||||
(('unpack_half_2x16_split_x', ('iand', a, 0xffff)), ('unpack_half_2x16_split_x', a)),
|
||||
(('unpack_32_2x16_split_x', ('iand', a, 0xffff)), ('unpack_32_2x16_split_x', a)),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue