1 ; RUN: opt < %s -deadargelim -S | FileCheck %s
3 define i32 @bar(i32 %A) {
4 call void (i32, ...) @thunk(i32 %A, i64 47, double 1.000000e+00)
5 %a = call i32 (i32, ...) @has_vastart(i32 %A, i64 47, double 1.000000e+00)
6 %b = call i32 (i32, ...) @no_vastart( i32 %A, i32 %A, i32 %A, i32 %A, i64 47, double 1.000000e+00 )
10 ; CHECK-LABEL: define i32 @bar
11 ; CHECK: call void (i32, ...) @thunk(i32 %A, i64 47, double 1.000000e+00)
12 ; CHECK: call i32 (i32, ...) @has_vastart(i32 %A, i64 47, double 1.000000e+00)
13 ; CHECK: call i32 @no_vastart(i32 %A)
15 declare void @thunk_target(i32 %X, ...)
17 define internal void @thunk(i32 %X, ...) {
18 musttail call void(i32, ...) @thunk_target(i32 %X, ...)
21 ; CHECK-LABEL: define internal void @thunk(i32 %X, ...)
22 ; CHECK: musttail call void (i32, ...) @thunk_target(i32 %X, ...)
24 define internal i32 @has_vastart(i32 %X, ...) {
26 call void @llvm.va_start(i8* %valist)
29 ; CHECK-LABEL: define internal i32 @has_vastart(i32 %X, ...)
31 declare void @llvm.va_start(i8*)
33 define internal i32 @no_vastart(i32 %X, ...) {
36 ; CHECK-LABEL: define internal i32 @no_vastart(i32 %X)