1 /* PR tree-optimization/54579
4 /* { dg-do compile } */
5 /* { dg-options "-O -fdump-tree-cddce1" } */
14 asr1l (long a
, long b
)
20 asr_conv (unsigned a
, unsigned b
)
22 return ~((int)~a
>> b
);
26 asr_conv2 (unsigned a
, unsigned b
)
28 return ~(unsigned)((int)~a
>> b
);
32 asr_conv3 (int a
, int b
)
34 return ~(unsigned)(~a
>> b
);
37 typedef __INT32_TYPE__
int32_t;
38 typedef __INT64_TYPE__
int64_t;
41 asr_conv4 (int64_t a
, int b
)
43 return ~((int32_t)~a
>> b
);
47 asr_conv5 (int64_t a
, int b
)
49 return ~(int32_t)(~a
>> b
);
55 return -((-a
- 1) >> b
) - 1;
61 return a
< 0 ? ~((~a
) >> b
) : a
>> b
;
65 asr3l (int64_t a
, int b
)
67 return a
< 0 ? ~((~a
) >> b
) : a
>> b
;
73 return a
< 0 ? -((-a
- 1) >> b
) - 1 : a
>> b
;
76 /* { dg-final { scan-tree-dump-times ">>" 11 "cddce1" } } */
77 /* { dg-final { scan-tree-dump-not "~" "cddce1" } } */