From 0dd50a426e1e3010bb548ae0101a66b734ea4c94 Mon Sep 17 00:00:00 2001 From: Georg Lehmann Date: Thu, 7 May 2026 14:46:48 +0200 Subject: [PATCH] nir: fix fp_math_ctrl in fisnan Otherwise, nir_opt_algebraic will replace it with false. Fixes: 63d199a01e8 ("nir: remove special fp_math_ctrl rules") Reviewed-by: Karol Herbst Part-of: --- src/compiler/nir/nir_builtin_builder.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/nir/nir_builtin_builder.h b/src/compiler/nir/nir_builtin_builder.h index 115fb08b5bb..14eb5d28ada 100644 --- a/src/compiler/nir/nir_builtin_builder.h +++ b/src/compiler/nir/nir_builtin_builder.h @@ -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;