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