From: Alyssa Rosenzweig Date: Fri, 8 Nov 2019 18:11:25 +0000 (-0500) Subject: pan/midgard: Fix copypropagation for textures X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ad6b2ac37473ae6fbb9af0c31e3f83465370c165;p=mesa.git pan/midgard: Fix copypropagation for textures total instructions in shared programs: 3562 -> 3457 (-2.95%) instructions in affected programs: 575 -> 470 (-18.26%) helped: 16 HURT: 0 helped stats (abs) min: 1 max: 14 x̄: 6.56 x̃: 10 helped stats (rel) min: 5.71% max: 24.56% x̄: 16.83% x̃: 18.87% 95% mean confidence interval for instructions value: -9.07 -4.06 95% mean confidence interval for instructions %-change: -19.00% -14.66% Instructions are helped. total bundles in shared programs: 1846 -> 1830 (-0.87%) bundles in affected programs: 338 -> 322 (-4.73%) helped: 16 HURT: 0 helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1 helped stats (rel) min: 2.50% max: 20.00% x̄: 8.85% x̃: 3.33% 95% mean confidence interval for bundles value: -1.00 -1.00 95% mean confidence interval for bundles %-change: -13.02% -4.67% Bundles are helped. total quadwords in shared programs: 3191 -> 3144 (-1.47%) quadwords in affected programs: 606 -> 559 (-7.76%) helped: 16 HURT: 0 helped stats (abs) min: 1 max: 14 x̄: 2.94 x̃: 3 helped stats (rel) min: 5.17% max: 22.22% x̄: 11.20% x̃: 5.62% 95% mean confidence interval for quadwords value: -4.58 -1.29 95% mean confidence interval for quadwords %-change: -15.16% -7.24% Quadwords are helped. total registers in shared programs: 312 -> 303 (-2.88%) registers in affected programs: 27 -> 18 (-33.33%) helped: 9 HURT: 0 helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1 helped stats (rel) min: 33.33% max: 33.33% x̄: 33.33% x̃: 33.33% 95% mean confidence interval for registers value: -1.00 -1.00 95% mean confidence interval for registers %-change: -33.33% -33.33% Registers are helped. Signed-off-by: Alyssa Rosenzweig --- diff --git a/src/panfrost/midgard/midgard_opt_copy_prop.c b/src/panfrost/midgard/midgard_opt_copy_prop.c index 20e256e6637..242db1eae2d 100644 --- a/src/panfrost/midgard/midgard_opt_copy_prop.c +++ b/src/panfrost/midgard/midgard_opt_copy_prop.c @@ -110,11 +110,12 @@ midgard_opt_copy_prop(compiler_context *ctx, midgard_block *block) if (!(is_tex || is_ldst || is_branch)) continue; - /* For textures, we get one real swizzle. For stores, - * we also get one. For loads, we get none. */ + /* For textures, we get a real swizzle for the + * coordinate and the content. For stores, we get one. + * For loads, we get none. */ unsigned start = - is_tex ? 1 : + is_tex ? 2 : OP_IS_STORE(q->load_store.op) ? 1 : 0; mir_foreach_src(q, s) {