PR testsuite/52641
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr31261.c
blob42bd2a21ef3483fd68043565d0aec0d9532b4829
1 /* PR tree-optimization/31261 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fdump-tree-original" } */
5 unsigned int
6 f1 (unsigned int a)
8 return (8 - (a & 7)) & 7;
11 long int
12 f2 (long int b)
14 return (16 + (b & 7)) & 15;
17 char
18 f3 (char c)
20 return -(c & 63) & 31;
23 int
24 f4 (int d)
26 return (12 - (d & 15)) & 7;
29 int
30 f5 (int e)
32 return (12 - (e & 7)) & 15;
35 /* { dg-final { scan-tree-dump-times "return -a \& 7;" 1 "original" } } */
36 /* { dg-final { scan-tree-dump-times "return b \& 7;" 1 "original" } } */
37 /* { dg-final { scan-tree-dump-times "return \\(char\\) -\\(unsigned char\\) c \& 31;" 1 "original" } } */
38 /* { dg-final { scan-tree-dump-times "return \\(int\\) \\(12 - \\(unsigned int\\) d\\) \& 7;" 1 "original" } } */
39 /* { dg-final { scan-tree-dump-times "return 12 - \\(e \& 7\\) \& 15;" 1 "original" } } */
40 /* { dg-final { cleanup-tree-dump "original" } } */