Rename the last test with .llx extension to .ll, resolve duplicate test by renaming...
[oota-llvm.git] / test / Integer / varargs_bt.ll
1 ; RUN: llvm-as %s -o - | llvm-dis > %t1.ll; 
2 ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
3 ; RUN: diff %t1.ll %t2.ll
4
5 ; Demonstrate all of the variable argument handling intrinsic functions plus 
6 ; the va_arg instruction.
7
8 declare void @llvm.va_start(i8** %ap)
9 declare void @llvm.va_copy(i8** %aq, i8** %ap)
10 declare void @llvm.va_end(i8** %ap)
11
12 define i33 @test(i33 %X, ...) {
13         %ap = alloca i8*
14         call void @llvm.va_start(i8** %ap)
15         %tmp = va_arg i8** %ap, i33 
16
17         %aq = alloca i8*
18         call void @llvm.va_copy(i8** %aq, i8** %ap)
19         call void @llvm.va_end(i8** %aq)
20         
21         call void @llvm.va_end(i8** %ap)
22         ret i33 %tmp
23 }