From c7e68d8625e4efcc776b5352de3b16b6951fabf7 Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Fri, 31 Jan 2020 10:41:35 +0100 Subject: [PATCH] pan/midgard: Don't check 'branch && branch->writeout' twice in mir_schedule_alu() There's a writeout bool storing the result of this test. Use it instead of duplicating the test. Signed-off-by: Boris Brezillon Reviewed-by: Alyssa Rosenzweig Part-of: --- src/panfrost/midgard/midgard_schedule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/panfrost/midgard/midgard_schedule.c b/src/panfrost/midgard/midgard_schedule.c index 101896de211..7654a046a76 100644 --- a/src/panfrost/midgard/midgard_schedule.c +++ b/src/panfrost/midgard/midgard_schedule.c @@ -914,7 +914,7 @@ mir_schedule_alu( /* If we have a render target reference, schedule a move for it */ - if (branch && branch->writeout && (branch->constants.u32[0] || ctx->is_blend)) { + if (writeout && (branch->constants.u32[0] || ctx->is_blend)) { midgard_instruction mov = v_mov(~0, make_compiler_temp(ctx)); sadd = mem_dup(&mov, sizeof(midgard_instruction)); sadd->unit = UNIT_SADD; -- 2.30.2