2019-04-17 06:52:47 +02:00
|
|
|
; RUN: opt -mergefunc -S < %s | FileCheck %s
|
|
|
|
|
|
|
|
; Weak functions too small for merging to be profitable
|
|
|
|
|
2019-08-03 16:28:34 +02:00
|
|
|
; CHECK: define weak i32 @foo(i8* %0, i32 %1)
|
2019-04-17 06:52:47 +02:00
|
|
|
; CHECK-NEXT: ret i32 %1
|
2019-08-03 16:28:34 +02:00
|
|
|
; CHECK: define weak i32 @bar(i8* %0, i32 %1)
|
2019-04-17 06:52:47 +02:00
|
|
|
; CHECK-NEXT: ret i32 %1
|
|
|
|
|
2019-08-03 16:28:34 +02:00
|
|
|
define weak i32 @foo(i8* %0, i32 %1) #0 {
|
2019-04-17 06:52:47 +02:00
|
|
|
ret i32 %1
|
|
|
|
}
|
|
|
|
|
2019-08-03 16:28:34 +02:00
|
|
|
define weak i32 @bar(i8* %0, i32 %1) #0 {
|
2019-04-17 06:52:47 +02:00
|
|
|
ret i32 %1
|
|
|
|
}
|