xref: /llvm-project/llvm/test/Analysis/BasicAA/2014-03-18-Maxlookup-reached.ll (revision 05ff7606c9d47135ecf5b69e25b1327634f6fa27)
1; RUN: opt < %s -aa-pipeline=basic-aa -passes=gvn  -S | FileCheck %s
2
3; PR15967
4; BasicAA claims no alias when there is (due to a problem when the MaxLookup
5; limit was reached).
6
7target datalayout = "e"
8
9%struct.foo = type { i32, i32 }
10
11define i32 @main() {
12  %t = alloca %struct.foo, align 4
13  store i32 1, ptr %t, align 4
14  %1 = getelementptr inbounds %struct.foo, ptr %t, i64 1
15  %2 = getelementptr inbounds i8, ptr %1, i32 -1
16  store i8 0, ptr %2
17  %3 = getelementptr inbounds i8, ptr %2, i32 -1
18  store i8 0, ptr %3
19  %4 = getelementptr inbounds i8, ptr %3, i32 -1
20  store i8 0, ptr %4
21  %5 = getelementptr inbounds i8, ptr %4, i32 -1
22  store i8 0, ptr %5
23  %6 = getelementptr inbounds i8, ptr %5, i32 -1
24  store i8 0, ptr %6
25  %7 = getelementptr inbounds i8, ptr %6, i32 -1
26  store i8 0, ptr %7
27  %8 = getelementptr inbounds i8, ptr %7, i32 -1
28  store i8 0, ptr %8
29  %9 = getelementptr inbounds i8, ptr %8, i32 -1
30  store i8 0, ptr %9
31  %10 = load i32, ptr %t, align 4
32  ret i32 %10
33; CHECK: ret i32 %10
34}
35