1 ; RUN: opt -S -mergefunc < %s | FileCheck %s
3 ; RUN: opt -S -mergefunc < %s | FileCheck -check-prefix=NOPLUS %s
5 ; This makes sure that zeros in constants don't cause problems with string based
7 define internal i32 @sum(i32 %x, i32 %y) {
10 %1 = extractvalue [3 x i32] [ i32 3, i32 0, i32 2 ], 2
11 %sum2 = add i32 %sum, %1
12 %sum3 = add i32 %sum2, %y
16 define internal i32 @add(i32 %x, i32 %y) {
19 %1 = extractvalue [3 x i32] [ i32 3, i32 0, i32 1 ], 2
20 %sum2 = add i32 %sum, %1
21 %sum3 = add i32 %sum2, %y
25 define internal i32 @plus(i32 %x, i32 %y) {
28 %1 = extractvalue [3 x i32] [ i32 3, i32 0, i32 5 ], 2
29 %sum2 = add i32 %sum, %1
30 %sum3 = add i32 %sum2, %y
34 define internal i32 @next(i32 %x, i32 %y) {
37 %1 = extractvalue [3 x i32] [ i32 3, i32 0, i32 5 ], 2
38 %sum2 = add i32 %sum, %1
39 %sum3 = add i32 %sum2, %y