mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-07 02:10:12 +01:00
aco: test branch opcode if removing it in try_optimize_branching_sequence
We shouldn't remove a p_cbranch_nz branch in this situation.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Fixes: b731be2e96 ("aco: Remove branch instruction when exec is constant non-zero.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18077>
This commit is contained in:
parent
21cb002b60
commit
cfb306b4e4
1 changed files with 1 additions and 1 deletions
|
|
@ -502,7 +502,7 @@ try_optimize_branching_sequence(ssa_elimination_ctx& ctx, Block& block, const in
|
|||
exec_val->operands[0].constantValue()) {
|
||||
/* Remove the branch instruction when exec is constant non-zero. */
|
||||
aco_ptr<Instruction>& branch = block.instructions.back();
|
||||
if (branch->isBranch() && branch->operands.size() && branch->operands[0].physReg() == exec)
|
||||
if (branch->opcode == aco_opcode::p_cbranch_z && branch->operands[0].physReg() == exec)
|
||||
block.instructions.back().reset();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue