agx: clean up packs from bounds check

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
This commit is contained in:
Alyssa Rosenzweig 2024-09-19 17:09:00 -04:00 committed by Marge Bot
parent 5b86a55f10
commit 9b3216f61b

View file

@ -50,6 +50,11 @@ lower_pack = [
(('f2u8', a), ('u2u8', ('f2u16', a))),
(('f2i8', a), ('i2i8', ('f2i16', a))),
# Duplicated from nir_opt_algebraic since this pattern is generated by our
# bounds checking optimization which needs to run relatively late.
(('unpack_64_2x32_split_x', ('pack_64_2x32_split', a, b)), a),
(('unpack_64_2x32_split_y', ('pack_64_2x32_split', a, b)), b),
# Based on the VIR lowering
(('f2f16_rtz', 'a@32'),
('bcsel', ('flt', ('fabs', a), ('fabs', ('f2f32', ('f2f16_rtne', a)))),