aco: don't remove branches that skip v_writelane_b32

Cc: mesa-stable

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27537>
This commit is contained in:
Georg Lehmann
2024-02-08 22:30:38 +01:00
committed by Marge Bot
parent 2c4980716f
commit cd6d9c5918

View File

@@ -2925,6 +2925,11 @@ lower_to_hw_instr(Program* program)
} else if (inst->isSALU()) {
num_scalar++;
} else if (inst->isVALU() || inst->isVINTRP()) {
if (instr->opcode == aco_opcode::v_writelane_b32 ||
instr->opcode == aco_opcode::v_writelane_b32_e64) {
/* writelane ignores exec, writing inactive lanes results in UB. */
can_remove = false;
}
num_vector++;
/* VALU which writes SGPRs are always executed on GFX10+ */
if (ctx.program->gfx_level >= GFX10) {