Debian Codegraph @

gcc/testsuite/gcc.target/vax/compare-add-zero.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "" } */
3
4 int
5 compare_add (int x, int y)
6 {
7 int z;
8
9 z = x + y;
10 if (z < 0)
11 return z;
12 else
13 return z + 2;
14 }
15
16 /* Expect assembly like:
17
18 addl3 4(%ap),8(%ap),%r0
19 jlss .L1
20 addl2 $2,%r0
21 .L1:
22
23 A reverse branch may be used at some optimization levels. */
24
25 /* Make sure the comparison is made against 0 rather than -1. */
26 /* { dg-final { scan-assembler-not "\tj(gtr|leq) " } } */
27 /* { dg-final { scan-assembler "\tj(geq|lss) " } } */