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 } 28