Debian Codegraph @

gcc/testsuite/gcc.target/sh/pr51697.c

raw
1 /* Check that DImode comparisons are optimized as expected when compiling
2 with -Os. */
3 /* { dg-do compile } */
4 /* { dg-options "-Os" } */
5 /* { dg-final { scan-assembler-times "tst" 2 } } */
6 /* { dg-final { scan-assembler-not "cmp" } } */
7
8 int
9 test_00 (long long* x)
10 {
11 /* 1x tst, no cmp/* insns. */
12 return *x & 0xFFFFFFFF ? -20 : -40;
13 }
14
15 int
16 test_01 (unsigned long long x)
17 {
18 /* 1x tst, no cmp/* insns. */
19 return x >= 0x100000000LL ? -20 : -40;
20 }