summaryrefslogtreecommitdiffstats
path: root/src/amd/llvm
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2019-10-24 18:48:54 +0200
committerSamuel Pitoiset <[email protected]>2019-10-28 09:31:52 +0100
commit59127925010bfbab09e0c22a41ce77b334f59942 (patch)
treebd11a01064e91bad05d12e32d57d254a2e6266e6 /src/amd/llvm
parentd82dfca8723a3f25f9fddfedbd022ead854fcdc8 (diff)
radv: fix OpQuantizeToF16 for NaN on GFX6-7
Do not flush NaN to 0. Fixes dEQP-VK.spirv_assembly.instruction.compute.opquantize.propagated_nans Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/llvm')
-rw-r--r--src/amd/llvm/ac_nir_to_llvm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/amd/llvm/ac_nir_to_llvm.c b/src/amd/llvm/ac_nir_to_llvm.c
index cd7091ad163..3d758759af7 100644
--- a/src/amd/llvm/ac_nir_to_llvm.c
+++ b/src/amd/llvm/ac_nir_to_llvm.c
@@ -356,10 +356,10 @@ static LLVMValueRef emit_f2f16(struct ac_llvm_context *ctx,
*/
LLVMValueRef temp, cond2;
temp = emit_intrin_1f_param(ctx, "llvm.fabs", ctx->f32, result);
- cond = LLVMBuildFCmp(ctx->builder, LLVMRealUGT,
+ cond = LLVMBuildFCmp(ctx->builder, LLVMRealOGT,
LLVMBuildBitCast(ctx->builder, LLVMConstInt(ctx->i32, 0x38800000, false), ctx->f32, ""),
temp, "");
- cond2 = LLVMBuildFCmp(ctx->builder, LLVMRealUNE,
+ cond2 = LLVMBuildFCmp(ctx->builder, LLVMRealONE,
temp, ctx->f32_0, "");
cond = LLVMBuildAnd(ctx->builder, cond, cond2, "");
result = LLVMBuildSelect(ctx->builder, cond, ctx->f32_0, result, "");