broadcom/compiler: allow vectorization to larger scalar type

Allow to vectorize operations from a smaller bit-size into
scalar operations of a larger bit-size. This allows us to
turn 2x8-bit into a equivalent scalar 16-bit load/store.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14648>
This commit is contained in:
Iago Toral Quiroga 2022-01-21 13:10:55 +01:00 committed by Marge Bot
parent a248ff0b5b
commit 296fde31aa

View file

@ -2059,7 +2059,10 @@ mem_vectorize_callback(unsigned align_mul, unsigned align_offset,
void *data)
{
/* TMU general access only supports 32-bit vectors */
if (bit_size != 32)
if (bit_size > 32)
return false;
if ((bit_size == 8 || bit_size == 16) && num_components > 1)
return false;
if (align_mul % 4 != 0 || align_offset % 4 != 0)