aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/powerpc/gcse-1.c
blob: 799cde1dd0e7fe7a74c5c15744366a7acd5dceb9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* { dg-do compile { target { *-*-linux* && ilp32 } } } */
/* { dg-options "-O2" } */
/* { dg-final { scan-assembler-times "@ha" 1 } } */


/* Test for PR 7003, address of array loaded int register
   twice without any need. */

extern const char flags [256];

unsigned char * f (unsigned char * s) {
  while (flags[*++s]);
  while (!flags[*++s]);
  return s;
}