blob: 804124967a007f57cd23f119ea60e28d8be14bc4 [file] [log] [blame]
; RUN: opt -S -passes=mergefunc %s | FileCheck %s
@i = global i32 0
@f = global float 0.0
define internal void @foo() {
; CHECK: define internal void @foo()
call void @callee_i32(ptr byval(i32) @i)
ret void
}
define internal void @bar() {
; CHECK: define internal void @bar()
call void @callee_float(ptr byval(float) @f)
ret void
}
define internal void @baz() {
; CHECK-NOT: define{{.*}}@bar
call void @callee_float(ptr byval(float) @f)
ret void
}
define void @user() {
; CHECK-LABEL: define void @user
; CHECK: call void @foo()
; CHECK: call void @bar()
; CHECK: call void @bar()
call void @foo()
call void @bar()
call void @baz()
ret void
}
declare void @callee_i32(ptr byval(i32))
declare void @callee_float(ptr byval(float))