aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/powerpc/pr16458-2.c
blob: 95e97de5560a92dc3123644b4872600183980514 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* Test cse'ing of unsigned compares.  */
/* { dg-do compile } */
/* { dg-options "-O2" } */

/* { dg-final { scan-assembler-not "cmpw" } } */
/* { dg-final { scan-assembler-times "cmplw" 1 } } */

unsigned int *a, *b;

int
foo (void)
{
  if (*a == *b) return 1;
  if (*a > *b)  return 2;
  if (*a < *b)  return 3;
  if (*a != *b) return 4;
  return 0;
}