llvm-mirror/test/Transforms/MergeFunc/weak-small.ll
Tim Northover e5745c32fd IR: print value numbers for unnamed function arguments
For consistency with normal instructions and clarity when reading IR,
it's best to print the %0, %1, ... names of function arguments in
definitions.

Also modifies the parser to accept IR in that form for obvious reasons.

llvm-svn: 367755
2019-08-03 14:28:34 +00:00

17 lines
365 B
LLVM

; 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
}