Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/imm_choice_comparison-1.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2" } */
3 /* { dg-final { check-function-bodies "**" "" } } */
4
5 /* PR target/117346 */
6 /* Make sure going through ccmp uses similar to non ccmp-case. */
7 /* This is similar to imm_choice_comparison.c's check except to force
8 the use of ccmp by reording the comparison and putting the cast before. */
9
10 /*
11 ** check:
12 ** ...
13 ** mov w[0-9]+, -16777217
14 ** ...
15 */
16
17 int
18 check (int x, int y)
19 {
20 unsigned xu = x;
21 if (xu > 0xfefffffe && x > y)
22 return 100;
23
24 return x;
25 }
26
27 /*
28 ** check1:
29 ** ...
30 ** mov w[0-9]+, -16777217
31 ** ...
32 */
33
34 int
35 check1 (int x, int y)
36 {
37 unsigned xu = x;
38 if (x > y && xu > 0xfefffffe)
39 return 100;
40
41 return x;
42 }