pan/bi: Cull DTSEL_IMM dests in post-RA DCE

They are useless (given the semantics of DTSEL_IMM) and complicate
scoreboarding. Just remove them in the pass that removes all the other silly
register destinations.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14298>
This commit is contained in:
Alyssa Rosenzweig 2021-12-23 13:12:19 -05:00 committed by Marge Bot
parent 956b969616
commit 87d46f40c8
1 changed files with 3 additions and 0 deletions

View File

@ -160,6 +160,9 @@ bi_opt_dce_post_ra(bi_context *ctx)
uint64_t live = block->reg_live_out;
bi_foreach_instr_in_block_rev(block, ins) {
if (ins->op == BI_OPCODE_DTSEL_IMM)
ins->dest[0] = bi_null();
bi_foreach_dest(ins, d) {
if (ins->dest[d].type != BI_INDEX_REGISTER)
continue;