@llvm.lifetime.begin acts as a load, not @llvm.lifetime.end.
authorOwen Anderson <resistor@mac.com>
Tue, 17 May 2011 00:05:49 +0000 (00:05 +0000)
committerOwen Anderson <resistor@mac.com>
Tue, 17 May 2011 00:05:49 +0000 (00:05 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131437 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/MemoryDependenceAnalysis.cpp

index ce7fab6459ed8a1247cb6030e0a3c8e2e63a9368..3f3175b3bab3996f0ef7d24b27cc30996a18c68d 100644 (file)
@@ -497,7 +497,7 @@ MemDepResult MemoryDependenceAnalysis::getDependency(Instruction *QueryInst) {
       // If we can do a pointer scan, make it happen.
       bool isLoad = !(MR & AliasAnalysis::Mod);
       if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(QueryInst))
-        isLoad |= II->getIntrinsicID() == Intrinsic::lifetime_end;
+        isLoad |= II->getIntrinsicID() == Intrinsic::lifetime_start;
 
       LocalCache = getPointerDependencyFrom(MemLoc, isLoad, ScanPos,
                                             QueryParent);