nir/opt_load_store_vectorize: delay aliasing test in try_vectorize_shared2()
Checking for aliasing can be very expensive. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38659>
This commit is contained in:
parent
598928d7e7
commit
89b9fcb5e7
1 changed files with 3 additions and 3 deletions
|
|
@ -1507,9 +1507,6 @@ try_vectorize_shared2(struct vectorize_ctx *ctx,
|
|||
struct entry *low, struct entry *high,
|
||||
struct entry *first, struct entry *second)
|
||||
{
|
||||
if (!can_vectorize(ctx, first, second) || first->deref)
|
||||
return false;
|
||||
|
||||
unsigned low_bit_size = get_bit_size(low);
|
||||
unsigned high_bit_size = get_bit_size(high);
|
||||
unsigned low_size = low->num_components * low_bit_size / 8;
|
||||
|
|
@ -1523,6 +1520,9 @@ try_vectorize_shared2(struct vectorize_ctx *ctx,
|
|||
if (high->align_mul % low_size || high->align_offset % low_size)
|
||||
return false;
|
||||
|
||||
if (!can_vectorize(ctx, first, second) || first->deref)
|
||||
return false;
|
||||
|
||||
uint64_t diff = get_offset_diff(low, high);
|
||||
bool st64 = diff % (64 * low_size) == 0;
|
||||
unsigned stride = st64 ? 64 * low_size : low_size;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue