forked from OSchip/llvm-project
Don't crash owhen ComputeLoadResult can't compute the result of the load.
llvm-svn: 132290
This commit is contained in:
parent
18d85eedda
commit
c66d455e50
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue