summaryrefslogtreecommitdiffstats
path: root/src/amd/common/ac_llvm_build.c
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2019-03-26 11:34:43 +0100
committerSamuel Pitoiset <[email protected]>2019-04-01 09:51:49 +0200
commit9d13b9e53ecf31337592d9d2243d7b1ae328a91d (patch)
tree03fb5407df557f6ecb0f974183ee83dba4c23a3c /src/amd/common/ac_llvm_build.c
parente39a6b940f23a50c148620a98175a6ec442d4003 (diff)
ac: fix ac_build_bit_count() for 16-bit integer type
Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/common/ac_llvm_build.c')
-rw-r--r--src/amd/common/ac_llvm_build.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/amd/common/ac_llvm_build.c b/src/amd/common/ac_llvm_build.c
index eb9e4504248..aff8f67827d 100644
--- a/src/amd/common/ac_llvm_build.c
+++ b/src/amd/common/ac_llvm_build.c
@@ -2547,6 +2547,8 @@ LLVMValueRef ac_build_bit_count(struct ac_llvm_context *ctx, LLVMValueRef src0)
result = ac_build_intrinsic(ctx, "llvm.ctpop.i16", ctx->i16,
(LLVMValueRef []) { src0 }, 1,
AC_FUNC_ATTR_READNONE);
+
+ result = LLVMBuildZExt(ctx->builder, result, ctx->i32, "");
break;
default:
unreachable(!"invalid bitsize");