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