53 lines · plain
1; RUN: opt -passes=mergefunc -S < %s | FileCheck %s2 3; CHECK-LABEL: @int_ptr_arg_different4; CHECK-NEXT: call void asm5 6; CHECK-DAG: @int_ptr_null7; CHECK-DAG: tail call void @float_ptr_null()8 9; CHECK-DAG: @int_ptr_arg_same10; CHECK-DAG: tail call void @float_ptr_arg_same(ptr %0)11 12; Used to satisfy minimum size limit13declare void @stuff()14 15; Can be merged16define void @float_ptr_null() {17 call void asm "nop", "r"(ptr null)18 call void @stuff()19 ret void20}21 22define void @int_ptr_null() {23 call void asm "nop", "r"(ptr null)24 call void @stuff()25 ret void26}27 28; Can be merged (uses same argument differing by pointer type)29define void @float_ptr_arg_same(ptr) {30 call void asm "nop", "r"(ptr %0)31 call void @stuff()32 ret void33}34 35define void @int_ptr_arg_same(ptr) {36 call void asm "nop", "r"(ptr %0)37 call void @stuff()38 ret void39}40 41; Can not be merged (uses different arguments)42define void @float_ptr_arg_different(ptr, ptr) {43 call void asm "nop", "r"(ptr %0)44 call void @stuff()45 ret void46}47 48define void @int_ptr_arg_different(ptr, ptr) {49 call void asm "nop", "r"(ptr %1)50 call void @stuff()51 ret void52}53