| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O2 -fno-tree-forwprop -fdump-tree-evrp-details" } */ |
| 3 |
|
| 4 |
void aa (void); |
| 5 |
void aos (void); |
| 6 |
void aob (void); |
| 7 |
|
| 8 |
void |
| 9 |
blah (int code1, int code2) |
| 10 |
{ |
| 11 |
int i; |
| 12 |
int n_sets; |
| 13 |
|
| 14 |
n_sets = (int) (code1 == 32); |
| 15 |
if (code2 == 64) goto L2; else goto L3; |
| 16 |
|
| 17 |
L2: |
| 18 |
aa (); |
| 19 |
|
| 20 |
L3: |
| 21 |
if (n_sets > 1) goto L4; else goto L10; |
| 22 |
|
| 23 |
L4: |
| 24 |
aos (); |
| 25 |
i = 0; |
| 26 |
goto L24; |
| 27 |
|
| 28 |
L10: |
| 29 |
if (n_sets > 0) goto L25; else goto L8; |
| 30 |
|
| 31 |
L25: |
| 32 |
i = 0; |
| 33 |
|
| 34 |
L24: |
| 35 |
aob (); |
| 36 |
i = i + 1; |
| 37 |
if (i < n_sets) goto L24; else goto L8; |
| 38 |
|
| 39 |
L8: |
| 40 |
return; |
| 41 |
} |
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
/* The n_sets > 0 test can be simplified into n_sets == 1 since the |
| 46 |
only way to reach the test is when n_sets <= 1, and the only value |
| 47 |
which satisfies both conditions is n_sets == 1. */ |
| 48 |
/* { dg-final { scan-tree-dump-times "Simplified relational" 1 "evrp" } } */ |
| 49 |
|