From: Rhys Perry Date: Fri, 15 May 2020 13:24:12 +0000 (+0100) Subject: aco: create mads when signed zeros should be preserved X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6cb42cdd8fddb990ee47124c18a510f4da6e99ac;p=mesa.git aco: create mads when signed zeros should be preserved 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: --- 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;