1 /* Check that a comparison 'unsigned int <= 0x7FFFFFFF' results in code
2 utilizing the cmp/pz instruction. */
3 /* { dg-do compile } */
4 /* { dg-options "-O1" } */
5 /* { dg-final { scan-assembler-not "not\[ \t\]" } } */
6 /* { dg-final { scan-assembler-times "cmp/pz" 7 } } */
7 /* { dg-final { scan-assembler-times "shll" 1 } } */
8 /* { dg-final { scan-assembler-times "movt" 4 } } */
11 test_00 (unsigned int a
)
13 return !(a
> 0x7FFFFFFF);
17 test_01 (unsigned int a
)
19 return !(a
> 0x7FFFFFFF) ? -5 : 10;
23 test_02 (unsigned int a
)
25 /* 1x shll, 1x movt */
26 return a
>= 0x80000000;
30 test_03 (unsigned int a
)
32 return a
>= 0x80000000 ? -5 : 10;
36 test_04 (unsigned int a
)
38 return a
<= 0x7FFFFFFF;
42 test_05 (unsigned int a
)
44 return a
<= 0x7FFFFFFF ? -5 : 10;
48 test_06 (unsigned int a
)
50 return a
< 0x80000000;
54 test_07 (unsigned int a
)
56 return a
< 0x80000000 ? -5 : 10;