1 ; 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)}
8 %Arr = external global [0 x int] ; <[0 x int]*> [#uses=2]
10 implementation ; Functions:
12 void %foo(int %N.in) {
14 %N = cast int %N.in to uint ; <uint> [#uses=1]
17 cond_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
26 return: ; preds = %cond_true, %entry