summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2018-09-14 12:52:38 +0200
committerSamuel Pitoiset <[email protected]>2018-09-17 15:18:34 +0200
commitfc398f4d6769f4537cb6fe52b643d28d9cb1d0b0 (patch)
tree958fa82f3571bd8e92360a8a0a7e114ebe46fa67 /src
parent94dd08eb7c5eb5dbb38a997ffbd3105be2d20d52 (diff)
ac: add 16-bit support to ac_build_bit_count()
Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/amd/common/ac_llvm_build.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/amd/common/ac_llvm_build.c b/src/amd/common/ac_llvm_build.c
index 6955df48e00..98635ec25af 100644
--- a/src/amd/common/ac_llvm_build.c
+++ b/src/amd/common/ac_llvm_build.c
@@ -2154,6 +2154,11 @@ LLVMValueRef ac_build_bit_count(struct ac_llvm_context *ctx, LLVMValueRef src0)
(LLVMValueRef []) { src0 }, 1,
AC_FUNC_ATTR_READNONE);
break;
+ case 16:
+ result = ac_build_intrinsic(ctx, "llvm.ctpop.i16", ctx->i16,
+ (LLVMValueRef []) { src0 }, 1,
+ AC_FUNC_ATTR_READNONE);
+ break;
default:
unreachable(!"invalid bitsize");
break;