Imported Upstream version 4.8.1
[platform/upstream/gcc48.git] / gcc / testsuite / gcc.target / powerpc / pr16458-2.c
1 /* Test cse'ing of unsigned compares.  */
2 /* { dg-do compile } */
3 /* { dg-options "-O2" } */
4
5 /* { dg-final { scan-assembler-not "cmpw" } } */
6 /* { dg-final { scan-assembler-times "cmplw" 1 } } */
7
8 unsigned int *a, *b;
9
10 int
11 foo (void)
12 {
13   if (*a == *b) return 1;
14   if (*a > *b)  return 2;
15   if (*a < *b)  return 3;
16   if (*a != *b) return 4;
17   return 0;
18 }