blob: f1e01515fd77f3f5e6fe4a9b784364741d0cfbaf [file] [log] [blame]
Tanya Lattnere9af5d12004-11-06 22:41:00 +00001// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
2
Chris Lattnercbc98eb2002-03-14 19:31:32 +00003/* GCC Used to generate code that contained a branch to the entry node of
4 * the do_merge function. This is illegal LLVM code. To fix this, GCC now
5 * inserts an entry node regardless of whether or not it has to insert allocas.
6 */
7
8struct edge_rec
9{
10 struct VERTEX *v;
11 struct edge_rec *next;
12 int wasseen;
13 int more_data;
14};
15
16typedef struct edge_rec *QUAD_EDGE;
17
18typedef struct {
19 QUAD_EDGE left, right;
20} EDGE_PAIR;
21
22struct EDGE_STACK {
23 int ptr;
24 QUAD_EDGE *elts;
25 int stack_size;
26};
27
28int do_merge(QUAD_EDGE ldo, QUAD_EDGE rdo) {
29 int lvalid;
30 QUAD_EDGE basel,rcand;
31 while (1) {
32 if (!lvalid) {
33 return (int)basel->next;
34 }
35 }
36}
37