1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdisable-tree-evrp -fdump-tree-thread-details-blocks-stats -fdump-tree-threadfull1-blocks-stats -fdump-tree-threadfull2-blocks-stats" } */
15 typedef unsigned char u8
;
16 typedef unsigned int u32
;
18 static u8
is_digit(u8 c
) {
19 return (u8
)((c
>='0') & (c
<='9')) ? 1 : 0;
22 enum STATES
FMS( u8
**in
, u32
*transitions
) {
25 enum STATES state
=START
;
26 for( ; *str
&& state
!= INVALID
; str
++ ) {
28 if (NEXT_SYMBOL
==',') /* end of this input */ {
35 if(is_digit(NEXT_SYMBOL
)) {
38 else if( NEXT_SYMBOL
== '+' || NEXT_SYMBOL
== '-' ) {
41 else if( NEXT_SYMBOL
== '.' ) {
50 if(is_digit(NEXT_SYMBOL
)) {
54 else if( NEXT_SYMBOL
== '.' ) {
64 if( NEXT_SYMBOL
== '.' ) {
68 else if(!is_digit(NEXT_SYMBOL
)) {
74 if( NEXT_SYMBOL
== 'E' || NEXT_SYMBOL
== 'e' ) {
76 transitions
[FLOAT
]++;
78 else if(!is_digit(NEXT_SYMBOL
)) {
80 transitions
[FLOAT
]++;
84 if( NEXT_SYMBOL
== '+' || NEXT_SYMBOL
== '-' ) {
94 if(is_digit(NEXT_SYMBOL
)) {
96 transitions
[EXPONENT
]++;
100 transitions
[EXPONENT
]++;
104 if(!is_digit(NEXT_SYMBOL
)) {
113 transitions
[INVALID
]++;
119 /* The profile is not updated perfectly because it is inconsitent from
120 profile estimation stage. But the number of inconsistencies should not
123 aarch64 has the highest CASE_VALUES_THRESHOLD in GCC. It's high enough
124 to change decisions in switch expansion which in turn can expose new
125 jump threading opportunities. Skip the later tests on aarch64. */
126 /* { dg-final { scan-tree-dump "Jumps threaded: \[7-9\]" "thread1" } } */
127 /* { dg-final { scan-tree-dump-not "optimizing for size" "thread1" } } */
128 /* { dg-final { scan-tree-dump-not "optimizing for size" "threadfull1" } } */
129 /* { dg-final { scan-tree-dump-not "optimizing for size" "thread2" { target { ! aarch64*-*-* } } } } */
130 /* { dg-final { scan-tree-dump-not "optimizing for size" "threadfull2" { target { ! aarch64*-*-* } } } } */