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

llvm-svn: 47364
This commit is contained in:
Owen Anderson 2008-02-20 08:23:02 +00:00
parent ab5729cfe6
commit b4724dbda2
1 changed files with 1 additions and 0 deletions

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;