blob: 2c37b4d8856b60a244fc627096a0c319d7374b1b [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; RUN: llvm-upgrade < %s | llvm-as | \
2; RUN: llc -relocation-model=dynamic-no-pic -mtriple=i686-apple-darwin8.7.2 |\
3; RUN: grep L_Arr.non_lazy_ptr
4; RUN: llvm-upgrade < %s | llvm-as | \
5; RUN: llc -relocation-model=dynamic-no-pic -mtriple=i686-apple-darwin8.7.2 |\
6; RUN: %prcontext L_Arr.non_lazy_ptr 1 | grep {4(%esp)}
7
8%Arr = external global [0 x int] ; <[0 x int]*> [#uses=2]
9
10implementation ; Functions:
11
12void %foo(int %N.in) {
13entry:
14 %N = cast int %N.in to uint ; <uint> [#uses=1]
15 br label %cond_true
16
17cond_true: ; preds = %cond_true, %entry
18 %indvar = phi uint [ 0, %entry ], [ %indvar.next, %cond_true ] ; <uint> [#uses=3]
19 %i.0.0 = cast uint %indvar to int ; <int> [#uses=1]
20 %tmp = getelementptr [0 x int]* %Arr, int 0, int %i.0.0
21 store int %i.0.0, int* %tmp
22 %indvar.next = add uint %indvar, 1 ; <uint> [#uses=2]
23 %exitcond = seteq uint %indvar.next, %N ; <bool> [#uses=1]
24 br bool %exitcond, label %return, label %cond_true
25
26return: ; preds = %cond_true, %entry
27 ret void
28}
29