nir: Remove useless ftrunc inside f2i/f2u.

No shader-db changes, probably because they're all removed by the GLSL
compiler optimization added in commit 69ad5fd4.

Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
Matt Turner 2015-03-26 10:09:42 -07:00
parent 97e6c1b957
commit 781badee7a

View file

@ -181,6 +181,10 @@ optimizations = [
(('bcsel', a, b, b), b),
(('fcsel', a, b, b), b),
# Conversions
(('f2i', ('ftrunc', a)), ('f2i', a)),
(('f2u', ('ftrunc', a)), ('f2u', a)),
# Subtracts
(('fsub', a, ('fsub', 0.0, b)), ('fadd', a, b)),
(('isub', a, ('isub', 0, b)), ('iadd', a, b)),