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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user