freedreno/ir3: Fix 16-bit bit_count.

No need to do the 16-bit lowering if it already is.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16465>
This commit is contained in:
Emma Anholt 2022-05-11 16:31:33 -07:00 committed by Marge Bot
parent 1c077ca9c0
commit 633cf4eca1
1 changed files with 1 additions and 1 deletions

View File

@ -769,7 +769,7 @@ emit_alu(struct ir3_context *ctx, nir_alu_instr *alu)
break; break;
} }
case nir_op_bit_count: { case nir_op_bit_count: {
if (ctx->compiler->gen < 5) { if (ctx->compiler->gen < 5 || (src[0]->dsts[0]->flags & IR3_REG_HALF)) {
dst[0] = ir3_CBITS_B(b, src[0], 0); dst[0] = ir3_CBITS_B(b, src[0], 0);
break; break;
} }