pan/bi: Vectorize comparisons

We've got vectorized comparison instructions going all the way back to
Bifrost.  We should probably stop splitting them.

Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39725>
This commit is contained in:
Faith Ekstrand 2026-02-05 21:52:58 -05:00 committed by Marge Bot
parent 918624174b
commit dceee75f87

View file

@ -5587,8 +5587,10 @@ bi_vectorize_filter(const nir_instr *instr, const void *data)
break;
}
int dst_bit_size = alu->def.bit_size;
if (dst_bit_size == 8)
const uint8_t bit_size = nir_alu_instr_is_comparison(alu)
? nir_src_bit_size(alu->src[0].src)
: alu->def.bit_size;
if (bit_size == 8)
switch (alu->op) {
case nir_op_imul:
case nir_op_i2i8:
@ -5597,7 +5599,7 @@ bi_vectorize_filter(const nir_instr *instr, const void *data)
default:
return 2;
}
else if (dst_bit_size == 16)
else if (bit_size == 16)
return 2;
else
return 1;