From 1ede7c053b77d04b5cbd8aca3053810122bc1eef Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 25 Apr 2023 10:12:00 -0400 Subject: [PATCH] pan/bi: Don't set has_fsub MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit All this option controls is fusing fadd(x, fneg(y)) into a single instruction, but our modifier propagation can already do that without the special cases. shader-db changes are mostly noise. total instructions in shared programs: 2698039 -> 2697812 (<.01%) instructions in affected programs: 156742 -> 156515 (-0.14%) helped: 280 HURT: 109 helped stats (abs) min: 1.0 max: 12.0 x̄: 1.69 x̃: 1 helped stats (rel) min: 0.08% max: 10.71% x̄: 0.65% x̃: 0.32% HURT stats (abs) min: 1.0 max: 8.0 x̄: 2.26 x̃: 2 HURT stats (rel) min: 0.15% max: 5.77% x̄: 2.08% x̃: 2.22% 95% mean confidence interval for instructions value: -0.80 -0.36 95% mean confidence interval for instructions %-change: -0.05% 0.28% Inconclusive result (%-change mean confidence interval includes 0). total cycles in shared programs: 143679.94 -> 143676.33 (<.01%) cycles in affected programs: 617.98 -> 614.38 (-0.58%) helped: 148 HURT: 3 helped stats (abs) min: 0.015625 max: 0.1875 x̄: 0.02 x̃: 0 helped stats (rel) min: 0.17% max: 3.33% x̄: 0.71% x̃: 0.57% HURT stats (abs) min: 0.015625 max: 0.046875 x̄: 0.03 x̃: 0 HURT stats (rel) min: 0.66% max: 2.27% x̄: 1.46% x̃: 1.45% 95% mean confidence interval for cycles value: -0.03 -0.02 95% mean confidence interval for cycles %-change: -0.77% -0.56% Cycles are helped. total fma in shared programs: 22102.44 -> 22098.33 (-0.02%) fma in affected programs: 395.98 -> 391.88 (-1.04%) helped: 123 HURT: 3 helped stats (abs) min: 0.015625 max: 0.1875 x̄: 0.03 x̃: 0 helped stats (rel) min: 0.43% max: 18.75% x̄: 1.81% x̃: 0.89% HURT stats (abs) min: 0.015625 max: 0.046875 x̄: 0.03 x̃: 0 HURT stats (rel) min: 0.66% max: 4.17% x̄: 2.09% x̃: 1.45% 95% mean confidence interval for fma value: -0.04 -0.03 95% mean confidence interval for fma %-change: -2.17% -1.27% Fma are helped. total cvt in shared programs: 14735.23 -> 14735.80 (<.01%) cvt in affected programs: 969.64 -> 970.20 (0.06%) helped: 179 HURT: 121 helped stats (abs) min: 0.015625 max: 0.09375 x̄: 0.02 x̃: 0 helped stats (rel) min: 0.17% max: 46.15% x̄: 1.13% x̃: 0.31% HURT stats (abs) min: 0.015625 max: 0.125 x̄: 0.03 x̃: 0 HURT stats (rel) min: 0.42% max: 28.57% x̄: 6.62% x̃: 6.25% 95% mean confidence interval for cvt value: -0.00 0.01 95% mean confidence interval for cvt %-change: 1.32% 2.68% Inconclusive result (value mean confidence interval includes 0). total quadwords in shared programs: 1460952 -> 1460680 (-0.02%) quadwords in affected programs: 10216 -> 9944 (-2.66%) helped: 39 HURT: 5 helped stats (abs) min: 8.0 max: 8.0 x̄: 8.00 x̃: 8 helped stats (rel) min: 0.97% max: 11.11% x̄: 4.53% x̃: 3.45% HURT stats (abs) min: 8.0 max: 8.0 x̄: 8.00 x̃: 8 HURT stats (rel) min: 12.50% max: 25.00% x̄: 15.71% x̃: 14.29% 95% mean confidence interval for quadwords value: -7.74 -4.62 95% mean confidence interval for quadwords %-change: -4.43% -0.04% Quadwords are helped. total threads in shared programs: 53538 -> 53537 (<.01%) threads in affected programs: 2 -> 1 (-50.00%) helped: 0 HURT: 1 Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/compiler/bifrost_compile.c | 3 --- src/panfrost/compiler/bifrost_compile.h | 1 - 2 files changed, 4 deletions(-) diff --git a/src/panfrost/compiler/bifrost_compile.c b/src/panfrost/compiler/bifrost_compile.c index 5512bbe..5b9adc8 100644 --- a/src/panfrost/compiler/bifrost_compile.c +++ b/src/panfrost/compiler/bifrost_compile.c @@ -2426,9 +2426,6 @@ bi_emit_alu(bi_builder *b, nir_alu_instr *instr) bi_fma_to(b, sz, dst, s0, s1, bi_negzero()); break; - case nir_op_fsub: - s1 = bi_neg(s1); - FALLTHROUGH; case nir_op_fadd: bi_fadd_to(b, sz, dst, s0, s1); break; diff --git a/src/panfrost/compiler/bifrost_compile.h b/src/panfrost/compiler/bifrost_compile.h index dca1aba..4f2a38f 100644 --- a/src/panfrost/compiler/bifrost_compile.h +++ b/src/panfrost/compiler/bifrost_compile.h @@ -83,7 +83,6 @@ void bifrost_compile_shader_nir(nir_shader *nir, .lower_uadd_carry = true, \ .lower_usub_borrow = true, \ \ - .has_fsub = true, \ .has_isub = true, \ .vectorize_io = true, \ .vectorize_vec2_16bit = true, \ -- 2.7.4