PR tree-optimization/85826 - ICE in gimple-ssa-warn-restruct on
[official-gcc.git] / gcc / testsuite / gcc.dg / fold-notshift-2.c
blobf8aab2a005eada42aedc05dc9ecfc37c53c6863d
1 /* PR middle-end/55299 */
3 /* { dg-do compile } */
4 /* { dg-options "-O -fdump-tree-cddce1" } */
6 unsigned int
7 lsr (unsigned int a, unsigned int b)
9 return ~((~a) >> b);
12 int
13 sl (int a, int b)
15 return ~((~a) << b);
18 typedef unsigned __INT32_TYPE__ uint32_t;
19 typedef __INT64_TYPE__ int64_t;
21 int64_t
22 asr_widen1 (uint32_t a, int b)
24 return ~((int64_t)(~a) >> b);
27 int64_t
28 asr_widen2 (uint32_t a, int b)
30 return ~(int64_t)(~a >> b);
33 /* { dg-final { scan-tree-dump-times "~" 8 "cddce1" } } */