blob: c42e0fad438ba11247835a3dfc795915e5bdadf1 [file] [log] [blame]
Andreas Bolka5771ed92009-06-30 02:12:10 +00001; RUN: llvm-as < %s | opt -disable-output -analyze -lda > %t
2; RUN: grep {instructions: 2} %t | count 1
3; RUN: grep {0,1: dependent} %t | count 1
4
5; x[5] = x[6] // with x being an array on the stack
6
7define void @foo(...) nounwind {
8entry:
9 %xptr = alloca [256 x i32], align 4
10 %x.ld.addr = getelementptr [256 x i32]* %xptr, i64 0, i64 6
11 %x.st.addr = getelementptr [256 x i32]* %xptr, i64 0, i64 5
12 br label %for.body
13
14for.body:
15 %i = phi i64 [ 0, %entry ], [ %i.next, %for.body ]
16 %x = load i32* %x.ld.addr
17 store i32 %x, i32* %x.st.addr
18 %i.next = add i64 %i, 1
19 %exitcond = icmp eq i64 %i.next, 256
20 br i1 %exitcond, label %for.end, label %for.body
21
22for.end:
23 ret void
24}