Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FunctionComparator] Consider tail call kinds
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
- Loading branch information
Showing
2 changed files
with
32 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
; 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 | ||
} |