[llvm-commits] [llvm] r47305 - /llvm/trunk/lib/Transforms/Scalar/GVN.cpp
Owen Anderson
resistor at mac.com
Mon Feb 18 18:53:23 PST 2008
Author: resistor
Date: Mon Feb 18 20:53:23 2008
New Revision: 47305
URL: http://llvm.org/viewvc/llvm-project?rev=47305&view=rev
Log:
Fix Transforms/GVN/memcpy.ll, which Chris broke in r47275 by reordering the branches. memcpy's are a kind of CallInst.
Modified:
llvm/trunk/lib/Transforms/Scalar/GVN.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/GVN.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/GVN.cpp?rev=47305&r1=47304&r2=47305&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/GVN.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/GVN.cpp Mon Feb 18 20:53:23 2008
@@ -1121,7 +1121,8 @@
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;
More information about the llvm-commits
mailing list