diff options
-rw-r--r-- | src/panfrost/midgard/midgard_ra.c | 8 |
1 files changed, 2 insertions, 6 deletions
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; |