aco: fix follow_operand with combined label_extract and label_split

No fossil-db changes.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29912>
This commit is contained in:
Rhys Perry 2024-06-06 18:10:15 +01:00 committed by Marge Bot
parent 9ee24db882
commit 7c995df9aa

View file

@ -2135,8 +2135,9 @@ follow_operand(opt_ctx& ctx, Operand op, bool ignore_uses = false)
Instruction* instr = ctx.info[op.tempId()].instr;
if (instr->definitions.size() == 2) {
assert(instr->definitions[0].isTemp() && instr->definitions[0].tempId() == op.tempId());
if (instr->definitions[1].isTemp() && ctx.uses[instr->definitions[1].tempId()])
unsigned idx = ctx.info[op.tempId()].label & label_split ? 1 : 0;
assert(instr->definitions[idx].isTemp() && instr->definitions[idx].tempId() == op.tempId());
if (instr->definitions[!idx].isTemp() && ctx.uses[instr->definitions[!idx].tempId()])
return nullptr;
}