From: Rob Clark Date: Thu, 19 Dec 2019 17:48:39 +0000 (-0800) Subject: freedreno/ir3: fix crash when no non-input instructions X-Git-Tag: upstream/20.1.8~3773 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=54c795f8297d5087b013777bddac32ed47941cb7;p=platform%2Fupstream%2Fmesa.git freedreno/ir3: fix crash when no non-input instructions This scenario can come up with block-sched and nop-sched moved to after RA. So lets fix it first to keep things bisectable. Signed-off-by: Rob Clark Part-of: --- diff --git a/src/freedreno/ir3/ir3_ra.c b/src/freedreno/ir3/ir3_ra.c index 789c08f..3b54bdb 100644 --- a/src/freedreno/ir3/ir3_ra.c +++ b/src/freedreno/ir3/ir3_ra.c @@ -775,7 +775,7 @@ ra_block_compute_live_ranges(struct ir3_ra_ctx *ctx, struct ir3_block *block) def(name, id->defn); - if (instr->opc == OPC_META_INPUT) + if ((instr->opc == OPC_META_INPUT) && first_non_input) use(name, first_non_input); if (is_high(id->defn)) {