1 ; RUN: opt < %s -aa-pipeline=basic-aa -passes=aa-eval -print-all-alias-modref-info 2>&1 | FileCheck %s
4 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
6 ; CHECK: MayAlias: double* %p.0.i.0, double* %p3
8 ; %p3 is equal to %p.0.i.0 on the second iteration of the loop,
9 ; so MayAlias is needed. In practice, basicaa returns PartialAlias
10 ; for GEPs to ignore TBAA.
12 define void @foo(ptr noalias %p) {
14 %p3 = getelementptr [3 x [3 x double]], ptr %p, i64 0, i64 0, i64 3
18 %i = phi i64 [ 0, %entry ], [ %i.next, %loop ]
20 %p.0.i.0 = getelementptr [3 x [3 x double]], ptr %p, i64 0, i64 %i, i64 0
22 store volatile double 0.0, ptr %p3
23 store volatile double 0.1, ptr %p.0.i.0
25 %i.next = add i64 %i, 1
26 %cmp = icmp slt i64 %i.next, 3
27 br i1 %cmp, label %loop, label %exit