1 ; RUN: opt -S -lowertypetests < %s | FileCheck %s
2 ; RUN: opt -S -passes=lowertypetests < %s | FileCheck %s
4 target datalayout = "e-p:32:32"
6 @a = constant i32 1, !type !0
7 @b = constant [2 x i32] [i32 2, i32 3], !type !1
9 !0 = !{i32 0, !"typeid1"}
10 !1 = !{i32 4, !"typeid1"}
12 declare i1 @llvm.type.test(i8* %ptr, metadata %bitset) nounwind readnone
17 %x = call i1 @llvm.type.test(i8* bitcast (i32* @a to i8*), metadata !"typeid1")
24 %x = call i1 @llvm.type.test(i8* bitcast (i32* getelementptr ([2 x i32], [2 x i32]* @b, i32 0, i32 1) to i8*), metadata !"typeid1")
30 ; CHECK-NOT: ret i1 true
31 %x = call i1 @llvm.type.test(i8* bitcast (i32* getelementptr ([2 x i32], [2 x i32]* @b, i32 0, i32 0) to i8*), metadata !"typeid1")