mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 05:08:08 +02:00
glsl/opt_cpe: Fix a crash when a kill kills for two reasons.
Fixes glsl-copy-propagation-loop-2 when this optimization pass is re-enabled. Reported-by: David Lamparter <equinox@diac24.net>
This commit is contained in:
parent
487debfda5
commit
909bd476ca
1 changed files with 3 additions and 1 deletions
|
|
@ -390,8 +390,10 @@ ir_copy_propagation_elements_visitor::kill(kill_entry *k)
|
|||
|
||||
if (entry->lhs == k->var) {
|
||||
entry->write_mask = entry->write_mask & ~k->write_mask;
|
||||
if (entry->write_mask == 0)
|
||||
if (entry->write_mask == 0) {
|
||||
entry->remove();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (entry->rhs == k->var) {
|
||||
entry->remove();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue