r600/sfn: don't propagate registers into conditional test
We don't check whether the register is overwritten between the actual
conditional test and the test of the used result, so don't try to
optimize the evaluation of the conditional.
Fixes: 79ca456b48
r600/sfn: rewrite NIR backend
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18983>
This commit is contained in:
@@ -219,11 +219,22 @@ void ReplaceIfPredicate::visit(AluInstr *alu)
|
||||
if (new_op == op0_nop)
|
||||
return;
|
||||
|
||||
/* Have to figure out how to pass the dependency correctly */
|
||||
/*for (auto& s : alu->sources()) {
|
||||
if (s->as_register() && s->as_register()->addr())
|
||||
for (auto& s : alu->sources()) {
|
||||
auto reg = s->as_register();
|
||||
/* Protext against propagating
|
||||
*
|
||||
* V = COND(R, X)
|
||||
* R = SOME_OP
|
||||
* IF (V)
|
||||
*
|
||||
* to
|
||||
*
|
||||
* R = SOME_OP
|
||||
* IF (COND(R, X))
|
||||
*/
|
||||
if (reg && !reg->is_ssa())
|
||||
return;
|
||||
}*/
|
||||
}
|
||||
|
||||
m_pred->set_op(new_op);
|
||||
m_pred->set_sources(alu->sources());
|
||||
|
Reference in New Issue
Block a user