Merge pull request #9458 from SuperAuguste/popcount-ctz-clz

Vector support for `@popCount`, `@ctz`, and `@clz`
This commit is contained in:
Andrew Kelley
2021-07-26 19:15:27 -04:00
committed by GitHub
7 changed files with 258 additions and 49 deletions

View File

@@ -5070,6 +5070,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;