1 ; RUN: opt -passes=aa-eval -print-all-alias-modref-info -disable-output < %s 2>&1 | FileCheck %s
3 ; CHECK: MayAlias: i8* %a, i8* %gep
4 define void @inttoptr_alloca() {
6 %a.int = ptrtoint ptr %a to i64
7 %a.int.1 = add i64 %a.int, 1
8 %gep = getelementptr i8, ptr inttoptr (i64 -1 to ptr), i64 %a.int.1
9 %load = load i8, ptr %gep
14 ; CHECK: MayAlias: i8* %a, i8* %gep
15 define void @inttoptr_alloca_unknown_relation(i64 %offset) {
17 %a.int = ptrtoint ptr %a to i64
18 %gep = getelementptr i8, ptr inttoptr (i64 -1 to ptr), i64 %offset
19 %load = load i8, ptr %gep
24 ; CHECK: NoAlias: i8* %a, i8* %gep
25 define void @inttoptr_alloca_noescape(i64 %offset) {
27 %gep = getelementptr i8, ptr inttoptr (i64 -1 to ptr), i64 %offset
28 %load = load i8, ptr %gep
33 ; CHECK: MayAlias: i8* %a, i8* %gep
34 define void @inttoptr_noalias(ptr noalias %a) {
35 %a.int = ptrtoint ptr %a to i64
36 %a.int.1 = add i64 %a.int, 1
37 %gep = getelementptr i8, ptr inttoptr (i64 -1 to ptr), i64 %a.int.1
38 %load = load i8, ptr %gep
43 ; CHECK: NoAlias: i8* %a, i8* %gep
44 define void @inttoptr_noalias_noescape(ptr noalias %a, i64 %offset) {
45 %gep = getelementptr i8, ptr inttoptr (i64 -1 to ptr), i64 %offset
46 %load = load i8, ptr %gep