]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.target/sparc/movcc-1.c
sparc.opt (msubxc): New option.
[thirdparty/gcc.git] / gcc / testsuite / gcc.target / sparc / movcc-1.c
1 /* { dg-do compile } */
2 /* { dg-options "-O2" } */
3
4 int foo1 (int a)
5 {
6 int b = a + 1;
7 if (b != 0)
8 return b;
9 return 1;
10 }
11
12 int foo2 (int a)
13 {
14 int b = a + 1;
15 if (b < 0)
16 return b;
17 return 1;
18 }
19
20 int foo3 (int a)
21 {
22 int b = a + 1;
23 if (b >= 0)
24 return b;
25 return 1;
26 }
27
28 /* { dg-final { scan-assembler "move\t%" } } */
29 /* { dg-final { scan-assembler "movpos\t%" } } */
30 /* { dg-final { scan-assembler "movneg\t%" } } */