r600/sfn: relax restrictions when optimizing predicate evaluation with a register

If the comparison comes right before the predicate evaluation it still
can be contracted.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37205>
This commit is contained in:
Gert Wollny 2025-09-03 16:20:36 +02:00 committed by Marge Bot
parent bbbb2be123
commit abe9b61212

View file

@ -384,8 +384,10 @@ ReplacePredicate::visit(AluInstr *alu)
* R = SOME_OP
* IF (COND(R, X))
*/
if (reg && !reg->has_flag(Register::ssa))
return;
if (reg && !reg->has_flag(Register::ssa)) {
if (m_pred->block_id() != alu->block_id() || m_pred->index() - 1 != alu->index())
return;
}
}
m_pred->set_op(new_op);