aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2008-02-20 08:23:02 +0000
committerOwen Anderson <resistor@mac.com>2008-02-20 08:23:02 +0000
commit61d30a821f372ca4185fc518023f857fbcb9c0f5 (patch)
tree00533b196071cecf64b70f270b01cc377dab7f47
parent8647bcd5de06eb4f8c11cee90333e373460aacb7 (diff)
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
-rw-r--r--lib/Transforms/Scalar/GVN.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Transforms/Scalar/GVN.cpp b/lib/Transforms/Scalar/GVN.cpp
index 2ecc0e5d1f..481956f6b4 100644
--- a/lib/Transforms/Scalar/GVN.cpp
+++ b/lib/Transforms/Scalar/GVN.cpp
@@ -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;