llvm-6502/test/CodeGen/ARM/vargs2.ll
Reid Spencer eacb7020ec For PR950:
Update the test suite to accommodate the change from signed integer types
to signless integer types. The changes were of only a few kinds:

1. Make sure llvm-upgrade is run on the source which does the bulk of the
   changes automatically.

2. Change things like "grep 'int'" to "grep 'i32'"

3. In several tests bitcasting caused the same name to be reused in the
   same type plane. These had to be manually fixed. The fix was (generally)
   to leave the bitcast and provide the instruction with a new name. This
   should not affect the semantics of the test. In a few cases, the
   bitcasts were known to be superfluous and irrelevant to the test case
   so they were removed.

4. One test case uses a bytecode file which needed to be updated to the
   latest bytecode format.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32789 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-31 06:02:00 +00:00

52 lines
2.1 KiB
LLVM

; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm
%str = internal constant [7 x ubyte] c"%d %d\0A\00" ; <[7 x ubyte]*> [#uses=1]
implementation ; Functions:
void %f(int %a_arg, ...) {
entry:
%a = cast int %a_arg to uint ; <uint> [#uses=1]
%l1 = alloca sbyte*, align 4 ; <sbyte**> [#uses=5]
%l2 = alloca sbyte*, align 4 ; <sbyte**> [#uses=4]
%memtmp = alloca sbyte* ; <sbyte**> [#uses=2]
call void %llvm.va_start( sbyte** %l1 )
%tmp22 = seteq int %a_arg, 0 ; <bool> [#uses=1]
%tmp23 = volatile load sbyte** %l1 ; <sbyte*> [#uses=2]
br bool %tmp22, label %bb8, label %bb
bb: ; preds = %bb, %entry
%indvar = phi uint [ 0, %entry ], [ %indvar.next, %bb ] ; <uint> [#uses=1]
%tmp.0 = phi sbyte* [ %tmp23, %entry ], [ %tmp, %bb ] ; <sbyte*> [#uses=2]
%tmp2 = getelementptr sbyte* %tmp.0, int 4 ; <sbyte*> [#uses=1]
volatile store sbyte* %tmp2, sbyte** %l1
%tmp3 = cast sbyte* %tmp.0 to int* ; <int*> [#uses=1]
%tmp = load int* %tmp3 ; <int> [#uses=1]
%tmp = volatile load sbyte** %l1 ; <sbyte*> [#uses=2]
%indvar.next = add uint %indvar, 1 ; <uint> [#uses=2]
%exitcond = seteq uint %indvar.next, %a ; <bool> [#uses=1]
br bool %exitcond, label %bb8, label %bb
bb8: ; preds = %bb, %entry
%p1.0.1 = phi int [ undef, %entry ], [ %tmp, %bb ] ; <int> [#uses=1]
%tmp.1 = phi sbyte* [ %tmp23, %entry ], [ %tmp, %bb ] ; <sbyte*> [#uses=1]
store sbyte* %tmp.1, sbyte** %memtmp
call void %llvm.va_copy( sbyte** %l2, sbyte** %memtmp )
%tmp10 = volatile load sbyte** %l2 ; <sbyte*> [#uses=2]
%tmp12 = getelementptr sbyte* %tmp10, int 4 ; <sbyte*> [#uses=1]
volatile store sbyte* %tmp12, sbyte** %l2
%tmp13 = cast sbyte* %tmp10 to int* ; <int*> [#uses=1]
%tmp14 = load int* %tmp13 ; <int> [#uses=1]
%tmp17 = call int (ubyte*, ...)* %printf( ubyte* getelementptr ([7 x ubyte]* %str, int 0, uint 0), int %p1.0.1, int %tmp14 ) ; <int> [#uses=0]
call void %llvm.va_end( sbyte** %l1 )
call void %llvm.va_end( sbyte** %l2 )
ret void
}
declare void %llvm.va_start(sbyte**)
declare void %llvm.va_copy(sbyte**, sbyte**)
declare int %printf(ubyte*, ...)
declare void %llvm.va_end(sbyte**)