1; RUN: opt < %s -cfl-aa -aa-eval -print-may-aliases -disable-output 2>&1 | FileCheck %s
2
3; CHECK-LABEL: Function: test1
4; CHECK: 0 no alias responses
5
6define i32 @test1(i32 %X, ...) {
7  ; Initialize variable argument processing
8  %ap = alloca i8*
9  %ap2 = bitcast i8** %ap to i8*
10  call void @llvm.va_start(i8* %ap2)
11
12  ; Read a single integer argument
13  %tmp = va_arg i8** %ap, i32
14
15  ; Demonstrate usage of llvm.va_copy and llvm.va_end
16  %aq = alloca i8*
17  %aq2 = bitcast i8** %aq to i8*
18  call void @llvm.va_copy(i8* %aq2, i8* %ap2)
19  call void @llvm.va_end(i8* %aq2)
20
21  ; Stop processing of arguments.
22  call void @llvm.va_end(i8* %ap2)
23  ret i32 %tmp
24}
25
26declare void @llvm.va_start(i8*)
27declare void @llvm.va_copy(i8*, i8*)
28declare void @llvm.va_end(i8*)
29
30