77
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1 ; RUN: opt < %s -basicaa -gvn -S | FileCheck %s
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
2
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
3 ; PR15967
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
4 ; BasicAA claims no alias when there is (due to a problem when the MaxLookup
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
5 ; limit was reached).
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
6
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
7 target datalayout = "e"
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
8
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
9 %struct.foo = type { i32, i32 }
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
10
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
11 define i32 @main() {
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
12 %t = alloca %struct.foo, align 4
|
95
|
13 %1 = getelementptr inbounds %struct.foo, %struct.foo* %t, i32 0, i32 0
|
77
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
14 store i32 1, i32* %1, align 4
|
95
|
15 %2 = getelementptr inbounds %struct.foo, %struct.foo* %t, i64 1
|
77
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
16 %3 = bitcast %struct.foo* %2 to i8*
|
95
|
17 %4 = getelementptr inbounds i8, i8* %3, i32 -1
|
77
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
18 store i8 0, i8* %4
|
95
|
19 %5 = getelementptr inbounds i8, i8* %4, i32 -1
|
77
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
20 store i8 0, i8* %5
|
95
|
21 %6 = getelementptr inbounds i8, i8* %5, i32 -1
|
77
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
22 store i8 0, i8* %6
|
95
|
23 %7 = getelementptr inbounds i8, i8* %6, i32 -1
|
77
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
24 store i8 0, i8* %7
|
95
|
25 %8 = getelementptr inbounds i8, i8* %7, i32 -1
|
77
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
26 store i8 0, i8* %8
|
95
|
27 %9 = getelementptr inbounds i8, i8* %8, i32 -1
|
77
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
28 store i8 0, i8* %9
|
95
|
29 %10 = getelementptr inbounds i8, i8* %9, i32 -1
|
77
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
30 store i8 0, i8* %10
|
95
|
31 %11 = getelementptr inbounds i8, i8* %10, i32 -1
|
77
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
32 store i8 0, i8* %11
|
95
|
33 %12 = load i32, i32* %1, align 4
|
77
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
34 ret i32 %12
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
35 ; CHECK: ret i32 %12
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
36 }
|