From bb9c15bac42cf323ef267095b33031ffc1d4fba4 Mon Sep 17 00:00:00 2001 From: Christoph Bumiller Date: Sun, 29 Jan 2012 15:41:52 +0100 Subject: nv50/ir/opt: another insn NULL check in phi elimination --- src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp b/src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp index a45d336b435..3bdd5c8533c 100644 --- a/src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp +++ b/src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp @@ -2020,6 +2020,8 @@ GlobalCSE::visit(BasicBlock *bb) if (phi->getSrc(0)->refCount() > 1) continue; ik = phi->getSrc(0)->getInsn(); + if (!ik) + continue; // probably a function input for (s = 1; phi->srcExists(s); ++s) { if (phi->getSrc(s)->refCount() > 1) break; -- cgit v1.2.3