1 /* PR tree-optimization/61839. */
2 /* { dg-do run } */
3 /* { dg-options "-O2 -fdump-tree-vrp1 -fdump-tree-optimized" } */
4
5 __attribute__ ((noinline))
foo(int a,unsigned b)6 int foo (int a, unsigned b)
7 {
8 int c = 1;
9 b = a ? 12 : 13;
10 c = b << 8;
11 if (c == 3072)
12 ;
13 else
14 __builtin_abort ();
15 return 0;
16 }
17
main()18 int main ()
19 {
20 volatile unsigned b = 1U;
21 foo (-1, b);
22 }
23
24 /* Scan for c [12, 13] << 8 in function foo. */
25 /* { dg-final { scan-tree-dump-times "3072 : 3328" 2 "vrp1" } } */
26 /* { dg-final { scan-tree-dump-times "3072" 0 "optimized" } } */
27