1 ; Test that ASAN will not instrument lifetime markers on alloca offsets.
3 ; RUN: opt < %s -passes=asan --asan-use-after-scope -S | FileCheck %s
5 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
6 target triple = "x86_64-apple-macosx10.15.0"
8 %t = type { ptr, ptr, %sub, i64 }
11 define void @foo() sanitize_address {
13 %0 = alloca %t, align 8
14 %x = getelementptr inbounds %t, ptr %0, i64 0, i32 2
15 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x)
16 call void @bar(ptr nonnull %x)
17 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #3
21 declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture)
22 declare void @bar(ptr)
23 declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture)
25 ; CHECK: store i64 %[[STACK_BASE:.+]], ptr %asan_local_stack_base, align 8
26 ; CHECK-NOT: store i8 0
27 ; CHECK: call void @bar(ptr nonnull %x)