1 /* { dg-do compile } */
2 /* { dg-options "-O3 -fdump-tree-ifcvt" } */
4 int foo1 (unsigned short a
[], unsigned int x
)
7 for (i
= 0; i
< 1000; i
++)
10 a
[i
] = (unsigned short)(x
<= 32768 ? x
+ 32768 : 0);
15 int foo2 (unsigned short a
[], unsigned int x
)
18 for (i
= 0; i
< 1000; i
++)
21 a
[i
] = (unsigned short)(x
< 32768 ? x
+ 32768 : 0);
26 int foo3 (unsigned short a
[], unsigned int x
)
29 for (i
= 0; i
< 1000; i
++)
32 a
[i
] = (unsigned short)(x
< 1000 ? x
- 1000 : 0);
37 int foo4 (unsigned short a
[], unsigned int x
)
40 for (i
= 0; i
< 1000; i
++)
43 a
[i
] = (unsigned short)(x
<= 2 ? x
+ 999 : 1001);
48 /* { dg-final { scan-tree-dump-times "MIN_EXPR " 4 "ifcvt" } } */