summaryrefslogtreecommitdiff
path: root/src/compiler/nir/nir_opt_load_store_vectorize.c
diff options
context:
space:
mode:
authorRhys Perry <pendingchaos02@gmail.com>2021-01-15 13:01:14 +0000
committerMarge Bot <eric+marge@anholt.net>2021-06-10 13:17:22 +0000
commit938098c98d496ab950d33cfdd1dc46624f5118fd (patch)
tree180a8e61d9967a3684ff18341516992451c4f393 /src/compiler/nir/nir_opt_load_store_vectorize.c
parent865ca3af2b6934163bd268091b9e1984746a064d (diff)
nir/opt_load_store_vectorize: only require one variable to be restrict
No fossil-db changes. Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7295>
Diffstat (limited to 'src/compiler/nir/nir_opt_load_store_vectorize.c')
-rw-r--r--src/compiler/nir/nir_opt_load_store_vectorize.c4
1 files 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