From 301a2792bea39a59be47d8950a0c5c8f998199c1 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 2 Nov 2009 02:48:17 +0000 Subject: [PATCH] fix failures introduced in r85774 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85777 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/SCCP.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; }