reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
; RUN: opt -mergefunc -S < %s | FileCheck %s

; Weak functions too small for merging to be profitable

; CHECK: define weak i32 @foo(i8* %0, i32 %1)
; CHECK-NEXT: ret i32 %1
; CHECK: define weak i32 @bar(i8* %0, i32 %1)
; CHECK-NEXT: ret i32 %1

define weak i32 @foo(i8* %0, i32 %1) #0 {
    ret i32 %1
}

define weak i32 @bar(i8* %0, i32 %1) #0 {
    ret i32 %1
}