nir/algebraic: Remove useless ftrunc inside f2i/f2u

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37186>
This commit is contained in:
Ian Romanick 2025-09-30 17:29:22 -07:00 committed by Marge Bot
parent c49d6e0480
commit 4338f7d033

View file

@ -1876,6 +1876,8 @@ optimizations.extend([
# Conversions
(('f2i', ('ftrunc', a)), ('f2i', a)),
(('f2u', ('ftrunc', a)), ('f2u', a)),
(('f2i', ('ffloor', 'a(is_not_negative)')), ('f2i', a)),
(('f2u', ('ffloor', a)), ('f2u', a)),
# Conversions from 16 bits to 32 bits and back can always be removed
(('f2fmp', ('f2f32', 'a@16')), a),