1; RUN: opt < %s -instcombine -S | FileCheck %s 2 3define signext i32 @b(i32* inreg %x) { 4 ret i32 0 5} 6 7define void @c(...) { 8 ret void 9} 10 11declare void @useit(i32) 12 13define void @d(i32 %x, ...) { 14 call void @useit(i32 %x) 15 ret void 16} 17 18define 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) 23 ret void 24} 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) 30