blob: 962d982059ad7e96ba0e5d2b2b9d9d733ecb8efc [file] [log] [blame]
/* Check that displacement addressing is used for indexed addresses with a
small offset, instead of re-calculating the index and that the movu.w
instruction is used on SH2A. */
/* { dg-do compile { target { sh2a } } } */
/* { dg-options "-O2" } */
/* { dg-final { scan-assembler-not "add\t#1" } } */
/* { dg-final { scan-assembler "movu.w" } } */
int
test_00 (unsigned short tab[], int index)
{
return tab[index + 1];
}