aco: remove condition operand from branch in invert block

As value numbering only handles logical blocks, this
could lead to invalid IR until insert_exec_mask().
No fossil-db changes.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10894>
This commit is contained in:
Daniel Schürmann
2021-05-19 15:42:10 +02:00
committed by Marge Bot
parent 2bb1bf78f0
commit 32c7d17120
2 changed files with 2 additions and 3 deletions
+1 -1
View File
@@ -983,7 +983,7 @@ void add_branch_code(exec_ctx& ctx, Block* block)
if (block->kind & block_kind_invert) {
// exec = s_andn2_b64 (original_exec, exec)
assert(block->instructions.back()->opcode == aco_opcode::p_cbranch_nz);
assert(block->instructions.back()->opcode == aco_opcode::p_branch);
block->instructions.pop_back();
assert(ctx.info[idx].exec.size() >= 2);
Operand orig_exec = ctx.info[idx].exec[ctx.info[idx].exec.size() - 2].first;