mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 08:58:02 +02:00
i965/fs: Wire up control flow correctly in predicated break pass.
When the earlier block ended with control flow, we'd mistakenly remove some of its links to its children. The same happened with the later block. Acked-by: Jason Ekstrand <jason.ekstrand@intel.com>
This commit is contained in:
parent
f0cfc4fca0
commit
58a54091a9
1 changed files with 7 additions and 3 deletions
|
|
@ -107,10 +107,14 @@ fs_visitor::opt_peephole_predicated_break()
|
|||
}
|
||||
endif_inst->remove(endif_block);
|
||||
|
||||
earlier_block->children.make_empty();
|
||||
later_block->parents.make_empty();
|
||||
if (!earlier_block->ends_with_control_flow()) {
|
||||
earlier_block->children.make_empty();
|
||||
earlier_block->add_successor(cfg->mem_ctx, jump_block);
|
||||
}
|
||||
|
||||
earlier_block->add_successor(cfg->mem_ctx, jump_block);
|
||||
if (!later_block->starts_with_control_flow()) {
|
||||
later_block->parents.make_empty();
|
||||
}
|
||||
jump_block->add_successor(cfg->mem_ctx, later_block);
|
||||
|
||||
if (earlier_block->can_combine_with(jump_block)) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue