Skip to content

Commit 9b1dea1

Browse files
dhoekwatercopybara-github
authored andcommitted
Add testdata for a function with two conditionals that eventually join
PiperOrigin-RevId: 696656402
1 parent 6b42b73 commit 9b1dea1

File tree

2 files changed

+94
-0
lines changed

2 files changed

+94
-0
lines changed

propeller/testdata/BUILD

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ exports_files([
4646
"sample.bin",
4747
"sample.c",
4848
"sample_section.bin",
49+
"simple_conditionals_join.protobuf",
4950
"test_comdat.h",
5051
"test_comdat_1.cc",
5152
"test_comdat_2.cc",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
## CFG consisting of a function with two conditionals which eventually join on
2+
## a single return basic block. In addition, size of foo.2 is zero.
3+
##
4+
## foo
5+
## | \
6+
## | \110
7+
## | \
8+
## | v
9+
## 150| foo.1
10+
## | / \
11+
## | /100 \10
12+
## | / \
13+
## v v v
14+
## foo.2 foo.3
15+
## \ /
16+
## \ /
17+
## 250 \ /10
18+
## \ /
19+
## v v
20+
## foo.4
21+
22+
cfg {
23+
name: "foo"
24+
function_index: 10
25+
node {
26+
bb_id: 0
27+
size: 10
28+
out_edges {
29+
sink {
30+
function_index: 10
31+
bb_index: 1
32+
}
33+
weight: 110
34+
kind: BRANCH_OR_FALLTHROUGH
35+
}
36+
out_edges {
37+
sink {
38+
function_index: 10
39+
bb_index: 2
40+
}
41+
weight: 150
42+
kind: BRANCH_OR_FALLTHROUGH
43+
}
44+
}
45+
node {
46+
bb_id: 1
47+
size: 4
48+
out_edges {
49+
sink {
50+
function_index: 10
51+
bb_index: 2
52+
}
53+
weight: 100
54+
kind: BRANCH_OR_FALLTHROUGH
55+
}
56+
out_edges {
57+
sink {
58+
function_index: 10
59+
bb_index: 3
60+
}
61+
weight: 10
62+
kind: BRANCH_OR_FALLTHROUGH
63+
}
64+
}
65+
node {
66+
bb_id: 2
67+
size: 0
68+
out_edges {
69+
sink {
70+
function_index: 10
71+
bb_index: 4
72+
}
73+
weight: 250
74+
kind: BRANCH_OR_FALLTHROUGH
75+
}
76+
}
77+
node {
78+
bb_id: 3
79+
size: 2
80+
out_edges {
81+
sink {
82+
function_index: 10
83+
bb_index: 4
84+
}
85+
weight: 10
86+
kind: BRANCH_OR_FALLTHROUGH
87+
}
88+
}
89+
node {
90+
bb_id: 4
91+
size: 2
92+
}
93+
}

0 commit comments

Comments
 (0)