1 ; RUN: opt -aa-pipeline=basic-aa -passes='print<memoryssa>,verify<memoryssa>' -disable-output < %s 2>&1 | FileCheck %s
2 ; This test checks that lifetime markers are considered clobbers of %P,
3 ; and due to lack of noalias information, of %Q as well.
5 define i8 @test(ptr %P, ptr %Q) {
7 ; CHECK: 1 = MemoryDef(liveOnEntry)
8 ; CHECK-NEXT: call void @llvm.lifetime.start.p0(i64 32, ptr %P)
9 call void @llvm.lifetime.start.p0(i64 32, ptr %P)
11 ; CHECK-NEXT: %0 = load i8, ptr %P
13 ; CHECK: 2 = MemoryDef(1)
14 ; CHECK-NEXT: store i8 1, ptr %P
16 ; CHECK: 3 = MemoryDef(2)
17 ; CHECK-NEXT: call void @llvm.lifetime.end.p0(i64 32, ptr %P)
18 call void @llvm.lifetime.end.p0(i64 32, ptr %P)
20 ; CHECK-NEXT: %1 = load i8, ptr %P
23 ; CHECK-NEXT: %2 = load i8, ptr %Q
27 declare void @llvm.lifetime.start.p0(i64 %S, ptr nocapture %P) readonly
28 declare void @llvm.lifetime.end.p0(i64 %S, ptr nocapture %P)