blob: 23e4d33c3a9f5462917b45a07e753d68182a5940 [file] [log] [blame]
Dan Gohmanf2f6ce62009-09-11 18:01:28 +00001; RUN: opt < %s -mergefunc -S > %t
Nick Lewycky8728d7a2009-06-12 15:56:56 +00002; RUN: grep {define weak} %t | count 2
3; RUN: grep {call} %t | count 2
Nick Lewyckyb38824f2011-01-25 08:56:50 +00004; XFAIL: *
5
6; This test is off for a bit as we change this particular sort of folding to
7; only apply on ELF systems and not Mach-O systems.
Nick Lewycky8728d7a2009-06-12 15:56:56 +00008
9define weak i32 @sum(i32 %x, i32 %y) {
10 %sum = add i32 %x, %y
11 ret i32 %sum
12}
13
14define weak i32 @add(i32 %x, i32 %y) {
15 %sum = add i32 %x, %y
16 ret i32 %sum
17}