Skip to content
Snippets Groups Projects
Commit 05fab97b authored by Gert Wollny's avatar Gert Wollny Committed by Marge Bot
Browse files

r600/sfn: Don't try to re-use the iterator when uses is updated

It seems on libc++ the iterator is invalidated when an element is removed
from the set, so make sure that we don't implicitely use the old,
invalidated iterator in the range based - open code the loop using while
instead.

Fixes: f3415c (r600/sfn: copy propagate register load chains)

Closes: #7931



Signed-off-by: default avatarGert Wollny <gert.wollny@collabora.com>
Part-of: <!20394>
parent aace38c2
No related branches found
No related tags found
No related merge requests found
Pipeline #766661 waiting for manual action
......@@ -360,7 +360,12 @@ CopyPropFwdVisitor::visit(AluInstr *instr)
auto src = instr->psrc(0);
auto dest = instr->dest();
for (auto& i : dest->uses()) {
auto ii = dest->uses().begin();
auto ie = dest->uses().end();
while(ii != ie) {
auto i = *ii;
++ii;
/* SSA can always be propagated, registers only in the same block
* and only if they are assigned in the same block */
bool can_propagate = dest->has_flag(Register::ssa);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment