OSDN Git Service

PR target/20095
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / ppc-compare-1.c
1 /* { dg-do compile { target powerpc64-*-* } } */
2 /* { dg-require-effective-target lp64 } */
3 /* { dg-options "-O2" } */
4
5 /* { dg-final { scan-assembler-not "cmpw" } } */
6
7 /* Origin:Pete Steinmetz <steinmtz@us.ibm.com> */
8
9 /* PR 16458: Extraneous compare.  */
10
11 int foo (unsigned a, unsigned b)
12 {
13   if (a == b) return 1;
14   if (a > b)  return 2;
15   if (a < b)  return 3;
16   return 0;
17 }