1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00
llvm-mirror/test/Analysis/BasicAA/constant-over-index.ll
Dan Gohman 6aff5b94ff Make BasicAliasAnalysis a normal AliasAnalysis implementation which
does normal initialization and normal chaining. Change the default
AliasAnalysis implementation to NoAlias.

Update StandardCompileOpts.h and friends to explicitly request
BasicAliasAnalysis.

Update tests to explicitly request -basicaa.

llvm-svn: 116720
2010-10-18 18:04:47 +00:00

29 lines
706 B
LLVM

; RUN: opt < %s -basicaa -aa-eval -print-all-alias-modref-info |& FileCheck %s
; PR4267
; CHECK: MayAlias: double* %p.0.i.0, double* %p3
; %p3 is equal to %p.0.i.0 on the second iteration of the loop,
; so MayAlias is needed.
define void @foo([3 x [3 x double]]* noalias %p) {
entry:
%p3 = getelementptr [3 x [3 x double]]* %p, i64 0, i64 0, i64 3
br label %loop
loop:
%i = phi i64 [ 0, %entry ], [ %i.next, %loop ]
%p.0.i.0 = getelementptr [3 x [3 x double]]* %p, i64 0, i64 %i, i64 0
volatile store double 0.0, double* %p3
volatile store double 0.1, double* %p.0.i.0
%i.next = add i64 %i, 1
%cmp = icmp slt i64 %i.next, 3
br i1 %cmp, label %loop, label %exit
exit:
ret void
}