aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2008-02-26 23:06:17 +0000
committerOwen Anderson <resistor@mac.com>2008-02-26 23:06:17 +0000
commit77db50f68f9fa5cade9f3a368af4722a76e0c8c5 (patch)
tree3308cf7c15ff6f1cc0dca5d0e385bb53f43efcc4 /lib/Transforms
parent8e50760dfe28ac1acd595895c965eead98a7d3df (diff)
Fix an issue where GVN had the sizes of the two memcpy's reverse, resulting
in an invalid transformation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47639 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Scalar/GVN.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/GVN.cpp b/lib/Transforms/Scalar/GVN.cpp
index 4b7e82c927..8bb811c45b 100644
--- a/lib/Transforms/Scalar/GVN.cpp
+++ b/lib/Transforms/Scalar/GVN.cpp
@@ -1188,8 +1188,8 @@ bool GVN::processMemCpy(MemCpyInst* M, MemCpyInst* MDep,
if (!C1 || !C2)
return false;
- uint64_t CpySize = C1->getValue().getZExtValue();
- uint64_t DepSize = C2->getValue().getZExtValue();
+ uint64_t DepSize = C1->getValue().getZExtValue();
+ uint64_t CpySize = C2->getValue().getZExtValue();
if (DepSize < CpySize)
return false;