From: Alyssa Rosenzweig Date: Tue, 29 Aug 2023 21:01:43 +0000 (-0400) Subject: agx: Use agx_first_instr X-Git-Tag: upstream/23.3.3~2443 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a009f39fca7064766d9e1d91bf8dc76c4ab4dc17;p=platform%2Fupstream%2Fmesa.git agx: Use agx_first_instr Signed-off-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/asahi/compiler/agx_opt_empty_else.c b/src/asahi/compiler/agx_opt_empty_else.c index 653782b..fc0ac54 100644 --- a/src/asahi/compiler/agx_opt_empty_else.c +++ b/src/asahi/compiler/agx_opt_empty_else.c @@ -92,9 +92,7 @@ agx_opt_empty_else(agx_context *ctx) { agx_foreach_block(ctx, blk) { if (match_block(blk)) { - agx_instr *else_instr = - list_first_entry(&blk->instructions, agx_instr, link); - + agx_instr *else_instr = agx_first_instr(blk); assert(state_for_instr(else_instr) == STATE_ELSE && "block matched"); agx_remove_instruction(else_instr);