1 ; RUN: opt < %s -passes=aa-eval -print-all-alias-modref-info -disable-output 2>&1 | FileCheck %s
4 ; CHECK: NoAlias: i8* %p.minus.2, i8* %p.plus.2
5 ; CHECK: MayAlias: i8* %p.idx.maybeneg, i8* %p.minus.2
6 ; CHECK: MayAlias: i8* %p.idx.maybeneg, i8* %p.plus.2
7 ; CHECK: NoAlias: i8* %p.idx.nneg, i8* %p.minus.2
8 ; CHECK: MayAlias: i8* %p.idx.nneg, i8* %p.plus.2
9 ; CHECK: MustAlias: i8* %p.idx.maybeneg, i8* %p.idx.nneg
10 define void @test(ptr %p, i64 %idx) {
11 %p.minus.2 = getelementptr i8, ptr %p, i64 -2
12 %p.plus.2 = getelementptr i8, ptr %p, i64 2
13 %p.idx.maybeneg = getelementptr inbounds i8, ptr %p, i64 %idx
14 %p.idx.nneg = getelementptr nuw nusw i8, ptr %p, i64 %idx
15 load i8, ptr %p.minus.2
16 load i8, ptr %p.plus.2
17 load i8, ptr %p.idx.maybeneg
18 load i8, ptr %p.idx.nneg