From 6cb42cdd8fddb990ee47124c18a510f4da6e99ac Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Fri, 15 May 2020 14:24:12 +0100 Subject: [PATCH] aco: create mads when signed zeros should be preserved MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This check was added because I thought v_mad_f32 didn't preserve the signess of zero, but I can't reproduce that and this isn't mentioned anywhere in LLVM. No fossil-db changes. Signed-off-by: Rhys Perry Reviewed-by: Daniel Schürmann Part-of: --- src/amd/compiler/aco_optimizer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/compiler/aco_optimizer.cpp b/src/amd/compiler/aco_optimizer.cpp index a07ea8092fc..37dcb89b182 100644 --- a/src/amd/compiler/aco_optimizer.cpp +++ b/src/amd/compiler/aco_optimizer.cpp @@ -2414,7 +2414,7 @@ void combine_instruction(opt_ctx &ctx, Block& block, aco_ptr& instr else if ((instr->opcode == aco_opcode::v_add_f32 || instr->opcode == aco_opcode::v_sub_f32 || instr->opcode == aco_opcode::v_subrev_f32) && - block.fp_mode.denorm32 == 0 && !block.fp_mode.preserve_signed_zero_inf_nan32) { + block.fp_mode.denorm32 == 0) { //TODO: we could use fma instead when denormals are enabled if the NIR isn't marked as precise uint32_t uses_src0 = UINT32_MAX; -- 2.30.2