summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2008-02-19 02:53:23 +0000
committerOwen Anderson <resistor@mac.com>2008-02-19 02:53:23 +0000
commitffca8e99b2e11ba715de25b0ecef3926cf23df13 (patch)
treef4adfd204c85f22d399a74263c81b7bafdec11b5 /llvm/lib/Transforms
parent86dc7ae58ee02a2354a843e05af122517f6dcd95 (diff)
downloadbcm5719-llvm-ffca8e99b2e11ba715de25b0ecef3926cf23df13.tar.gz
bcm5719-llvm-ffca8e99b2e11ba715de25b0ecef3926cf23df13.zip
Fix Transforms/GVN/memcpy.ll, which Chris broke in r47275 by reordering the branches. memcpy's are a kind of CallInst.
llvm-svn: 47305
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/GVN.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/GVN.cpp b/llvm/lib/Transforms/Scalar/GVN.cpp
index efe8254cd54..e8337600727 100644
--- a/llvm/lib/Transforms/Scalar/GVN.cpp
+++ b/llvm/lib/Transforms/Scalar/GVN.cpp
@@ -1121,7 +1121,8 @@ bool GVN::processMemCpy(MemCpyInst* M,
dep == MemoryDependenceAnalysis::NonLocal)
return false;
else if (CallInst* C = dyn_cast<CallInst>(dep))
- return performReturnSlotOptzn(M, C, toErase);
+ if (!isa<MemCpyInst>(C))
+ return performReturnSlotOptzn(M, C, toErase);
else if (!isa<MemCpyInst>(dep))
return false;
OpenPOWER on IntegriCloud