From b1a1de76e8168bef331eb863a61822f96f43314d Mon Sep 17 00:00:00 2001 From: Connor Abbott Date: Mon, 26 Apr 2021 23:37:04 +0200 Subject: [PATCH] ir3/sched: Consider unused destinations when computing live effect If an instruction's destination is unused, then we shouldn't penalize it. For example, this helps us schedule atomic operations whose results aren't read. This works around RA failures when CSE is enabled in some robustness2 tests. Part-of: --- src/freedreno/ir3/ir3_sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/freedreno/ir3/ir3_sched.c b/src/freedreno/ir3/ir3_sched.c index a51399e477d..a5509afb4e6 100644 --- a/src/freedreno/ir3/ir3_sched.c +++ b/src/freedreno/ir3/ir3_sched.c @@ -501,7 +501,7 @@ static int live_effect(struct ir3_instruction *instr) { struct ir3_sched_node *n = instr->data; - int new_live = n->partially_live ? 0 : dest_regs(instr); + int new_live = (n->partially_live || !instr->uses || instr->uses->entries == 0) ? 0 : dest_regs(instr); int freed_live = 0; /* if we schedule something that causes a vecN to be live,