1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00
llvm-mirror/test/Transforms/MergeFunc/fold-weak.ll
Nick Lewycky b20b284b35 Teach mergefunc how to emit aliases safely again -- but keep it turned it off
for now. It's controlled by the HasGlobalAliases variable which is not attached
to any flag yet.

llvm-svn: 124182
2011-01-25 08:56:50 +00:00

18 lines
409 B
LLVM

; RUN: opt < %s -mergefunc -S > %t
; RUN: grep {define weak} %t | count 2
; RUN: grep {call} %t | count 2
; XFAIL: *
; This test is off for a bit as we change this particular sort of folding to
; only apply on ELF systems and not Mach-O systems.
define weak i32 @sum(i32 %x, i32 %y) {
%sum = add i32 %x, %y
ret i32 %sum
}
define weak i32 @add(i32 %x, i32 %y) {
%sum = add i32 %x, %y
ret i32 %sum
}