ac: fix ac_find_lsb() for 16-bit integer type

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
This commit is contained in:
Samuel Pitoiset 2019-03-26 11:34:45 +01:00
parent b16dffff23
commit 7a088d1ac8
1 changed files with 2 additions and 0 deletions

View File

@ -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. */