aco/insert_exec_mask: don't restore exec in continue_or_break blocks

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33527>
This commit is contained in:
Daniel Schürmann 2025-02-17 09:10:52 +01:00 committed by Marge Bot
parent 7f7c1d463a
commit 115ff5f95b

View file

@ -642,15 +642,12 @@ add_branch_code(exec_ctx& ctx, Block* block)
assert(block->instructions.back()->opcode == aco_opcode::p_branch); assert(block->instructions.back()->opcode == aco_opcode::p_branch);
block->instructions.pop_back(); block->instructions.pop_back();
bool need_parallelcopy = false; while (!(ctx.info[idx].exec.back().type & mask_type_loop))
while (!(ctx.info[idx].exec.back().type & mask_type_loop)) {
ctx.info[idx].exec.pop_back(); ctx.info[idx].exec.pop_back();
need_parallelcopy = true;
}
if (need_parallelcopy) Temp cond = bld.sopc(Builder::s_cmp_lg, bld.def(s1, scc), ctx.info[idx].exec.back().op,
bld.copy(Definition(exec, bld.lm), ctx.info[idx].exec.back().op); Operand::zero(bld.lm.bytes()));
bld.branch(aco_opcode::p_cbranch_nz, Operand(exec, bld.lm), block->linear_succs[1], bld.branch(aco_opcode::p_cbranch_nz, Operand(cond, scc), block->linear_succs[1],
block->linear_succs[0]); block->linear_succs[0]);
} else if (block->kind & block_kind_uniform) { } else if (block->kind & block_kind_uniform) {
Pseudo_branch_instruction& branch = block->instructions.back()->branch(); Pseudo_branch_instruction& branch = block->instructions.back()->branch();