1 ; RUN: opt -mergefunc -S < %s | FileCheck %s
3 ; CHECK-LABEL: @int_ptr_arg_different
4 ; CHECK-NEXT: call void asm
6 ; CHECK-LABEL: @int_ptr_null
7 ; CHECK-NEXT: tail call void @float_ptr_null()
9 ; CHECK-LABEL: @int_ptr_arg_same
10 ; CHECK-NEXT: %2 = bitcast i32* %0 to float*
11 ; CHECK-NEXT: tail call void @float_ptr_arg_same(float* %2)
13 ; Used to satisfy minimum size limit
17 define void @float_ptr_null() {
18 call void asm "nop", "r"(float* null)
23 define void @int_ptr_null() {
24 call void asm "nop", "r"(i32* null)
29 ; Can be merged (uses same argument differing by pointer type)
30 define void @float_ptr_arg_same(float*) {
31 call void asm "nop", "r"(float* %0)
36 define void @int_ptr_arg_same(i32*) {
37 call void asm "nop", "r"(i32* %0)
42 ; Can not be merged (uses different arguments)
43 define void @float_ptr_arg_different(float*, float*) {
44 call void asm "nop", "r"(float* %0)
49 define void @int_ptr_arg_different(i32*, i32*) {
50 call void asm "nop", "r"(i32* %1)