brintos

brintos / llvm-project-archived public Read only

0
0
Text · 845 B · c275922 Raw
32 lines · plain
1; RUN: opt < %s -aa-pipeline=basic-aa -passes=aa-eval -print-all-alias-modref-info 2>&1 | FileCheck %s2; PR42673 4target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"5 6; CHECK: MayAlias: double* %p.0.i.0, double* %p37 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 PartialAlias10; for GEPs to ignore TBAA.11 12define void @foo(ptr noalias %p) {13entry:14  %p3 = getelementptr [3 x [3 x double]], ptr %p, i64 0, i64 0, i64 315  br label %loop16 17loop:18  %i = phi i64 [ 0, %entry ], [ %i.next, %loop ]19 20  %p.0.i.0 = getelementptr [3 x [3 x double]], ptr %p, i64 0, i64 %i, i64 021 22  store volatile double 0.0, ptr %p323  store volatile double 0.1, ptr %p.0.i.024 25  %i.next = add i64 %i, 126  %cmp = icmp slt i64 %i.next, 327  br i1 %cmp, label %loop, label %exit28 29exit:30  ret void31}32