41 lines · plain
1; RUN: opt -passes=mergefunc -disable-output < %s2 3; A linked list type and simple payload4%LL = type { %S, ptr }5%S = type { ptr }6 7; Table refers to itself via GEP8@Table = internal global [3 x %LL] [%LL { %S { ptr @B }, ptr @Table }, %LL { %S { ptr @A }, ptr @Table }, %LL { %S { ptr @A }, ptr @Table }], align 169 10; The body of this is irrelevant; it is long so that mergefunc doesn't skip it as a small function.11define internal void @A(ptr %self, i32 %a) {12 %1 = add i32 %a, 3213 %2 = add i32 %1, 3214 %3 = add i32 %2, 3215 %4 = add i32 %3, 3216 %5 = add i32 %4, 3217 %6 = add i32 %5, 3218 %7 = add i32 %6, 3219 %8 = add i32 %7, 3220 %9 = add i32 %8, 3221 %10 = add i32 %9, 3222 %11 = add i32 %10, 3223 ret void24}25 26define internal void @B(ptr %self, i32 %a) {27 %1 = add i32 %a, 3228 %2 = add i32 %1, 3229 %3 = add i32 %2, 3230 %4 = add i32 %3, 3231 %5 = add i32 %4, 3232 %6 = add i32 %5, 3233 %7 = add i32 %6, 3234 %8 = add i32 %7, 3235 %9 = add i32 %8, 3236 %10 = add i32 %9, 3237 %11 = add i32 %10, 3238 ret void39}40 41