Whoops! Add missing NULL check.
authorNick Lewycky <nicholas@mxc.ca>
Sun, 22 Oct 2006 21:38:24 +0000 (21:38 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Sun, 22 Oct 2006 21:38:24 +0000 (21:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31121 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/PredicateSimplifier.cpp

index ca0d056e58cb83921cb87c704669d3b20a21a677..6cda6d257dc1f6689be576e5594d98949f95d167 100644 (file)
@@ -350,6 +350,7 @@ namespace {
         } break;
         case Instruction::Xor: {
           ConstantIntegral *CI = dyn_cast<ConstantIntegral>(V1);
+         if (!CI) break;
           if (CI->isAllOnesValue()) {
             if (BO->getOperand(0) == V1)
               add(Opcode, ConstantBool::getFalse(), BO->getOperand(1), false);