Add vector support for @popCount

This commit is contained in:
Auguste Rame
2021-07-25 20:35:55 -04:00
parent 653c851e62
commit ecca829bcb
6 changed files with 96 additions and 15 deletions

View File

@@ -5053,6 +5053,7 @@ static LLVMValueRef get_int_builtin_fn(CodeGen *g, ZigType *expr_type, BuiltinFn
n_args = 1;
key.id = ZigLLVMFnIdPopCount;
key.data.pop_count.bit_count = (uint32_t)int_type->data.integral.bit_count;
key.data.pop_count.vector_len = vector_len;
} else if (fn_id == BuiltinFnIdBswap) {
fn_name = "bswap";
n_args = 1;