When performing return slot optimization, remember to inform memdep when we're removing the memcpy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47364 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Owen Anderson 2008-02-20 08:23:02 +00:00
parent 8647bcd5de
commit 61d30a821f

View File

@ -1139,6 +1139,7 @@ bool GVN::performReturnSlotOptzn(MemCpyInst* cpy, CallInst* C,
MD.dropInstruction(C);
// Remove the memcpy
MD.removeInstruction(cpy);
toErase.push_back(cpy);
return true;