30 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2;; Check the cases involving dso_local_equivalent where we do expect functions to be merged.3; RUN: opt -S -passes=mergefunc < %s | FileCheck %s4 5; CHECK-NOT: @b6 7@x = constant { ptr, ptr } { ptr @a, ptr @b }8; CHECK: { ptr @a, ptr @a }9 10define i32 @func() {11; CHECK-LABEL: @func(12; CHECK-NEXT: ret i32 013;14 ret i32 015}16 17define internal i32 @a() unnamed_addr {18; CHECK-LABEL: @a(19; CHECK-NEXT: [[TMP1:%.*]] = call i32 dso_local_equivalent @func()20; CHECK-NEXT: ret i32 [[TMP1]]21;22 %1 = call i32 dso_local_equivalent @func()23 ret i32 %124}25 26define internal i32 @b() unnamed_addr {27 %1 = call i32 dso_local_equivalent @func()28 ret i32 %129}30