diff options
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/SCCP.cpp | 3 | 
1 files changed, 2 insertions, 1 deletions
| diff --git a/llvm/lib/Transforms/Scalar/SCCP.cpp b/llvm/lib/Transforms/Scalar/SCCP.cpp index 7421d4f349b..e931c379894 100644 --- a/llvm/lib/Transforms/Scalar/SCCP.cpp +++ b/llvm/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<ConstantInt>(BCValue.getConstant())->isZero()] = true; +    if (BCValue.isConstant()) +      Succs[cast<ConstantInt>(BCValue.getConstant())->isZero()] = true;      return;    } | 

