1 ; RUN: opt < %s -aa-pipeline=basic-aa -passes=aa-eval -print-all-alias-modref-info -disable-output 2>&1 | FileCheck %s
2 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
3 target triple = "x86_64-apple-darwin13.4.0"
5 ; CHECK-LABEL: compute1
6 ; CHECK: MayAlias: i32* %arrayidx8, i32* %out
7 ; CHECK: NoAlias: i32* %arrayidx11, i32* %out
8 ; CHECK: MayAlias: i32* %arrayidx11, i32* %arrayidx8
9 ; CHECK: NoAlias: i32* %arrayidx14, i32* %out
10 ; CHECK: MayAlias: i32* %arrayidx14, i32* %arrayidx8
11 ; CHECK: MayAlias: i32* %arrayidx11, i32* %arrayidx14
12 define void @compute1(i32 %num.0.lcssa, ptr %out) {
13 %idxprom = zext i32 %num.0.lcssa to i64
14 %arrayidx8 = getelementptr inbounds i32, ptr %out, i64 %idxprom
15 %add9 = or i32 %num.0.lcssa, 1
16 %idxprom10 = zext i32 %add9 to i64
17 %arrayidx11 = getelementptr inbounds i32, ptr %out, i64 %idxprom10
18 %add12 = or i32 %num.0.lcssa, 2
19 %idxprom13 = zext i32 %add12 to i64
20 %arrayidx14 = getelementptr inbounds i32, ptr %out, i64 %idxprom13
22 load i32, ptr %arrayidx8
23 load i32, ptr %arrayidx11
24 load i32, ptr %arrayidx14
28 ; CHECK-LABEL: compute2
29 ; CHECK: MayAlias: i32* %arrayidx11, i32* %out.addr
30 define void @compute2(i32 %num, ptr %out.addr) {
31 %add9 = add i32 %num, 1
32 %idxprom10 = zext i32 %add9 to i64
33 %arrayidx11 = getelementptr inbounds i32, ptr %out.addr, i64 %idxprom10
34 load i32, ptr %out.addr
35 load i32, ptr %arrayidx11