summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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