diff options
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; |

