blob: 174a573b5b0de9b6a82154b64ae0954d19bf7d17 [file] [log] [blame]
Peter Collingbourne59675ba2017-03-10 20:09:11 +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: - TypeTests:
5; SUMMARY-NEXT: TypeTestAssumeVCalls:
6
7; SUMMARY: TypeIdMap:
8; SUMMARY-NEXT: typeid3:
9; SUMMARY-NEXT: TTRes:
10; SUMMARY-NEXT: Kind: Unsat
11; SUMMARY-NEXT: SizeM1BitWidth: 0
12; SUMMARY-NEXT: WPDRes:
13; SUMMARY-NEXT: 0:
14; SUMMARY-NEXT: Kind: Indir
15; SUMMARY-NEXT: SingleImplName: ''
16; SUMMARY-NEXT: ResByArg:
17; SUMMARY-NEXT: 12,24:
18; SUMMARY-NEXT: Kind: UniqueRetVal
19; SUMMARY-NEXT: Info: 0
20; SUMMARY-NEXT: typeid4:
21; SUMMARY-NEXT: TTRes:
22; SUMMARY-NEXT: Kind: Unsat
23; SUMMARY-NEXT: SizeM1BitWidth: 0
24; SUMMARY-NEXT: WPDRes:
25; SUMMARY-NEXT: 0:
26; SUMMARY-NEXT: Kind: Indir
27; SUMMARY-NEXT: SingleImplName: ''
28; SUMMARY-NEXT: ResByArg:
29; SUMMARY-NEXT: 24,12:
30; SUMMARY-NEXT: Kind: UniqueRetVal
31; SUMMARY-NEXT: Info: 1
32
33; CHECK: @vt3a = constant i1 (i8*, i32, i32)* @vf3a
34@vt3a = constant i1 (i8*, i32, i32)* @vf3a, !type !0
35
36; CHECK: @vt3b = constant i1 (i8*, i32, i32)* @vf3b
37@vt3b = constant i1 (i8*, i32, i32)* @vf3b, !type !0
38
39; CHECK: @vt3c = constant i1 (i8*, i32, i32)* @vf3c
40@vt3c = constant i1 (i8*, i32, i32)* @vf3c, !type !0
41
42; CHECK: @vt4a = constant i1 (i8*, i32, i32)* @vf4a
43@vt4a = constant i1 (i8*, i32, i32)* @vf4a, !type !1
44
45; CHECK: @vt4b = constant i1 (i8*, i32, i32)* @vf4b
46@vt4b = constant i1 (i8*, i32, i32)* @vf4b, !type !1
47
48; CHECK: @vt4c = constant i1 (i8*, i32, i32)* @vf4c
49@vt4c = constant i1 (i8*, i32, i32)* @vf4c, !type !1
50
51; CHECK: @__typeid_typeid3_0_12_24_unique_member = hidden alias i8, bitcast (i1 (i8*, i32, i32)** @vt3b to i8*)
52; CHECK: @__typeid_typeid4_0_24_12_unique_member = hidden alias i8, bitcast (i1 (i8*, i32, i32)** @vt4b to i8*)
53
54define i1 @vf3a(i8*, i32, i32) {
55 ret i1 true
56}
57
58define i1 @vf3b(i8*, i32, i32) {
59 ret i1 false
60}
61
62define i1 @vf3c(i8*, i32, i32) {
63 ret i1 true
64}
65
66define i1 @vf4a(i8*, i32, i32) {
67 ret i1 false
68}
69
70define i1 @vf4b(i8*, i32, i32) {
71 ret i1 true
72}
73
74define i1 @vf4c(i8*, i32, i32) {
75 ret i1 false
76}
77
78!0 = !{i32 0, !"typeid3"}
79!1 = !{i32 0, !"typeid4"}