diff options
| author | Nick Lewycky <nicholas@mxc.ca> | 2011-05-29 19:33:36 +0000 | 
|---|---|---|
| committer | Nick Lewycky <nicholas@mxc.ca> | 2011-05-29 19:33:36 +0000 | 
| commit | c66d455e506468328e341e62b5d58b0d48b8884d (patch) | |
| tree | 2a9d2f51c450b0805e385a7c68ecc1a7662aa955 /llvm/lib/Transforms | |
| parent | 18d85eedda8b5a2f77c58221082ea6f5ee31894c (diff) | |
| download | bcm5719-llvm-c66d455e506468328e341e62b5d58b0d48b8884d.tar.gz bcm5719-llvm-c66d455e506468328e341e62b5d58b0d48b8884d.zip | |
Don't crash owhen ComputeLoadResult can't compute the result of the load.
llvm-svn: 132290
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/IPO/GlobalOpt.cpp | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/llvm/lib/Transforms/IPO/GlobalOpt.cpp b/llvm/lib/Transforms/IPO/GlobalOpt.cpp index 371500bc786..cdf7b76dd08 100644 --- a/llvm/lib/Transforms/IPO/GlobalOpt.cpp +++ b/llvm/lib/Transforms/IPO/GlobalOpt.cpp @@ -2444,7 +2444,7 @@ static bool EvaluateFunction(Function *F, Constant *&RetVal,          Constant *Val = getVal(Values, MSI->getValue());          Constant *DestVal = ComputeLoadResult(getVal(Values, Ptr),                                                MutatedMemory); -        if (Val->isNullValue() && DestVal->isNullValue()) { +        if (Val->isNullValue() && DestVal && DestVal->isNullValue()) {            // This memset is a no-op.            ++CurInst;            continue; | 

