From 938098c98d496ab950d33cfdd1dc46624f5118fd Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Fri, 15 Jan 2021 13:01:14 +0000 Subject: [PATCH] nir/opt_load_store_vectorize: only require one variable to be restrict MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No fossil-db changes. Signed-off-by: Rhys Perry Reviewed-by: Daniel Schürmann Part-of: --- src/compiler/nir/nir_opt_load_store_vectorize.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/nir/nir_opt_load_store_vectorize.c b/src/compiler/nir/nir_opt_load_store_vectorize.c index fc924d9a2e6..ee8c40eb0e3 100644 --- a/src/compiler/nir/nir_opt_load_store_vectorize.c +++ b/src/compiler/nir/nir_opt_load_store_vectorize.c @@ -895,7 +895,7 @@ vectorize_stores(nir_builder *b, struct vectorize_ctx *ctx, } /* Returns true if it can prove that "a" and "b" point to different bindings - * and both use ACCESS_RESTRICT. */ + * and either one uses ACCESS_RESTRICT. */ static bool bindings_different_restrict(nir_shader *shader, struct entry *a, struct entry *b) { @@ -934,7 +934,7 @@ bindings_different_restrict(nir_shader *shader, struct entry *a, struct entry *b unsigned b_access = b->access | (b_var ? b_var->data.access : 0); return different_bindings && - ((a_access & b_access) & ACCESS_RESTRICT); + ((a_access | b_access) & ACCESS_RESTRICT); } static int64_t