* expmed.h (canonicalize_comparison): New declaration.
[official-gcc.git] / gcc / testsuite / gcc.target / aarch64 / imm_choice_comparison.c
blobebc44d6dbc7287d907603d77d7b54496de177c4b
1 /* { dg-do compile } */
2 /* { dg-options "-O2" } */
4 /* Go from four moves to two. */
6 int
7 foo (long long x)
9 return x <= 0x1999999999999998;
12 int
13 GT (unsigned int x)
15 return x > 0xfefffffe;
18 int
19 LE (unsigned int x)
21 return x <= 0xfefffffe;
24 int
25 GE (long long x)
27 return x >= 0xff000000;
30 int
31 LT (int x)
33 return x < 0xff000000;
36 /* Optimize the immediate in conditionals. */
38 int
39 check (int x, int y)
41 if (x > y && GT (x))
42 return 100;
44 return x;
47 int
48 tern (int x)
50 return x >= 0xff000000 ? 5 : -3;
53 /* baz produces one movk instruction. */
54 /* { dg-final { scan-assembler-times "movk" 1 } } */