nir: disable fp class analysis for 64bit transcendentals

Some backends have terrible precision for these fp64 opcodes, so don't try to
do anything clever.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15334
Fixes: 5a298f3560 ("nir: rewrite fp range analysis as a fp class analysis")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41206>
This commit is contained in:
Georg Lehmann 2026-04-27 09:18:05 +02:00 committed by Marge Bot
parent 92581c7f02
commit 599a52174b

View file

@ -1039,7 +1039,11 @@ process_fp_query(struct analysis_state *state, struct analysis_query *aq, uint32
}
case nir_op_frcp:
r = frcp_fp_class(handle_sz(alu, src_res[0]));
/* Some backends have terrible precision for fp64,
* so don't try to do anything clever.
*/
if (alu->def.bit_size < 64)
r = frcp_fp_class(handle_sz(alu, src_res[0]));
break;
case nir_op_mov:
@ -1085,11 +1089,13 @@ process_fp_query(struct analysis_state *state, struct analysis_query *aq, uint32
break;
case nir_op_fsqrt:
r = fsqrt_fp_class(src_res[0]);
if (alu->def.bit_size < 64)
r = fsqrt_fp_class(src_res[0]);
break;
case nir_op_frsq:
r = frcp_fp_class(fsqrt_fp_class(handle_sz(alu, src_res[0])));
if (alu->def.bit_size < 64)
r = frcp_fp_class(fsqrt_fp_class(handle_sz(alu, src_res[0])));
break;
case nir_op_ffloor: {