If an ALU instruction was emitted from the get-go as group, then
we have to make sure that replacing a source doesn't violate the
readport configuration in the group.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8374
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21684>
void inc_priority() { ++m_priority; }
void set_parent_group(AluGroup *group) { m_parent_group = group; }
+ AluGroup *parent_group() { return m_parent_group;}
AluInstr *as_alu() override { return this; }
if (can_propagate) {
sfn_log << SfnLog::opt << " Try replace in " << i->block_id() << ":"
<< i->index() << *i << "\n";
- progress |= i->replace_source(dest, src);
+
+ if (i->as_alu() && i->as_alu()->parent_group()) {
+ progress |= i->as_alu()->parent_group()->replace_source(dest, src);
+ } else
+ progress |= i->replace_source(dest, src);
}
}
if (instr->dest()) {