Module: Mesa Branch: master Commit: 84ab61160a18edab0e1698e1e54e560b57d5a9ab URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=84ab61160a18edab0e1698e1e54e560b57d5a9ab
Author: Jason Ekstrand <[email protected]> Date: Sat Mar 28 11:24:08 2020 -0500 nir/algebraic: Add downcast-of-pack opts Reviewed-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4365> --- src/compiler/nir/nir_opt_algebraic.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py index dbfd4917503..472db765026 100644 --- a/src/compiler/nir/nir_opt_algebraic.py +++ b/src/compiler/nir/nir_opt_algebraic.py @@ -1400,6 +1400,15 @@ for N, M in itertools.product(type_sizes('uint'), type_sizes('uint')): # The N == M case is handled by other optimizations pass +# Downcast operations should be able to see through pack +for t in ['i', 'u']: + for N in [8, 16, 32]: + x2xN = '{0}2{0}{1}'.format(t, N) + optimizations += [ + ((x2xN, ('pack_64_2x32_split', a, b)), (x2xN, a)), + ((x2xN, ('pack_64_2x32_split', a, b)), (x2xN, a)), + ] + # Optimize comparisons with up-casts for t in ['int', 'uint', 'float']: for N, M in itertools.product(type_sizes(t), repeat=2): _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
