1 ; RUN: opt -S -passes=wholeprogramdevirt -whole-program-visibility %s | FileCheck %s
3 target datalayout = "e-p:64:64"
4 target triple = "x86_64-unknown-linux-gnu"
6 @vt2 = constant [3 x ptr] [
12 define i1 @vf0i1(ptr %this) readnone {
16 define i1 @vf1i1(ptr %this) readnone {
20 define i32 @vf2i32(ptr %this) readnone {
24 ; CHECK: define i1 @call1(
25 define i1 @call1(ptr %obj) {
26 %vtable = load ptr, ptr %obj
27 %p = call i1 @llvm.type.test(ptr %vtable, metadata !"typeid")
28 call void @llvm.assume(i1 %p)
29 %p2 = call i1 @llvm.type.test(ptr %vtable, metadata !"typeid")
30 call void @llvm.assume(i1 %p2)
31 %fptr = load ptr, ptr %vtable
32 %result = call i1 %fptr(ptr %obj)
36 declare i1 @llvm.type.test(ptr, metadata)
37 declare void @llvm.assume(i1)
39 !0 = !{i32 0, !"typeid"}