Essentially, do not treat `call` and `musttail call` as the same thing. As a drive-by, fold CallInst and InvokeInst handling together using the CallSite helper. Differential Revision: https://reviews.llvm.org/D56815 llvm-svn: 351405
22 lines
407 B
LLVM
22 lines
407 B
LLVM
; RUN: opt -mergefunc -S < %s | FileCheck %s
|
|
|
|
declare void @dummy()
|
|
|
|
; CHECK-LABEL: define{{.*}}@foo
|
|
; CHECK: call {{.*}}@dummy
|
|
; CHECK: musttail {{.*}}@dummy
|
|
define void @foo() {
|
|
call void @dummy()
|
|
musttail call void @dummy()
|
|
ret void
|
|
}
|
|
|
|
; CHECK-LABEL: define{{.*}}@bar
|
|
; CHECK: call {{.*}}@dummy
|
|
; CHECK: call {{.*}}@dummy
|
|
define void @bar() {
|
|
call void @dummy()
|
|
call void @dummy()
|
|
ret void
|
|
}
|