2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
[official-gcc.git] / gcc / testsuite / gcc.target / sh / pr51244-9.c
blobaf8a465846092572fb5e7f8c5bc445e7149d6fce
1 /* Check that compare-branch is inverted properly.
2 Example:
3 mov.w .L566,r2 -> mov.w .L566,r2
4 add r11,r2 add r11,r2
5 mov.l @(12,r2),r7 mov.l @(8,r2),r5
6 mov.l @(8,r2),r5 mov.l @(12,r2),r2
7 mov #0,r2 tst r2,r2
8 cmp/hi r2,r7 bt .L534
9 bf .L534
11 /* { dg-do compile } */
12 /* { dg-options "-O2" } */
13 /* { dg-final { scan-assembler-not "mov\t#0" } } */
14 static inline unsigned int
15 test_03_00 (unsigned int x)
17 /* Return unassigned value on purpose. */
18 unsigned int res;
19 return res;
22 struct S
24 unsigned int a;
25 unsigned int b;
28 int test_03 (struct S* i)
30 if ((i->a != 2 && i->a != 3) || i->a > test_03_00 (i->b))
31 return -5;
33 return -55;