From: Chris Lattner Date: Mon, 2 Nov 2009 02:48:17 +0000 (+0000) Subject: fix failures introduced in r85774 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=301a2792bea39a59be47d8950a0c5c8f998199c1;p=oota-llvm.git fix failures introduced in r85774 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85777 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/SCCP.cpp b/lib/Transforms/Scalar/SCCP.cpp index 7421d4f349b..e931c379894 100644 --- a/lib/Transforms/Scalar/SCCP.cpp +++ b/lib/Transforms/Scalar/SCCP.cpp @@ -451,7 +451,8 @@ void SCCPSolver::getFeasibleSuccessors(TerminatorInst &TI, } // Constant condition variables mean the branch can only go a single way. - Succs[cast(BCValue.getConstant())->isZero()] = true; + if (BCValue.isConstant()) + Succs[cast(BCValue.getConstant())->isZero()] = true; return; }