mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 01:50:10 +01:00
ac: add 16-bit support to ac_find_lsb()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
This commit is contained in:
parent
5a6c8ca3e8
commit
94dd08eb7c
1 changed files with 13 additions and 2 deletions
|
|
@ -2499,14 +2499,25 @@ LLVMValueRef ac_find_lsb(struct ac_llvm_context *ctx,
|
|||
const char *intrin_name;
|
||||
LLVMTypeRef type;
|
||||
LLVMValueRef zero;
|
||||
if (src0_bitsize == 64) {
|
||||
|
||||
switch (src0_bitsize) {
|
||||
case 64:
|
||||
intrin_name = "llvm.cttz.i64";
|
||||
type = ctx->i64;
|
||||
zero = ctx->i64_0;
|
||||
} else {
|
||||
break;
|
||||
case 32:
|
||||
intrin_name = "llvm.cttz.i32";
|
||||
type = ctx->i32;
|
||||
zero = ctx->i32_0;
|
||||
break;
|
||||
case 16:
|
||||
intrin_name = "llvm.cttz.i16";
|
||||
type = ctx->i16;
|
||||
zero = ctx->i16_0;
|
||||
break;
|
||||
default:
|
||||
unreachable(!"invalid bitsize");
|
||||
}
|
||||
|
||||
LLVMValueRef params[2] = {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue