From: Alyssa Rosenzweig Date: Fri, 9 Aug 2019 17:40:01 +0000 (-0700) Subject: pan/midgard: Extend liveness analysis to trinary ops X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=14b5b9ac38518ff56f6b11feefbc60b049a5c4fe;p=mesa.git pan/midgard: Extend liveness analysis to trinary ops Fixes RA fails with multiple indirect SSBO writes. Signed-off-by: Alyssa Rosenzweig --- diff --git a/src/panfrost/midgard/midgard_ra.c b/src/panfrost/midgard/midgard_ra.c index a669168eba4..a44d342c205 100644 --- a/src/panfrost/midgard/midgard_ra.c +++ b/src/panfrost/midgard/midgard_ra.c @@ -636,12 +636,8 @@ allocate_registers(compiler_context *ctx, bool *spilled) * invocations, and if there are none, the source dies * */ - int sources[2] = { - ins->ssa_args.src[0], ins->ssa_args.src[1] - }; - - for (int src = 0; src < 2; ++src) { - int s = sources[src]; + for (int src = 0; src < ARRAY_SIZE(ins->ssa_args.src); ++src) { + int s = ins->ssa_args.src[src]; if (s < 0) continue;