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