1 ; RUN: opt < %s -basicaa -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" 4 5 ; CHECK-LABEL: compute1 6 ; CHECK: PartialAlias: i32* %arrayidx8, i32* %out 7 ; CHECK: PartialAlias: i32* %arrayidx11, i32* %out 8 ; CHECK: PartialAlias: i32* %arrayidx11, i32* %arrayidx8 9 ; CHECK: PartialAlias: i32* %arrayidx14, i32* %out 10 ; CHECK: PartialAlias: i32* %arrayidx14, i32* %arrayidx8 11 ; CHECK: PartialAlias: i32* %arrayidx11, i32* %arrayidx14 12 define void @compute1(i32 %num.0.lcssa, i32* %out) { 13 %idxprom = zext i32 %num.0.lcssa to i64 14 %arrayidx8 = getelementptr inbounds i32, i32* %out, i64 %idxprom 15 %add9 = or i32 %num.0.lcssa, 1 16 %idxprom10 = zext i32 %add9 to i64 17 %arrayidx11 = getelementptr inbounds i32, i32* %out, i64 %idxprom10 18 %add12 = or i32 %num.0.lcssa, 2 19 %idxprom13 = zext i32 %add12 to i64 20 %arrayidx14 = getelementptr inbounds i32, i32* %out, i64 %idxprom13 21 ret void 22 } 23 24 ; CHECK-LABEL: compute2 25 ; CHECK: PartialAlias: i32* %arrayidx11, i32* %out.addr 26 define void @compute2(i32 %num, i32* %out.addr) { 27 %add9 = add i32 %num, 1 28 %idxprom10 = zext i32 %add9 to i64 29 %arrayidx11 = getelementptr inbounds i32, i32* %out.addr, i64 %idxprom10 30 ret void 31 } 32