1 /* Check that displacement addressing is used for indexed addresses with a
2 small offset, instead of re-calculating the index and that the movu.w
3 instruction is used on SH2A. */
4 /* { dg-do compile { target { sh2a } } } */
5 /* { dg-options "-O2" } */
6 /* { dg-final { scan-assembler-not "add\t#1" } } */
7 /* { dg-final { scan-assembler "movu.w" } } */
8
9 int
10 test_00 (unsigned short tab[], int index)
11 {
12 return tab[index + 1];
13 }