1 ; RUN: opt < %s -passes=asan -asan-max-inline-poisoning-size=0 -asan-stack-dynamic-alloca=0 -S | FileCheck --check-prefix=OUTLINE %s
2 ; RUN: opt < %s -passes=asan -asan-max-inline-poisoning-size=999 -asan-stack-dynamic-alloca=0 -S | FileCheck --check-prefix=INLINE %s
4 target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
5 target triple = "arm64-apple-macosx13.0.0"
7 ; Function Attrs: noinline nounwind optnone sanitize_address ssp uwtable(sync)
8 define void @foo() #0 {
10 %array01 = alloca [1 x i8], align 1
11 %array02 = alloca [2 x i8], align 1
12 %array03 = alloca [3 x i8], align 1
13 %array04 = alloca [4 x i8], align 1
14 %array05 = alloca [5 x i8], align 1
15 %array06 = alloca [6 x i8], align 1
16 %array07 = alloca [7 x i8], align 1
17 ; OUTLINE: call void @__asan_set_shadow_f1(i64 %33, i64 4)
18 ; OUTLINE: call void @__asan_set_shadow_01(i64 %34, i64 1)
19 ; OUTLINE: call void @__asan_set_shadow_f2(i64 %35, i64 1)
20 ; OUTLINE: call void @__asan_set_shadow_02(i64 %36, i64 1)
21 ; OUTLINE: call void @__asan_set_shadow_f2(i64 %37, i64 1)
22 ; OUTLINE: call void @__asan_set_shadow_03(i64 %38, i64 1)
23 ; OUTLINE: call void @__asan_set_shadow_f2(i64 %39, i64 1)
24 ; OUTLINE: call void @__asan_set_shadow_04(i64 %40, i64 1)
25 ; OUTLINE: call void @__asan_set_shadow_f2(i64 %41, i64 1)
26 ; OUTLINE: call void @__asan_set_shadow_05(i64 %42, i64 1)
27 ; OUTLINE: call void @__asan_set_shadow_f2(i64 %43, i64 3)
28 ; OUTLINE: call void @__asan_set_shadow_06(i64 %44, i64 1)
29 ; OUTLINE: call void @__asan_set_shadow_f2(i64 %45, i64 3)
30 ; OUTLINE: call void @__asan_set_shadow_07(i64 %46, i64 1)
31 ; OUTLINE: call void @__asan_set_shadow_f3(i64 %47, i64 3)
32 ; OUTLINE: call void @__asan_stack_free_2(i64 %7, i64 192)
33 ; OUTLINE: call void @__asan_set_shadow_00(i64 %135, i64 24)
34 ; INLINE: store i64 -1007977276409515535, ptr %34, align 1
35 ; INLINE: store i64 -940423264817843709, ptr %36, align 1
36 ; INLINE: store i64 -868083087686045178, ptr %38, align 1
37 %arrayidx = getelementptr inbounds [1 x i8], ptr %array01, i64 0, i64 1
38 store i8 1, ptr %arrayidx, align 1
39 %arrayidx1 = getelementptr inbounds [2 x i8], ptr %array02, i64 0, i64 2
40 store i8 2, ptr %arrayidx1, align 1
41 %arrayidx2 = getelementptr inbounds [3 x i8], ptr %array03, i64 0, i64 3
42 store i8 3, ptr %arrayidx2, align 1
43 %arrayidx3 = getelementptr inbounds [4 x i8], ptr %array04, i64 0, i64 4
44 store i8 4, ptr %arrayidx3, align 1
45 %arrayidx4 = getelementptr inbounds [5 x i8], ptr %array05, i64 0, i64 5
46 store i8 5, ptr %arrayidx4, align 1
47 %arrayidx5 = getelementptr inbounds [6 x i8], ptr %array06, i64 0, i64 6
48 store i8 6, ptr %arrayidx5, align 1
49 %arrayidx6 = getelementptr inbounds [7 x i8], ptr %array07, i64 0, i64 7
50 store i8 7, ptr %arrayidx6, align 1
51 ; CHECK-NOT: store i64 -723401728380766731, ptr %126, align 1
54 attributes #0 = { noinline nounwind optnone sanitize_address ssp uwtable(sync) "frame-pointer"="non-leaf" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+sha3,+sm4,+v8.1a,+v8.2a,+v8.3a,+v8.4a,+v8a,+zcm,+zcz" }