1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-dom1-details" } */
3 /* { dg-additional-options "-mbranch-cost=2" { target s390*-*-* } } */
4 struct bitmap_head_def;
5 typedef struct bitmap_head_def *bitmap;
6 typedef const struct bitmap_head_def *const_bitmap;
7 typedef unsigned long BITMAP_WORD;
8 typedef struct bitmap_element_def
10 struct bitmap_element_def *next;
23 bitmap_ior_and_compl (bitmap dst, const_bitmap a, const_bitmap b,
26 unsigned char changed = 0;
28 bitmap_element *dst_elt;
29 const bitmap_element *a_elt, *b_elt, *kill_elt, *dst_prev;
31 while (a_elt || b_elt)
33 unsigned char new_element = 0;
36 while (kill_elt && kill_elt->indx < b_elt->indx)
37 kill_elt = kill_elt->next;
39 if (b_elt && kill_elt && kill_elt->indx == b_elt->indx
40 && (!a_elt || a_elt->indx >= b_elt->indx))
42 bitmap_element tmp_elt;
47 changed = bitmap_elt_ior (dst, dst_elt, dst_prev,
48 a_elt, &tmp_elt, changed);
57 /* The block starting the second conditional has 3 incoming edges,
58 we should thread all three, but due to a bug in the threading
59 code we missed the edge when the first conditional is false
60 (b_elt is zero, which means the second conditional is always
62 /* { dg-final { scan-tree-dump-times "Threaded" 3 "dom1" { target { ! mips*-*-* } } } } */
63 /* MIPS defines LOGICAL_OP_NON_SHORT_CIRCUIT to 0, so we split var1 || var2
64 into two conditions, rather than use (var1 != 0) | (var2 != 0). */
65 /* { dg-final { scan-tree-dump-times "Threaded" 4 "dom1" { target mips*-*-* } } } */
66 /* { dg-final { cleanup-tree-dump "dom1" } } */