1 target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
2 target triple = "aarch64-unknown-linux"
4 attributes #0 = { noinline sanitize_memtag "target-features"="+mte,+neon" }
6 define dso_local void @Write1(ptr %p) #0 {
8 store i8 0, ptr %p, align 1
12 define dso_local void @Write4(ptr %p) #0 {
14 store i32 0, ptr %p, align 1
18 define dso_local void @Write4_2(ptr %p, ptr %q) #0 {
20 store i32 0, ptr %p, align 1
21 store i32 0, ptr %q, align 1
25 define dso_local void @Write8(ptr %p) #0 {
27 store i64 0, ptr %p, align 1
31 define dso_local ptr @WriteAndReturn8(ptr %p) #0 {
33 store i8 0, ptr %p, align 1
37 declare dso_local void @ExternalCall(ptr %p)
39 define dso_preemptable void @PreemptableWrite1(ptr %p) #0 {
41 store i8 0, ptr %p, align 1
45 define linkonce dso_local void @InterposableWrite1(ptr %p) #0 {
47 store i8 0, ptr %p, align 1
51 define dso_local ptr @ReturnDependent(ptr %p) #0 {
53 %p2 = getelementptr i8, ptr %p, i64 2
58 define dso_local void @Rec0(ptr %p) #0 {
60 %p1 = getelementptr i8, ptr %p, i64 2
61 call void @Write4(ptr %p1)
66 define dso_local void @Rec1(ptr %p) #0 {
68 %p1 = getelementptr i8, ptr %p, i64 1
69 call void @Rec0(ptr %p1)
73 ; access range [-2, 2)
74 define dso_local void @Rec2(ptr %p) #0 {
76 %p1 = getelementptr i8, ptr %p, i64 -5
77 call void @Rec1(ptr %p1)
81 ; Recursive function that passes %acc unchanged => access range [0, 4).
82 define dso_local void @RecursiveNoOffset(ptr %p, i32 %size, ptr %acc) {
84 %cmp = icmp eq i32 %size, 0
85 br i1 %cmp, label %return, label %if.end
88 %load0 = load i32, ptr %p, align 4
89 %load1 = load i32, ptr %acc, align 4
90 %add = add nsw i32 %load1, %load0
91 store i32 %add, ptr %acc, align 4
92 %add.ptr = getelementptr inbounds i32, ptr %p, i64 1
93 %sub = add nsw i32 %size, -1
94 tail call void @RecursiveNoOffset(ptr %add.ptr, i32 %sub, ptr %acc)
101 ; Recursive function that advances %acc on each iteration => access range unlimited.
102 define dso_local void @RecursiveWithOffset(i32 %size, ptr %acc) {
104 %cmp = icmp eq i32 %size, 0
105 br i1 %cmp, label %return, label %if.end
108 store i32 0, ptr %acc, align 4
109 %acc2 = getelementptr inbounds i32, ptr %acc, i64 1
110 %sub = add nsw i32 %size, -1
111 tail call void @RecursiveWithOffset(i32 %sub, ptr %acc2)
118 define dso_local ptr @ReturnAlloca() {
120 %x = alloca i64, align 4
124 define dso_local void @Write1Private(ptr %p) #0 {
126 call void @Private(ptr %p)
130 define dso_local void @Write1SameModule(ptr %p) #0 {
132 call void @Write1(ptr %p)
136 declare void @Write1Module0(ptr %p)
138 define dso_local void @Write1DiffModule(ptr %p) #0 {
140 call void @Write1Module0(ptr %p)
144 define private dso_local void @Private(ptr %p) #0 {
146 %p1 = getelementptr i8, ptr %p, i64 -1
147 store i8 0, ptr %p1, align 1
151 define dso_local void @Write1Weak(ptr %p) #0 {
153 call void @Weak(ptr %p)
157 define weak dso_local void @Weak(ptr %p) #0 {
159 %p1 = getelementptr i8, ptr %p, i64 -1
160 store i8 0, ptr %p1, align 1