42 lines · plain
1; RUN: opt -S < %s | opt -S | FileCheck %s2 3; CHECK-DAG: %T1 = type { i8 }4; CHECK-DAG: %T2 = type { i8 }5; CHECK-DAG: %T3 = type { i8 }6; CHECK-DAG: %T4 = type { i8 }7; CHECK-DAG: %T5 = type { i8 }8; CHECK-DAG: %T6 = type { i8 }9; CHECK-DAG: %T7 = type { i8 }10; CHECK-DAG: %T8 = type { i8 }11 12%T1 = type { i8 }13%T2 = type { i8 }14%T3 = type { i8 }15%T4 = type { i8 }16%T5 = type { i8 }17%T6 = type { i8 }18%T7 = type { i8 }19%T8 = type { i8 }20 21@g = external global %T122 23@g.ifunc = ifunc %T8 (), ptr @f.resolver24 25define %T2 @f(ptr %p) {26 alloca %T327 getelementptr %T4, ptr %p, i64 128 call void @f(ptr sret(%T5) %p)29 store ptr getelementptr (%T6, ptr @g, i64 1), ptr %p30 unreachable31}32 33define ptr @f.resolver(ptr %p) {34 alloca %T335 getelementptr %T4, ptr %p, i64 136 call void @f(ptr sret(%T5) %p)37 store ptr getelementptr (%T6, ptr @g, i64 1), ptr %p38 unreachable39}40 41declare void @f2(ptr sret(%T7))42