[sanitizer] Improve FreeBSD ASLR detection
[llvm-project.git] / llvm / test / Analysis / MemorySSA / lifetime-simple.ll
blob9d3de796d3cfc5a802180b391c74e945c9a78179
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) {
6 entry:
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)
10 ; CHECK:  MemoryUse(1)
11 ; CHECK-NEXT:   %0 = load i8, i8* %P
12   %0 = load i8, i8* %P
13 ; CHECK:  2 = MemoryDef(1)
14 ; CHECK-NEXT:   store i8 1, i8* %P
15   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)
19 ; CHECK:  MemoryUse(3)
20 ; CHECK-NEXT:   %1 = load i8, i8* %P
21   %1 = load i8, i8* %P
22 ; CHECK:  MemoryUse(3)
23 ; CHECK-NEXT:   %2 = load i8, i8* %Q
24   %2 = load i8, i8* %Q
25   ret i8 %1
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)