/* Collect information about the branching sequence. */
- bool logical_end_found = false;
bool branch_exec_val_found = false;
int branch_exec_val_idx = -1;
int branch_exec_copy_idx = -1;
(instr->opcode == aco_opcode::p_logical_end && !ctx.logical_phi_info[block.index].empty());
bool writes_exec = instr_writes_exec(instr.get());
- logical_end_found |= instr->opcode == aco_opcode::p_logical_end;
-
/* See if we found an unused exec write. */
if (writes_exec && !exec_write_used) {
/* Don't eliminate an instruction that writes registers other than exec and scc.
/* For a newly encountered exec write, clear the used flag. */
if (writes_exec) {
- if (!logical_end_found && instr->operands.size() && !branch_exec_val_found) {
+ if (instr->operands.size() && !branch_exec_val_found) {
/* We are in a branch that jumps according to exec.
* We just found the instruction that copies to exec before the branch.
*/
/* See if we can optimize the instruction that produces the exec mask. */
if (branch_exec_val_idx != -1) {
- assert(logical_end_found && branch_exec_tempid && branch_exec_copy_idx != -1);
+ assert(branch_exec_tempid && branch_exec_copy_idx != -1);
try_optimize_branching_sequence(ctx, block, branch_exec_val_idx, branch_exec_copy_idx);
}