Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGen / 2002-02-14-EntryNodePreds.c
blob60d1104f96679ef5d212db54c6c44c09af9be26b
1 // RUN: %clang_cc1 -emit-llvm %s -o /dev/null
3 /* 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 */
8 struct edge_rec
10 struct VERTEX *v;
11 struct edge_rec *next;
12 int wasseen;
13 int more_data;
16 typedef struct edge_rec *QUAD_EDGE;
18 typedef struct {
19 QUAD_EDGE left, right;
20 } EDGE_PAIR;
22 struct EDGE_STACK {
23 int ptr;
24 QUAD_EDGE *elts;
25 int stack_size;
28 int 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;