1 ; RUN: opt -basic-aa -print-memoryssa -verify-memoryssa -enable-new-pm=0 -analyze < %s 2>&1 | FileCheck %s
2 ; RUN: opt -aa-pipeline=basic-aa -passes='print<memoryssa>,verify<memoryssa>' -disable-output < %s 2>&1 | FileCheck %s
3 ; This test checks that lifetime markers are considered clobbers of %P,
4 ; and due to lack of noalias information, of %Q as well.
6 define i8 @test(i8* %P, i8* %Q) {
8 ; CHECK: 1 = MemoryDef(liveOnEntry)
9 ; CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 32, i8* %P)
10 call void @llvm.lifetime.start.p0i8(i64 32, i8* %P)
12 ; CHECK-NEXT: %0 = load i8, i8* %P
14 ; CHECK: 2 = MemoryDef(1)
15 ; CHECK-NEXT: store i8 1, i8* %P
17 ; CHECK: 3 = MemoryDef(2)
18 ; CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 32, i8* %P)
19 call void @llvm.lifetime.end.p0i8(i64 32, i8* %P)
21 ; CHECK-NEXT: %1 = load i8, i8* %P
24 ; CHECK-NEXT: %2 = load i8, i8* %Q
28 declare void @llvm.lifetime.start.p0i8(i64 %S, i8* nocapture %P) readonly
29 declare void @llvm.lifetime.end.p0i8(i64 %S, i8* nocapture %P)