While working on the pool allocator, I noticed that basicaa is failing a scary
[oota-llvm.git] / test / ExecutionEngine / 2002-12-16-ArgTest.ll
1 %.LC0 = internal global [10 x sbyte] c"argc: %d\0A\00"
2
3 implementation   ; Functions:
4
5 declare int %puts(sbyte*)
6
7 void %getoptions(int* %argc) {
8 bb0:            ; No predecessors!
9         ret void
10 }
11
12 declare int %printf(sbyte*, ...)
13
14 int %main(int %argc, sbyte** %argv) {
15 bb0:            ; No predecessors!
16         call int (sbyte*, ...)* %printf( sbyte* getelementptr ([10 x sbyte]* %.LC0, long 0, long 0), int %argc)
17         %cast224 = cast sbyte** %argv to sbyte*         ; <sbyte*> [#uses=1]
18         %local = alloca sbyte*          ; <sbyte**> [#uses=3]
19         store sbyte* %cast224, sbyte** %local
20         %cond226 = setle int %argc, 0           ; <bool> [#uses=1]
21         br bool %cond226, label %bb3, label %bb2
22
23 bb2:            ; preds = %bb2, %bb0
24         %cann-indvar = phi int [ 0, %bb0 ], [ %add1-indvar, %bb2 ]              ; <int> [#uses=2]
25         %add1-indvar = add int %cann-indvar, 1          ; <int> [#uses=2]
26         %cann-indvar-idxcast = cast int %cann-indvar to long            ; <long> [#uses=1]
27         ;%reg115 = load sbyte** %local          ; <sbyte*> [#uses=1]
28         ;%cann-indvar-idxcast-scale = mul long %cann-indvar-idxcast, 8          ; <long> [#uses=1]
29         ;%reg232 = getelementptr sbyte* %reg115, long %cann-indvar-idxcast-scale                ; <sbyte*> [#uses=1]
30         ;%cast235 = cast sbyte* %reg232 to sbyte**              ; <sbyte**> [#uses=1]
31         %CT = cast sbyte**  %local to sbyte***
32         %reg115 = load sbyte*** %CT
33         %cast235 = getelementptr sbyte** %reg115, long %cann-indvar-idxcast
34
35         %reg117 = load sbyte** %cast235         ; <sbyte*> [#uses=1]
36         %reg236 = call int %puts( sbyte* %reg117 )              ; <int> [#uses=0]
37         %cond239 = setlt int %add1-indvar, %argc                ; <bool> [#uses=1]
38         br bool %cond239, label %bb2, label %bb3
39
40 bb3:            ; preds = %bb2, %bb0
41         %cast243 = cast sbyte** %local to int*          ; <int*> [#uses=1]
42         call void %getoptions( int* %cast243 )
43         ret int 0
44 }