nv50/ir/opt: don't delete instruction in removeFlow before its last use
This commit is contained in:
parent
be161e66d6
commit
d41f293bf0
|
@ -1737,10 +1737,10 @@ FlatteningPass::removeFlow(Instruction *insn)
|
|||
if (term->op != OP_JOIN)
|
||||
return;
|
||||
|
||||
delete_Instruction(prog, term);
|
||||
|
||||
Value *pred = term->getPredicate();
|
||||
|
||||
delete_Instruction(prog, term);
|
||||
|
||||
if (pred && pred->refCount() == 0) {
|
||||
Instruction *pSet = pred->getUniqueInsn();
|
||||
pred->join->reg.data.id = -1; // deallocate
|
||||
|
|
Loading…
Reference in New Issue