nir/algebraic: Remove redundant pack / unpack lowering patterns
No shader-db or fossil-db changes on any Intel platform. Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24900>
This commit is contained in:
@@ -1695,12 +1695,12 @@ optimizations.extend([
|
||||
|
||||
# Lower pack/unpack
|
||||
(('pack_64_2x32_split', a, b), ('ior', ('u2u64', a), ('ishl', ('u2u64', b), 32)), 'options->lower_pack_64_2x32_split'),
|
||||
(('pack_32_2x16_split', a, b), ('ior', ('u2u32', a), ('ishl', ('u2u32', b), 16)), 'options->lower_pack_32_2x16_split'),
|
||||
(('pack_32_2x16_split', a, b), ('ior', ('u2u32', a), ('ishl', ('u2u32', b), 16)), 'options->lower_pack_32_2x16_split || options->lower_pack_split'),
|
||||
(('pack_half_2x16_split', a, b), ('pack_half_2x16_rtz_split', a, b), 'options->has_pack_half_2x16_rtz'),
|
||||
(('unpack_64_2x32_split_x', a), ('u2u32', a), 'options->lower_unpack_64_2x32_split'),
|
||||
(('unpack_64_2x32_split_y', a), ('u2u32', ('ushr', a, 32)), 'options->lower_unpack_64_2x32_split'),
|
||||
(('unpack_32_2x16_split_x', a), ('u2u16', a), 'options->lower_unpack_32_2x16_split'),
|
||||
(('unpack_32_2x16_split_y', a), ('u2u16', ('ushr', a, 16)), 'options->lower_unpack_32_2x16_split'),
|
||||
(('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'),
|
||||
|
||||
# Useless masking before unpacking
|
||||
(('unpack_half_2x16_split_x', ('iand', a, 0xffff)), ('unpack_half_2x16_split_x', a)),
|
||||
@@ -2194,18 +2194,6 @@ optimizations.extend([
|
||||
('f2f32', ('u2u16', ('ushr', a, 16))),
|
||||
'options->lower_pack_split'),
|
||||
|
||||
(('pack_32_2x16_split', 'a@16', 'b@16'),
|
||||
('ior', ('ishl', ('u2u32', b), 16), ('u2u32', a)),
|
||||
'options->lower_pack_split'),
|
||||
|
||||
(('unpack_32_2x16_split_x', 'a@32'),
|
||||
('u2u16', a),
|
||||
'options->lower_pack_split'),
|
||||
|
||||
(('unpack_32_2x16_split_y', 'a@32'),
|
||||
('u2u16', ('ushr', 'a', 16)),
|
||||
'options->lower_pack_split'),
|
||||
|
||||
(('isign', a), ('imin', ('imax', a, -1), 1), 'options->lower_isign'),
|
||||
(('imin', ('imax', a, -1), 1), ('isign', a), '!options->lower_isign'),
|
||||
(('imax', ('imin', a, 1), -1), ('isign', a), '!options->lower_isign'),
|
||||
|
Reference in New Issue
Block a user