Merge from trunk
[official-gcc.git] / gcc / testsuite / gcc.target / sh / pr51697.c
blobd63e329bff94cbd9729e826068f79b82b1cfc3d8
1 /* Check that DImode comparisons are optimized as expected when compiling
2 with -Os. */
3 /* { dg-do compile } */
4 /* { dg-options "-Os" } */
5 /* { dg-skip-if "" { "sh*-*-*" } { "-m5*"} { "" } } */
6 /* { dg-final { scan-assembler-times "tst" 2 } } */
7 /* { dg-final { scan-assembler-not "cmp" } } */
9 int
10 test_00 (long long* x)
12 /* 1x tst, no cmp/* insns. */
13 return *x & 0xFFFFFFFF ? -20 : -40;
16 int
17 test_01 (unsigned long long x)
19 /* 1x tst, no cmp/* insns. */
20 return x >= 0x100000000LL ? -20 : -40;