aco: preserve SSA in try_eliminate_scc_copy
Otherwise, there is no definition of this temporary. Fixes fail in future validation. Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30440>
This commit is contained in:
@@ -523,6 +523,7 @@ try_eliminate_scc_copy(pr_opt_ctx& ctx, aco_ptr<Instruction>& instr)
|
||||
}
|
||||
|
||||
/* Duplicate the original producer of the SCC */
|
||||
Definition scc_def = instr->definitions[0];
|
||||
instr.reset(create_instruction(producer_instr->opcode, producer_instr->format,
|
||||
producer_instr->operands.size(),
|
||||
producer_instr->definitions.size()));
|
||||
@@ -545,6 +546,7 @@ try_eliminate_scc_copy(pr_opt_ctx& ctx, aco_ptr<Instruction>& instr)
|
||||
for (unsigned i = 0; i < producer_instr->definitions.size(); ++i)
|
||||
instr->definitions[i] = Definition(producer_instr->definitions[i].physReg(),
|
||||
producer_instr->definitions[i].regClass());
|
||||
instr->definitions.back() = scc_def; /* Keep temporary ID. */
|
||||
}
|
||||
|
||||
void
|
||||
|
Reference in New Issue
Block a user