mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 13:10:10 +01:00
i965: Update if_block/else_block in the dead control flow pass.
I think this bug crept in only recently. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
3e248e0418
commit
88d673bde6
1 changed files with 7 additions and 0 deletions
|
|
@ -103,6 +103,13 @@ dead_control_flow_eliminate(backend_visitor *v)
|
|||
if (earlier_block && earlier_block->can_combine_with(later_block)) {
|
||||
earlier_block->combine_with(later_block);
|
||||
|
||||
foreach_block (block, v->cfg) {
|
||||
if (block->if_block == later_block)
|
||||
block->if_block = earlier_block;
|
||||
if (block->else_block == later_block)
|
||||
block->else_block = earlier_block;
|
||||
}
|
||||
|
||||
/* If ENDIF was in its own block, then we've now deleted it and
|
||||
* merged the two surrounding blocks, the latter of which the
|
||||
* __next block pointer was pointing to.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue