[Mesa-dev] [PATCH 7/9] ac: add 16-bit support to ac_build_bit_count()
Samuel Pitoiset
samuel.pitoiset at gmail.com
Fri Sep 14 10:52:38 UTC 2018
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
src/amd/common/ac_llvm_build.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/amd/common/ac_llvm_build.c b/src/amd/common/ac_llvm_build.c
index 6955df48e0..98635ec25a 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;
--
2.19.0
More information about the mesa-dev
mailing list