nir/load_store_vectorize: rework alignment calculation
authorRhys Perry <pendingchaos02@gmail.com>
Thu, 23 Apr 2020 15:13:10 +0000 (16:13 +0100)
committerMarge Bot <eric+marge@anholt.net>
Fri, 4 Sep 2020 13:03:50 +0000 (13:03 +0000)
commit91a8a07a5f0ffdd9eb85634fc9c0cb13812210b2
tree6b0b0a05e37225f9c01050752c0fdf1e0e1dbaaf
parent8faf85f68770ee3e060bb74c87e857070f336a02
nir/load_store_vectorize: rework alignment calculation

It now also updates align_offset and creates better alignment information
with a constant 0 offset.

shader-db (Navi):
Totals from 63 (0.05% of 127638) affected shaders:
SGPRs: 3072 -> 3064 (-0.26%)
VGPRs: 2736 -> 2740 (+0.15%)
CodeSize: 325180 -> 324336 (-0.26%); split: -0.27%, +0.01%
Instrs: 63555 -> 63413 (-0.22%); split: -0.24%, +0.02%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4710>
src/compiler/nir/nir_opt_load_store_vectorize.c
src/compiler/nir/tests/load_store_vectorizer_tests.cpp