Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/cmpimm_cset_1.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-save-temps -O2" } */
3
4 /* Test that we emit a sub+subs sequence rather than mov+movk+cmp. */
5
6 int
7 foo (int x)
8 {
9 return x == 0x123456;
10 }
11
12 long long
13 fool (long long x)
14 {
15 return x == 0x123456;
16 }
17
18 /* { dg-final { scan-assembler-not "cmp\tw\[0-9\]*.*" } } */
19 /* { dg-final { scan-assembler-not "cmp\tx\[0-9\]*.*" } } */
20 /* { dg-final { scan-assembler-times "sub\tw\[0-9\]+.*" 1 } } */
21 /* { dg-final { scan-assembler-times "sub\tx\[0-9\]+.*" 1 } } */
22 /* { dg-final { scan-assembler-times "subs\tw\[0-9\]+.*" 1 } } */
23 /* { dg-final { scan-assembler-times "subs\tx\[0-9\]+.*" 1 } } */