1 ; RUN: opt -S -mergefunc < %s | FileCheck %s
3 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
4 target triple = "x86_64-unknown-linux-gnu"
6 define i32 @_Z1fi(i32 %i) #0 {
8 %retval = alloca i32, align 4
9 %i.addr = alloca i32, align 4
10 store i32 %i, i32* %i.addr, align 4
11 %0 = load i32, i32* %i.addr, align 4
12 %cmp = icmp eq i32 %0, 1
13 br i1 %cmp, label %if.then, label %if.end
16 store i32 3, i32* %retval
20 %1 = load i32, i32* %i.addr, align 4
21 %cmp1 = icmp eq i32 %1, 3
22 br i1 %cmp1, label %if.then.2, label %if.end.3
25 store i32 56, i32* %retval
29 store i32 0, i32* %retval
33 %2 = load i32, i32* %retval
38 define internal i8* @Afunc(i32* %P) {
41 ret i8* blockaddress(@_Z1fi, %if.then.2)
44 define internal i8* @Bfunc(i32* %P) {
48 ret i8* blockaddress(@_Z1fi, %if.then.2)