1 ; RUN: opt -S -mergefunc < %s | FileCheck %s
3 ; We should normalize to test2 rather than test1,
4 ; because it allows us to drop test1 entirely
6 ; CHECK-NOT: define internal void @test1() unnamed_addr
7 ; CHECK: define void @test3() unnamed_addr
8 ; CHECK-NEXT: call void @test2()
9 ; CHECK-NEXT: call void @test2()
13 define internal void @test1() unnamed_addr {
19 define void @test2() unnamed_addr {
25 define void @test3() unnamed_addr {
31 ; We should normalize to the existing test6 rather than
32 ; to a new anonymous strong backing function
34 ; CHECK: define weak void @test5()
35 ; CHECK-NEXT: tail call void @test6()
36 ; CHECK: define weak void @test4()
37 ; CHECK-NEXT: tail call void @test6()
39 declare void @dummy2()
41 define weak void @test4() {
46 define weak void @test5() {
51 define void @test6() {