summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2019-03-26 11:34:45 +0100
committerSamuel Pitoiset <[email protected]>2019-04-01 09:51:54 +0200
commit7a088d1ac8f10fa42c81e9ce7d5eaac1cc9e8faa (patch)
tree5bf5ed934f7bcd0bdacb55c8337481af510d7dc1
parentb16dffff235c474095a6ef88ae35b50a120f34d8 (diff)
ac: fix ac_find_lsb() for 16-bit integer type
Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
-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 ae1502abef6..20c722e332e 100644
--- a/src/amd/common/ac_llvm_build.c
+++ b/src/amd/common/ac_llvm_build.c
@@ -2944,6 +2944,8 @@ LLVMValueRef ac_find_lsb(struct ac_llvm_context *ctx,
if (src0_bitsize == 64) {
lsb = LLVMBuildTrunc(ctx->builder, lsb, ctx->i32, "");
+ } else if (src0_bitsize == 16) {
+ lsb = LLVMBuildSExt(ctx->builder, lsb, ctx->i32, "");
}
/* TODO: We need an intrinsic to skip this conditional. */