summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/MergeFunc/fold-weak.ll
blob: 5598c250ec3c6d7ab8fe0fb700b52f417b687ce3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
; RUN: opt %s -mergefunc | llvm-dis > %t
; RUN: grep {define weak} %t | count 2
; RUN: grep {call} %t | count 2

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
}
OpenPOWER on IntegriCloud