From 5eec4941d1591129ea40680477872109bec9f036 Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Sun, 22 Oct 2006 21:38:24 +0000 Subject: [PATCH] Whoops! Add missing NULL check. llvm-svn: 31121 --- lib/Transforms/Scalar/PredicateSimplifier.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Transforms/Scalar/PredicateSimplifier.cpp b/lib/Transforms/Scalar/PredicateSimplifier.cpp index ca0d056e58c..6cda6d257dc 100644 --- a/lib/Transforms/Scalar/PredicateSimplifier.cpp +++ b/lib/Transforms/Scalar/PredicateSimplifier.cpp @@ -350,6 +350,7 @@ namespace { } break; case Instruction::Xor: { ConstantIntegral *CI = dyn_cast(V1); + if (!CI) break; if (CI->isAllOnesValue()) { if (BO->getOperand(0) == V1) add(Opcode, ConstantBool::getFalse(), BO->getOperand(1), false);