mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-15 23:57:48 +00:00
Added functions cross-reference test.
Originally this similar was initiated by Björn Steinbrink here: http://reviews.llvm.org/D3437 Bug itself has been fixed by principal changes in MergeFunctions. Though special checks for functions merging are still actual. And the test has been accepted with slight modifications. llvm-svn: 210486
This commit is contained in:
parent
a9e2748af6
commit
d55da90a63
27
test/Transforms/MergeFunc/functions.ll
Normal file
27
test/Transforms/MergeFunc/functions.ll
Normal file
@ -0,0 +1,27 @@
|
||||
; RUN: opt -S -mergefunc < %s | FileCheck %s
|
||||
|
||||
; Be sure we don't merge cross-referenced functions of same type.
|
||||
|
||||
; CHECK-LABEL: @left
|
||||
; CHECK-LABEL: entry-block
|
||||
; CHECK-LABEL: call void @right(i64 %p)
|
||||
define void @left(i64 %p) {
|
||||
entry-block:
|
||||
call void @right(i64 %p)
|
||||
call void @right(i64 %p)
|
||||
call void @right(i64 %p)
|
||||
call void @right(i64 %p)
|
||||
ret void
|
||||
}
|
||||
|
||||
; CHECK-LABEL: @right
|
||||
; CHECK-LABEL: entry-block
|
||||
; CHECK-LABEL: call void @left(i64 %p)
|
||||
define void @right(i64 %p) {
|
||||
entry-block:
|
||||
call void @left(i64 %p)
|
||||
call void @left(i64 %p)
|
||||
call void @left(i64 %p)
|
||||
call void @left(i64 %p)
|
||||
ret void
|
||||
}
|
Loading…
Reference in New Issue
Block a user