1 ; RUN: opt -S -passes=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, ptr %i.addr, align 4
11 %0 = load i32, ptr %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, ptr %retval
20 %1 = load i32, ptr %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, ptr %retval
29 store i32 0, ptr %retval
33 %2 = load i32, ptr %retval
38 define internal ptr @Afunc(ptr %P) {
41 ret ptr blockaddress(@_Z1fi, %if.then.2)
44 define internal ptr @Bfunc(ptr %P) {
48 ret ptr blockaddress(@_Z1fi, %if.then.2)