From 14b5b9ac38518ff56f6b11feefbc60b049a5c4fe Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Fri, 9 Aug 2019 10:40:01 -0700 Subject: pan/midgard: Extend liveness analysis to trinary ops Fixes RA fails with multiple indirect SSBO writes. Signed-off-by: Alyssa Rosenzweig --- src/panfrost/midgard/midgard_ra.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/panfrost') 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; -- cgit v1.2.3