mirror of
https://github.com/RPCS3/llvm.git
synced 2024-11-28 14:10:55 +00:00
New testcase for printing out arguments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5085 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8a307e8c63
commit
1ada064803
44
test/ExecutionEngine/2002-12-16-ArgTest.ll
Normal file
44
test/ExecutionEngine/2002-12-16-ArgTest.ll
Normal file
@ -0,0 +1,44 @@
|
||||
%.LC0 = internal global [14 x sbyte] c"in getoptions\00" ; <[14 x sbyte]*> [#uses=1]
|
||||
|
||||
implementation ; Functions:
|
||||
|
||||
declare void %__main()
|
||||
|
||||
declare int %puts(sbyte*)
|
||||
|
||||
void %getoptions(int* %argc) {
|
||||
bb0: ; No predecessors!
|
||||
ret void
|
||||
}
|
||||
|
||||
int %main(int %argc, sbyte** %argv) {
|
||||
bb0: ; No predecessors!
|
||||
%cast224 = cast sbyte** %argv to sbyte* ; <sbyte*> [#uses=1]
|
||||
%local = alloca sbyte* ; <sbyte**> [#uses=3]
|
||||
store sbyte* %cast224, sbyte** %local
|
||||
call void %__main( )
|
||||
%cond226 = setle int %argc, 0 ; <bool> [#uses=1]
|
||||
br bool %cond226, label %bb3, label %bb2
|
||||
|
||||
bb2: ; preds = %bb2, %bb0
|
||||
%cann-indvar = phi int [ 0, %bb0 ], [ %add1-indvar, %bb2 ] ; <int> [#uses=2]
|
||||
%add1-indvar = add int %cann-indvar, 1 ; <int> [#uses=2]
|
||||
%cann-indvar-idxcast = cast int %cann-indvar to long ; <long> [#uses=1]
|
||||
;%reg115 = load sbyte** %local ; <sbyte*> [#uses=1]
|
||||
;%cann-indvar-idxcast-scale = mul long %cann-indvar-idxcast, 8 ; <long> [#uses=1]
|
||||
;%reg232 = getelementptr sbyte* %reg115, long %cann-indvar-idxcast-scale ; <sbyte*> [#uses=1]
|
||||
;%cast235 = cast sbyte* %reg232 to sbyte** ; <sbyte**> [#uses=1]
|
||||
%CT = cast sbyte** %local to sbyte***
|
||||
%reg115 = load sbyte*** %CT
|
||||
%cast235 = getelementptr sbyte** %reg115, long %cann-indvar-idxcast
|
||||
|
||||
%reg117 = load sbyte** %cast235 ; <sbyte*> [#uses=1]
|
||||
%reg236 = call int %puts( sbyte* %reg117 ) ; <int> [#uses=0]
|
||||
%cond239 = setlt int %add1-indvar, %argc ; <bool> [#uses=1]
|
||||
br bool %cond239, label %bb2, label %bb3
|
||||
|
||||
bb3: ; preds = %bb2, %bb0
|
||||
%cast243 = cast sbyte** %local to int* ; <int*> [#uses=1]
|
||||
call void %getoptions( int* %cast243 )
|
||||
ret int 0
|
||||
}
|
Loading…
Reference in New Issue
Block a user