A p_cbranch_nz instruction that reads exec is divergent too.
Fixes:
f030b75b7d2c359b90c18ee4ed83fa05265c12e0
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21493>
} else if (instr->isBranch()) {
Pseudo_branch_instruction* branch = &instr->branch();
const uint32_t target = branch->target[0];
- const bool uniform_branch = !(branch->opcode == aco_opcode::p_cbranch_z &&
+ const bool uniform_branch = !((branch->opcode == aco_opcode::p_cbranch_z ||
+ branch->opcode == aco_opcode::p_cbranch_nz) &&
branch->operands[0].physReg() == exec);
/* Check if the branch instruction can be removed.