ac: add 16-bit support fo fsign
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 21 Mar 2019 09:14:30 +0000 (10:14 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 21 Mar 2019 11:13:07 +0000 (12:13 +0100)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/common/ac_llvm_build.c

index a9c6b4af95843a03edf5bb7d68902498416f0d87..a153b008594d2bb5f09e383749b9b8da12c28c6f 100644 (file)
@@ -2472,7 +2472,11 @@ LLVMValueRef ac_build_fsign(struct ac_llvm_context *ctx, LLVMValueRef src0,
        LLVMValueRef cmp, val, zero, one;
        LLVMTypeRef type;
 
-       if (bitsize == 32) {
+       if (bitsize == 16) {
+               type = ctx->f16;
+               zero = ctx->f16_0;
+               one = ctx->f16_1;
+       } else if (bitsize == 32) {
                type = ctx->f32;
                zero = ctx->f32_0;
                one = ctx->f32_1;