1 ; RUN: opt -S -passes=mergefunc < %s | FileCheck %s
3 ; Ensure that we do not merge functions that are identical with the
4 ; exception of the order of the incoming blocks to a phi.
6 ; CHECK-LABEL: define linkonce_odr hidden i1 @first(i2 %0)
7 define linkonce_odr hidden i1 @first(i2 %0) {
10 switch i2 %0, label %default [
24 %result = phi i1 [ true, %L1 ], [ false, %L2 ], [ false, %L3 ]
29 ; CHECK-LABEL: define linkonce_odr hidden i1 @second(i2 %0)
30 define linkonce_odr hidden i1 @second(i2 %0) {
33 switch i2 %0, label %default [
47 %result = phi i1 [ true, %L3 ], [ false, %L2 ], [ false, %L1 ]