From 85ff60e68a9e255b0898bee00be08380149a19a9 Mon Sep 17 00:00:00 2001 From: Georg Lehmann Date: Wed, 25 Mar 2026 14:33:18 +0100 Subject: [PATCH] nir/opt_uniform_subgroup: use ddx/ddy fp_math_ctrl Foz-DB Navi48: Totals from 16 (0.01% of 139781) affected shaders: Instrs: 12432 -> 11597 (-6.72%) CodeSize: 66204 -> 62440 (-5.69%) Latency: 77168 -> 76132 (-1.34%) InvThroughput: 8942 -> 8332 (-6.82%) VClause: 302 -> 290 (-3.97%) SClause: 207 -> 201 (-2.90%) Copies: 553 -> 517 (-6.51%) PreVGPRs: 589 -> 577 (-2.04%) VALU: 8007 -> 7473 (-6.67%) SALU: 1057 -> 900 (-14.85%) VMEM: 407 -> 395 (-2.95%) Reviewed-by: Alyssa Rosenzweig Part-of: --- src/compiler/nir/nir_opt_uniform_subgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/nir/nir_opt_uniform_subgroup.c b/src/compiler/nir/nir_opt_uniform_subgroup.c index cfd9731fdd8..11d608560b2 100644 --- a/src/compiler/nir/nir_opt_uniform_subgroup.c +++ b/src/compiler/nir/nir_opt_uniform_subgroup.c @@ -241,7 +241,7 @@ opt_uniform_subgroup_instr(nir_builder *b, nir_intrinsic_instr *intrin, void *_s return false; nir_def *x = intrin->src[0].ssa; - b->fp_math_ctrl = nir_fp_no_fast_math; + b->fp_math_ctrl = nir_intrinsic_fp_math_ctrl(intrin); replacement = nir_fsub(b, x, x); b->fp_math_ctrl = nir_fp_fast_math; break;