1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00
llvm-mirror/test/Transforms/MergeFunc/merge-small-unnamed-addr.ll
whitequark 35489f6916 [MergeFunctions] Merge small functions if possible without a thunk.
This can result in significant code size savings in some cases,
e.g. an interrupt table all filled with the same assembly stub
in a certain Cortex-M BSP results in code blowup by a factor of 2.5.

Differential Revision: https://reviews.llvm.org/D34806

llvm-svn: 315853
2017-10-15 12:29:09 +00:00

15 lines
277 B
LLVM

; RUN: opt -S -mergefunc < %s | FileCheck %s
; CHECK-NOT: @b
@x = constant { void ()*, void ()* } { void ()* @a, void ()* @b }
; CHECK: { void ()* @a, void ()* @a }
define internal void @a() unnamed_addr {
ret void
}
define internal void @b() unnamed_addr {
ret void
}