nv50/ir/opt: another insn NULL check in phi elimination
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>
Sun, 29 Jan 2012 14:41:52 +0000 (15:41 +0100)
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>
Sat, 14 Apr 2012 19:54:03 +0000 (21:54 +0200)
src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp

index a45d336b43591f9632c5e66ceb02815d7d2ceb18..3bdd5c8533c866b52893fd915695fc8030497cbc 100644 (file)
@@ -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;