2 source_filename = "foo.cpp"
3 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
4 target triple = "x86_64-unknown-linux-gnu"
6 %struct.A = type { i32 (...)** }
8 ; Function Attrs: uwtable
9 define hidden i32 @_Z3fooP1A(%struct.A* %pA) local_unnamed_addr {
11 %0 = bitcast %struct.A* %pA to i32 (%struct.A*)***
12 %vtable = load i32 (%struct.A*)**, i32 (%struct.A*)*** %0, align 8, !tbaa !2
13 %1 = bitcast i32 (%struct.A*)** %vtable to i8*
14 %2 = tail call i1 @llvm.type.test(i8* %1, metadata !"_ZTS1A")
15 tail call void @llvm.assume(i1 %2)
16 %3 = load i32 (%struct.A*)*, i32 (%struct.A*)** %vtable, align 8
17 %call = tail call i32 %3(%struct.A* %pA)
18 %add = add nsw i32 %call, 10
22 ; Function Attrs: nounwind readnone willreturn
23 declare i1 @llvm.type.test(i8*, metadata)
25 ; Function Attrs: nounwind willreturn
26 declare void @llvm.assume(i1)
28 !llvm.module.flags = !{!0}
31 !0 = !{i32 1, !"wchar_size", i32 4}
32 !1 = !{!"clang version 10.0.0 (trunk 373596)"}
34 !3 = !{!"vtable pointer", !4, i64 0}
35 !4 = !{!"Simple C++ TBAA"}