From: Boris Brezillon Date: Fri, 31 Jan 2020 09:41:35 +0000 (+0100) Subject: pan/midgard: Don't check 'branch && branch->writeout' twice in mir_schedule_alu() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c7e68d8625e4efcc776b5352de3b16b6951fabf7;p=mesa.git 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: --- 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;