nir/algebraic: optimize more 64-bit imul with constant source
authorRhys Perry <pendingchaos02@gmail.com>
Tue, 9 Mar 2021 16:51:25 +0000 (16:51 +0000)
committerMarge Bot <emma+marge@anholt.net>
Fri, 17 Dec 2021 18:51:24 +0000 (18:51 +0000)
commit403ae3b48eef757dd296dcc9b4ab980fe468b623
tree00363663e2872c8b036e2b9475e6e2049cd49efb
parentc56cf157c518193ef85d54f9185df5c703d14896
nir/algebraic: optimize more 64-bit imul with constant source

Two 64-bit shifts and an addition are usually faster than the several
multiplications nir_lower_int64 creates.

No fossil-db changes.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14227>
src/compiler/nir/nir_opt_algebraic.py
src/compiler/nir/nir_search_helpers.h