aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2012-03-22 11:59:32 +0100
committerChristoph Bumiller <[email protected]>2012-04-14 21:54:02 +0200
commitd41f293bf014e08df3df4324cdc02de5ce49d5ed (patch)
tree440e944bb1b590911ff8fcbb25d54573e15b8666 /src/gallium
parentbe161e66d6108e56d40c116a4ee12668d6b8d960 (diff)
nv50/ir/opt: don't delete instruction in removeFlow before its last use
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp b/src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp
index 259bb5636c5..a45d336b435 100644
--- a/src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp
+++ b/src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp
@@ -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