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(i8* %P, i8* %Q) {
7 ; CHECK: 1 = MemoryDef(liveOnEntry)
8 ; CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 32, i8* %P)
9 call void @llvm.lifetime.start.p0i8(i64 32, i8* %P)
11 ; CHECK-NEXT: %0 = load i8, i8* %P
13 ; CHECK: 2 = MemoryDef(1)
14 ; CHECK-NEXT: store i8 1, i8* %P
16 ; CHECK: 3 = MemoryDef(2)
17 ; CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 32, i8* %P)
18 call void @llvm.lifetime.end.p0i8(i64 32, i8* %P)
20 ; CHECK-NEXT: %1 = load i8, i8* %P
23 ; CHECK-NEXT: %2 = load i8, i8* %Q
27 declare void @llvm.lifetime.start.p0i8(i64 %S, i8* nocapture %P) readonly
28 declare void @llvm.lifetime.end.p0i8(i64 %S, i8* nocapture %P)