1 ; RUN: opt -S -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)
7 define linkonce_odr hidden i1 @first(i2) {
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)
30 define linkonce_odr hidden i1 @second(i2) {
33 switch i2 %0, label %default [
47 %result = phi i1 [ true, %L3 ], [ false, %L2 ], [ false, %L1 ]