1; RUN: opt -S -globalsplit %s | FileCheck %s
2
3target datalayout = "e-p:64:64"
4target triple = "x86_64-unknown-linux-gnu"
5
6; CHECK: @global =
7@global = constant { [2 x i8* ()*], [1 x i8* ()*] } {
8  [2 x i8* ()*] [i8* ()* @f, i8* ()* @g],
9  [1 x i8* ()*] [i8* ()* @h]
10}
11
12define i8* @f() {
13  ret i8* bitcast (i8* ()** getelementptr ({ [2 x i8* ()*], [1 x i8* ()*] }, { [2 x i8* ()*], [1 x i8* ()*] }* @global, i32 0, inrange i32 0, i32 0) to i8*)
14}
15
16define i8* @g() {
17  ret i8* null
18}
19
20define i8* @h() {
21  ret i8* null
22}
23
24define void @foo() {
25  %p = call i1 @llvm.type.test(i8* null, metadata !"")
26  ret void
27}
28
29declare i1 @llvm.type.test(i8*, metadata) nounwind readnone
30