1 ; RUN: opt < %s -instcombine -S | FileCheck %s
3 define signext i32 @b(i32* inreg %x) {
11 declare void @useit(i32)
13 define void @d(i32 %x, ...) {
14 call void @useit(i32 %x)
18 define void @g(i32* %y) {
19 call i32 bitcast (i32 (i32*)* @b to i32 (i32)*)(i32 zeroext 0)
20 call void bitcast (void (...)* @c to void (i32*)*)(i32* %y)
21 call void bitcast (void (...)* @c to void (i32*)*)(i32* sret %y)
22 call void bitcast (void (i32, ...)* @d to void (i32, i32*)*)(i32 0, i32* sret %y)
25 ; CHECK-LABEL: define void @g(i32* %y)
26 ; CHECK: call i32 bitcast (i32 (i32*)* @b to i32 (i32)*)(i32 zeroext 0)
27 ; CHECK: call void (...) @c(i32* %y)
28 ; CHECK: call void bitcast (void (...)* @c to void (i32*)*)(i32* sret %y)
29 ; CHECK: call void bitcast (void (i32, ...)* @d to void (i32, i32*)*)(i32 0, i32* sret %y)