~pali/+junk/llvm-toolchain-3.7

« back to all changes in this revision

Viewing changes to test/Transforms/MergeFunc/functions.ll

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2015-07-15 17:51:08 UTC
  • Revision ID: package-import@ubuntu.com-20150715175108-l8mynwovkx4zx697
Tags: upstream-3.7~+rc2
ImportĀ upstreamĀ versionĀ 3.7~+rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
; RUN: opt -S -mergefunc < %s | FileCheck %s
 
2
 
 
3
; Be sure we don't merge cross-referenced functions of same type.
 
4
 
 
5
; CHECK-LABEL: @left
 
6
; CHECK-LABEL: entry-block
 
7
; CHECK-LABEL: call void @right(i64 %p)
 
8
define void @left(i64 %p) {
 
9
entry-block:
 
10
  call void @right(i64 %p)
 
11
  call void @right(i64 %p)
 
12
  call void @right(i64 %p)
 
13
  call void @right(i64 %p)
 
14
  ret void
 
15
}
 
16
 
 
17
; CHECK-LABEL: @right
 
18
; CHECK-LABEL: entry-block
 
19
; CHECK-LABEL: call void @left(i64 %p)
 
20
define void @right(i64 %p) {
 
21
entry-block:
 
22
  call void @left(i64 %p)
 
23
  call void @left(i64 %p)
 
24
  call void @left(i64 %p)
 
25
  call void @left(i64 %p)
 
26
  ret void
 
27
}