1 ; RUN: opt -passes=mergefunc -S < %s | FileCheck %s
3 ; CHECK-LABEL: @int_ptr_arg_different
4 ; CHECK-NEXT: call void asm
6 ; CHECK-DAG: @int_ptr_null
7 ; CHECK-DAG: tail call void @float_ptr_null()
9 ; CHECK-DAG: @int_ptr_arg_same
10 ; CHECK-DAG: tail call void @float_ptr_arg_same(ptr %0)
12 ; Used to satisfy minimum size limit
16 define void @float_ptr_null() {
17 call void asm "nop", "r"(ptr null)
22 define void @int_ptr_null() {
23 call void asm "nop", "r"(ptr null)
28 ; Can be merged (uses same argument differing by pointer type)
29 define void @float_ptr_arg_same(ptr) {
30 call void asm "nop", "r"(ptr %0)
35 define void @int_ptr_arg_same(ptr) {
36 call void asm "nop", "r"(ptr %0)
41 ; Can not be merged (uses different arguments)
42 define void @float_ptr_arg_different(ptr, ptr) {
43 call void asm "nop", "r"(ptr %0)
48 define void @int_ptr_arg_different(ptr, ptr) {
49 call void asm "nop", "r"(ptr %1)