1 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
2 target triple = "x86_64-unknown-linux-gnu"
4 define dso_local void @Write1(i8* %p) {
6 store i8 0, i8* %p, align 1
10 define dso_local void @Write4(i8* %p) {
12 %0 = bitcast i8* %p to i32*
13 store i32 0, i32* %0, align 1
17 define dso_local void @Write4_2(i8* %p, i8* %q) {
19 %0 = bitcast i8* %p to i32*
20 store i32 0, i32* %0, align 1
21 %1 = bitcast i8* %q to i32*
22 store i32 0, i32* %1, align 1
26 define dso_local void @Write8(i8* %p) {
28 %0 = bitcast i8* %p to i64*
29 store i64 0, i64* %0, align 1
33 define dso_local i8* @WriteAndReturn8(i8* %p) {
35 store i8 0, i8* %p, align 1
39 declare dso_local void @ExternalCall(i8* %p)
41 define dso_preemptable void @PreemptableWrite1(i8* %p) {
43 store i8 0, i8* %p, align 1
47 define linkonce dso_local void @InterposableWrite1(i8* %p) {
49 store i8 0, i8* %p, align 1
53 define dso_local i8* @ReturnDependent(i8* %p) {
55 %p2 = getelementptr i8, i8* %p, i64 2
60 define dso_local void @Rec0(i8* %p) {
62 %p1 = getelementptr i8, i8* %p, i64 2
63 call void @Write4(i8* %p1)
68 define dso_local void @Rec1(i8* %p) {
70 %p1 = getelementptr i8, i8* %p, i64 1
71 call void @Rec0(i8* %p1)
75 ; access range [-2, 2)
76 define dso_local void @Rec2(i8* %p) {
78 %p1 = getelementptr i8, i8* %p, i64 -5
79 call void @Rec1(i8* %p1)
83 ; Recursive function that passes %acc unchanged => access range [0, 4).
84 define dso_local void @RecursiveNoOffset(i32* %p, i32 %size, i32* %acc) {
86 %cmp = icmp eq i32 %size, 0
87 br i1 %cmp, label %return, label %if.end
90 %0 = load i32, i32* %p, align 4
91 %1 = load i32, i32* %acc, align 4
92 %add = add nsw i32 %1, %0
93 store i32 %add, i32* %acc, align 4
94 %add.ptr = getelementptr inbounds i32, i32* %p, i64 1
95 %sub = add nsw i32 %size, -1
96 tail call void @RecursiveNoOffset(i32* %add.ptr, i32 %sub, i32* %acc)
103 ; Recursive function that advances %acc on each iteration => access range unlimited.
104 define dso_local void @RecursiveWithOffset(i32 %size, i32* %acc) {
106 %cmp = icmp eq i32 %size, 0
107 br i1 %cmp, label %return, label %if.end
110 store i32 0, i32* %acc, align 4
111 %acc2 = getelementptr inbounds i32, i32* %acc, i64 1
112 %sub = add nsw i32 %size, -1
113 tail call void @RecursiveWithOffset(i32 %sub, i32* %acc2)