pan/bi: Support bit_count()

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774>
This commit is contained in:
Boris Brezillon 2021-01-25 13:22:05 +01:00 committed by Alyssa Rosenzweig
parent 58e887f07e
commit 06d6dd1b40

View file

@ -1517,6 +1517,10 @@ bi_emit_alu(bi_builder *b, nir_alu_instr *instr)
bi_clz_to(b, sz, dst, s0, false);
break;
case nir_op_bit_count:
bi_popcount_i32_to(b, dst, s0);
break;
default:
fprintf(stderr, "Unhandled ALU op %s\n", nir_op_infos[instr->op].name);
unreachable("Unknown ALU op");