1 ; RUN: llvm-dis < %s.bc| FileCheck %s
2 ; RUN: verify-uselistorder < %s.bc
4 ; vaArgIntrinsic.3.2.ll.bc was generated by passing this file to llvm-as-3.2.
5 ; The test checks that LLVM does not misread variable argument intrinsic instructions
6 ; of older bitcode files.
8 define i32 @varArgIntrinsic(i32 %X, ...) {
11 %ap2 = bitcast i8** %ap to i8*
13 ; CHECK: call void @llvm.va_start(i8* %ap2)
14 call void @llvm.va_start(i8* %ap2)
16 ; CHECK-NEXT: %tmp = va_arg i8** %ap, i32
17 %tmp = va_arg i8** %ap, i32
20 %aq2 = bitcast i8** %aq to i8*
22 ; CHECK: call void @llvm.va_copy(i8* %aq2, i8* %ap2)
23 call void @llvm.va_copy(i8* %aq2, i8* %ap2)
24 ; CHECK-NEXT: call void @llvm.va_end(i8* %aq2)
25 call void @llvm.va_end(i8* %aq2)
27 ; CHECK-NEXT: call void @llvm.va_end(i8* %ap2)
28 call void @llvm.va_end(i8* %ap2)
32 declare void @llvm.va_start(i8*)
33 declare void @llvm.va_copy(i8*, i8*)
34 declare void @llvm.va_end(i8*)