From d2be2fd4c12e56a145fb43674e7547ac68757bd1 Mon Sep 17 00:00:00 2001 From: Georg Lehmann Date: Wed, 25 Mar 2026 13:31:21 +0100 Subject: [PATCH] nir/opt_fp_math_ctrl: ignore ffract input sign of zero ffract(-0.0) = fract(+0.0) = +0.0 Foz-DB Navi48: Totals from 23 (0.01% of 205040) affected shaders: Instrs: 12036 -> 11836 (-1.66%) CodeSize: 58392 -> 57716 (-1.16%); split: -1.19%, +0.03% Latency: 57532 -> 57204 (-0.57%); split: -0.61%, +0.04% InvThroughput: 10399 -> 10217 (-1.75%) VClause: 72 -> 70 (-2.78%) Copies: 324 -> 335 (+3.40%) PreVGPRs: 640 -> 646 (+0.94%) VALU: 8561 -> 8364 (-2.30%) Reviewed-by: Alyssa Rosenzweig Part-of: --- src/compiler/nir/nir_opt_fp_math_ctrl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/nir/nir_opt_fp_math_ctrl.c b/src/compiler/nir/nir_opt_fp_math_ctrl.c index 3e678ed232e..fed39ff52af 100644 --- a/src/compiler/nir/nir_opt_fp_math_ctrl.c +++ b/src/compiler/nir/nir_opt_fp_math_ctrl.c @@ -120,6 +120,7 @@ opt_alu_fp_math_ctrl(nir_alu_instr *alu, struct opt_fp_ctrl_state *state) case nir_op_fcos: case nir_op_fcos_amd: case nir_op_fmulz: + case nir_op_ffract: break; case nir_op_fmin: { bool had_neg_zero = false;