1 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
2 target triple = "x86_64-grtev4-linux-gnu"
4 %struct.B2 = type { %struct.A2 }
5 %struct.A2 = type { i32 (...)** }
6 %struct.B3 = type { %struct.A3 }
7 %struct.A3 = type { i32 (...)** }
9 @_ZTV1B2 = constant { [3 x i8*] } { [3 x i8*] [i8* undef, i8* undef, i8* undef] }, !type !0
11 @_ZTV1B3 = constant { [3 x i8*] } { [3 x i8*] [i8* undef, i8* undef, i8* undef] }, !type !1
13 define void @test2(i8* %b) {
15 %0 = bitcast i8* %b to i8**
16 %vtable2 = load i8*, i8** %0
17 %1 = tail call i1 @llvm.type.test(i8* %vtable2, metadata !"_ZTS1A2")
18 br i1 %1, label %cont, label %trap
21 tail call void @llvm.trap()
28 define void @test1(i8* %b) {
30 %0 = bitcast i8* %b to i8**
31 %vtable2 = load i8*, i8** %0
32 %1 = tail call i1 @llvm.type.test(i8* %vtable2, metadata !"_ZTS1A3")
33 br i1 %1, label %cont, label %trap
36 tail call void @llvm.trap()
43 @test3 = hidden unnamed_addr alias void (i8*), void (i8*)* @test1
45 declare i1 @llvm.type.test(i8*, metadata)
46 declare void @llvm.trap()
48 !0 = !{i64 16, !"_ZTS1A2"}
49 !1 = !{i64 16, !"_ZTS1A3"}