Debian Codegraph @

gcc/testsuite/gcc.target/i386/dec-cmov-2.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2" } */
3 /* { dg-additional-options "-march=core2 -mregparm=3" { target ia32 } } */
4
5 int foo(int x)
6 {
7 x--;
8 if (x == -1)
9 x = 16;
10 return x;
11 }
12
13 int bar(int x)
14 {
15 if (x == 0)
16 x = 16;
17 else x--;
18 return x;
19 }
20
21 #ifdef __x86_64__
22 long long fool(long long x)
23 {
24 x--;
25 if (x == -1)
26 x = 16;
27 return x;
28 }
29
30 long long barl(long long x)
31 {
32 if (x == 0)
33 x = 16;
34 else x--;
35 return x;
36 }
37 #endif
38
39 short foos(short x)
40 {
41 x--;
42 if (x == -1)
43 x = 16;
44 return x;
45 }
46
47 short bars(short x)
48 {
49 if (x == 0)
50 x = 16;
51 else x--;
52 return x;
53 }
54
55 /* { dg-final { scan-assembler-not "lea(l|q)" } } */
56 /* { dg-final { scan-assembler-not "test(l|q|w)" } } */
57