nir: do not vectorize load/store if offset can overflow and robustness enabled
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 4 May 2020 14:02:38 +0000 (16:02 +0200)
committerMarge Bot <eric+marge@anholt.net>
Mon, 11 May 2020 07:25:15 +0000 (07:25 +0000)
commit04718a9cd63cea9d815bffd91495069a79db8ac5
tree6ad0455776ada01b701e18cd8391fbef39141dc9
parent3fba0a7a6f01496344ddb93e774b2d4bc9195e8a
nir: do not vectorize load/store if offset can overflow and robustness enabled

This prevents vectorization for loads/stores that can overflow if
the low offset is negative and the range greater or equal than 0.

The caller can pass the list of variable modes that matter for
robust access.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4881>
src/amd/compiler/aco_instruction_selection_setup.cpp
src/compiler/nir/nir.h
src/compiler/nir/nir_opt_load_store_vectorize.c
src/compiler/nir/tests/load_store_vectorizer_tests.cpp
src/intel/compiler/brw_nir.c