You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
512 B

; RUN: opt -S -mergefunc %s | FileCheck %s
; CHECK-LABEL: define void @foo
; CHECK: call void %bc
define void @foo(i8* byval(i8) %a0, i8* swiftself %a4) {
entry:
%bc = bitcast i8* %a0 to void (i8*, i8*)*
call void %bc(i8* byval(i8) %a0, i8* swiftself %a4)
ret void
}
; CHECK-LABEL: define void @bar
; CHECK: call void %bc
define void @bar(i8* byval(i8) %a0, i8** swifterror %a4) {
entry:
%bc = bitcast i8* %a0 to void (i8*, i8**)*
call void %bc(i8* byval(i8) %a0, i8** swifterror %a4)
ret void
}