blob: 4260a2e570d16a49d63ba412483e8a2bc6cebe5c [file] [log] [blame]
Eric Christophercee313d2019-04-17 04:52:47 +00001; RUN: opt -wholeprogramdevirt -wholeprogramdevirt-summary-action=export -wholeprogramdevirt-read-summary=%S/Inputs/export.yaml -wholeprogramdevirt-write-summary=%t -S -o - %s | FileCheck %s
2; RUN: FileCheck --check-prefix=SUMMARY %s < %t
3
4; SUMMARY-NOT: TypeTests:
5
6; SUMMARY: TypeIdMap:
7; SUMMARY-NEXT: typeid3:
8; SUMMARY-NEXT: TTRes:
9; SUMMARY-NEXT: Kind: Unsat
10; SUMMARY-NEXT: SizeM1BitWidth: 0
11; SUMMARY-NEXT: AlignLog2: 0
12; SUMMARY-NEXT: SizeM1: 0
13; SUMMARY-NEXT: BitMask: 0
14; SUMMARY-NEXT: InlineBits: 0
15; SUMMARY-NEXT: WPDRes:
16; SUMMARY-NEXT: 0:
17; SUMMARY-NEXT: Kind: Indir
18; SUMMARY-NEXT: SingleImplName: ''
19; SUMMARY-NEXT: ResByArg:
20; SUMMARY-NEXT: 12,24:
21; SUMMARY-NEXT: Kind: UniqueRetVal
22; SUMMARY-NEXT: Info: 0
23; SUMMARY-NEXT: Byte: 0
24; SUMMARY-NEXT: Bit: 0
25; SUMMARY-NEXT: typeid4:
26; SUMMARY-NEXT: TTRes:
27; SUMMARY-NEXT: Kind: Unsat
28; SUMMARY-NEXT: SizeM1BitWidth: 0
29; SUMMARY-NEXT: AlignLog2: 0
30; SUMMARY-NEXT: SizeM1: 0
31; SUMMARY-NEXT: BitMask: 0
32; SUMMARY-NEXT: InlineBits: 0
33; SUMMARY-NEXT: WPDRes:
34; SUMMARY-NEXT: 0:
35; SUMMARY-NEXT: Kind: Indir
36; SUMMARY-NEXT: SingleImplName: ''
37; SUMMARY-NEXT: ResByArg:
38; SUMMARY-NEXT: 24,12:
39; SUMMARY-NEXT: Kind: UniqueRetVal
40; SUMMARY-NEXT: Info: 1
41; SUMMARY-NEXT: Byte: 0
42; SUMMARY-NEXT: Bit: 0
43
44; CHECK: @vt3a = constant i1 (i8*, i32, i32)* @vf3a
45@vt3a = constant i1 (i8*, i32, i32)* @vf3a, !type !0
46
47; CHECK: @vt3b = constant i1 (i8*, i32, i32)* @vf3b
48@vt3b = constant i1 (i8*, i32, i32)* @vf3b, !type !0
49
50; CHECK: @vt3c = constant i1 (i8*, i32, i32)* @vf3c
51@vt3c = constant i1 (i8*, i32, i32)* @vf3c, !type !0
52
53; CHECK: @vt4a = constant i1 (i8*, i32, i32)* @vf4a
54@vt4a = constant i1 (i8*, i32, i32)* @vf4a, !type !1
55
56; CHECK: @vt4b = constant i1 (i8*, i32, i32)* @vf4b
57@vt4b = constant i1 (i8*, i32, i32)* @vf4b, !type !1
58
59; CHECK: @vt4c = constant i1 (i8*, i32, i32)* @vf4c
60@vt4c = constant i1 (i8*, i32, i32)* @vf4c, !type !1
61
62; CHECK: @__typeid_typeid3_0_12_24_unique_member = hidden alias i8, bitcast (i1 (i8*, i32, i32)** @vt3b to i8*)
63; CHECK: @__typeid_typeid4_0_24_12_unique_member = hidden alias i8, bitcast (i1 (i8*, i32, i32)** @vt4b to i8*)
64
65define i1 @vf3a(i8*, i32, i32) {
66 ret i1 true
67}
68
69define i1 @vf3b(i8*, i32, i32) {
70 ret i1 false
71}
72
73define i1 @vf3c(i8*, i32, i32) {
74 ret i1 true
75}
76
77define i1 @vf4a(i8*, i32, i32) {
78 ret i1 false
79}
80
81define i1 @vf4b(i8*, i32, i32) {
82 ret i1 true
83}
84
85define i1 @vf4c(i8*, i32, i32) {
86 ret i1 false
87}
88
89!0 = !{i32 0, !"typeid3"}
90!1 = !{i32 0, !"typeid4"}