agx: Use agx_first_instr

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25052>
This commit is contained in:
Alyssa Rosenzweig
2023-08-29 17:01:43 -04:00
committed by Marge Bot
parent aad7d5288a
commit a009f39fca

View File

@@ -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);