pan/bi: improve vectorization of 8bit alu

Keep/make 2-element vector at least, and 4-element vector for
supported opcode.

Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36638>
This commit is contained in:
Romaric Jodin
2025-11-14 15:14:54 +01:00
committed by Marge Bot
parent 2b2914d81f
commit 40e3d8e0e6
+10 -1
View File
@@ -5533,7 +5533,16 @@ bi_vectorize_filter(const nir_instr *instr, const void *data)
}
int dst_bit_size = alu->def.bit_size;
if (dst_bit_size == 16)
if (dst_bit_size == 8)
switch (alu->op) {
case nir_op_imul:
case nir_op_i2i8:
case nir_op_u2u8:
return 4;
default:
return 2;
}
else if (dst_bit_size == 16)
return 2;
else
return 1;