Index: lib/Transforms/Utils/MemorySSA.cpp =================================================================== --- lib/Transforms/Utils/MemorySSA.cpp +++ lib/Transforms/Utils/MemorySSA.cpp @@ -220,6 +220,7 @@ // markers. switch (II->getIntrinsicID()) { case Intrinsic::lifetime_start: + return AA.isMustAlias(MemoryLocation(II->getArgOperand(1)), UseLoc); case Intrinsic::lifetime_end: case Intrinsic::invariant_start: case Intrinsic::invariant_end: @@ -298,7 +299,6 @@ Instruction *Inst = MD->getMemoryInst(); if (IntrinsicInst *II = dyn_cast(Inst)) { switch (II->getIntrinsicID()) { - case Intrinsic::lifetime_start: case Intrinsic::lifetime_end: return AA.isMustAlias(MemoryLocation(II->getArgOperand(1)), Loc); default: Index: test/Transforms/Util/MemorySSA/lifetime-simple.ll =================================================================== --- test/Transforms/Util/MemorySSA/lifetime-simple.ll +++ test/Transforms/Util/MemorySSA/lifetime-simple.ll @@ -9,7 +9,7 @@ ; CHECK: 1 = MemoryDef(liveOnEntry) ; CHECK-NEXT: call void @llvm.lifetime.start(i64 32, i8* %P) call void @llvm.lifetime.start(i64 32, i8* %P) -; CHECK: MemoryUse(liveOnEntry) +; CHECK: MemoryUse(1) ; CHECK-NEXT: %0 = load i8, i8* %P %0 = load i8, i8* %P ; CHECK: 2 = MemoryDef(1)