summaryrefslogtreecommitdiffstats
path: root/src/amd/common
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2019-03-26 11:34:44 +0100
committerSamuel Pitoiset <[email protected]>2019-04-01 09:51:52 +0200
commitb16dffff235c474095a6ef88ae35b50a120f34d8 (patch)
tree4461135e963b5c8570102b533fb2ca583bf48d8a /src/amd/common
parent9d13b9e53ecf31337592d9d2243d7b1ae328a91d (diff)
ac: fix ac_build_bitfield_reverse() for 16-bit integer type
Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/common')
-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 aff8f67827d..ae1502abef6 100644
--- a/src/amd/common/ac_llvm_build.c
+++ b/src/amd/common/ac_llvm_build.c
@@ -2576,6 +2576,8 @@ LLVMValueRef ac_build_bitfield_reverse(struct ac_llvm_context *ctx,
result = ac_build_intrinsic(ctx, "llvm.bitreverse.i16", ctx->i16,
(LLVMValueRef []) { src0 }, 1,
AC_FUNC_ATTR_READNONE);
+
+ result = LLVMBuildZExt(ctx->builder, result, ctx->i32, "");
break;
default:
unreachable(!"invalid bitsize");