mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-30 10:00:14 +01:00
aco: Pop branch operands when targets are same in SSA elimination.
The branch instruction is no longer conditional when the targets are the same, so the operand is not necessary and can be removed. Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21493>
This commit is contained in:
parent
739bd03c37
commit
0eb7c49c7f
1 changed files with 5 additions and 1 deletions
|
|
@ -270,8 +270,12 @@ try_remove_simple_block(ssa_elimination_ctx& ctx, Block* block)
|
|||
assert(false);
|
||||
}
|
||||
|
||||
if (branch.target[0] == branch.target[1])
|
||||
if (branch.target[0] == branch.target[1]) {
|
||||
while (branch.operands.size())
|
||||
branch.operands.pop_back();
|
||||
|
||||
branch.opcode = aco_opcode::p_branch;
|
||||
}
|
||||
|
||||
for (unsigned i = 0; i < pred.linear_succs.size(); i++)
|
||||
if (pred.linear_succs[i] == block->index)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue