1 ; RUN: opt -S -lowertypetests < %s | FileCheck %s
3 ; Tests that non-string metadata nodes may be used as bitset identifiers.
5 target datalayout = "e-p:32:32"
7 ; CHECK: @[[ANAME:.*]] = private constant { i32 }
8 ; CHECK: @[[BNAME:.*]] = private constant { [2 x i32] }
10 @a = constant i32 1, !type !0
11 @b = constant [2 x i32] [i32 2, i32 3], !type !1
18 declare i1 @llvm.type.test(i8* %ptr, metadata %bitset) nounwind readnone
21 define i1 @foo(i8* %p) {
22 ; CHECK: icmp eq i32 {{.*}}, ptrtoint ({ i32 }* @[[ANAME]] to i32)
23 %x = call i1 @llvm.type.test(i8* %p, metadata !2)
28 define i1 @bar(i8* %p) {
29 ; CHECK: icmp eq i32 {{.*}}, ptrtoint ({ [2 x i32] }* @[[BNAME]] to i32)
30 %x = call i1 @llvm.type.test(i8* %p, metadata !3)