| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O2 -fno-delayed-branch" } */ |
| 3 |
/* In this test we want to verify that combine canonicalizes the |
| 4 |
MULT into an ASHIFT which in turn allows postreload-gcse to |
| 5 |
find the common subexpression. |
| 6 |
|
| 7 |
Neither pass dumps stuff in a format that is particularly good |
| 8 |
for parsing here, so we count the shadd insns. More is not |
| 9 |
necessarily better in this test. If this test is too fragile |
| 10 |
over time we'll have to revisit the combine and/or postreload |
| 11 |
dumps. Note we have disabled delay slot filling to improve |
| 12 |
test stability. */ |
| 13 |
/* { dg-final { scan-assembler-times "sh.add" 4 } } */ |
| 14 |
|
| 15 |
extern void oof (void); |
| 16 |
typedef struct simple_bitmap_def *sbitmap; |
| 17 |
struct simple_bitmap_def |
| 18 |
{ |
| 19 |
unsigned char *popcount; |
| 20 |
unsigned int n_bits; |
| 21 |
unsigned long elms[1]; |
| 22 |
}; |
| 23 |
__inline__ void |
| 24 |
SET_BIT (sbitmap map, unsigned int bitno) |
| 25 |
{ |
| 26 |
if (map->popcount) |
| 27 |
{ |
| 28 |
unsigned char oldbit; |
| 29 |
oldbit = |
| 30 |
((map)->elms[bitno / 64]); |
| 31 |
if (!oldbit) |
| 32 |
oof (); |
| 33 |
} |
| 34 |
map->elms[bitno / 64] |= 1; |
| 35 |
} |
| 36 |
|
| 37 |
void |
| 38 |
fix_bb_placements (int indx1, int indx2, sbitmap in_queue) |
| 39 |
{ |
| 40 |
SET_BIT (in_queue, indx1); |
| 41 |
SET_BIT (in_queue, indx2); |
| 42 |
} |