diff --git a/src/amd/compiler/aco_optimizer.cpp b/src/amd/compiler/aco_optimizer.cpp index 17a43f5bf03..d1d7a78952c 100644 --- a/src/amd/compiler/aco_optimizer.cpp +++ b/src/amd/compiler/aco_optimizer.cpp @@ -4004,9 +4004,8 @@ create_med3_cb(opt_ctx& ctx, alu_opt_info& info) { aco_type type = instr_info.alu_opcode_infos[(int)info.opcode].def_types[0]; - /* NaN correctness needs max first, then min. TODO only use isNaNPreserve */ - if (!max_first && type.base_type == aco_base_type_float && - (info.defs[0].isPrecise() || info.defs[0].isNaNPreserve())) + /* NaN correctness needs max first, then min. */ + if (!max_first && type.base_type == aco_base_type_float && info.defs[0].isNaNPreserve()) return false; uint64_t upper = 0;