From: Christoph Bumiller Date: Sun, 29 Jan 2012 14:41:52 +0000 (+0100) Subject: nv50/ir/opt: another insn NULL check in phi elimination X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bb9c15bac42cf323ef267095b33031ffc1d4fba4;p=mesa.git nv50/ir/opt: another insn NULL check in phi elimination --- 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;