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> (cherry picked from commit6de40d17ba
)
This commit is contained in:
@@ -1012,7 +1012,7 @@
|
||||
"description": "r600/sfn: don't propagate registers into conditional test",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "79ca456b4837b3bc21cf9ef3c03c505c4b4909f6"
|
||||
},
|
||||
|
@@ -212,11 +212,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