nir: fix fp_math_ctrl in fisnan
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

Otherwise, nir_opt_algebraic will replace it with false.

Fixes: 63d199a01e ("nir: remove special fp_math_ctrl rules")
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41420>
This commit is contained in:
Georg Lehmann 2026-05-07 14:46:48 +02:00 committed by Marge Bot
parent 50a56b64d1
commit 0dd50a426e

View file

@ -65,7 +65,7 @@ static inline nir_def *
nir_fisnan(nir_builder *b, nir_def *x)
{
unsigned old_fp_math_ctrl = b->fp_math_ctrl;
b->fp_math_ctrl |= nir_fp_exact;
b->fp_math_ctrl |= nir_fp_preserve_inf | nir_fp_preserve_nan;
nir_def *res = nir_fneu(b, x, x);
b->fp_math_ctrl = old_fp_math_ctrl;
return res;