Mesa (main): nir/opt_load_store_vectorize: only require one variable to be restrict
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Jun 10 13:39:33 UTC 2021
Module: Mesa
Branch: main
Commit: 938098c98d496ab950d33cfdd1dc46624f5118fd
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=938098c98d496ab950d33cfdd1dc46624f5118fd
Author: Rhys Perry <pendingchaos02 at gmail.com>
Date: Fri Jan 15 13:01:14 2021 +0000
nir/opt_load_store_vectorize: only require one variable to be restrict
No fossil-db changes.
Signed-off-by: Rhys Perry <pendingchaos02 at gmail.com>
Reviewed-by: Daniel Schürmann <daniel at schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7295>
---
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
More information about the mesa-commit
mailing list