remove another pointless noalias check: M is a memcpy, so the
authorChris Lattner <sabre@nondot.org>
Thu, 18 Nov 2010 07:39:57 +0000 (07:39 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 18 Nov 2010 07:39:57 +0000 (07:39 +0000)
source and dest are known to not overlap.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119692 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/MemCpyOptimizer.cpp

index cab8bac0f94192351297d4d759be3a31980752c7..ea29fca346a10894fd657c6b3d1a1fefde2203cf 100644 (file)
@@ -691,8 +691,7 @@ bool MemCpyOpt::processMemCpyMemCpyDependence(MemCpyInst *M, MemCpyInst *MDep,
   // Finally, we have to make sure that the dest of the second does not
   // alias the source of the first.
   AliasAnalysis &AA = getAnalysis<AliasAnalysis>();
-  if (!AA.isNoAlias(M->getRawDest(), MSize, MDep->getRawSource(), DepSize) ||
-      !AA.isNoAlias(M->getRawDest(), MSize, M->getRawSource(), MSize))
+  if (!AA.isNoAlias(M->getRawDest(), MSize, MDep->getRawSource(), DepSize))
     return false;
   
   // If all checks passed, then we can transform these memcpy's