[RTL-ifcvt] Improve conditional select ops on immediates
[official-gcc.git] / gcc / testsuite / gcc.target / aarch64 / csel_imms_inc_1.c
blob2ae434da5a08f160050e07a6226cb21e70a99029
1 /* { dg-do run } */
2 /* { dg-options "-save-temps -O2 -fno-inline" } */
4 extern void abort (void);
6 int
7 fooinc (int x)
9 if (x)
10 return 1025;
11 else
12 return 1026;
15 int
16 fooinc2 (int x)
18 if (x)
19 return 1026;
20 else
21 return 1025;
24 int
25 main (void)
27 if (fooinc (0) != 1026)
28 abort ();
30 if (fooinc (1) != 1025)
31 abort ();
33 if (fooinc2 (0) != 1025)
34 abort ();
36 if (fooinc2 (1) != 1026)
37 abort ();
39 return 0;
42 /* { dg-final { scan-assembler-not "csel\tw\[0-9\]*.*" } } */