When removing a function from the function set and adding it to deferred, we
[llvm.git] / test / Integer / varargs_bt.ll
blob25ad58ad79345d04328e8cb9fabb2dae3aeab511
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
5 ; Demonstrate all of the variable argument handling intrinsic functions plus 
6 ; the va_arg instruction.
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)
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 
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