Debian Codegraph @

gcc/testsuite/gcc.target/i386/pr94802.c

raw
1 /* PR tree-optimization/94802 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -masm=att" } */
4 /* { dg-final { scan-assembler-not "\ttestl\t" } } */
5 /* { dg-final { scan-assembler-times "\tcmpl\t" 8 } } */
6
7 void foo (void);
8
9 int
10 f1 (int a, int b)
11 {
12 return (a - b) >= 0;
13 }
14
15 int
16 f2 (int a, int b)
17 {
18 return (a - b) > 0;
19 }
20
21 int
22 f3 (int a, int b)
23 {
24 return (a - b) <= 0;
25 }
26
27 int
28 f4 (int a, int b)
29 {
30 return (a - b) < 0;
31 }
32
33 void
34 f5 (int a, int b)
35 {
36 if ((a - b) >= 0)
37 foo ();
38 }
39
40 void
41 f6 (int a, int b)
42 {
43 if ((a - b) > 0)
44 foo ();
45 }
46
47 void
48 f7 (int a, int b)
49 {
50 if ((a - b) <= 0)
51 foo ();
52 }
53
54 void
55 f8 (int a, int b)
56 {
57 if ((a - b) < 0)
58 foo ();
59 }