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>
This commit is contained in:
Rhys Perry 2021-01-15 13:01:14 +00:00 committed by Marge Bot
parent 865ca3af2b
commit 938098c98d
1 changed files with 2 additions and 2 deletions

View File

@ -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